@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,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 { AnyRecord, ReadonlyEventHost } from '@amazon/vinyl-util';
|
|
2
|
+
import { 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 { AdInfo } from './AdBreakInfo';
|
|
2
|
+
import { 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 { HlsMediaPlaylist } from '@amazon/vinyl-hls-parser';
|
|
2
|
+
import { 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
|
|
@@ -41,7 +41,7 @@ export declare const defaultPlaybackControllerImplOptions: {
|
|
|
41
41
|
* Firefox can but if the playhead reaches the end of track before the media stream is closed, an 'ended' event
|
|
42
42
|
* will never fire.
|
|
43
43
|
*/
|
|
44
|
-
export declare function getMinSeekableBufferDefault():
|
|
44
|
+
export declare function getMinSeekableBufferDefault(): 5 | 2;
|
|
45
45
|
export interface PlaybackControllerImplDeps {
|
|
46
46
|
readonly media: HTMLMediaElement;
|
|
47
47
|
readonly loudnessNormalizationController: LoudnessNormalizationController;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { 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 { Timestamp } from '@amazon/vinyl-util';
|
|
2
|
+
import { 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 { MutableValue } from '@amazon/vinyl-observable';
|
|
2
|
+
import { EventHandler, SignalOptions, Unsubscribe } from '@amazon/vinyl-util';
|
|
3
|
+
import { 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 { RestrictableContentType } from './MediaQualityMetadata';
|
|
2
|
+
import { ContentTypesValue } from './ContentTypesValue';
|
|
3
|
+
import { 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
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MediaQualityMetadata } from './MediaQualityMetadata';
|
|
2
|
+
import { FilterPredicate } from '@amazon/vinyl-util';
|
|
3
|
+
/**
|
|
4
|
+
* Thrown if the audio-description filter ever emptied a period's audio. The
|
|
5
|
+
* filter keeps at least one audio rendition per period by design, so this is a
|
|
6
|
+
* defensive guard rather than an expected path.
|
|
7
|
+
*/
|
|
8
|
+
export declare function throwNoPlayableAudio(): never;
|
|
9
|
+
/**
|
|
10
|
+
* Characteristics that mark an audio rendition as an audio description (a.k.a.
|
|
11
|
+
* described video / DVS) — narration of on-screen action for viewers who cannot
|
|
12
|
+
* see it. HLS signals this with the `public.accessibility.describes-video`
|
|
13
|
+
* CHARACTERISTIC; DASH with a `description` Role. Such renditions must not be
|
|
14
|
+
* chosen as the default audio; they are an accessibility opt-in.
|
|
15
|
+
*/
|
|
16
|
+
export declare const AUDIO_DESCRIPTION_CHARACTERISTICS: readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* Whether an audio quality is an audio-description rendition.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isAudioDescription(quality: MediaQualityMetadata): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Creates a filter that keeps audio-description renditions out of (or, when
|
|
23
|
+
* opted in, restricts audio to) the audio selection.
|
|
24
|
+
*
|
|
25
|
+
* - `preferDescription: false` (default): drop audio-description renditions
|
|
26
|
+
* from each period *when a non-description audio alternative exists*, so the
|
|
27
|
+
* main audio is chosen by default instead of the description track. If a
|
|
28
|
+
* period has only description audio, it is kept (playback is never stranded).
|
|
29
|
+
* - `preferDescription: true`: keep only description renditions when the period
|
|
30
|
+
* has any; otherwise keep all (again, never strand playback).
|
|
31
|
+
*
|
|
32
|
+
* Non-audio qualities are always kept.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createAudioDescriptionFilter(preferDescription: boolean): FilterPredicate<MediaQualityMetadata>;
|
|
35
|
+
//# sourceMappingURL=mediaTimelineAccessibilityFilter.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Disposable } from '@amazon/vinyl-util';
|
|
2
|
+
import { TextTrackRenderer } from './TextTrackRenderer';
|
|
3
|
+
/**
|
|
4
|
+
* The subset of a `VTTCue`'s positioning properties {@link computeCueLayout}
|
|
5
|
+
* reads. A native `VTTCue` satisfies this; a plain `TextTrackCue` (platforms
|
|
6
|
+
* without `VTTCue`) leaves them undefined and falls back to defaults.
|
|
7
|
+
*/
|
|
8
|
+
export interface CueGeometry {
|
|
9
|
+
readonly align?: string | null;
|
|
10
|
+
readonly line?: number | AutoKeyword;
|
|
11
|
+
readonly lineAlign?: LineAlignSetting;
|
|
12
|
+
readonly position?: number | AutoKeyword;
|
|
13
|
+
readonly positionAlign?: PositionAlignSetting;
|
|
14
|
+
readonly size?: number;
|
|
15
|
+
readonly snapToLines?: boolean;
|
|
16
|
+
readonly vertical?: DirectionSetting;
|
|
17
|
+
}
|
|
18
|
+
/** Inline styles (camelCase CSS properties) to apply to a rendered cue box. */
|
|
19
|
+
export type CueLayout = Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Maps a cue's WebVTT positioning settings to inline CSS. Pure and DOM-free so
|
|
22
|
+
* the (branchy) placement logic is unit-testable in isolation.
|
|
23
|
+
*
|
|
24
|
+
* A cue with neither `line` nor `position` set flows in the renderer's
|
|
25
|
+
* bottom-anchored, centered container (the common subtitle case). Otherwise it
|
|
26
|
+
* is absolutely positioned: `size` → width, `position`/`positionAlign` →
|
|
27
|
+
* horizontal, `line`/`lineAlign`/`snapToLines` → vertical (percentage lines, or
|
|
28
|
+
* whole rows counted from the bottom for negative integers), `align` → text
|
|
29
|
+
* alignment, `vertical` → writing mode.
|
|
30
|
+
*/
|
|
31
|
+
export declare function computeCueLayout(cue: CueGeometry): CueLayout;
|
|
32
|
+
/**
|
|
33
|
+
* Renders a cue's text payload as safe HTML. Text is escaped (so it can't
|
|
34
|
+
* inject nodes); newlines become `<br>`; and WebVTT cue tags are converted:
|
|
35
|
+
* `<c.foo>`→`<span class="foo">`, `<i>/<b>/<u>/<ruby>/<rt>` pass through,
|
|
36
|
+
* `<v Name>`→`<span title>`, `<lang xx>`→`<span lang>`, timestamp tags are
|
|
37
|
+
* dropped. Class-based styling requires matching app CSS (STYLE blocks in the
|
|
38
|
+
* VTT are not applied).
|
|
39
|
+
*/
|
|
40
|
+
export declare function renderCueText(text: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* A {@link TextTrackRenderer} that paints cues as HTML into {@link element}.
|
|
43
|
+
* Mount `element` over the video; it stacks cues at the bottom, centered, and
|
|
44
|
+
* positions any cue that carries explicit WebVTT settings. The DOM track is
|
|
45
|
+
* expected to be `'hidden'` so only this renderer paints.
|
|
46
|
+
*/
|
|
47
|
+
export declare class HtmlTextTrackRenderer implements TextTrackRenderer, Disposable {
|
|
48
|
+
/** The overlay container to mount over the video. */
|
|
49
|
+
readonly element: HTMLElement;
|
|
50
|
+
private track;
|
|
51
|
+
private readonly styleElement;
|
|
52
|
+
private readonly onCueChange;
|
|
53
|
+
constructor();
|
|
54
|
+
setTextTrack(track: TextTrack | null): void;
|
|
55
|
+
setStyles(styles: readonly string[]): void;
|
|
56
|
+
dispose(): void;
|
|
57
|
+
private renderActiveCues;
|
|
58
|
+
private createCueBox;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=HtmlTextTrackRenderer.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { EventHostImpl, Maybe, RequestInitOptions } from '@amazon/vinyl-util';
|
|
2
|
+
import { TextTrackController, TextTrackControllerOptions, TextTrackEventMap, TextTrackInfo } from './TextTrack';
|
|
3
|
+
import { ObservableValue } from '@amazon/vinyl-observable';
|
|
4
|
+
import { MediaTextTrackProvider } from './mediaTextTrackProvider';
|
|
5
|
+
import { ReadonlyPlaybackController } from '../playback/ReadonlyPlaybackController';
|
|
6
|
+
import { TextTrackRenderer } from './TextTrackRenderer';
|
|
7
|
+
export interface SidecarTextTrackControllerDeps {
|
|
8
|
+
/**
|
|
9
|
+
* Hands out (memoized) DOM text tracks. Text tracks can only be created on a
|
|
10
|
+
* media element and never removed, so the provider reuses one track per
|
|
11
|
+
* rendition rather than accumulating them.
|
|
12
|
+
*/
|
|
13
|
+
readonly textTrackProvider: MediaTextTrackProvider;
|
|
14
|
+
/**
|
|
15
|
+
* Optional request init options forwarded with each VTT fetch (e.g. CORS).
|
|
16
|
+
*/
|
|
17
|
+
readonly requestInit?: Maybe<RequestInitOptions>;
|
|
18
|
+
/**
|
|
19
|
+
* The discovered text tracks, re-emitted whenever the manifest changes.
|
|
20
|
+
*/
|
|
21
|
+
readonly textTracks: ObservableValue<Promise<readonly TextTrackInfo[]>>;
|
|
22
|
+
/**
|
|
23
|
+
* Declarative selection / rendering configuration. Re-applied on change.
|
|
24
|
+
*/
|
|
25
|
+
readonly options: ObservableValue<TextTrackControllerOptions>;
|
|
26
|
+
/**
|
|
27
|
+
* Supplies the current playhead used to fetch caption segments in a window
|
|
28
|
+
* around it.
|
|
29
|
+
*/
|
|
30
|
+
readonly playbackController: ReadonlyPlaybackController;
|
|
31
|
+
/**
|
|
32
|
+
* Optional renderer that paints cues itself (HTML overlay). When provided,
|
|
33
|
+
* the DOM text track is kept `'hidden'` (timing only) and the renderer is
|
|
34
|
+
* handed the active track; without one, the track renders natively
|
|
35
|
+
* (`'showing'`).
|
|
36
|
+
*/
|
|
37
|
+
readonly textTrackRenderer?: Maybe<TextTrackRenderer>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Selects the text track that matches the given options, or null for none.
|
|
41
|
+
*
|
|
42
|
+
* The `enabled` mode gates everything: `'off'` renders nothing (default is
|
|
43
|
+
* `'forced'`). Otherwise an explicit {@link TextTrackSelection.id} wins; else
|
|
44
|
+
* the best language match is chosen among tracks filtered by kind and
|
|
45
|
+
* forced-ness. Forced-ness comes from {@link TextTrackSelection.forced} when
|
|
46
|
+
* set, otherwise from the mode (`'forced'` keeps only forced tracks, `'on'`
|
|
47
|
+
* only full tracks).
|
|
48
|
+
*
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
export declare function resolveSelectedTrack(tracks: readonly TextTrackInfo[], options: TextTrackControllerOptions): TextTrackInfo | null;
|
|
52
|
+
/**
|
|
53
|
+
* Manages a sidecar WebVTT-based text track lifecycle:
|
|
54
|
+
*
|
|
55
|
+
* - tracks the discovered {@link TextTrackInfo} list (from the `textTracks`
|
|
56
|
+
* observable) and the current selection (from the `options` observable)
|
|
57
|
+
* - on selection, fetches the chosen track's WebVTT and pushes cues to a DOM
|
|
58
|
+
* `TextTrack` obtained from the {@link MediaTextTrackProvider}
|
|
59
|
+
* - clears cues and hides the DOM track when the selection changes or clears
|
|
60
|
+
*
|
|
61
|
+
* The controller is agnostic of HLS/DASH discovery details; its inputs are the
|
|
62
|
+
* observables supplied by the manifest layer.
|
|
63
|
+
*/
|
|
64
|
+
export declare class SidecarTextTrackController extends EventHostImpl<TextTrackEventMap> implements TextTrackController {
|
|
65
|
+
private readonly deps;
|
|
66
|
+
get [Symbol.toStringTag](): string;
|
|
67
|
+
private _active;
|
|
68
|
+
private _tracks;
|
|
69
|
+
private _activeTextTrack;
|
|
70
|
+
private _ref;
|
|
71
|
+
private readonly loadAbort;
|
|
72
|
+
private readonly disposer;
|
|
73
|
+
constructor(deps: SidecarTextTrackControllerDeps);
|
|
74
|
+
get textTracks(): readonly TextTrackInfo[];
|
|
75
|
+
get activeTextTrack(): (TextTrackInfo | null);
|
|
76
|
+
get active(): boolean;
|
|
77
|
+
get disposed(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Replaces the discovered track list, emits `textTracksChange`, then
|
|
80
|
+
* re-applies the current selection against the new list.
|
|
81
|
+
*/
|
|
82
|
+
private setTracks;
|
|
83
|
+
/**
|
|
84
|
+
* Recomputes the selection from the current options and track list,
|
|
85
|
+
* emitting `activeTextTrackChange` on change and (re)rendering when active.
|
|
86
|
+
*/
|
|
87
|
+
private refreshSelection;
|
|
88
|
+
deactivate(): void;
|
|
89
|
+
activate(): void;
|
|
90
|
+
private startLoad;
|
|
91
|
+
private appendCues;
|
|
92
|
+
/**
|
|
93
|
+
* Clears cues from the current DOM track and hides it, keeping the track for
|
|
94
|
+
* later reuse via the provider.
|
|
95
|
+
*/
|
|
96
|
+
private hideCurrent;
|
|
97
|
+
/**
|
|
98
|
+
* Cancels any in-flight load, hides the DOM text track, and resets state.
|
|
99
|
+
* Called by the host when the underlying media is unloaded.
|
|
100
|
+
*/
|
|
101
|
+
dispose(): void;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=SidecarTextTrackController.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Maybe, ReadonlyAbort, RequestInitOptions } from '@amazon/vinyl-util';
|
|
2
|
+
import { WebVttCue } from './parseWebVtt';
|
|
3
|
+
/**
|
|
4
|
+
* Seconds ahead of the playhead to keep cues buffered. Mirrors the media
|
|
5
|
+
* pipeline's default HLS `minBufferTime` so captions stay in step with the
|
|
6
|
+
* audio/video buffer.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_TEXT_LOOK_AHEAD = 10;
|
|
9
|
+
/**
|
|
10
|
+
* Seconds behind the playhead to keep cues buffered. Small window so that a
|
|
11
|
+
* short rewind (e.g. accidental skip-back) doesn't force a refetch.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_TEXT_LOOK_BEHIND = 2;
|
|
14
|
+
export interface LoadWebVttCuesOptions {
|
|
15
|
+
readonly abort?: Maybe<ReadonlyAbort>;
|
|
16
|
+
readonly requestInit?: Maybe<RequestInitOptions>;
|
|
17
|
+
/**
|
|
18
|
+
* HLS EXT-X-DEFINE variables to make available for `IMPORT` and for
|
|
19
|
+
* substitution of segment URIs when loading from an HLS media playlist.
|
|
20
|
+
*/
|
|
21
|
+
readonly variables?: Maybe<Readonly<Record<string, string>>>;
|
|
22
|
+
/**
|
|
23
|
+
* Invoked with each batch of cues as soon as they are parsed. Called once
|
|
24
|
+
* per HLS segment, or once for a direct `.vtt` document.
|
|
25
|
+
*/
|
|
26
|
+
readonly onCues: (cues: readonly WebVttCue[]) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Invoked with the CSS body of any `STYLE` blocks parsed from a document.
|
|
29
|
+
* Only called when a document actually declares styles.
|
|
30
|
+
*/
|
|
31
|
+
readonly onStyles?: Maybe<(styles: readonly string[]) => void>;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the current playback time (seconds on the presentation
|
|
34
|
+
* timeline). Used to fetch caption segments in a window around the
|
|
35
|
+
* playhead rather than draining the entire playlist up front.
|
|
36
|
+
*/
|
|
37
|
+
readonly getCurrentTime: () => number;
|
|
38
|
+
/**
|
|
39
|
+
* Seconds ahead of the playhead to keep buffered. Default 10s.
|
|
40
|
+
*/
|
|
41
|
+
readonly lookAhead?: Maybe<number>;
|
|
42
|
+
/**
|
|
43
|
+
* Seconds behind the playhead to keep buffered. Default 2s.
|
|
44
|
+
*/
|
|
45
|
+
readonly lookBehind?: Maybe<number>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Loads WebVTT cues from a URI, streaming them by playhead position.
|
|
49
|
+
*
|
|
50
|
+
* Two URI shapes are accepted:
|
|
51
|
+
* - Direct `.vtt` document: fetched once and delivered via `onCues`.
|
|
52
|
+
* - HLS media playlist (`.m3u8`): the playlist is parsed, then segments
|
|
53
|
+
* whose time range overlaps the buffer window around `getCurrentTime()`
|
|
54
|
+
* are fetched (closest to the playhead first), one at a time. Each
|
|
55
|
+
* segment's cues are delivered via `onCues` as it is parsed.
|
|
56
|
+
*
|
|
57
|
+
* Cue start/end times are expected to already be on the presentation
|
|
58
|
+
* timeline (Shaka packager's default WebVTT output), so segments are joined
|
|
59
|
+
* without offset.
|
|
60
|
+
*
|
|
61
|
+
* The returned promise resolves once every segment has been fetched, or the
|
|
62
|
+
* abort signal fires. Fetch failures reject the promise.
|
|
63
|
+
*/
|
|
64
|
+
export declare function loadWebVttCues(uri: string, options: LoadWebVttCuesOptions): Promise<void>;
|
|
65
|
+
//# sourceMappingURL=SidecarTextTrackLoader.d.ts.map
|