@amazon/vinyl 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +15 -4
- package/dist/index.js.map +3 -3
- package/dist/test/integ.es5.js +43 -43
- package/dist/test/integ.js +70 -2
- package/dist/test/integ.js.map +2 -2
- package/dist/types/current/ad/AdBreakInfo.d.ts +160 -0
- package/dist/types/current/ad/AdBreakInfo.d.ts.map +1 -0
- package/dist/types/current/ad/AdBreakInfo.js +5 -0
- package/dist/types/current/ad/AdController.d.ts +229 -0
- package/dist/types/current/ad/AdController.d.ts.map +1 -0
- package/dist/types/current/ad/AdController.js +19 -0
- package/dist/types/current/ad/AdControllerImpl.d.ts +146 -0
- package/dist/types/current/ad/AdControllerImpl.d.ts.map +1 -0
- package/dist/types/current/ad/AdControllerImpl.js +705 -0
- package/dist/types/current/ad/AdError.d.ts +6 -0
- package/dist/types/current/ad/AdError.d.ts.map +1 -0
- package/dist/types/current/ad/AdError.js +14 -0
- package/dist/types/current/ad/AdsProvider.d.ts +28 -0
- package/dist/types/current/ad/AdsProvider.d.ts.map +1 -0
- package/dist/types/current/ad/AdsProvider.js +5 -0
- package/dist/types/current/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
- package/dist/types/current/ad/defaultAdLoadOptionsResolver.d.ts.map +1 -0
- package/dist/types/current/ad/defaultAdLoadOptionsResolver.js +26 -0
- package/dist/types/current/ad/discoverHlsInterstitials.d.ts +22 -0
- package/dist/types/current/ad/discoverHlsInterstitials.d.ts.map +1 -0
- package/dist/types/current/ad/discoverHlsInterstitials.js +246 -0
- package/dist/types/current/drm/DrmControllerImpl.d.ts.map +1 -1
- package/dist/types/current/drm/DrmControllerImpl.js +11 -1
- package/dist/types/current/playback/PlaybackControllerImpl.d.ts +1 -1
- package/dist/types/current/streaming/AudioOptions.d.ts +39 -0
- package/dist/types/current/streaming/AudioOptions.d.ts.map +1 -0
- package/dist/types/current/streaming/AudioOptions.js +15 -0
- package/dist/types/current/streaming/LoadMetric.d.ts +58 -0
- package/dist/types/current/streaming/LoadMetric.d.ts.map +1 -0
- package/dist/types/current/streaming/LoadMetric.js +5 -0
- package/dist/types/current/streaming/ManifestControllerImpl.d.ts +43 -0
- package/dist/types/current/streaming/ManifestControllerImpl.d.ts.map +1 -0
- package/dist/types/current/streaming/ManifestControllerImpl.js +104 -0
- package/dist/types/current/streaming/buffering/codecDenylist.d.ts +23 -0
- package/dist/types/current/streaming/buffering/codecDenylist.d.ts.map +1 -0
- package/dist/types/current/streaming/buffering/codecDenylist.js +62 -0
- package/dist/types/current/streaming/createAllowedContentTypesValue.d.ts +30 -0
- package/dist/types/current/streaming/createAllowedContentTypesValue.d.ts.map +1 -0
- package/dist/types/current/streaming/createAllowedContentTypesValue.js +43 -0
- package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
- package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.d.ts.map +1 -0
- package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.js +75 -0
- package/dist/types/current/text/HtmlTextTrackRenderer.d.ts +60 -0
- package/dist/types/current/text/HtmlTextTrackRenderer.d.ts.map +1 -0
- package/dist/types/current/text/HtmlTextTrackRenderer.js +231 -0
- package/dist/types/current/text/SidecarTextTrackController.d.ts +103 -0
- package/dist/types/current/text/SidecarTextTrackController.d.ts.map +1 -0
- package/dist/types/current/text/SidecarTextTrackController.js +250 -0
- package/dist/types/current/text/SidecarTextTrackLoader.d.ts +65 -0
- package/dist/types/current/text/SidecarTextTrackLoader.d.ts.map +1 -0
- package/dist/types/current/text/SidecarTextTrackLoader.js +150 -0
- package/dist/types/current/text/TextTrack.d.ts +179 -0
- package/dist/types/current/text/TextTrack.d.ts.map +1 -0
- package/dist/types/current/text/TextTrack.js +29 -0
- package/dist/types/current/text/TextTrackRenderer.d.ts +24 -0
- package/dist/types/current/text/TextTrackRenderer.d.ts.map +1 -0
- package/dist/types/current/text/TextTrackRenderer.js +5 -0
- package/dist/types/current/text/VttCueStyle.d.ts +41 -0
- package/dist/types/current/text/VttCueStyle.d.ts.map +1 -0
- package/dist/types/current/text/VttCueStyle.js +45 -0
- package/dist/types/current/text/discoverDashTextTracks.d.ts +24 -0
- package/dist/types/current/text/discoverDashTextTracks.d.ts.map +1 -0
- package/dist/types/current/text/discoverDashTextTracks.js +109 -0
- package/dist/types/current/text/discoverHlsTextTracks.d.ts +19 -0
- package/dist/types/current/text/discoverHlsTextTracks.d.ts.map +1 -0
- package/dist/types/current/text/discoverHlsTextTracks.js +49 -0
- package/dist/types/current/text/mediaTextTrackProvider.d.ts +34 -0
- package/dist/types/current/text/mediaTextTrackProvider.d.ts.map +1 -0
- package/dist/types/current/text/mediaTextTrackProvider.js +42 -0
- package/dist/types/current/text/parseWebVtt.d.ts +60 -0
- package/dist/types/current/text/parseWebVtt.d.ts.map +1 -0
- package/dist/types/current/text/parseWebVtt.js +248 -0
- package/dist/types/current/text/pickPreferredTextTrack.d.ts +15 -0
- package/dist/types/current/text/pickPreferredTextTrack.d.ts.map +1 -0
- package/dist/types/current/text/pickPreferredTextTrack.js +71 -0
- package/dist/types/current/track/SeekRange.d.ts +9 -0
- package/dist/types/current/track/SeekRange.d.ts.map +1 -0
- package/dist/types/current/track/SeekRange.js +5 -0
- package/dist/types/current/track/hls/HlsManifestData.d.ts +19 -0
- package/dist/types/current/track/hls/HlsManifestData.d.ts.map +1 -0
- package/dist/types/current/track/hls/HlsManifestData.js +5 -0
- package/dist/types/current/track/hls/createHlsManifestProvider.d.ts +6 -0
- package/dist/types/current/track/hls/createHlsManifestProvider.d.ts.map +1 -0
- package/dist/types/current/track/hls/createHlsManifestProvider.js +9 -0
- package/dist/types/current/track/inferLoadOptionsFromUri.d.ts +15 -0
- package/dist/types/current/track/inferLoadOptionsFromUri.d.ts.map +1 -0
- package/dist/types/current/track/inferLoadOptionsFromUri.js +55 -0
- package/dist/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/types/current/util/media/codecOverrides.d.ts +33 -0
- package/dist/types/current/util/media/codecOverrides.d.ts.map +1 -0
- package/dist/types/current/util/media/codecOverrides.js +37 -0
- package/dist/types/current/util/media/codecSupport.d.ts +6 -0
- package/dist/types/current/util/media/codecSupport.d.ts.map +1 -0
- package/dist/types/current/util/media/codecSupport.js +17 -0
- package/dist/types/current/util/media/mimeType.d.ts +8 -0
- package/dist/types/current/util/media/mimeType.d.ts.map +1 -0
- package/dist/types/current/util/media/mimeType.js +13 -0
- package/dist/types/ts3.7/ad/AdBreakInfo.d.ts +160 -0
- package/dist/types/ts3.7/ad/AdController.d.ts +243 -0
- package/dist/types/ts3.7/ad/AdControllerImpl.d.ts +146 -0
- package/dist/types/ts3.7/ad/AdError.d.ts +6 -0
- package/dist/types/ts3.7/ad/AdsProvider.d.ts +28 -0
- package/dist/types/ts3.7/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
- package/dist/types/ts3.7/ad/discoverHlsInterstitials.d.ts +22 -0
- package/dist/types/ts3.7/playback/PlaybackControllerImpl.d.ts +1 -1
- package/dist/types/ts3.7/streaming/AudioOptions.d.ts +39 -0
- package/dist/types/ts3.7/streaming/LoadMetric.d.ts +58 -0
- package/dist/types/ts3.7/streaming/ManifestControllerImpl.d.ts +40 -0
- package/dist/types/ts3.7/streaming/buffering/codecDenylist.d.ts +23 -0
- package/dist/types/ts3.7/streaming/createAllowedContentTypesValue.d.ts +30 -0
- package/dist/types/ts3.7/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
- package/dist/types/ts3.7/text/HtmlTextTrackRenderer.d.ts +60 -0
- package/dist/types/ts3.7/text/SidecarTextTrackController.d.ts +103 -0
- package/dist/types/ts3.7/text/SidecarTextTrackLoader.d.ts +65 -0
- package/dist/types/ts3.7/text/TextTrack.d.ts +183 -0
- package/dist/types/ts3.7/text/TextTrackRenderer.d.ts +24 -0
- package/dist/types/ts3.7/text/VttCueStyle.d.ts +41 -0
- package/dist/types/ts3.7/text/discoverDashTextTracks.d.ts +24 -0
- package/dist/types/ts3.7/text/discoverHlsTextTracks.d.ts +19 -0
- package/dist/types/ts3.7/text/mediaTextTrackProvider.d.ts +34 -0
- package/dist/types/ts3.7/text/parseWebVtt.d.ts +60 -0
- package/dist/types/ts3.7/text/pickPreferredTextTrack.d.ts +15 -0
- package/dist/types/ts3.7/track/SeekRange.d.ts +9 -0
- package/dist/types/ts3.7/track/hls/HlsManifestData.d.ts +19 -0
- package/dist/types/ts3.7/track/hls/createHlsManifestProvider.d.ts +6 -0
- package/dist/types/ts3.7/track/inferLoadOptionsFromUri.d.ts +15 -0
- package/dist/types/ts3.7/util/media/codecOverrides.d.ts +33 -0
- package/dist/types/ts3.7/util/media/codecSupport.d.ts +6 -0
- package/dist/types/ts3.7/util/media/mimeType.d.ts +8 -0
- package/dist/types/ts4.1/ad/AdBreakInfo.d.ts +160 -0
- package/dist/types/ts4.1/ad/AdController.d.ts +243 -0
- package/dist/types/ts4.1/ad/AdControllerImpl.d.ts +146 -0
- package/dist/types/ts4.1/ad/AdError.d.ts +6 -0
- package/dist/types/ts4.1/ad/AdsProvider.d.ts +28 -0
- package/dist/types/ts4.1/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
- package/dist/types/ts4.1/ad/discoverHlsInterstitials.d.ts +22 -0
- package/dist/types/ts4.1/playback/PlaybackControllerImpl.d.ts +1 -1
- package/dist/types/ts4.1/streaming/AudioOptions.d.ts +39 -0
- package/dist/types/ts4.1/streaming/LoadMetric.d.ts +58 -0
- package/dist/types/ts4.1/streaming/ManifestControllerImpl.d.ts +40 -0
- package/dist/types/ts4.1/streaming/buffering/codecDenylist.d.ts +23 -0
- package/dist/types/ts4.1/streaming/createAllowedContentTypesValue.d.ts +30 -0
- package/dist/types/ts4.1/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
- package/dist/types/ts4.1/text/HtmlTextTrackRenderer.d.ts +60 -0
- package/dist/types/ts4.1/text/SidecarTextTrackController.d.ts +104 -0
- package/dist/types/ts4.1/text/SidecarTextTrackLoader.d.ts +65 -0
- package/dist/types/ts4.1/text/TextTrack.d.ts +183 -0
- package/dist/types/ts4.1/text/TextTrackRenderer.d.ts +24 -0
- package/dist/types/ts4.1/text/VttCueStyle.d.ts +41 -0
- package/dist/types/ts4.1/text/discoverDashTextTracks.d.ts +24 -0
- package/dist/types/ts4.1/text/discoverHlsTextTracks.d.ts +19 -0
- package/dist/types/ts4.1/text/mediaTextTrackProvider.d.ts +34 -0
- package/dist/types/ts4.1/text/parseWebVtt.d.ts +60 -0
- package/dist/types/ts4.1/text/pickPreferredTextTrack.d.ts +15 -0
- package/dist/types/ts4.1/track/SeekRange.d.ts +9 -0
- package/dist/types/ts4.1/track/hls/HlsManifestData.d.ts +19 -0
- package/dist/types/ts4.1/track/hls/createHlsManifestProvider.d.ts +6 -0
- package/dist/types/ts4.1/track/inferLoadOptionsFromUri.d.ts +15 -0
- package/dist/types/ts4.1/util/media/codecOverrides.d.ts +33 -0
- package/dist/types/ts4.1/util/media/codecSupport.d.ts +6 -0
- package/dist/types/ts4.1/util/media/mimeType.d.ts +8 -0
- package/dist/types/ts4.7/ad/AdBreakInfo.d.ts +160 -0
- package/dist/types/ts4.7/ad/AdController.d.ts +243 -0
- package/dist/types/ts4.7/ad/AdControllerImpl.d.ts +146 -0
- package/dist/types/ts4.7/ad/AdError.d.ts +6 -0
- package/dist/types/ts4.7/ad/AdsProvider.d.ts +28 -0
- package/dist/types/ts4.7/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
- package/dist/types/ts4.7/ad/discoverHlsInterstitials.d.ts +22 -0
- package/dist/types/ts4.7/playback/PlaybackControllerImpl.d.ts +1 -1
- package/dist/types/ts4.7/streaming/AudioOptions.d.ts +39 -0
- package/dist/types/ts4.7/streaming/LoadMetric.d.ts +58 -0
- package/dist/types/ts4.7/streaming/ManifestControllerImpl.d.ts +43 -0
- package/dist/types/ts4.7/streaming/buffering/codecDenylist.d.ts +23 -0
- package/dist/types/ts4.7/streaming/createAllowedContentTypesValue.d.ts +30 -0
- package/dist/types/ts4.7/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
- package/dist/types/ts4.7/text/HtmlTextTrackRenderer.d.ts +60 -0
- package/dist/types/ts4.7/text/SidecarTextTrackController.d.ts +103 -0
- package/dist/types/ts4.7/text/SidecarTextTrackLoader.d.ts +65 -0
- package/dist/types/ts4.7/text/TextTrack.d.ts +183 -0
- package/dist/types/ts4.7/text/TextTrackRenderer.d.ts +24 -0
- package/dist/types/ts4.7/text/VttCueStyle.d.ts +41 -0
- package/dist/types/ts4.7/text/discoverDashTextTracks.d.ts +24 -0
- package/dist/types/ts4.7/text/discoverHlsTextTracks.d.ts +19 -0
- package/dist/types/ts4.7/text/mediaTextTrackProvider.d.ts +34 -0
- package/dist/types/ts4.7/text/parseWebVtt.d.ts +60 -0
- package/dist/types/ts4.7/text/pickPreferredTextTrack.d.ts +15 -0
- package/dist/types/ts4.7/track/SeekRange.d.ts +9 -0
- package/dist/types/ts4.7/track/hls/HlsManifestData.d.ts +19 -0
- package/dist/types/ts4.7/track/hls/createHlsManifestProvider.d.ts +6 -0
- package/dist/types/ts4.7/track/inferLoadOptionsFromUri.d.ts +15 -0
- package/dist/types/ts4.7/util/media/codecOverrides.d.ts +33 -0
- package/dist/types/ts4.7/util/media/codecSupport.d.ts +6 -0
- package/dist/types/ts4.7/util/media/mimeType.d.ts +8 -0
- package/dist/unit/types/current/ad/AdController.test.d.ts +2 -0
- package/dist/unit/types/current/ad/AdController.test.d.ts.map +1 -0
- package/dist/unit/types/current/ad/AdController.test.js +10 -0
- package/dist/unit/types/current/ad/AdControllerImpl.test.d.ts +2 -0
- package/dist/unit/types/current/ad/AdControllerImpl.test.d.ts.map +1 -0
- package/dist/unit/types/current/ad/AdControllerImpl.test.js +1456 -0
- package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.d.ts +2 -0
- package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.d.ts.map +1 -0
- package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.js +56 -0
- package/dist/unit/types/current/ad/discoverHlsInterstitials.test.d.ts +2 -0
- package/dist/unit/types/current/ad/discoverHlsInterstitials.test.d.ts.map +1 -0
- package/dist/unit/types/current/ad/discoverHlsInterstitials.test.js +756 -0
- package/dist/unit/types/current/drm/DrmControllerImpl.test.js +66 -1
- package/dist/unit/types/current/streaming/ManifestControllerImpl.test.d.ts +2 -0
- package/dist/unit/types/current/streaming/ManifestControllerImpl.test.d.ts.map +1 -0
- package/dist/unit/types/current/streaming/ManifestControllerImpl.test.js +197 -0
- package/dist/unit/types/current/streaming/buffering/codecDenylist.test.d.ts +2 -0
- package/dist/unit/types/current/streaming/buffering/codecDenylist.test.d.ts.map +1 -0
- package/dist/unit/types/current/streaming/buffering/codecDenylist.test.js +56 -0
- package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.d.ts +2 -0
- package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.d.ts.map +1 -0
- package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.js +77 -0
- package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.d.ts +2 -0
- package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.d.ts.map +1 -0
- package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.js +99 -0
- package/dist/unit/types/current/text/HtmlTextTrackRenderer.test.d.ts +2 -0
- package/dist/unit/types/current/text/HtmlTextTrackRenderer.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/HtmlTextTrackRenderer.test.js +231 -0
- package/dist/unit/types/current/text/SidecarTextTrackController.test.d.ts +2 -0
- package/dist/unit/types/current/text/SidecarTextTrackController.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/SidecarTextTrackController.test.js +686 -0
- package/dist/unit/types/current/text/SidecarTextTrackLoader.test.d.ts +2 -0
- package/dist/unit/types/current/text/SidecarTextTrackLoader.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/SidecarTextTrackLoader.test.js +365 -0
- package/dist/unit/types/current/text/VttCueStyle.test.d.ts +2 -0
- package/dist/unit/types/current/text/VttCueStyle.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/VttCueStyle.test.js +76 -0
- package/dist/unit/types/current/text/discoverDashTextTracks.test.d.ts +2 -0
- package/dist/unit/types/current/text/discoverDashTextTracks.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/discoverDashTextTracks.test.js +199 -0
- package/dist/unit/types/current/text/discoverHlsTextTracks.test.d.ts +2 -0
- package/dist/unit/types/current/text/discoverHlsTextTracks.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/discoverHlsTextTracks.test.js +177 -0
- package/dist/unit/types/current/text/mediaTextTrackProvider.test.d.ts +2 -0
- package/dist/unit/types/current/text/mediaTextTrackProvider.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/mediaTextTrackProvider.test.js +86 -0
- package/dist/unit/types/current/text/parseWebVtt.test.d.ts +2 -0
- package/dist/unit/types/current/text/parseWebVtt.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/parseWebVtt.test.js +393 -0
- package/dist/unit/types/current/text/pickPreferredTextTrack.test.d.ts +2 -0
- package/dist/unit/types/current/text/pickPreferredTextTrack.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/pickPreferredTextTrack.test.js +78 -0
- package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.d.ts +2 -0
- package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.d.ts.map +1 -0
- package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.js +165 -0
- package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/unit/types/current/util/media/codecOverrides.test.d.ts +2 -0
- package/dist/unit/types/current/util/media/codecOverrides.test.d.ts.map +1 -0
- package/dist/unit/types/current/util/media/codecOverrides.test.js +42 -0
- package/dist/unit/types/current/util/media/codecSupport.test.d.ts +2 -0
- package/dist/unit/types/current/util/media/codecSupport.test.d.ts.map +1 -0
- package/dist/unit/types/current/util/media/codecSupport.test.js +26 -0
- package/dist/unit/types/current/util/media/mimeType.test.d.ts +2 -0
- package/dist/unit/types/current/util/media/mimeType.test.d.ts.map +1 -0
- package/dist/unit/types/current/util/media/mimeType.test.js +22 -0
- package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.d.ts +2 -0
- package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.d.ts.map +1 -0
- package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.js +142 -0
- package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.d.ts +2 -0
- package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.d.ts.map +1 -0
- package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.js +188 -0
- package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.d.ts +15 -0
- package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.d.ts.map +1 -0
- package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.js +26 -0
- package/dist/vinylTestUtil/types/current/mock/dash/mockDashManifest.d.ts +84 -84
- package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.d.ts +10 -0
- package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.d.ts.map +1 -0
- package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.js +14 -0
- package/dist/vinylTestUtil/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/vinylTestUtil/types/ts3.7/mock/ad/MockAdController.d.ts +15 -0
- package/dist/vinylTestUtil/types/ts3.7/mock/dash/mockDashManifest.d.ts +84 -84
- package/dist/vinylTestUtil/types/ts3.7/mock/text/MockTextTrackController.d.ts +10 -0
- package/dist/vinylTestUtil/types/ts4.1/mock/ad/MockAdController.d.ts +15 -0
- package/dist/vinylTestUtil/types/ts4.1/mock/dash/mockDashManifest.d.ts +84 -84
- package/dist/vinylTestUtil/types/ts4.1/mock/text/MockTextTrackController.d.ts +10 -0
- package/dist/vinylTestUtil/types/ts4.7/mock/ad/MockAdController.d.ts +15 -0
- package/dist/vinylTestUtil/types/ts4.7/mock/dash/mockDashManifest.d.ts +84 -84
- package/dist/vinylTestUtil/types/ts4.7/mock/text/MockTextTrackController.d.ts +10 -0
- package/package.json +10 -11
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import type { ChangeEvent } from '../event/ChangeEvent';
|
|
2
|
+
import type { ReadonlyEventHost } from '@amazon/vinyl-util';
|
|
3
|
+
import type { AdBreakInfo, AdInfo, TrackAds } from './AdBreakInfo';
|
|
4
|
+
import type { AdsProvider } from './AdsProvider';
|
|
5
|
+
/**
|
|
6
|
+
* Events dispatched by an {@link AdController}. These are provider-agnostic:
|
|
7
|
+
* an application listens once and receives the same events whether the ads
|
|
8
|
+
* originate from HLS Interstitials or DASH SCTE-35.
|
|
9
|
+
*/
|
|
10
|
+
export interface AdEventMap {
|
|
11
|
+
/**
|
|
12
|
+
* Emitted when the set of known ad breaks for the current media changes,
|
|
13
|
+
* for example when a live manifest reveals a new break.
|
|
14
|
+
*/
|
|
15
|
+
readonly currentTrackAdsChange: ChangeEvent<TrackAds | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Dispatched when the playhead approaches a midroll or postroll break —
|
|
18
|
+
* within the break's resolution/preload window — so its ad assets can be
|
|
19
|
+
* resolved and warmed ahead of entry. Fires once per break as it is
|
|
20
|
+
* approached (again after a seek back re-arms a replayable break). Prerolls
|
|
21
|
+
* are preloaded up front and do not emit this.
|
|
22
|
+
*/
|
|
23
|
+
readonly adPreload: AdBreakEvent;
|
|
24
|
+
/**
|
|
25
|
+
* Dispatched when an ad break has been entered — its ads may still be
|
|
26
|
+
* resolving. An ad break may contain one or more ads.
|
|
27
|
+
*/
|
|
28
|
+
readonly adBreakEntered: AdBreakEvent;
|
|
29
|
+
/**
|
|
30
|
+
* Dispatched when the current ad break has completed: all of its ads
|
|
31
|
+
* played, were skipped, it hit its playout limit, or it had no ads. Carries
|
|
32
|
+
* the position at which primary content resumes.
|
|
33
|
+
*/
|
|
34
|
+
readonly adBreakCompleted: AdBreakCompleteEvent;
|
|
35
|
+
/**
|
|
36
|
+
* Dispatched when an ad region has been entered.
|
|
37
|
+
*/
|
|
38
|
+
readonly adEntered: AdEvent;
|
|
39
|
+
/**
|
|
40
|
+
* Dispatched when an ad has started playing.
|
|
41
|
+
*/
|
|
42
|
+
readonly adPlaying: AdEvent;
|
|
43
|
+
/**
|
|
44
|
+
* Dispatched on each playback progress tick while an ad is active, carrying
|
|
45
|
+
* the elapsed and remaining time for both the current ad and the whole ad
|
|
46
|
+
* break. Applications should prefer this over deriving ad timing from the
|
|
47
|
+
* media element's duration.
|
|
48
|
+
*/
|
|
49
|
+
readonly adTimeUpdate: AdTimeUpdateEvent;
|
|
50
|
+
/**
|
|
51
|
+
* Dispatched when an ad has played through 25%.
|
|
52
|
+
*/
|
|
53
|
+
readonly adFirstQuartile: AdProgressEvent;
|
|
54
|
+
/**
|
|
55
|
+
* Dispatched when an ad has played through 50%.
|
|
56
|
+
*/
|
|
57
|
+
readonly adMidpoint: AdProgressEvent;
|
|
58
|
+
/**
|
|
59
|
+
* Dispatched when an ad has played through 75%.
|
|
60
|
+
*/
|
|
61
|
+
readonly adThirdQuartile: AdProgressEvent;
|
|
62
|
+
/**
|
|
63
|
+
* Dispatched when an ad has played through 100%.
|
|
64
|
+
* Will be dispatched before adCompleted.
|
|
65
|
+
*/
|
|
66
|
+
readonly adEnded: AdProgressEvent;
|
|
67
|
+
/**
|
|
68
|
+
* Dispatched when an ad has stopped playing for any reason such as
|
|
69
|
+
* ended, error, or skipped.
|
|
70
|
+
*/
|
|
71
|
+
readonly adCompleted: AdCompleteEvent;
|
|
72
|
+
/**
|
|
73
|
+
* An ad list or an individual ad failed to complete.
|
|
74
|
+
*/
|
|
75
|
+
readonly adError: AdErrorEvent;
|
|
76
|
+
}
|
|
77
|
+
export interface AdErrorEvent {
|
|
78
|
+
/**
|
|
79
|
+
* The current ad break when the ad failed to load.
|
|
80
|
+
*/
|
|
81
|
+
readonly adBreak: AdBreakInfo;
|
|
82
|
+
/**
|
|
83
|
+
* If set, the error was from an individual ad.
|
|
84
|
+
* If not set, the failure was in loading the ad list.
|
|
85
|
+
*/
|
|
86
|
+
readonly currentAd: AdInfo | null;
|
|
87
|
+
/**
|
|
88
|
+
* The source error.
|
|
89
|
+
*/
|
|
90
|
+
readonly error: any;
|
|
91
|
+
}
|
|
92
|
+
export interface AdEvent {
|
|
93
|
+
/** The parent ad break */
|
|
94
|
+
readonly adBreak: AdBreakInfo;
|
|
95
|
+
/** The ad that triggered this event. */
|
|
96
|
+
readonly ad: AdInfo;
|
|
97
|
+
/** The zero-based position of this ad within its break. */
|
|
98
|
+
readonly index: number;
|
|
99
|
+
/** The total number of ads in this break. */
|
|
100
|
+
readonly totalAds: number;
|
|
101
|
+
}
|
|
102
|
+
export interface AdProgressEvent extends AdEvent {
|
|
103
|
+
/**
|
|
104
|
+
* The average continuous playback rate for the quartile.
|
|
105
|
+
* Typically, 1.0 unless playbackRate was altered.
|
|
106
|
+
*/
|
|
107
|
+
readonly playbackRateAvg: number;
|
|
108
|
+
}
|
|
109
|
+
export interface AdTimeUpdateEvent extends AdEvent {
|
|
110
|
+
/** Seconds the current ad has played. */
|
|
111
|
+
readonly adCurrentTime: number;
|
|
112
|
+
/**
|
|
113
|
+
* Seconds remaining in the current ad, or null when the ad's duration is
|
|
114
|
+
* unknown.
|
|
115
|
+
*/
|
|
116
|
+
readonly adTimeRemaining: number | null;
|
|
117
|
+
/**
|
|
118
|
+
* Seconds the current ad break has played, summed across all of its ads so
|
|
119
|
+
* far (including the current one).
|
|
120
|
+
*/
|
|
121
|
+
readonly breakCurrentTime: number;
|
|
122
|
+
/**
|
|
123
|
+
* Seconds remaining in the current ad break as a whole, or null when the
|
|
124
|
+
* break's total duration is unknown.
|
|
125
|
+
*/
|
|
126
|
+
readonly breakTimeRemaining: number | null;
|
|
127
|
+
/**
|
|
128
|
+
* Whether the current ad may be skipped right now — false while skipping is
|
|
129
|
+
* restricted or the break's skip window has not yet opened. Applications
|
|
130
|
+
* should gate their skip control on this.
|
|
131
|
+
*/
|
|
132
|
+
readonly canSkip: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Seconds until the ad becomes skippable, or null when there is no pending
|
|
135
|
+
* skip window (it is already skippable, or skipping is never offered).
|
|
136
|
+
*/
|
|
137
|
+
readonly skipIn: number | null;
|
|
138
|
+
}
|
|
139
|
+
export interface AdCompleteEvent extends AdEvent {
|
|
140
|
+
/** The current ad break. */
|
|
141
|
+
readonly adBreak: AdBreakInfo;
|
|
142
|
+
/** The reason the ad changed, e.g. 'ended' for completed naturally, or 'skipped' */
|
|
143
|
+
readonly reason: AdChangeReason;
|
|
144
|
+
}
|
|
145
|
+
export interface AdBreakEvent {
|
|
146
|
+
/** The ad break. */
|
|
147
|
+
readonly adBreak: AdBreakInfo;
|
|
148
|
+
}
|
|
149
|
+
export interface AdBreakCompleteEvent extends AdBreakEvent {
|
|
150
|
+
/**
|
|
151
|
+
* The absolute media-timeline position, in seconds, at which primary content
|
|
152
|
+
* resumes after this break. The controller has already resolved the break's
|
|
153
|
+
* resume offset and playout, so consumers use this position directly.
|
|
154
|
+
*/
|
|
155
|
+
readonly resumePosition: number;
|
|
156
|
+
/** The reason the ad break changed, e.g. 'ended' for completed naturally, or 'skipped' */
|
|
157
|
+
readonly reason: AdChangeReason;
|
|
158
|
+
}
|
|
159
|
+
export type AdChangeReason = 'ended' | 'skipped' | 'contentChange' | 'error';
|
|
160
|
+
export declare const ALL_AD_EVENTS: readonly [
|
|
161
|
+
"currentTrackAdsChange",
|
|
162
|
+
"adPreload",
|
|
163
|
+
"adBreakEntered",
|
|
164
|
+
"adBreakCompleted",
|
|
165
|
+
"adFirstQuartile",
|
|
166
|
+
"adEntered",
|
|
167
|
+
"adPlaying",
|
|
168
|
+
"adTimeUpdate",
|
|
169
|
+
"adMidpoint",
|
|
170
|
+
"adThirdQuartile",
|
|
171
|
+
"adEnded",
|
|
172
|
+
"adCompleted",
|
|
173
|
+
"adError"
|
|
174
|
+
];
|
|
175
|
+
/**
|
|
176
|
+
* Read-only view of the ad breaks for the current media and which break, if
|
|
177
|
+
* any, currently contains the playhead.
|
|
178
|
+
*/
|
|
179
|
+
export interface ReadonlyAdController extends ReadonlyEventHost<AdEventMap> {
|
|
180
|
+
/**
|
|
181
|
+
* The ad breaks known for the current media.
|
|
182
|
+
*/
|
|
183
|
+
readonly currentTrackAds: TrackAds | null;
|
|
184
|
+
/**
|
|
185
|
+
* The ad break currently containing the playhead, or null when the
|
|
186
|
+
* playhead is in primary content.
|
|
187
|
+
*/
|
|
188
|
+
readonly currentAdBreak: AdBreakInfo | null;
|
|
189
|
+
/**
|
|
190
|
+
* The ad currently playing within the active break, or null.
|
|
191
|
+
*/
|
|
192
|
+
readonly currentAd: AdInfo | null;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Tracks the ad breaks for the current media and reports when the playhead
|
|
196
|
+
* enters and exits them.
|
|
197
|
+
*
|
|
198
|
+
* The controller is deliberately agnostic of HLS/DASH discovery details: its
|
|
199
|
+
* input is a list of {@link AdBreakInfo} sourced from an {@link AdsProvider}
|
|
200
|
+
* (set via {@link setAdsProvider}); it derives the active break from the
|
|
201
|
+
* playhead by observing the playback controller.
|
|
202
|
+
*/
|
|
203
|
+
export interface AdController extends ReadonlyAdController {
|
|
204
|
+
/**
|
|
205
|
+
* Sets the source of ad breaks, or null when no source is active. A
|
|
206
|
+
* `ReadonlyTrack` satisfies {@link AdsProvider} directly, so the current
|
|
207
|
+
* playing track can be passed as-is.
|
|
208
|
+
*/
|
|
209
|
+
setAdsProvider(provider: AdsProvider | null): void;
|
|
210
|
+
/**
|
|
211
|
+
* Skips the entire active ad break, advancing past all remaining ads.
|
|
212
|
+
* No-op when no ad break is active.
|
|
213
|
+
*/
|
|
214
|
+
skipAdBreak(): void;
|
|
215
|
+
/**
|
|
216
|
+
* Skips the currently playing ad. If there are more ads in the break,
|
|
217
|
+
* the next ad begins. If it's the last ad, the break ends.
|
|
218
|
+
* No-op when no ad break is active.
|
|
219
|
+
*/
|
|
220
|
+
skipAd(): void;
|
|
221
|
+
/**
|
|
222
|
+
* Skips the current ad with 'error' for the completed reason.
|
|
223
|
+
* Emits an 'adError' event.
|
|
224
|
+
* If there are more ads in the break,
|
|
225
|
+
* the next ad begins. If it's the last ad, the break ends.
|
|
226
|
+
*
|
|
227
|
+
* No-op when no ad break is active.
|
|
228
|
+
*/
|
|
229
|
+
failAd(error: Error): void;
|
|
230
|
+
/**
|
|
231
|
+
* Activates the preroll ads.
|
|
232
|
+
* Does nothing if there is no preroll.
|
|
233
|
+
* Resolves with the active preroll, or null if there wasn't one.
|
|
234
|
+
*/
|
|
235
|
+
enterPreroll(): Promise<AdBreakInfo | null>;
|
|
236
|
+
/**
|
|
237
|
+
* Activates the next postroll ad.
|
|
238
|
+
* Does nothing if there is no postroll.
|
|
239
|
+
* Resolves with the active postroll, or null if there wasn't one.
|
|
240
|
+
*/
|
|
241
|
+
enterPostroll(): Promise<AdBreakInfo | null>;
|
|
242
|
+
}
|
|
243
|
+
//# sourceMappingURL=AdController.d.ts.map
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { EventHostImpl } from '@amazon/vinyl-util';
|
|
2
|
+
import type { AdBreakInfo, AdInfo, TrackAds } from './AdBreakInfo';
|
|
3
|
+
import type { AdController, AdEventMap } from './AdController';
|
|
4
|
+
import type { ReadonlyPlaybackController } from '../playback/ReadonlyPlaybackController';
|
|
5
|
+
import type { AdsProvider } from './AdsProvider';
|
|
6
|
+
/**
|
|
7
|
+
* The % playhead start tolerance for playback progress when emitting ad progress events.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AD_START_TOLERANCE = 0.05;
|
|
10
|
+
export interface AdControllerImplDeps {
|
|
11
|
+
readonly playbackController: ReadonlyPlaybackController;
|
|
12
|
+
}
|
|
13
|
+
export interface AdControllerImplOptions {
|
|
14
|
+
/**
|
|
15
|
+
* After an ad is set, the number of seconds to wait for playback to begin
|
|
16
|
+
* before marking the ad as failed.
|
|
17
|
+
* Default: 15
|
|
18
|
+
*/
|
|
19
|
+
readonly adLoadTimeout: number;
|
|
20
|
+
/**
|
|
21
|
+
* How many seconds ahead of a midroll or postroll break to emit `adPreload`
|
|
22
|
+
* (so its ad assets can be warmed before the playhead reaches it). Used only
|
|
23
|
+
* when the break itself carries no {@link AdBreakInfo.resolutionTimeOffset};
|
|
24
|
+
* a break's own offset always takes precedence.
|
|
25
|
+
* Default: 10
|
|
26
|
+
*/
|
|
27
|
+
readonly preloadAheadTime: number;
|
|
28
|
+
}
|
|
29
|
+
export declare const defaultAdControllerImplOptions: AdControllerImplOptions;
|
|
30
|
+
/**
|
|
31
|
+
* Provider-agnostic {@link AdController}. Holds the discovered ad breaks and
|
|
32
|
+
* derives enter/exit region events from playhead time updates.
|
|
33
|
+
*
|
|
34
|
+
* This controller is the *model* for ad playback: it knows which breaks exist,
|
|
35
|
+
* which break contains the playhead, and which ad within that break is current.
|
|
36
|
+
* It does NOT create, preload, or activate any tracks — that is the
|
|
37
|
+
* responsibility of the {@link TrackController}.
|
|
38
|
+
*
|
|
39
|
+
* A break is considered active while `startTime <= currentTime < endTime`,
|
|
40
|
+
* where `endTime` is `startTime + duration`. Breaks whose duration is unknown
|
|
41
|
+
* (null) or breaks which restrict `jump` will become active at
|
|
42
|
+
* `currentTime > startTime`
|
|
43
|
+
*
|
|
44
|
+
* This class contains no HLS- or DASH-specific logic; discovery code maps its
|
|
45
|
+
* protocol's signals to {@link AdBreakInfo} exposed by an
|
|
46
|
+
* {@link AdsProvider.getAds}, which this controller reads once the provider is
|
|
47
|
+
* set via {@link AdController.setAdsProvider} (and re-reads on `adsChange`).
|
|
48
|
+
*/
|
|
49
|
+
export declare class AdControllerImpl extends EventHostImpl<AdEventMap> implements AdController {
|
|
50
|
+
private readonly deps;
|
|
51
|
+
get [Symbol.toStringTag](): string;
|
|
52
|
+
private readonly options;
|
|
53
|
+
private _trackAds;
|
|
54
|
+
private adsProviderSub;
|
|
55
|
+
private adsProvider;
|
|
56
|
+
private midrollAds;
|
|
57
|
+
private preloadableBreaks;
|
|
58
|
+
private readonly preloadedBreakIds;
|
|
59
|
+
private lastPlaybackTime;
|
|
60
|
+
private pendingAdBreaks;
|
|
61
|
+
private readonly completeAdBreakIds;
|
|
62
|
+
private readonly spentBreakIds;
|
|
63
|
+
private readonly disposer;
|
|
64
|
+
private adBreakState;
|
|
65
|
+
private loadingNext;
|
|
66
|
+
constructor(deps: AdControllerImplDeps, options?: Partial<AdControllerImplOptions>);
|
|
67
|
+
clearCompletedAds(): void;
|
|
68
|
+
private isBreakSuppressed;
|
|
69
|
+
/** The media-time the current ad has actually played, or 0 if not playing. */
|
|
70
|
+
private adElapsed;
|
|
71
|
+
/**
|
|
72
|
+
* Computes whether the current ad may be skipped and, when not yet, how many
|
|
73
|
+
* seconds remain until it can. A `skip` restriction blocks it outright;
|
|
74
|
+
* otherwise a resolved skip window gates it by the elapsed break playout, and
|
|
75
|
+
* with no window the ad is freely skippable.
|
|
76
|
+
*/
|
|
77
|
+
private resolveSkipState;
|
|
78
|
+
get currentTrackAds(): (TrackAds | null);
|
|
79
|
+
private setTrackAds;
|
|
80
|
+
/**
|
|
81
|
+
* Returns a function that returns true if the ads provider has changed
|
|
82
|
+
* since the callback was created.
|
|
83
|
+
*/
|
|
84
|
+
private providerInterrupted;
|
|
85
|
+
setAdsProvider(provider: AdsProvider | null): void;
|
|
86
|
+
enterPreroll(): Promise<AdBreakInfo | null>;
|
|
87
|
+
enterPostroll(): Promise<AdBreakInfo | null>;
|
|
88
|
+
private enterRoll;
|
|
89
|
+
private get hasProvider();
|
|
90
|
+
skipAdBreak(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Marks an ad break as completed (or 'spent' and replayable), emits an `adBreakCompleted` event.
|
|
93
|
+
*/
|
|
94
|
+
private completeAdBreak;
|
|
95
|
+
get currentAdBreak(): (AdBreakInfo | null);
|
|
96
|
+
/**
|
|
97
|
+
* Marks an ad as completed and emits an `adCompleted` event.
|
|
98
|
+
*/
|
|
99
|
+
private completeAd;
|
|
100
|
+
/**
|
|
101
|
+
* Polls the next pending ad and activates it.
|
|
102
|
+
* When there are no remaining ads, activates the next ad break (if any).
|
|
103
|
+
*/
|
|
104
|
+
private nextAdOrBreak;
|
|
105
|
+
get currentAd(): (AdInfo | null);
|
|
106
|
+
private get adState();
|
|
107
|
+
private startAd;
|
|
108
|
+
/**
|
|
109
|
+
* Checks if the playhead has entered a time to activate a midroll ad.
|
|
110
|
+
*/
|
|
111
|
+
private onTimeUpdate;
|
|
112
|
+
/**
|
|
113
|
+
* Emits `adPreload` once for each midroll/postroll break the playhead is
|
|
114
|
+
* approaching — within (the break's {@link AdBreakInfo.resolutionTimeOffset}
|
|
115
|
+
* or, when absent, the `preloadAheadTime` option) seconds before its start —
|
|
116
|
+
* so a consumer can resolve and warm the break's assets before entry.
|
|
117
|
+
* Suppressed (played-once/spent) breaks are skipped.
|
|
118
|
+
*/
|
|
119
|
+
private checkAdPreload;
|
|
120
|
+
/**
|
|
121
|
+
* Main content with ad breaks is playing, check if we have entered a midroll region.
|
|
122
|
+
*/
|
|
123
|
+
private checkMidrollIngress;
|
|
124
|
+
/**
|
|
125
|
+
* Emits events for `adTimeUpdate`, `adFirstQuartile`, `adMidpoint`, and
|
|
126
|
+
* `adThirdQuartile`.
|
|
127
|
+
* (Does not emit `adCompleted`)
|
|
128
|
+
*/
|
|
129
|
+
private emitAdProgressEvents;
|
|
130
|
+
private emitTimeUpdate;
|
|
131
|
+
/**
|
|
132
|
+
* Ads breaks can have a playout limit that may cut off ad playback.
|
|
133
|
+
* End the ad if that limit is reached.
|
|
134
|
+
*/
|
|
135
|
+
private enforcePlayoutLimits;
|
|
136
|
+
private setPendingBreaks;
|
|
137
|
+
skipAd(): void;
|
|
138
|
+
failAd(error: Error): void;
|
|
139
|
+
private endAd;
|
|
140
|
+
get disposed(): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Disposes this controller, removes all listeners.
|
|
143
|
+
*/
|
|
144
|
+
dispose(): void;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=AdControllerImpl.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ErrorLevel, ReportableError } from '@amazon/vinyl-util';
|
|
2
|
+
export declare class AdError extends ReportableError {
|
|
3
|
+
get [Symbol.toStringTag](): string;
|
|
4
|
+
constructor(message: string, origin?: string, level?: ErrorLevel);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=AdError.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AnyRecord, ReadonlyEventHost } from '@amazon/vinyl-util';
|
|
2
|
+
import type { TrackAds } from './AdBreakInfo';
|
|
3
|
+
/**
|
|
4
|
+
* Events dispatched by an {@link AdsProvider}.
|
|
5
|
+
*/
|
|
6
|
+
export interface AdsProviderEventMap {
|
|
7
|
+
/**
|
|
8
|
+
* The set of ads has changed; consumers should re-read via
|
|
9
|
+
* {@link AdsProvider.getAds}.
|
|
10
|
+
*/
|
|
11
|
+
readonly adsChange: AnyRecord;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The minimal surface an {@link AdController} needs to source its ad breaks:
|
|
15
|
+
* a resolver for the current break list, plus an `adsChange` event to signal
|
|
16
|
+
* when that list changes. A {@link ReadonlyTrack} satisfies this directly, so
|
|
17
|
+
* the current playing track can be passed as-is; applications may also
|
|
18
|
+
* implement it to supply ads out of band (e.g. from an external ad server).
|
|
19
|
+
*/
|
|
20
|
+
export interface AdsProvider extends ReadonlyEventHost<AdsProviderEventMap> {
|
|
21
|
+
/**
|
|
22
|
+
* Resolves to the provider's current ad breaks. The result may change over
|
|
23
|
+
* the provider's lifetime; each `adsChange` event indicates that a
|
|
24
|
+
* subsequent call may return different breaks.
|
|
25
|
+
*/
|
|
26
|
+
getAds(): Promise<TrackAds>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=AdsProvider.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AdInfo } from './AdBreakInfo';
|
|
2
|
+
import type { VinylTrackLoadOptions } from '../track/createVinylTrackFactories';
|
|
3
|
+
import { ReportableError } from '@amazon/vinyl-util';
|
|
4
|
+
export declare function defaultAdLoadOptionsResolver(adInfo: AdInfo): Promise<VinylTrackLoadOptions>;
|
|
5
|
+
/**
|
|
6
|
+
* An error indicating that a method was called with illegal arguments.
|
|
7
|
+
*/
|
|
8
|
+
export declare class UnresolvableAdError extends ReportableError {
|
|
9
|
+
get [Symbol.toStringTag](): string;
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=defaultAdLoadOptionsResolver.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HlsMediaPlaylist } from '@amazon/vinyl-hls-parser';
|
|
2
|
+
import type { AdBreakList } from './AdBreakInfo';
|
|
3
|
+
/**
|
|
4
|
+
* Discovers HLS Interstitial ad breaks from a parsed media playlist and maps
|
|
5
|
+
* them to the provider-agnostic {@link AdBreakInfo} model.
|
|
6
|
+
*
|
|
7
|
+
* HLS Interstitials (Apple's SGAI primitive) are carried as EXT-X-DATERANGE
|
|
8
|
+
* tags with `CLASS="com.apple.hls.interstitial"`. Each such range is anchored
|
|
9
|
+
* to a wall-clock `START-DATE`; this function converts that to a media-timeline
|
|
10
|
+
* start time by correlating it with the playlist's EXT-X-PROGRAM-DATE-TIME
|
|
11
|
+
* anchor. When the playlist carries no program date-time, and the range's
|
|
12
|
+
* start-date is not otherwise resolvable, the break is anchored to the start of
|
|
13
|
+
* the timeline (pre-roll) as a best effort.
|
|
14
|
+
*
|
|
15
|
+
* @param playlist The parsed HLS media playlist.
|
|
16
|
+
* @param baseUrl The URL of the media playlist, used to resolve relative
|
|
17
|
+
* `X-ASSET-URI` values.
|
|
18
|
+
* @param contentDuration The total content duration in seconds, if known, used
|
|
19
|
+
* to classify post-rolls. Pass null/undefined for live or unknown durations.
|
|
20
|
+
*/
|
|
21
|
+
export declare function discoverHlsInterstitials(playlist: HlsMediaPlaylist, baseUrl: string, contentDuration?: number | null): Promise<AdBreakList>;
|
|
22
|
+
//# sourceMappingURL=discoverHlsInterstitials.d.ts.map
|
|
@@ -43,7 +43,7 @@ export declare const defaultPlaybackControllerImplOptions: {
|
|
|
43
43
|
* Firefox can but if the playhead reaches the end of track before the media stream is closed, an 'ended' event
|
|
44
44
|
* will never fire.
|
|
45
45
|
*/
|
|
46
|
-
export declare function getMinSeekableBufferDefault():
|
|
46
|
+
export declare function getMinSeekableBufferDefault(): 5 | 2;
|
|
47
47
|
export interface PlaybackControllerImplDeps {
|
|
48
48
|
readonly media: HTMLMediaElement;
|
|
49
49
|
readonly loudnessNormalizationController: LoudnessNormalizationController;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ObjectSchema } from '@amazon/vinyl-validation';
|
|
2
|
+
/**
|
|
3
|
+
* Criteria used to pick which audio rendition to play.
|
|
4
|
+
*/
|
|
5
|
+
export interface AudioSelection {
|
|
6
|
+
/**
|
|
7
|
+
* Preferred language(s) for audio content, as RFC 5646 codes (e.g. `'en'`,
|
|
8
|
+
* `'ja'`, `'fr-CA'`). May be a single tag or an ordered list of tags —
|
|
9
|
+
* earlier entries are preferred, with the best relatedness match kept for
|
|
10
|
+
* each period (audio without a language tag is always kept). `null` (the
|
|
11
|
+
* default) is NOT "no preference": it orders by the platform's
|
|
12
|
+
* `navigator.languages`. To keep every language, this option is not the
|
|
13
|
+
* mechanism — omit language content or pass a tag matching all.
|
|
14
|
+
*/
|
|
15
|
+
readonly language?: string | readonly string[] | null;
|
|
16
|
+
/**
|
|
17
|
+
* Opt in to audio-description (a.k.a. described-video / DVS) audio: audio
|
|
18
|
+
* renditions carrying an accessibility "describes video" characteristic that
|
|
19
|
+
* narrate on-screen action. `false` (the default) keeps them out of the
|
|
20
|
+
* automatic default-audio selection — they are chosen only when this is set.
|
|
21
|
+
* When `true`, a description rendition is preferred where one exists for the
|
|
22
|
+
* selected language. Changing this reselects audio immediately.
|
|
23
|
+
*/
|
|
24
|
+
readonly descriptive?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Declarative audio configuration. Mirrors `VinylOptions.text`: the audio
|
|
28
|
+
* rendition is chosen from {@link selection}; changing it reselects audio
|
|
29
|
+
* immediately.
|
|
30
|
+
*/
|
|
31
|
+
export interface AudioOptions {
|
|
32
|
+
/**
|
|
33
|
+
* The audio selection criteria (language / descriptive).
|
|
34
|
+
*/
|
|
35
|
+
readonly selection?: AudioSelection;
|
|
36
|
+
}
|
|
37
|
+
export declare const defaultAudioOptions: AudioOptions;
|
|
38
|
+
export declare const audioOptionsValidator: ObjectSchema<AudioOptions>;
|
|
39
|
+
//# sourceMappingURL=AudioOptions.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Timestamp } from '@amazon/vinyl-util';
|
|
2
|
+
import type { TrackUri } from '../track/Track';
|
|
3
|
+
/**
|
|
4
|
+
* The stage of the track-load journey a {@link LoadSpanMeasurement} describes.
|
|
5
|
+
*
|
|
6
|
+
* - `manifest`: fetching and parsing the DASH/HLS manifest.
|
|
7
|
+
* - `license`: the DRM license request/response exchange.
|
|
8
|
+
* - `initSegment`: fetching the initialization segment.
|
|
9
|
+
* - `firstSegment`: fetching the first media segment.
|
|
10
|
+
*/
|
|
11
|
+
export type LoadSpanKind = 'manifest' | 'license' | 'initSegment' | 'firstSegment';
|
|
12
|
+
/**
|
|
13
|
+
* A timed span for one stage of a track load.
|
|
14
|
+
*
|
|
15
|
+
* Dispatched by the controller that owns the stage. Emitters attribute the span
|
|
16
|
+
* to the track it was measured for at the source (see {@link trackUri}); the
|
|
17
|
+
* player republishes it as a {@link LoadSpanEvent}. When the emitter cannot know
|
|
18
|
+
* the owning track, `trackUri` is omitted and the span is dropped rather than
|
|
19
|
+
* misattributed.
|
|
20
|
+
*/
|
|
21
|
+
export interface LoadSpanMeasurement {
|
|
22
|
+
readonly kind: LoadSpanKind;
|
|
23
|
+
/**
|
|
24
|
+
* When the stage began, as a unix millisecond timestamp.
|
|
25
|
+
*/
|
|
26
|
+
readonly startTime: Timestamp;
|
|
27
|
+
/**
|
|
28
|
+
* When the stage completed, as a unix millisecond timestamp.
|
|
29
|
+
*/
|
|
30
|
+
readonly endTime: Timestamp;
|
|
31
|
+
/**
|
|
32
|
+
* The track this span was measured for, stamped at the source by the
|
|
33
|
+
* emitter that knows which track initiated the load. Omitted only when the
|
|
34
|
+
* initiating track is not yet known (e.g. an encrypted event handled before
|
|
35
|
+
* buffering DRM info is set).
|
|
36
|
+
*/
|
|
37
|
+
readonly trackUri?: TrackUri;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A {@link LoadSpanMeasurement} attributed to the track it was measured for.
|
|
41
|
+
*
|
|
42
|
+
* Emitted on the player as the `loadSpan` event.
|
|
43
|
+
*/
|
|
44
|
+
export interface LoadSpanEvent extends LoadSpanMeasurement {
|
|
45
|
+
readonly trackUri: TrackUri;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Player-level load metric events.
|
|
49
|
+
*/
|
|
50
|
+
export interface LoadMetricEventMap {
|
|
51
|
+
/**
|
|
52
|
+
* A stage of a track load completed. Reports the time span of the stage
|
|
53
|
+
* together with the track it belongs to. Consumers measuring end-to-end
|
|
54
|
+
* load latency key on the first event per `kind` and `trackUri`.
|
|
55
|
+
*/
|
|
56
|
+
readonly loadSpan: LoadSpanEvent;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=LoadMetric.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { MutableValue } from '@amazon/vinyl-observable';
|
|
2
|
+
import type { EventHandler, SignalOptions, Unsubscribe } from '@amazon/vinyl-util';
|
|
3
|
+
import type { ManifestController, ManifestControllerEventMap, ManifestProvider } from './ManifestController';
|
|
4
|
+
export interface ManifestControllerImplDeps<T> {
|
|
5
|
+
readonly manifestProvider: ManifestProvider<T>;
|
|
6
|
+
}
|
|
7
|
+
export declare class ManifestControllerImpl<T> implements ManifestController<Promise<T>> {
|
|
8
|
+
private readonly deps;
|
|
9
|
+
get [Symbol.toStringTag](): string;
|
|
10
|
+
get logPrefix(): string;
|
|
11
|
+
private readonly _data;
|
|
12
|
+
private _error;
|
|
13
|
+
private readonly abortSlot;
|
|
14
|
+
private readonly disposer;
|
|
15
|
+
private readonly events;
|
|
16
|
+
private manifestSpanArmed;
|
|
17
|
+
constructor(deps: ManifestControllerImplDeps<T>);
|
|
18
|
+
on<K extends keyof ManifestControllerEventMap>(type: K, handler: EventHandler<ManifestControllerEventMap[K]>, options?: SignalOptions): Unsubscribe;
|
|
19
|
+
hasAnyListeners(): boolean;
|
|
20
|
+
hasListeners(type: keyof ManifestControllerEventMap): boolean;
|
|
21
|
+
readonly __eventMapType: import("@amazon/vinyl-util").Covariant<ManifestControllerEventMap>;
|
|
22
|
+
get error(): (Error | null);
|
|
23
|
+
refresh(): void;
|
|
24
|
+
private requestManifest;
|
|
25
|
+
/**
|
|
26
|
+
* Measures the initial manifest fetch as a load span, re-arming on failure
|
|
27
|
+
* so a recovered load is still measured.
|
|
28
|
+
*/
|
|
29
|
+
private measureLoadSpan;
|
|
30
|
+
reset(): void;
|
|
31
|
+
get value(): Promise<T>;
|
|
32
|
+
get changeId(): number;
|
|
33
|
+
getValue(): Promise<T>;
|
|
34
|
+
onData(callback: (value: Promise<T>, previous?: Promise<T>) => void): () => void;
|
|
35
|
+
map<U>(fn: (value: Promise<T>) => U): import("@amazon/vinyl-observable").ObservableValue<U>;
|
|
36
|
+
pick<K extends keyof NonNullable<Promise<T>>>(key: K): MutableValue<Promise<T>[K]>;
|
|
37
|
+
get disposed(): boolean;
|
|
38
|
+
dispose(): void;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=ManifestControllerImpl.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records every codec in the given mimeType as denylisted. Returns true if any
|
|
3
|
+
* codec was newly added (i.e. was not already denylisted), false if all codecs
|
|
4
|
+
* were already present. The return value lets callers bound retry loops: a
|
|
5
|
+
* repeat failure for an already-denylisted codec should not trigger another
|
|
6
|
+
* fallback attempt.
|
|
7
|
+
*/
|
|
8
|
+
export declare function denylistCodecsFromMimeType(mimeType: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Returns true when any codec in the given mimeType has been denylisted.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isMimeTypeDenylisted(mimeType: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the currently denylisted codec strings (lowercased). Primarily for
|
|
15
|
+
* diagnostics and testing.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getDenylistedCodecs(): readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* Clears the runtime codec denylist. Intended for tests and for re-detecting
|
|
20
|
+
* support (e.g. after an environment change).
|
|
21
|
+
*/
|
|
22
|
+
export declare function clearCodecDenylist(): void;
|
|
23
|
+
//# sourceMappingURL=codecDenylist.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { RestrictableContentType } from './MediaQualityMetadata';
|
|
2
|
+
import type { ContentTypesValue } from './ContentTypesValue';
|
|
3
|
+
import type { ObservableValue } from '@amazon/vinyl-observable';
|
|
4
|
+
export interface AllowedContentTypesValueDeps {
|
|
5
|
+
/**
|
|
6
|
+
* The unfiltered content types present in the manifest.
|
|
7
|
+
*/
|
|
8
|
+
readonly baseContentTypesValue: ContentTypesValue;
|
|
9
|
+
/**
|
|
10
|
+
* The player options. The `allowedContentTypes` allow list restricts which
|
|
11
|
+
* media content types are streamed; `null` means no restriction.
|
|
12
|
+
*/
|
|
13
|
+
readonly options: ObservableValue<{
|
|
14
|
+
readonly allowedContentTypes: readonly RestrictableContentType[] | null;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Wraps a {@link ContentTypesValue} with the `allowedContentTypes` allow list
|
|
19
|
+
* from the player options. When the allow list is set, only media content
|
|
20
|
+
* types (`'audio'`, `'video'`) in the list are emitted; other media streams
|
|
21
|
+
* are ignored. When it is `null`, the underlying content types pass through
|
|
22
|
+
* unchanged. Text is never restricted by the allow list and always passes
|
|
23
|
+
* through (captions are governed by caption selection).
|
|
24
|
+
*
|
|
25
|
+
* Because the result is derived from the `allowedContentTypes` option via
|
|
26
|
+
* {@link combineData}, changing the option re-emits a newly filtered set, which
|
|
27
|
+
* reloads the track using only the allowed content types.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createAllowedContentTypesValue(deps: AllowedContentTypesValueDeps): ContentTypesValue;
|
|
30
|
+
//# sourceMappingURL=createAllowedContentTypesValue.d.ts.map
|