@amazon/vinyl 1.2.0 → 2.0.0

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.
Files changed (653) hide show
  1. package/dist/index.cjs +9225 -6633
  2. package/dist/index.cjs.map +4 -4
  3. package/dist/index.js +9080 -6435
  4. package/dist/index.js.map +4 -4
  5. package/dist/test/benchmark.es5.js +266 -253
  6. package/dist/test/benchmark.js +3256 -3190
  7. package/dist/test/benchmark.js.map +4 -4
  8. package/dist/test/integ.es5.js +1404 -1093
  9. package/dist/test/integ.js +45924 -33873
  10. package/dist/test/integ.js.map +4 -4
  11. package/dist/types/current/ad/AdBreakInfo.d.ts +160 -0
  12. package/dist/types/current/ad/AdBreakInfo.d.ts.map +1 -0
  13. package/dist/types/current/ad/AdController.d.ts +229 -0
  14. package/dist/types/current/ad/AdController.d.ts.map +1 -0
  15. package/dist/types/current/ad/AdController.js +19 -0
  16. package/dist/types/current/ad/AdControllerImpl.d.ts +146 -0
  17. package/dist/types/current/ad/AdControllerImpl.d.ts.map +1 -0
  18. package/dist/types/current/ad/AdControllerImpl.js +705 -0
  19. package/dist/types/current/ad/AdError.d.ts +6 -0
  20. package/dist/types/current/ad/AdError.d.ts.map +1 -0
  21. package/dist/types/current/ad/AdError.js +14 -0
  22. package/dist/types/current/ad/AdsProvider.d.ts +28 -0
  23. package/dist/types/current/ad/AdsProvider.d.ts.map +1 -0
  24. package/dist/types/current/ad/AdsProvider.js +5 -0
  25. package/dist/types/current/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
  26. package/dist/types/current/ad/defaultAdLoadOptionsResolver.d.ts.map +1 -0
  27. package/dist/types/current/ad/defaultAdLoadOptionsResolver.js +26 -0
  28. package/dist/types/current/ad/discoverHlsInterstitials.d.ts +22 -0
  29. package/dist/types/current/ad/discoverHlsInterstitials.d.ts.map +1 -0
  30. package/dist/types/current/ad/discoverHlsInterstitials.js +246 -0
  31. package/dist/types/current/drm/DrmController.d.ts +29 -4
  32. package/dist/types/current/drm/DrmController.d.ts.map +1 -1
  33. package/dist/types/current/drm/DrmControllerImpl.d.ts +13 -4
  34. package/dist/types/current/drm/DrmControllerImpl.d.ts.map +1 -1
  35. package/dist/types/current/drm/DrmControllerImpl.js +85 -14
  36. package/dist/types/current/drm/util/unpackPlayReadyChallenge.d.ts +5 -0
  37. package/dist/types/current/drm/util/unpackPlayReadyChallenge.d.ts.map +1 -1
  38. package/dist/types/current/drm/util/unpackPlayReadyChallenge.js +5 -0
  39. package/dist/types/current/index.d.ts +151 -126
  40. package/dist/types/current/index.d.ts.map +1 -1
  41. package/dist/types/current/index.js +151 -126
  42. package/dist/types/current/playback/PlaybackControllerImpl.d.ts +1 -0
  43. package/dist/types/current/playback/PlaybackControllerImpl.d.ts.map +1 -1
  44. package/dist/types/current/playback/PlaybackControllerImpl.js +44 -5
  45. package/dist/types/current/playback/PlaybackSource.d.ts +1 -1
  46. package/dist/types/current/playback/ReadonlyPlaybackController.d.ts +6 -1
  47. package/dist/types/current/playback/ReadonlyPlaybackController.d.ts.map +1 -1
  48. package/dist/types/current/playback/ReadonlyPlaybackController.js +1 -0
  49. package/dist/types/current/streaming/ContentStream.d.ts +8 -1
  50. package/dist/types/current/streaming/ContentStream.d.ts.map +1 -1
  51. package/dist/types/current/streaming/ContentStream.js +19 -2
  52. package/dist/types/current/streaming/LoadMetric.d.ts +58 -0
  53. package/dist/types/current/streaming/LoadMetric.d.ts.map +1 -0
  54. package/dist/types/current/streaming/LoadMetric.js +5 -0
  55. package/dist/types/current/streaming/ManifestController.d.ts +16 -1
  56. package/dist/types/current/streaming/ManifestController.d.ts.map +1 -1
  57. package/dist/types/current/streaming/ManifestControllerImpl.d.ts +43 -0
  58. package/dist/types/current/streaming/ManifestControllerImpl.d.ts.map +1 -0
  59. package/dist/types/current/streaming/ManifestControllerImpl.js +104 -0
  60. package/dist/types/current/streaming/MediaQualityMetadata.d.ts +16 -0
  61. package/dist/types/current/streaming/MediaQualityMetadata.d.ts.map +1 -1
  62. package/dist/types/current/streaming/MediaQualityMetadata.js +6 -0
  63. package/dist/types/current/streaming/MediaTimeline.d.ts +6 -0
  64. package/dist/types/current/streaming/MediaTimeline.d.ts.map +1 -1
  65. package/dist/types/current/streaming/SegmentController.d.ts +5 -0
  66. package/dist/types/current/streaming/SegmentController.d.ts.map +1 -1
  67. package/dist/types/current/streaming/SegmentControllerImpl.d.ts +12 -0
  68. package/dist/types/current/streaming/SegmentControllerImpl.d.ts.map +1 -1
  69. package/dist/types/current/streaming/SegmentControllerImpl.js +67 -10
  70. package/dist/types/current/streaming/StreamingEventMap.d.ts +38 -1
  71. package/dist/types/current/streaming/StreamingEventMap.d.ts.map +1 -1
  72. package/dist/types/current/streaming/StreamingEventMap.js +4 -0
  73. package/dist/types/current/streaming/abr/QualitySelectorImpl.d.ts +28 -0
  74. package/dist/types/current/streaming/abr/QualitySelectorImpl.d.ts.map +1 -1
  75. package/dist/types/current/streaming/abr/QualitySelectorImpl.js +39 -4
  76. package/dist/types/current/streaming/buffering/BufferingController.d.ts +37 -0
  77. package/dist/types/current/streaming/buffering/BufferingController.d.ts.map +1 -1
  78. package/dist/types/current/streaming/buffering/BufferingController.js +79 -3
  79. package/dist/types/current/streaming/buffering/MediaSourceController.d.ts +16 -11
  80. package/dist/types/current/streaming/buffering/MediaSourceController.d.ts.map +1 -1
  81. package/dist/types/current/streaming/buffering/MediaSourceController.js +76 -51
  82. package/dist/types/current/streaming/buffering/SourceBufferController.d.ts.map +1 -1
  83. package/dist/types/current/streaming/buffering/SourceBufferController.js +5 -2
  84. package/dist/types/current/streaming/buffering/codecDenylist.d.ts +23 -0
  85. package/dist/types/current/streaming/buffering/codecDenylist.d.ts.map +1 -0
  86. package/dist/types/current/streaming/buffering/codecDenylist.js +62 -0
  87. package/dist/types/current/streaming/createAllowedContentTypesValue.d.ts +30 -0
  88. package/dist/types/current/streaming/createAllowedContentTypesValue.d.ts.map +1 -0
  89. package/dist/types/current/streaming/createAllowedContentTypesValue.js +43 -0
  90. package/dist/types/current/streaming/createDefaultMediaTimelineTransformer.d.ts +4 -1
  91. package/dist/types/current/streaming/createDefaultMediaTimelineTransformer.d.ts.map +1 -1
  92. package/dist/types/current/streaming/createDefaultMediaTimelineTransformer.js +32 -1
  93. package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
  94. package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.d.ts.map +1 -0
  95. package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.js +75 -0
  96. package/dist/types/current/streaming/mediaTimelineLanguageFilter.d.ts +24 -6
  97. package/dist/types/current/streaming/mediaTimelineLanguageFilter.d.ts.map +1 -1
  98. package/dist/types/current/streaming/mediaTimelineLanguageFilter.js +61 -16
  99. package/dist/types/current/text/SidecarTextTrackController.d.ts +91 -0
  100. package/dist/types/current/text/SidecarTextTrackController.d.ts.map +1 -0
  101. package/dist/types/current/text/SidecarTextTrackController.js +237 -0
  102. package/dist/types/current/text/SidecarTextTrackLoader.d.ts +60 -0
  103. package/dist/types/current/text/SidecarTextTrackLoader.d.ts.map +1 -0
  104. package/dist/types/current/text/SidecarTextTrackLoader.js +144 -0
  105. package/dist/types/current/text/TextTrack.d.ts +125 -0
  106. package/dist/types/current/text/TextTrack.d.ts.map +1 -0
  107. package/dist/types/current/text/TextTrack.js +9 -0
  108. package/dist/types/current/text/VttCueStyle.d.ts +41 -0
  109. package/dist/types/current/text/VttCueStyle.d.ts.map +1 -0
  110. package/dist/types/current/text/VttCueStyle.js +45 -0
  111. package/dist/types/current/text/discoverDashTextTracks.d.ts +24 -0
  112. package/dist/types/current/text/discoverDashTextTracks.d.ts.map +1 -0
  113. package/dist/types/current/text/discoverDashTextTracks.js +109 -0
  114. package/dist/types/current/text/discoverHlsTextTracks.d.ts +19 -0
  115. package/dist/types/current/text/discoverHlsTextTracks.d.ts.map +1 -0
  116. package/dist/types/current/text/discoverHlsTextTracks.js +49 -0
  117. package/dist/types/current/text/parseWebVtt.d.ts +46 -0
  118. package/dist/types/current/text/parseWebVtt.d.ts.map +1 -0
  119. package/dist/types/current/text/parseWebVtt.js +120 -0
  120. package/dist/types/current/text/pickPreferredTextTrack.d.ts +14 -0
  121. package/dist/types/current/text/pickPreferredTextTrack.d.ts.map +1 -0
  122. package/dist/types/current/text/pickPreferredTextTrack.js +68 -0
  123. package/dist/types/current/track/SeekRange.d.ts +9 -0
  124. package/dist/types/current/track/SeekRange.d.ts.map +1 -0
  125. package/dist/types/current/track/SeekRange.js +5 -0
  126. package/dist/types/current/track/Track.d.ts +50 -7
  127. package/dist/types/current/track/Track.d.ts.map +1 -1
  128. package/dist/types/current/track/TrackBase.d.ts +30 -29
  129. package/dist/types/current/track/TrackBase.d.ts.map +1 -1
  130. package/dist/types/current/track/TrackBase.js +68 -16
  131. package/dist/types/current/track/TrackController.d.ts +100 -36
  132. package/dist/types/current/track/TrackController.d.ts.map +1 -1
  133. package/dist/types/current/track/TrackController.js +368 -115
  134. package/dist/types/current/track/TrackFactory.d.ts +23 -3
  135. package/dist/types/current/track/TrackFactory.d.ts.map +1 -1
  136. package/dist/types/current/track/TrackFactory.js +9 -3
  137. package/dist/types/current/track/dash/DashManifestController.d.ts +1 -40
  138. package/dist/types/current/track/dash/DashManifestController.d.ts.map +1 -1
  139. package/dist/types/current/track/dash/DashManifestController.js +1 -79
  140. package/dist/types/current/track/dash/DashMediaQualityMetadataResolver.d.ts.map +1 -1
  141. package/dist/types/current/track/dash/DashMediaQualityMetadataResolver.js +13 -0
  142. package/dist/types/current/track/dash/DashTrack.d.ts +4 -5
  143. package/dist/types/current/track/dash/DashTrack.d.ts.map +1 -1
  144. package/dist/types/current/track/dash/DashTrack.js +3 -5
  145. package/dist/types/current/track/dash/buildDashMediaTimeline.d.ts.map +1 -1
  146. package/dist/types/current/track/dash/buildDashMediaTimeline.js +3 -2
  147. package/dist/types/current/track/dash/createDashContentTypesValue.js +2 -2
  148. package/dist/types/current/track/dash/createDashFactories.d.ts +39 -12
  149. package/dist/types/current/track/dash/createDashFactories.d.ts.map +1 -1
  150. package/dist/types/current/track/dash/createDashFactories.js +33 -5
  151. package/dist/types/current/track/dash/createSegmentControllerFactory.d.ts +0 -5
  152. package/dist/types/current/track/dash/createSegmentControllerFactory.d.ts.map +1 -1
  153. package/dist/types/current/track/dash/timeline/DashRepresentationSegmentProvider.d.ts.map +1 -1
  154. package/dist/types/current/track/dash/timeline/DashRepresentationSegmentProvider.js +2 -1
  155. package/dist/types/current/track/dash/util/mpd.d.ts +10 -0
  156. package/dist/types/current/track/dash/util/mpd.d.ts.map +1 -1
  157. package/dist/types/current/track/dash/util/mpd.js +16 -0
  158. package/dist/types/current/track/hls/HlsManifestController.d.ts +1 -25
  159. package/dist/types/current/track/hls/HlsManifestController.d.ts.map +1 -1
  160. package/dist/types/current/track/hls/HlsManifestController.js +1 -68
  161. package/dist/types/{ts3.7/track/hls/HlsManifestProvider.d.ts → current/track/hls/HlsManifestData.d.ts} +4 -6
  162. package/dist/types/current/track/hls/HlsManifestData.d.ts.map +1 -0
  163. package/dist/types/current/track/hls/HlsManifestData.js +5 -0
  164. package/dist/types/current/track/hls/HlsMediaQualityMetadataResolver.js +9 -6
  165. package/dist/types/current/track/hls/HlsTrack.d.ts +5 -6
  166. package/dist/types/current/track/hls/HlsTrack.d.ts.map +1 -1
  167. package/dist/types/current/track/hls/HlsTrack.js +3 -5
  168. package/dist/types/current/track/hls/buildHlsMediaTimeline.d.ts +8 -1
  169. package/dist/types/current/track/hls/buildHlsMediaTimeline.d.ts.map +1 -1
  170. package/dist/types/current/track/hls/buildHlsMediaTimeline.js +134 -67
  171. package/dist/types/current/track/hls/createDefaultHlsManifestTransformer.d.ts +1 -1
  172. package/dist/types/current/track/hls/createDefaultHlsManifestTransformer.d.ts.map +1 -1
  173. package/dist/types/current/track/hls/createHlsContentTypesValue.d.ts +1 -1
  174. package/dist/types/current/track/hls/createHlsContentTypesValue.d.ts.map +1 -1
  175. package/dist/types/current/track/hls/createHlsFactories.d.ts +40 -13
  176. package/dist/types/current/track/hls/createHlsFactories.d.ts.map +1 -1
  177. package/dist/types/current/track/hls/createHlsFactories.js +35 -6
  178. package/dist/types/current/track/hls/createHlsManifestProvider.d.ts +6 -0
  179. package/dist/types/current/track/hls/createHlsManifestProvider.d.ts.map +1 -0
  180. package/dist/types/current/track/hls/createHlsManifestProvider.js +9 -0
  181. package/dist/types/current/track/hls/createUrlHlsManifestProvider.d.ts +4 -4
  182. package/dist/types/current/track/hls/createUrlHlsManifestProvider.d.ts.map +1 -1
  183. package/dist/types/current/track/hls/createUrlHlsManifestProvider.js +22 -3
  184. package/dist/types/current/track/hls/index.d.ts +1 -1
  185. package/dist/types/current/track/hls/index.d.ts.map +1 -1
  186. package/dist/types/current/track/hls/index.js +1 -1
  187. package/dist/types/current/track/inferLoadOptionsFromUri.d.ts +15 -0
  188. package/dist/types/current/track/inferLoadOptionsFromUri.d.ts.map +1 -0
  189. package/dist/types/current/track/inferLoadOptionsFromUri.js +55 -0
  190. package/dist/types/current/track/mse/MseTrack.d.ts +66 -8
  191. package/dist/types/current/track/mse/MseTrack.d.ts.map +1 -1
  192. package/dist/types/current/track/mse/MseTrack.js +216 -52
  193. package/dist/types/current/track/source/SourceObjectTrack.d.ts +2 -2
  194. package/dist/types/current/track/source/SourceObjectTrack.d.ts.map +1 -1
  195. package/dist/types/current/track/source/SourceTrack.d.ts +2 -2
  196. package/dist/types/current/track/source/SourceTrack.d.ts.map +1 -1
  197. package/dist/types/current/track/source/SourceTrack.js +1 -2
  198. package/dist/types/current/track/source/SourceTrackBase.d.ts +7 -5
  199. package/dist/types/current/track/source/SourceTrackBase.d.ts.map +1 -1
  200. package/dist/types/current/track/source/SourceTrackBase.js +26 -9
  201. package/dist/types/current/tsconfig.tsbuildinfo +1 -1
  202. package/dist/types/current/util/media/codecOverrides.d.ts +33 -0
  203. package/dist/types/current/util/media/codecOverrides.d.ts.map +1 -0
  204. package/dist/types/current/util/media/codecOverrides.js +37 -0
  205. package/dist/types/current/util/media/codecSupport.d.ts +6 -0
  206. package/dist/types/current/util/media/codecSupport.d.ts.map +1 -0
  207. package/dist/types/current/util/media/codecSupport.js +17 -0
  208. package/dist/types/current/util/media/mediaSource.d.ts +5 -0
  209. package/dist/types/current/util/media/mediaSource.d.ts.map +1 -1
  210. package/dist/types/current/util/media/mediaSource.js +6 -1
  211. package/dist/types/current/vinyl/ReadonlyPlaybackStreamingState.d.ts +9 -2
  212. package/dist/types/current/vinyl/ReadonlyPlaybackStreamingState.d.ts.map +1 -1
  213. package/dist/types/current/vinyl/VinylDeps.d.ts +5 -0
  214. package/dist/types/current/vinyl/VinylDeps.d.ts.map +1 -1
  215. package/dist/types/current/vinyl/VinylOptions.d.ts +68 -4
  216. package/dist/types/current/vinyl/VinylOptions.d.ts.map +1 -1
  217. package/dist/types/current/vinyl/VinylOptions.js +17 -2
  218. package/dist/types/current/vinyl/VinylPlayer.d.ts +63 -4
  219. package/dist/types/current/vinyl/VinylPlayer.d.ts.map +1 -1
  220. package/dist/types/current/vinyl/VinylPlayer.js +216 -36
  221. package/dist/types/current/vinyl/createVinylFactories.d.ts +55 -12
  222. package/dist/types/current/vinyl/createVinylFactories.d.ts.map +1 -1
  223. package/dist/types/current/vinyl/createVinylFactories.js +4 -0
  224. package/dist/types/ts3.7/ad/AdBreakInfo.d.ts +160 -0
  225. package/dist/types/ts3.7/ad/AdController.d.ts +243 -0
  226. package/dist/types/ts3.7/ad/AdControllerImpl.d.ts +146 -0
  227. package/dist/types/ts3.7/ad/AdError.d.ts +6 -0
  228. package/dist/types/ts3.7/ad/AdsProvider.d.ts +28 -0
  229. package/dist/types/ts3.7/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
  230. package/dist/types/ts3.7/ad/discoverHlsInterstitials.d.ts +22 -0
  231. package/dist/types/ts3.7/drm/DrmController.d.ts +29 -4
  232. package/dist/types/ts3.7/drm/DrmControllerImpl.d.ts +13 -4
  233. package/dist/types/ts3.7/drm/util/unpackPlayReadyChallenge.d.ts +5 -0
  234. package/dist/types/ts3.7/index.d.ts +151 -126
  235. package/dist/types/ts3.7/playback/PlaybackControllerImpl.d.ts +1 -0
  236. package/dist/types/ts3.7/playback/PlaybackSource.d.ts +1 -1
  237. package/dist/types/ts3.7/playback/ReadonlyPlaybackController.d.ts +6 -0
  238. package/dist/types/ts3.7/streaming/ContentStream.d.ts +8 -1
  239. package/dist/types/ts3.7/streaming/LoadMetric.d.ts +58 -0
  240. package/dist/types/ts3.7/streaming/ManifestController.d.ts +16 -1
  241. package/dist/types/ts3.7/streaming/ManifestControllerImpl.d.ts +40 -0
  242. package/dist/types/ts3.7/streaming/MediaQualityMetadata.d.ts +19 -0
  243. package/dist/types/ts3.7/streaming/MediaTimeline.d.ts +6 -0
  244. package/dist/types/ts3.7/streaming/SegmentController.d.ts +5 -0
  245. package/dist/types/ts3.7/streaming/SegmentControllerImpl.d.ts +12 -0
  246. package/dist/types/ts3.7/streaming/StreamingEventMap.d.ts +42 -1
  247. package/dist/types/ts3.7/streaming/abr/QualitySelectorImpl.d.ts +28 -0
  248. package/dist/types/ts3.7/streaming/buffering/BufferingController.d.ts +37 -0
  249. package/dist/types/ts3.7/streaming/buffering/MediaSourceController.d.ts +16 -11
  250. package/dist/types/ts3.7/streaming/buffering/codecDenylist.d.ts +23 -0
  251. package/dist/types/ts3.7/streaming/createAllowedContentTypesValue.d.ts +30 -0
  252. package/dist/types/ts3.7/streaming/createDefaultMediaTimelineTransformer.d.ts +4 -1
  253. package/dist/types/ts3.7/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
  254. package/dist/types/ts3.7/streaming/mediaTimelineLanguageFilter.d.ts +24 -6
  255. package/dist/types/ts3.7/text/SidecarTextTrackController.d.ts +91 -0
  256. package/dist/types/ts3.7/text/SidecarTextTrackLoader.d.ts +60 -0
  257. package/dist/types/ts3.7/text/TextTrack.d.ts +129 -0
  258. package/dist/types/ts3.7/text/VttCueStyle.d.ts +41 -0
  259. package/dist/types/ts3.7/text/discoverDashTextTracks.d.ts +24 -0
  260. package/dist/types/ts3.7/text/discoverHlsTextTracks.d.ts +19 -0
  261. package/dist/types/ts3.7/text/parseWebVtt.d.ts +46 -0
  262. package/dist/types/ts3.7/text/pickPreferredTextTrack.d.ts +14 -0
  263. package/dist/types/ts3.7/track/SeekRange.d.ts +9 -0
  264. package/dist/types/ts3.7/track/Track.d.ts +50 -7
  265. package/dist/types/ts3.7/track/TrackBase.d.ts +21 -29
  266. package/dist/types/ts3.7/track/TrackController.d.ts +102 -37
  267. package/dist/types/ts3.7/track/TrackFactory.d.ts +22 -2
  268. package/dist/types/ts3.7/track/dash/DashManifestController.d.ts +1 -36
  269. package/dist/types/ts3.7/track/dash/DashTrack.d.ts +4 -5
  270. package/dist/types/ts3.7/track/dash/createDashFactories.d.ts +39 -12
  271. package/dist/types/ts3.7/track/dash/createSegmentControllerFactory.d.ts +0 -5
  272. package/dist/types/ts3.7/track/dash/util/mpd.d.ts +10 -0
  273. package/dist/types/ts3.7/track/hls/HlsManifestController.d.ts +1 -22
  274. package/dist/types/{current/track/hls/HlsManifestProvider.d.ts → ts3.7/track/hls/HlsManifestData.d.ts} +4 -6
  275. package/dist/types/ts3.7/track/hls/HlsTrack.d.ts +5 -6
  276. package/dist/types/ts3.7/track/hls/buildHlsMediaTimeline.d.ts +8 -1
  277. package/dist/types/ts3.7/track/hls/createDefaultHlsManifestTransformer.d.ts +1 -1
  278. package/dist/types/ts3.7/track/hls/createHlsContentTypesValue.d.ts +1 -1
  279. package/dist/types/ts3.7/track/hls/createHlsFactories.d.ts +40 -13
  280. package/dist/types/ts3.7/track/hls/createHlsManifestProvider.d.ts +6 -0
  281. package/dist/types/ts3.7/track/hls/createUrlHlsManifestProvider.d.ts +4 -4
  282. package/dist/types/ts3.7/track/hls/index.d.ts +1 -1
  283. package/dist/types/ts3.7/track/inferLoadOptionsFromUri.d.ts +15 -0
  284. package/dist/types/ts3.7/track/mse/MseTrack.d.ts +65 -7
  285. package/dist/types/ts3.7/track/source/SourceObjectTrack.d.ts +2 -2
  286. package/dist/types/ts3.7/track/source/SourceTrack.d.ts +2 -2
  287. package/dist/types/ts3.7/track/source/SourceTrackBase.d.ts +7 -5
  288. package/dist/types/ts3.7/util/media/codecOverrides.d.ts +33 -0
  289. package/dist/types/ts3.7/util/media/codecSupport.d.ts +6 -0
  290. package/dist/types/ts3.7/util/media/mediaSource.d.ts +5 -0
  291. package/dist/types/ts3.7/vinyl/ReadonlyPlaybackStreamingState.d.ts +9 -2
  292. package/dist/types/ts3.7/vinyl/VinylDeps.d.ts +5 -0
  293. package/dist/types/ts3.7/vinyl/VinylOptions.d.ts +68 -4
  294. package/dist/types/ts3.7/vinyl/VinylPlayer.d.ts +33 -4
  295. package/dist/types/ts3.7/vinyl/createVinylFactories.d.ts +55 -12
  296. package/dist/types/ts4.1/ad/AdBreakInfo.d.ts +160 -0
  297. package/dist/types/ts4.1/ad/AdController.d.ts +243 -0
  298. package/dist/types/ts4.1/ad/AdControllerImpl.d.ts +146 -0
  299. package/dist/types/ts4.1/ad/AdError.d.ts +6 -0
  300. package/dist/types/ts4.1/ad/AdsProvider.d.ts +28 -0
  301. package/dist/types/ts4.1/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
  302. package/dist/types/ts4.1/ad/discoverHlsInterstitials.d.ts +22 -0
  303. package/dist/types/ts4.1/drm/DrmController.d.ts +29 -4
  304. package/dist/types/ts4.1/drm/DrmControllerImpl.d.ts +13 -4
  305. package/dist/types/ts4.1/drm/util/unpackPlayReadyChallenge.d.ts +5 -0
  306. package/dist/types/ts4.1/index.d.ts +151 -126
  307. package/dist/types/ts4.1/playback/PlaybackControllerImpl.d.ts +1 -0
  308. package/dist/types/ts4.1/playback/PlaybackSource.d.ts +1 -1
  309. package/dist/types/ts4.1/playback/ReadonlyPlaybackController.d.ts +6 -0
  310. package/dist/types/ts4.1/streaming/ContentStream.d.ts +8 -1
  311. package/dist/types/ts4.1/streaming/LoadMetric.d.ts +58 -0
  312. package/dist/types/ts4.1/streaming/ManifestController.d.ts +16 -1
  313. package/dist/types/ts4.1/streaming/ManifestControllerImpl.d.ts +40 -0
  314. package/dist/types/ts4.1/streaming/MediaQualityMetadata.d.ts +19 -0
  315. package/dist/types/ts4.1/streaming/MediaTimeline.d.ts +6 -0
  316. package/dist/types/ts4.1/streaming/SegmentController.d.ts +5 -0
  317. package/dist/types/ts4.1/streaming/SegmentControllerImpl.d.ts +12 -0
  318. package/dist/types/ts4.1/streaming/StreamingEventMap.d.ts +42 -1
  319. package/dist/types/ts4.1/streaming/abr/QualitySelectorImpl.d.ts +28 -0
  320. package/dist/types/ts4.1/streaming/buffering/BufferingController.d.ts +37 -0
  321. package/dist/types/ts4.1/streaming/buffering/MediaSourceController.d.ts +16 -11
  322. package/dist/types/ts4.1/streaming/buffering/codecDenylist.d.ts +23 -0
  323. package/dist/types/ts4.1/streaming/createAllowedContentTypesValue.d.ts +30 -0
  324. package/dist/types/ts4.1/streaming/createDefaultMediaTimelineTransformer.d.ts +4 -1
  325. package/dist/types/ts4.1/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
  326. package/dist/types/ts4.1/streaming/mediaTimelineLanguageFilter.d.ts +24 -6
  327. package/dist/types/ts4.1/text/SidecarTextTrackController.d.ts +92 -0
  328. package/dist/types/ts4.1/text/SidecarTextTrackLoader.d.ts +60 -0
  329. package/dist/types/ts4.1/text/TextTrack.d.ts +129 -0
  330. package/dist/types/ts4.1/text/VttCueStyle.d.ts +41 -0
  331. package/dist/types/ts4.1/text/discoverDashTextTracks.d.ts +24 -0
  332. package/dist/types/ts4.1/text/discoverHlsTextTracks.d.ts +19 -0
  333. package/dist/types/ts4.1/text/parseWebVtt.d.ts +46 -0
  334. package/dist/types/ts4.1/text/pickPreferredTextTrack.d.ts +14 -0
  335. package/dist/types/ts4.1/track/SeekRange.d.ts +9 -0
  336. package/dist/types/ts4.1/track/Track.d.ts +50 -7
  337. package/dist/types/ts4.1/track/TrackBase.d.ts +21 -29
  338. package/dist/types/ts4.1/track/TrackController.d.ts +102 -37
  339. package/dist/types/ts4.1/track/TrackFactory.d.ts +22 -2
  340. package/dist/types/ts4.1/track/dash/DashManifestController.d.ts +1 -36
  341. package/dist/types/ts4.1/track/dash/DashTrack.d.ts +4 -5
  342. package/dist/types/ts4.1/track/dash/createDashFactories.d.ts +39 -12
  343. package/dist/types/ts4.1/track/dash/createSegmentControllerFactory.d.ts +0 -5
  344. package/dist/types/ts4.1/track/dash/util/mpd.d.ts +10 -0
  345. package/dist/types/ts4.1/track/hls/HlsManifestController.d.ts +1 -22
  346. package/dist/types/ts4.1/track/hls/{HlsManifestProvider.d.ts → HlsManifestData.d.ts} +4 -6
  347. package/dist/types/ts4.1/track/hls/HlsTrack.d.ts +5 -6
  348. package/dist/types/ts4.1/track/hls/buildHlsMediaTimeline.d.ts +8 -1
  349. package/dist/types/ts4.1/track/hls/createDefaultHlsManifestTransformer.d.ts +1 -1
  350. package/dist/types/ts4.1/track/hls/createHlsContentTypesValue.d.ts +1 -1
  351. package/dist/types/ts4.1/track/hls/createHlsFactories.d.ts +41 -13
  352. package/dist/types/ts4.1/track/hls/createHlsManifestProvider.d.ts +6 -0
  353. package/dist/types/ts4.1/track/hls/createUrlHlsManifestProvider.d.ts +4 -4
  354. package/dist/types/ts4.1/track/hls/index.d.ts +1 -1
  355. package/dist/types/ts4.1/track/inferLoadOptionsFromUri.d.ts +15 -0
  356. package/dist/types/ts4.1/track/mse/MseTrack.d.ts +65 -7
  357. package/dist/types/ts4.1/track/source/SourceObjectTrack.d.ts +2 -2
  358. package/dist/types/ts4.1/track/source/SourceTrack.d.ts +2 -2
  359. package/dist/types/ts4.1/track/source/SourceTrackBase.d.ts +7 -5
  360. package/dist/types/ts4.1/util/media/codecOverrides.d.ts +33 -0
  361. package/dist/types/ts4.1/util/media/codecSupport.d.ts +6 -0
  362. package/dist/types/ts4.1/util/media/mediaSource.d.ts +5 -0
  363. package/dist/types/ts4.1/vinyl/ReadonlyPlaybackStreamingState.d.ts +9 -2
  364. package/dist/types/ts4.1/vinyl/VinylDeps.d.ts +5 -0
  365. package/dist/types/ts4.1/vinyl/VinylOptions.d.ts +68 -4
  366. package/dist/types/ts4.1/vinyl/VinylPlayer.d.ts +33 -4
  367. package/dist/types/ts4.1/vinyl/createVinylFactories.d.ts +56 -12
  368. package/dist/types/ts4.7/ad/AdBreakInfo.d.ts +160 -0
  369. package/dist/types/ts4.7/ad/AdController.d.ts +243 -0
  370. package/dist/types/ts4.7/ad/AdControllerImpl.d.ts +146 -0
  371. package/dist/types/ts4.7/ad/AdError.d.ts +6 -0
  372. package/dist/types/ts4.7/ad/AdsProvider.d.ts +28 -0
  373. package/dist/types/ts4.7/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
  374. package/dist/types/ts4.7/ad/discoverHlsInterstitials.d.ts +22 -0
  375. package/dist/types/ts4.7/drm/DrmController.d.ts +29 -4
  376. package/dist/types/ts4.7/drm/DrmControllerImpl.d.ts +13 -4
  377. package/dist/types/ts4.7/drm/util/unpackPlayReadyChallenge.d.ts +5 -0
  378. package/dist/types/ts4.7/index.d.ts +151 -126
  379. package/dist/types/ts4.7/playback/PlaybackControllerImpl.d.ts +1 -0
  380. package/dist/types/ts4.7/playback/PlaybackSource.d.ts +1 -1
  381. package/dist/types/ts4.7/playback/ReadonlyPlaybackController.d.ts +6 -0
  382. package/dist/types/ts4.7/streaming/ContentStream.d.ts +8 -1
  383. package/dist/types/ts4.7/streaming/LoadMetric.d.ts +58 -0
  384. package/dist/types/ts4.7/streaming/ManifestController.d.ts +16 -1
  385. package/dist/types/ts4.7/streaming/ManifestControllerImpl.d.ts +43 -0
  386. package/dist/types/ts4.7/streaming/MediaQualityMetadata.d.ts +19 -0
  387. package/dist/types/ts4.7/streaming/MediaTimeline.d.ts +6 -0
  388. package/dist/types/ts4.7/streaming/SegmentController.d.ts +5 -0
  389. package/dist/types/ts4.7/streaming/SegmentControllerImpl.d.ts +12 -0
  390. package/dist/types/ts4.7/streaming/StreamingEventMap.d.ts +42 -1
  391. package/dist/types/ts4.7/streaming/abr/QualitySelectorImpl.d.ts +28 -0
  392. package/dist/types/ts4.7/streaming/buffering/BufferingController.d.ts +37 -0
  393. package/dist/types/ts4.7/streaming/buffering/MediaSourceController.d.ts +16 -11
  394. package/dist/types/ts4.7/streaming/buffering/codecDenylist.d.ts +23 -0
  395. package/dist/types/ts4.7/streaming/createAllowedContentTypesValue.d.ts +30 -0
  396. package/dist/types/ts4.7/streaming/createDefaultMediaTimelineTransformer.d.ts +4 -1
  397. package/dist/types/ts4.7/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
  398. package/dist/types/ts4.7/streaming/mediaTimelineLanguageFilter.d.ts +24 -6
  399. package/dist/types/ts4.7/text/SidecarTextTrackController.d.ts +91 -0
  400. package/dist/types/ts4.7/text/SidecarTextTrackLoader.d.ts +60 -0
  401. package/dist/types/ts4.7/text/TextTrack.d.ts +129 -0
  402. package/dist/types/ts4.7/text/VttCueStyle.d.ts +41 -0
  403. package/dist/types/ts4.7/text/discoverDashTextTracks.d.ts +24 -0
  404. package/dist/types/ts4.7/text/discoverHlsTextTracks.d.ts +19 -0
  405. package/dist/types/ts4.7/text/parseWebVtt.d.ts +46 -0
  406. package/dist/types/ts4.7/text/pickPreferredTextTrack.d.ts +14 -0
  407. package/dist/types/ts4.7/track/SeekRange.d.ts +9 -0
  408. package/dist/types/ts4.7/track/Track.d.ts +50 -7
  409. package/dist/types/ts4.7/track/TrackBase.d.ts +30 -29
  410. package/dist/types/ts4.7/track/TrackController.d.ts +102 -37
  411. package/dist/types/ts4.7/track/TrackFactory.d.ts +23 -3
  412. package/dist/types/ts4.7/track/dash/DashManifestController.d.ts +1 -40
  413. package/dist/types/ts4.7/track/dash/DashTrack.d.ts +4 -5
  414. package/dist/types/ts4.7/track/dash/createDashFactories.d.ts +39 -12
  415. package/dist/types/ts4.7/track/dash/createSegmentControllerFactory.d.ts +0 -5
  416. package/dist/types/ts4.7/track/dash/util/mpd.d.ts +10 -0
  417. package/dist/types/ts4.7/track/hls/HlsManifestController.d.ts +1 -25
  418. package/dist/types/ts4.7/track/hls/{HlsManifestProvider.d.ts → HlsManifestData.d.ts} +4 -6
  419. package/dist/types/ts4.7/track/hls/HlsTrack.d.ts +5 -6
  420. package/dist/types/ts4.7/track/hls/buildHlsMediaTimeline.d.ts +8 -1
  421. package/dist/types/ts4.7/track/hls/createDefaultHlsManifestTransformer.d.ts +1 -1
  422. package/dist/types/ts4.7/track/hls/createHlsContentTypesValue.d.ts +1 -1
  423. package/dist/types/ts4.7/track/hls/createHlsFactories.d.ts +40 -13
  424. package/dist/types/ts4.7/track/hls/createHlsManifestProvider.d.ts +6 -0
  425. package/dist/types/ts4.7/track/hls/createUrlHlsManifestProvider.d.ts +4 -4
  426. package/dist/types/ts4.7/track/hls/index.d.ts +1 -1
  427. package/dist/types/ts4.7/track/inferLoadOptionsFromUri.d.ts +15 -0
  428. package/dist/types/ts4.7/track/mse/MseTrack.d.ts +66 -8
  429. package/dist/types/ts4.7/track/source/SourceObjectTrack.d.ts +2 -2
  430. package/dist/types/ts4.7/track/source/SourceTrack.d.ts +2 -2
  431. package/dist/types/ts4.7/track/source/SourceTrackBase.d.ts +7 -5
  432. package/dist/types/ts4.7/util/media/codecOverrides.d.ts +33 -0
  433. package/dist/types/ts4.7/util/media/codecSupport.d.ts +6 -0
  434. package/dist/types/ts4.7/util/media/mediaSource.d.ts +5 -0
  435. package/dist/types/ts4.7/vinyl/ReadonlyPlaybackStreamingState.d.ts +9 -2
  436. package/dist/types/ts4.7/vinyl/VinylDeps.d.ts +5 -0
  437. package/dist/types/ts4.7/vinyl/VinylOptions.d.ts +68 -4
  438. package/dist/types/ts4.7/vinyl/VinylPlayer.d.ts +63 -4
  439. package/dist/types/ts4.7/vinyl/createVinylFactories.d.ts +55 -12
  440. package/dist/unit/types/current/ad/AdController.test.d.ts +2 -0
  441. package/dist/unit/types/current/ad/AdController.test.d.ts.map +1 -0
  442. package/dist/unit/types/current/ad/AdController.test.js +10 -0
  443. package/dist/unit/types/current/ad/AdControllerImpl.test.d.ts +2 -0
  444. package/dist/unit/types/current/ad/AdControllerImpl.test.d.ts.map +1 -0
  445. package/dist/unit/types/current/ad/AdControllerImpl.test.js +1456 -0
  446. package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.d.ts +2 -0
  447. package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.d.ts.map +1 -0
  448. package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.js +56 -0
  449. package/dist/unit/types/current/ad/discoverHlsInterstitials.test.d.ts +2 -0
  450. package/dist/unit/types/current/ad/discoverHlsInterstitials.test.d.ts.map +1 -0
  451. package/dist/unit/types/current/ad/discoverHlsInterstitials.test.js +756 -0
  452. package/dist/unit/types/current/drm/DrmControllerImpl.test.js +205 -4
  453. package/dist/unit/types/current/index.d.ts +117 -98
  454. package/dist/unit/types/current/index.d.ts.map +1 -1
  455. package/dist/unit/types/current/index.js +117 -98
  456. package/dist/unit/types/current/playback/PlaybackControllerImpl.test.js +92 -3
  457. package/dist/unit/types/current/streaming/ContentStream.test.js +11 -0
  458. package/dist/unit/types/current/streaming/ManifestControllerImpl.test.d.ts +2 -0
  459. package/dist/unit/types/current/streaming/ManifestControllerImpl.test.d.ts.map +1 -0
  460. package/dist/unit/types/current/streaming/ManifestControllerImpl.test.js +197 -0
  461. package/dist/unit/types/current/streaming/MediaTimeline.test.js +2 -0
  462. package/dist/unit/types/current/streaming/MseTrack.test.js +478 -14
  463. package/dist/unit/types/current/streaming/SegmentControllerImpl.test.js +66 -0
  464. package/dist/unit/types/current/streaming/StreamingEventMap.test.js +2 -2
  465. package/dist/unit/types/current/streaming/abr/QualitySelectorImpl.test.js +110 -0
  466. package/dist/unit/types/current/streaming/buffering/BufferingController.test.js +123 -21
  467. package/dist/unit/types/current/streaming/buffering/MediaSourceController.test.js +37 -10
  468. package/dist/unit/types/current/streaming/buffering/SourceBufferController.test.js +4 -0
  469. package/dist/unit/types/current/streaming/buffering/codecDenylist.test.d.ts +2 -0
  470. package/dist/unit/types/current/streaming/buffering/codecDenylist.test.d.ts.map +1 -0
  471. package/dist/unit/types/current/streaming/buffering/codecDenylist.test.js +56 -0
  472. package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.d.ts +2 -0
  473. package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.d.ts.map +1 -0
  474. package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.js +77 -0
  475. package/dist/unit/types/current/streaming/createDefaultMediaTimelineTransformer.test.js +144 -2
  476. package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.d.ts +2 -0
  477. package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.d.ts.map +1 -0
  478. package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.js +99 -0
  479. package/dist/unit/types/current/streaming/mediaTimelineFilter.test.js +9 -0
  480. package/dist/unit/types/current/streaming/mediaTimelineLanguageFilter.test.js +92 -3
  481. package/dist/unit/types/current/text/SidecarTextTrackController.test.d.ts +2 -0
  482. package/dist/unit/types/current/text/SidecarTextTrackController.test.d.ts.map +1 -0
  483. package/dist/unit/types/current/text/SidecarTextTrackController.test.js +587 -0
  484. package/dist/unit/types/current/text/SidecarTextTrackLoader.test.d.ts +2 -0
  485. package/dist/unit/types/current/text/SidecarTextTrackLoader.test.d.ts.map +1 -0
  486. package/dist/unit/types/current/text/SidecarTextTrackLoader.test.js +336 -0
  487. package/dist/unit/types/current/text/VttCueStyle.test.d.ts +2 -0
  488. package/dist/unit/types/current/text/VttCueStyle.test.d.ts.map +1 -0
  489. package/dist/unit/types/current/text/VttCueStyle.test.js +76 -0
  490. package/dist/unit/types/current/text/discoverDashTextTracks.test.d.ts +2 -0
  491. package/dist/unit/types/current/text/discoverDashTextTracks.test.d.ts.map +1 -0
  492. package/dist/unit/types/current/text/discoverDashTextTracks.test.js +199 -0
  493. package/dist/unit/types/current/text/discoverHlsTextTracks.test.d.ts +2 -0
  494. package/dist/unit/types/current/text/discoverHlsTextTracks.test.d.ts.map +1 -0
  495. package/dist/unit/types/current/text/discoverHlsTextTracks.test.js +177 -0
  496. package/dist/unit/types/current/text/parseWebVtt.test.d.ts +2 -0
  497. package/dist/unit/types/current/text/parseWebVtt.test.d.ts.map +1 -0
  498. package/dist/unit/types/current/text/parseWebVtt.test.js +212 -0
  499. package/dist/unit/types/current/text/pickPreferredTextTrack.test.d.ts +2 -0
  500. package/dist/unit/types/current/text/pickPreferredTextTrack.test.d.ts.map +1 -0
  501. package/dist/unit/types/current/text/pickPreferredTextTrack.test.js +67 -0
  502. package/dist/unit/types/current/track/TrackBase.test.js +50 -5
  503. package/dist/unit/types/current/track/TrackController.test.js +712 -109
  504. package/dist/unit/types/current/track/TrackFactory.test.js +13 -25
  505. package/dist/unit/types/current/track/dash/createDashContentStreamFactories.test.js +1 -0
  506. package/dist/unit/types/current/track/dash/createDashFactories.test.js +63 -2
  507. package/dist/unit/types/current/track/dash/createSegmentControllerFactory.test.js +1 -0
  508. package/dist/unit/types/current/track/dash/util/mpd.test.js +24 -1
  509. package/dist/unit/types/current/track/hls/HlsManifestController.test.js +4 -4
  510. package/dist/unit/types/current/track/hls/HlsMediaQualityMetadataResolver.test.js +4 -2
  511. package/dist/unit/types/current/track/hls/buildHlsMediaTimeline.test.js +260 -14
  512. package/dist/unit/types/current/track/hls/createHlsContentStreamFactories.test.js +1 -0
  513. package/dist/unit/types/current/track/hls/createHlsFactories.test.js +182 -4
  514. package/dist/unit/types/current/track/hls/createUrlHlsManifestProvider.test.js +19 -0
  515. package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.d.ts +2 -0
  516. package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.d.ts.map +1 -0
  517. package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.js +165 -0
  518. package/dist/unit/types/current/track/source/SourceTrack.test.js +5 -0
  519. package/dist/unit/types/current/track/source/SourceTrackBase.test.js +24 -3
  520. package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
  521. package/dist/unit/types/current/util/media/codecOverrides.test.d.ts +2 -0
  522. package/dist/unit/types/current/util/media/codecOverrides.test.d.ts.map +1 -0
  523. package/dist/unit/types/current/util/media/codecOverrides.test.js +42 -0
  524. package/dist/unit/types/current/util/media/codecSupport.test.d.ts +2 -0
  525. package/dist/unit/types/current/util/media/codecSupport.test.d.ts.map +1 -0
  526. package/dist/unit/types/current/util/media/codecSupport.test.js +26 -0
  527. package/dist/unit/types/current/util/media/mediaSource.test.js +6 -0
  528. package/dist/unit/types/current/vinyl/VinylPlayer.test.js +177 -75
  529. package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.d.ts +2 -0
  530. package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.d.ts.map +1 -0
  531. package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.js +142 -0
  532. package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.d.ts +2 -0
  533. package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.d.ts.map +1 -0
  534. package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.js +263 -0
  535. package/dist/vinylTestUtil/index.js +2393 -2232
  536. package/dist/vinylTestUtil/index.js.map +4 -4
  537. package/dist/vinylTestUtil/types/current/assets/vinylTestAssets.d.ts +14 -0
  538. package/dist/vinylTestUtil/types/current/assets/vinylTestAssets.d.ts.map +1 -1
  539. package/dist/vinylTestUtil/types/current/assets/vinylTestAssets.js +49 -30
  540. package/dist/vinylTestUtil/types/current/index.d.ts +53 -51
  541. package/dist/vinylTestUtil/types/current/index.d.ts.map +1 -1
  542. package/dist/vinylTestUtil/types/current/index.js +53 -51
  543. package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.d.ts +15 -0
  544. package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.d.ts.map +1 -0
  545. package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.js +26 -0
  546. package/dist/vinylTestUtil/types/current/mock/dash/MockDashManifestController.d.ts +8 -1
  547. package/dist/vinylTestUtil/types/current/mock/dash/MockDashManifestController.d.ts.map +1 -1
  548. package/dist/vinylTestUtil/types/current/mock/dash/MockDashManifestController.js +15 -0
  549. package/dist/vinylTestUtil/types/current/mock/dash/mockDashManifest.d.ts +12 -12
  550. package/dist/vinylTestUtil/types/current/mock/drm/MockDrmController.d.ts +2 -2
  551. package/dist/vinylTestUtil/types/current/mock/drm/MockDrmController.d.ts.map +1 -1
  552. package/dist/vinylTestUtil/types/current/mock/hls/MockHlsManifestController.d.ts +7 -1
  553. package/dist/vinylTestUtil/types/current/mock/hls/MockHlsManifestController.d.ts.map +1 -1
  554. package/dist/vinylTestUtil/types/current/mock/hls/MockHlsManifestController.js +12 -0
  555. package/dist/vinylTestUtil/types/current/mock/hls/mockHlsManifest.d.ts +3 -3
  556. package/dist/vinylTestUtil/types/current/mock/hls/mockHlsManifest.d.ts.map +1 -1
  557. package/dist/vinylTestUtil/types/current/mock/hls/mockHlsManifest.js +1 -0
  558. package/dist/vinylTestUtil/types/current/mock/player/MockVinylPlayerDependencies.d.ts +8 -0
  559. package/dist/vinylTestUtil/types/current/mock/player/MockVinylPlayerDependencies.d.ts.map +1 -1
  560. package/dist/vinylTestUtil/types/current/mock/player/MockVinylPlayerDependencies.js +17 -1
  561. package/dist/vinylTestUtil/types/current/mock/streaming/MockContentStream.d.ts +2 -1
  562. package/dist/vinylTestUtil/types/current/mock/streaming/MockContentStream.d.ts.map +1 -1
  563. package/dist/vinylTestUtil/types/current/mock/streaming/MockContentStream.js +1 -0
  564. package/dist/vinylTestUtil/types/current/mock/streaming/buffering/MockBufferingController.d.ts +1 -0
  565. package/dist/vinylTestUtil/types/current/mock/streaming/buffering/MockBufferingController.d.ts.map +1 -1
  566. package/dist/vinylTestUtil/types/current/mock/streaming/buffering/MockBufferingController.js +1 -0
  567. package/dist/vinylTestUtil/types/current/mock/streaming/buffering/MockMediaSourceController.d.ts +2 -1
  568. package/dist/vinylTestUtil/types/current/mock/streaming/buffering/MockMediaSourceController.d.ts.map +1 -1
  569. package/dist/vinylTestUtil/types/current/mock/streaming/buffering/MockMediaSourceController.js +2 -1
  570. package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.d.ts +10 -0
  571. package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.d.ts.map +1 -0
  572. package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.js +14 -0
  573. package/dist/vinylTestUtil/types/current/mock/track/MockTrack.d.ts +13 -4
  574. package/dist/vinylTestUtil/types/current/mock/track/MockTrack.d.ts.map +1 -1
  575. package/dist/vinylTestUtil/types/current/mock/track/MockTrack.js +11 -0
  576. package/dist/vinylTestUtil/types/current/mock/track/MockTrackController.d.ts +3 -2
  577. package/dist/vinylTestUtil/types/current/mock/track/MockTrackController.d.ts.map +1 -1
  578. package/dist/vinylTestUtil/types/current/mock/track/MockTrackController.js +2 -1
  579. package/dist/vinylTestUtil/types/current/mock/track/dash/createMockDashDependencies.d.ts +6 -0
  580. package/dist/vinylTestUtil/types/current/mock/track/dash/createMockDashDependencies.d.ts.map +1 -1
  581. package/dist/vinylTestUtil/types/current/mock/track/dash/createMockDashDependencies.js +8 -1
  582. package/dist/vinylTestUtil/types/current/mock/track/hls/createMockHlsDependencies.d.ts +4 -0
  583. package/dist/vinylTestUtil/types/current/mock/track/hls/createMockHlsDependencies.d.ts.map +1 -1
  584. package/dist/vinylTestUtil/types/current/mock/track/hls/createMockHlsDependencies.js +6 -1
  585. package/dist/vinylTestUtil/types/current/player/createVinylSuite.d.ts.map +1 -1
  586. package/dist/vinylTestUtil/types/current/player/createVinylSuite.js +18 -7
  587. package/dist/vinylTestUtil/types/current/tsconfig.tsbuildinfo +1 -1
  588. package/dist/vinylTestUtil/types/current/util/playback/eventPromises.d.ts.map +1 -1
  589. package/dist/vinylTestUtil/types/current/util/playback/eventPromises.js +1 -1
  590. package/dist/vinylTestUtil/types/current/util/playback/expectTrackCanSeek.d.ts.map +1 -1
  591. package/dist/vinylTestUtil/types/current/util/playback/expectTrackCanSeek.js +5 -2
  592. package/dist/vinylTestUtil/types/current/util/playback/expectTrackPlays.js +3 -3
  593. package/dist/vinylTestUtil/types/current/util/playback/expectTrackPlaysUntil.d.ts.map +1 -1
  594. package/dist/vinylTestUtil/types/current/util/playback/expectTrackPlaysUntil.js +11 -7
  595. package/dist/vinylTestUtil/types/ts3.7/assets/vinylTestAssets.d.ts +14 -0
  596. package/dist/vinylTestUtil/types/ts3.7/index.d.ts +53 -51
  597. package/dist/vinylTestUtil/types/ts3.7/mock/ad/MockAdController.d.ts +15 -0
  598. package/dist/vinylTestUtil/types/ts3.7/mock/dash/MockDashManifestController.d.ts +8 -1
  599. package/dist/vinylTestUtil/types/ts3.7/mock/dash/mockDashManifest.d.ts +12 -12
  600. package/dist/vinylTestUtil/types/ts3.7/mock/drm/MockDrmController.d.ts +2 -2
  601. package/dist/vinylTestUtil/types/ts3.7/mock/hls/MockHlsManifestController.d.ts +7 -1
  602. package/dist/vinylTestUtil/types/ts3.7/mock/hls/mockHlsManifest.d.ts +3 -3
  603. package/dist/vinylTestUtil/types/ts3.7/mock/player/MockVinylPlayerDependencies.d.ts +8 -0
  604. package/dist/vinylTestUtil/types/ts3.7/mock/streaming/MockContentStream.d.ts +2 -1
  605. package/dist/vinylTestUtil/types/ts3.7/mock/streaming/buffering/MockBufferingController.d.ts +1 -0
  606. package/dist/vinylTestUtil/types/ts3.7/mock/streaming/buffering/MockMediaSourceController.d.ts +2 -1
  607. package/dist/vinylTestUtil/types/ts3.7/mock/text/MockTextTrackController.d.ts +10 -0
  608. package/dist/vinylTestUtil/types/ts3.7/mock/track/MockTrack.d.ts +13 -4
  609. package/dist/vinylTestUtil/types/ts3.7/mock/track/MockTrackController.d.ts +3 -2
  610. package/dist/vinylTestUtil/types/ts3.7/mock/track/dash/createMockDashDependencies.d.ts +6 -0
  611. package/dist/vinylTestUtil/types/ts3.7/mock/track/hls/createMockHlsDependencies.d.ts +4 -0
  612. package/dist/vinylTestUtil/types/ts4.1/assets/vinylTestAssets.d.ts +14 -0
  613. package/dist/vinylTestUtil/types/ts4.1/index.d.ts +53 -51
  614. package/dist/vinylTestUtil/types/ts4.1/mock/ad/MockAdController.d.ts +15 -0
  615. package/dist/vinylTestUtil/types/ts4.1/mock/dash/MockDashManifestController.d.ts +8 -1
  616. package/dist/vinylTestUtil/types/ts4.1/mock/dash/mockDashManifest.d.ts +12 -12
  617. package/dist/vinylTestUtil/types/ts4.1/mock/drm/MockDrmController.d.ts +2 -2
  618. package/dist/vinylTestUtil/types/ts4.1/mock/hls/MockHlsManifestController.d.ts +7 -1
  619. package/dist/vinylTestUtil/types/ts4.1/mock/hls/mockHlsManifest.d.ts +3 -3
  620. package/dist/vinylTestUtil/types/ts4.1/mock/player/MockVinylPlayerDependencies.d.ts +8 -0
  621. package/dist/vinylTestUtil/types/ts4.1/mock/streaming/MockContentStream.d.ts +2 -1
  622. package/dist/vinylTestUtil/types/ts4.1/mock/streaming/buffering/MockBufferingController.d.ts +1 -0
  623. package/dist/vinylTestUtil/types/ts4.1/mock/streaming/buffering/MockMediaSourceController.d.ts +2 -1
  624. package/dist/vinylTestUtil/types/ts4.1/mock/text/MockTextTrackController.d.ts +10 -0
  625. package/dist/vinylTestUtil/types/ts4.1/mock/track/MockTrack.d.ts +13 -4
  626. package/dist/vinylTestUtil/types/ts4.1/mock/track/MockTrackController.d.ts +3 -2
  627. package/dist/vinylTestUtil/types/ts4.1/mock/track/dash/createMockDashDependencies.d.ts +6 -0
  628. package/dist/vinylTestUtil/types/ts4.1/mock/track/hls/createMockHlsDependencies.d.ts +4 -0
  629. package/dist/vinylTestUtil/types/ts4.7/assets/vinylTestAssets.d.ts +14 -0
  630. package/dist/vinylTestUtil/types/ts4.7/index.d.ts +53 -51
  631. package/dist/vinylTestUtil/types/ts4.7/mock/ad/MockAdController.d.ts +15 -0
  632. package/dist/vinylTestUtil/types/ts4.7/mock/dash/MockDashManifestController.d.ts +8 -1
  633. package/dist/vinylTestUtil/types/ts4.7/mock/dash/mockDashManifest.d.ts +12 -12
  634. package/dist/vinylTestUtil/types/ts4.7/mock/drm/MockDrmController.d.ts +2 -2
  635. package/dist/vinylTestUtil/types/ts4.7/mock/hls/MockHlsManifestController.d.ts +7 -1
  636. package/dist/vinylTestUtil/types/ts4.7/mock/hls/mockHlsManifest.d.ts +3 -3
  637. package/dist/vinylTestUtil/types/ts4.7/mock/player/MockVinylPlayerDependencies.d.ts +8 -0
  638. package/dist/vinylTestUtil/types/ts4.7/mock/streaming/MockContentStream.d.ts +2 -1
  639. package/dist/vinylTestUtil/types/ts4.7/mock/streaming/buffering/MockBufferingController.d.ts +1 -0
  640. package/dist/vinylTestUtil/types/ts4.7/mock/streaming/buffering/MockMediaSourceController.d.ts +2 -1
  641. package/dist/vinylTestUtil/types/ts4.7/mock/text/MockTextTrackController.d.ts +10 -0
  642. package/dist/vinylTestUtil/types/ts4.7/mock/track/MockTrack.d.ts +13 -4
  643. package/dist/vinylTestUtil/types/ts4.7/mock/track/MockTrackController.d.ts +3 -2
  644. package/dist/vinylTestUtil/types/ts4.7/mock/track/dash/createMockDashDependencies.d.ts +6 -0
  645. package/dist/vinylTestUtil/types/ts4.7/mock/track/hls/createMockHlsDependencies.d.ts +4 -0
  646. package/docs/ADS.md +264 -0
  647. package/docs/USAGE.md +142 -9
  648. package/package.json +16 -16
  649. package/dist/types/current/track/hls/HlsManifestProvider.d.ts.map +0 -1
  650. package/dist/unit/types/current/track/dash/DashManifestController.test.d.ts +0 -2
  651. package/dist/unit/types/current/track/dash/DashManifestController.test.d.ts.map +0 -1
  652. package/dist/unit/types/current/track/dash/DashManifestController.test.js +0 -186
  653. /package/dist/types/current/{track/hls/HlsManifestProvider.js → ad/AdBreakInfo.js} +0 -0
@@ -27,7 +27,7 @@ export interface PlaybackSource {
27
27
  load(): void;
28
28
  /**
29
29
  * Determines whether the media element is allowed to have a remote playback UI.
30
- * (Note: AirPlay does not support remote playback for Dash)
30
+ * (Note: AirPlay does not support remote playback for MSE)
31
31
  */
32
32
  disableRemotePlayback: boolean;
33
33
  }
@@ -163,6 +163,11 @@ export interface PlaybackControllerEventMap {
163
163
  * Fired periodically as the browser loads a resource.
164
164
  */
165
165
  readonly progress: ProgressEvent;
166
+ /**
167
+ * Fired when the intrinsic dimensions of the media (e.g. a video's width or
168
+ * height) change, including once they first become known.
169
+ */
170
+ readonly resize: AnyRecord;
166
171
  /**
167
172
  * Fired when the playback rate has changed.
168
173
  */
@@ -259,6 +264,7 @@ export declare const ALL_PLAYBACK_STATE_EVENTS: readonly [
259
264
  "rateChange",
260
265
  "readyStateChange",
261
266
  "reset",
267
+ "resize",
262
268
  "seeked",
263
269
  "seeking",
264
270
  "timeUpdate",
@@ -39,6 +39,10 @@ export interface ContentStream extends ReadonlyEventHost<StreamingEventMap>, Dis
39
39
  * True if the last segment has been appended.
40
40
  */
41
41
  readonly bufferingEnded: boolean;
42
+ /**
43
+ * True while this stream's buffer holds any data.
44
+ */
45
+ readonly hasData: boolean;
42
46
  /**
43
47
  * Starts prefetching with the given priority and prefetch start time.
44
48
  * @param options
@@ -53,7 +57,7 @@ export interface ContentStream extends ReadonlyEventHost<StreamingEventMap>, Dis
53
57
  /**
54
58
  * Activates the content stream, activating sub-controllers.
55
59
  */
56
- activate(options: ContentStreamActivateOptions): void;
60
+ activate(options: Maybe<ContentStreamActivateOptions>): void;
57
61
  /**
58
62
  * Deactivates the content stream, deactivating sub-controllers.
59
63
  */
@@ -82,6 +86,8 @@ export interface ContentStreamImplDeps {
82
86
  }
83
87
  export declare class ContentStreamImpl extends EventHostImpl<StreamingEventMap> implements ContentStream {
84
88
  readonly contentType: ContentType;
89
+ get [Symbol.toStringTag](): string;
90
+ readonly logPrefix: string;
85
91
  private disposer;
86
92
  private readonly segmentController;
87
93
  private readonly bufferingController;
@@ -91,6 +97,7 @@ export declare class ContentStreamImpl extends EventHostImpl<StreamingEventMap>
91
97
  get streamingQuality(): (MediaQualityMetadata | null);
92
98
  get bufferingQuality(): (MediaQualityMetadata | null);
93
99
  get playbackQuality(): (MediaQualityMetadata | null);
100
+ get hasData(): boolean;
94
101
  get bufferingEnded(): boolean;
95
102
  get error(): (Error | null);
96
103
  /**
@@ -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
@@ -1,5 +1,16 @@
1
1
  import type { ObservableValue } from '@amazon/vinyl-observable';
2
- export interface ManifestController<T> extends ObservableValue<T> {
2
+ import type { ReadonlyAbort, ReadonlyEventHost } from '@amazon/vinyl-util';
3
+ import type { LoadSpanMeasurement } from './LoadMetric';
4
+ /**
5
+ * Events a manifest controller dispatches.
6
+ */
7
+ export interface ManifestControllerEventMap {
8
+ /**
9
+ * The initial manifest fetch completed.
10
+ */
11
+ readonly loadSpanMeasured: LoadSpanMeasurement;
12
+ }
13
+ export interface ManifestController<T> extends ObservableValue<T>, ReadonlyEventHost<ManifestControllerEventMap> {
3
14
  /**
4
15
  * Manually triggers a reload of the manifest.
5
16
  * A manifest reload will not clear currently fetched or buffered segments.
@@ -10,4 +21,8 @@ export interface ManifestController<T> extends ObservableValue<T> {
10
21
  */
11
22
  reset(): void;
12
23
  }
24
+ /**
25
+ * Provides a manifest.
26
+ */
27
+ export type ManifestProvider<T> = (abort?: ReadonlyAbort) => Promise<T>;
13
28
  //# sourceMappingURL=ManifestController.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
@@ -11,6 +11,17 @@ export declare const ALL_CONTENT_TYPES: [
11
11
  "audio",
12
12
  "text"
13
13
  ];
14
+ /**
15
+ * The content types that can be restricted via an allow list (see
16
+ * `VinylOptions.allowedContentTypes`). Text is intentionally excluded: text
17
+ * tracks (subtitles / closed captions) are governed by caption selection, not
18
+ * by the content-type allow list, so they always remain available.
19
+ */
20
+ export type RestrictableContentType = Exclude<ContentType, 'text'>;
21
+ export declare const RESTRICTABLE_CONTENT_TYPES: [
22
+ "video",
23
+ "audio"
24
+ ];
14
25
  /**
15
26
  * Contains media formatting and encryption metadata.
16
27
  */
@@ -117,6 +128,14 @@ export interface MediaQualityMetadata extends MediaFormatMetadata {
117
128
  * Specifies the language of the content, using a code as defined by RFC 5646.
118
129
  */
119
130
  readonly lang: string | null;
131
+ /**
132
+ * Media characteristics / accessibility roles describing this rendition,
133
+ * e.g. `public.accessibility.describes-video` (HLS CHARACTERISTICS) or a
134
+ * DASH Role / Accessibility scheme value such as `description`. Used to keep
135
+ * accessibility renditions (e.g. audio description) from being auto-selected
136
+ * by default. Empty when none are signaled.
137
+ */
138
+ readonly characteristics: readonly string[];
120
139
  /**
121
140
  * Identifies the group this quality belongs to (e.g. the adaptation set).
122
141
  */
@@ -1,6 +1,7 @@
1
1
  import type { SegmentReference } from './SegmentReference';
2
2
  import type { SegmentDataProvider } from './SegmentDataSlot';
3
3
  import type { MediaQualityMetadata } from './MediaQualityMetadata';
4
+ import type { AdBreakList } from '../ad/AdBreakInfo';
4
5
  /**
5
6
  * Represents a single quality within a period, providing access to its metadata
6
7
  * and segment data.
@@ -32,6 +33,11 @@ export interface MediaTimeline {
32
33
  * The minimum duration of the buffer that a client should maintain for uninterrupted playback.
33
34
  */
34
35
  readonly minBufferTime: number;
36
+ /**
37
+ * Ad breaks discovered from the media presentation (e.g. HLS Interstitials,
38
+ * DASH SCTE-35). Empty when the stream carries no ad signals.
39
+ */
40
+ getAdBreaks(): Promise<AdBreakList>;
35
41
  /**
36
42
  * The total duration of the media, in seconds.
37
43
  * Returns `Infinity` for live streams.
@@ -2,6 +2,7 @@ import type { AnyRecord, Disposable, ReadonlyAbort, ReadonlyEventHost, ReadonlyR
2
2
  import type { SegmentReference } from './SegmentReference';
3
3
  import type { ChangeEvent } from '../event/ChangeEvent';
4
4
  import type { MediaQualityMetadata } from './MediaQualityMetadata';
5
+ import type { LoadSpanMeasurement } from './LoadMetric';
5
6
  /**
6
7
  * Forward-snap tolerance, in seconds, applied when looking up a segment by time.
7
8
  *
@@ -32,6 +33,10 @@ export interface SegmentControllerEventMap {
32
33
  * This is dispatched when a new quality is requested.
33
34
  */
34
35
  readonly streamingQualityChange: ChangeEvent<MediaQualityMetadata | null>;
36
+ /**
37
+ * The first init or media segment fetch of this stream completed.
38
+ */
39
+ readonly loadSpanMeasured: LoadSpanMeasurement;
35
40
  }
36
41
  /**
37
42
  * The SegmentController provides segments to buffer for the given time.
@@ -45,6 +45,7 @@ export declare class SegmentControllerImpl extends EventHostImpl<SegmentControll
45
45
  readonly deps: SegmentControllerImplDeps;
46
46
  readonly contentType: ContentType;
47
47
  get [Symbol.toStringTag](): string;
48
+ readonly logPrefix: string;
48
49
  private _active;
49
50
  get active(): boolean;
50
51
  private readonly _fetchedRanges;
@@ -65,6 +66,8 @@ export declare class SegmentControllerImpl extends EventHostImpl<SegmentControll
65
66
  private ended;
66
67
  private prefetching;
67
68
  private _error;
69
+ private initSpanArmed;
70
+ private firstSegmentSpanArmed;
68
71
  private timeUpdateSub;
69
72
  private seekingSub;
70
73
  private readonly abort;
@@ -110,6 +113,15 @@ export declare class SegmentControllerImpl extends EventHostImpl<SegmentControll
110
113
  private getNextTimeToPrefetch;
111
114
  private pollPrefetch;
112
115
  private prefetchErrorHandler;
116
+ /**
117
+ * Requests init-segment data, measuring the first fetch as a load span.
118
+ */
119
+ private requestInitData;
120
+ /**
121
+ * Requests media-segment data, measuring the first fetch as a load span.
122
+ */
123
+ private requestSegmentData;
124
+ private measureLoadSpan;
113
125
  get fetchedRanges(): ReadonlyRanges;
114
126
  get fetchedTime(): number;
115
127
  private _streamingQuality;
@@ -2,6 +2,8 @@ import type { ChangeEvent } from '../event/ChangeEvent';
2
2
  import type { ContentType, MediaQualityMetadata } from './MediaQualityMetadata';
3
3
  import type { BasicErrorEvent } from '../event/BasicErrorEvent';
4
4
  import type { AnyRecord } from '@amazon/vinyl-util';
5
+ import type { SeekRange } from '../track/SeekRange';
6
+ import type { LoadSpanMeasurement } from './LoadMetric';
5
7
  /**
6
8
  * Events a track dispatches related to streaming quality and status.
7
9
  */
@@ -32,6 +34,10 @@ export interface StreamingEventMap {
32
34
  * The last segment has finished appending.
33
35
  */
34
36
  readonly bufferingEnded: AnyRecord;
37
+ /**
38
+ * The buffer went from empty to holding data, or back to empty.
39
+ */
40
+ readonly hasDataChange: ChangeEvent<boolean>;
35
41
  /**
36
42
  * Dispatched when a streaming error occurs.
37
43
  */
@@ -48,6 +54,37 @@ export interface StreamingEventMap {
48
54
  * The available unfiltered qualities for the current period have changed.
49
55
  */
50
56
  readonly qualitiesUnfilteredChange: ChangeEvent<readonly MediaQualityMetadata[]>;
57
+ /**
58
+ * A codec the browser reported as supported failed to decode on append and
59
+ * has been denylisted at runtime. The current media should be reloaded so
60
+ * quality selection can fall back to a codec that decodes. Recoverable:
61
+ * this is dispatched instead of an `error`, and the player reloads the
62
+ * track in response.
63
+ */
64
+ readonly codecUnsupported: CodecUnsupportedEvent;
65
+ /**
66
+ * The seekable range on the media timeline has changed.
67
+ */
68
+ readonly seekRangeChange: ChangeEvent<SeekRange | null>;
69
+ /**
70
+ * A stage of the track load completed. Rather than redispatch this raw
71
+ * measurement, the player attributes it to the current track and
72
+ * republishes it as the `loadSpan` event.
73
+ */
74
+ readonly loadSpanMeasured: LoadSpanMeasurement;
75
+ }
76
+ /**
77
+ * Payload for {@link StreamingEventMap.codecUnsupported}.
78
+ */
79
+ export interface CodecUnsupportedEvent {
80
+ /**
81
+ * The mimeType (including the failing codec) that was denylisted.
82
+ */
83
+ readonly mimeType: string;
84
+ /**
85
+ * The content type of the stream whose append failed.
86
+ */
87
+ readonly contentType: ContentType;
51
88
  }
52
89
  /**
53
90
  * All streaming-related events a track may emit.
@@ -60,9 +97,13 @@ export declare const ALL_STREAMING_EVENTS: readonly [
60
97
  "bufferingQualityChange",
61
98
  "playbackQualityChange",
62
99
  "bufferingEnded",
100
+ "hasDataChange",
63
101
  "error",
64
102
  "reset",
65
103
  "qualitiesChange",
66
- "qualitiesUnfilteredChange"
104
+ "qualitiesUnfilteredChange",
105
+ "codecUnsupported",
106
+ "seekRangeChange",
107
+ "loadSpanMeasured"
67
108
  ];
68
109
  //# sourceMappingURL=StreamingEventMap.d.ts.map
@@ -66,6 +66,32 @@ export interface QualitySelectorImplOptions {
66
66
  * Default: null (no limit).
67
67
  */
68
68
  readonly maxBandwidth?: Maybe<number>;
69
+ /**
70
+ * Maximum video height, in pixels, a quality may have to be selectable.
71
+ * Mirrors Shaka's `restrictions.maxHeight`.
72
+ *
73
+ * Only affects video qualities; audio (and other non-video) qualities are
74
+ * never restricted by resolution. Qualities with an unknown height (null)
75
+ * are treated as within the cap.
76
+ *
77
+ * Soft cap: if no video quality fits within the resolution limit, the
78
+ * quality with the smallest bandwidth is selected so video still plays.
79
+ *
80
+ * Has no effect when {@link strategy} is {@link AbrStrategy.LOWEST} or
81
+ * {@link AbrStrategy.HIGHEST}, since those strategies pin the selection
82
+ * regardless of resolution.
83
+ *
84
+ * Default: null (no limit).
85
+ */
86
+ readonly maxHeight?: Maybe<number>;
87
+ /**
88
+ * Maximum video width, in pixels, a quality may have to be selectable.
89
+ * Mirrors Shaka's `restrictions.maxWidth`. Behaves like {@link maxHeight}
90
+ * but constrains the width dimension.
91
+ *
92
+ * Default: null (no limit).
93
+ */
94
+ readonly maxWidth?: Maybe<number>;
69
95
  }
70
96
  export declare enum AbrStrategy {
71
97
  /**
@@ -97,6 +123,8 @@ export declare const defaultQualitySelectorImplOptions: {
97
123
  readonly bandwidthMultiplierHigh: 0.9;
98
124
  readonly restrictDecoderChangeOnAudioAbrUp: false;
99
125
  readonly maxBandwidth: null;
126
+ readonly maxHeight: null;
127
+ readonly maxWidth: null;
100
128
  };
101
129
  export interface QualitySelectorImplDeps {
102
130
  readonly options: ObservableValue<QualitySelectorImplOptions>;
@@ -6,6 +6,7 @@ import type { ReadonlySegmentController } from '../SegmentController';
6
6
  import type { BasicErrorEvent } from '../../event/BasicErrorEvent';
7
7
  import type { ChangeEvent } from '../../event/ChangeEvent';
8
8
  import type { ContentType, MediaQualityMetadata } from '../MediaQualityMetadata';
9
+ import type { CodecUnsupportedEvent } from '../StreamingEventMap';
9
10
  import type { MediaSourceController } from './MediaSourceController';
10
11
  /**
11
12
  * The interval to throttle polling the buffer.
@@ -44,6 +45,16 @@ export interface BufferingControllerEventMap {
44
45
  * The last segment has finished appending.
45
46
  */
46
47
  readonly bufferingEnded: AnyRecord;
48
+ /**
49
+ * The buffer went from empty to holding data, or back to empty.
50
+ */
51
+ readonly hasDataChange: ChangeEvent<boolean>;
52
+ /**
53
+ * A codec the browser reported as supported failed to decode on append and
54
+ * has been denylisted. Dispatched instead of `error` so the media can be
55
+ * reloaded and fall back to a codec that decodes.
56
+ */
57
+ readonly codecUnsupported: CodecUnsupportedEvent;
47
58
  }
48
59
  export interface BufferingController extends ReadonlyEventHost<BufferingControllerEventMap>, Clearable, Disposable {
49
60
  /**
@@ -73,6 +84,10 @@ export interface BufferingController extends ReadonlyEventHost<BufferingControll
73
84
  * True if the stream has buffered the last segment.
74
85
  */
75
86
  readonly bufferingEnded: boolean;
87
+ /**
88
+ * True while the buffer holds any data (false when empty or cleared).
89
+ */
90
+ readonly hasData: boolean;
76
91
  /**
77
92
  * Begins buffering.
78
93
  */
@@ -125,6 +140,7 @@ export declare class BufferingControllerImpl extends EventHostImpl<BufferingCont
125
140
  readonly deps: BufferingControllerImplDeps;
126
141
  readonly contentType: ContentType;
127
142
  get [Symbol.toStringTag](): string;
143
+ readonly logPrefix: string;
128
144
  readonly options: BufferingControllerImplOptions;
129
145
  private readonly mediaSourceController;
130
146
  private readonly playbackController;
@@ -148,6 +164,7 @@ export declare class BufferingControllerImpl extends EventHostImpl<BufferingCont
148
164
  private reopen;
149
165
  private _error;
150
166
  private _bufferingEnded;
167
+ private _hasData;
151
168
  private readonly queue;
152
169
  private disposer;
153
170
  private _active;
@@ -208,12 +225,32 @@ export declare class BufferingControllerImpl extends EventHostImpl<BufferingCont
208
225
  */
209
226
  private get mediaSourceClosed();
210
227
  get bufferingEnded(): boolean;
228
+ get hasData(): boolean;
229
+ private setHasData;
211
230
  private readonly handleError;
231
+ /**
232
+ * Attempts to recover from a SourceBuffer decode/append failure caused by a
233
+ * codec the browser reported as supported but cannot actually decode.
234
+ *
235
+ * Denylists the failing quality's codec so subsequent quality selection
236
+ * avoids it, then clears and retries. Returns true when a fallback was
237
+ * initiated (the caller should not enter an error state), false otherwise.
238
+ *
239
+ * Guards against loops: recovery only proceeds when the codec was newly
240
+ * denylisted. A repeat failure for an already-denylisted codec (e.g. a
241
+ * single-codec stream with no alternative) returns false and falls through
242
+ * to the normal error path, so playback errors out rather than looping.
243
+ */
244
+ private tryCodecFallback;
212
245
  /**
213
246
  * Returns the amount of time buffered at the current media position.
214
247
  * @private
215
248
  */
216
249
  getBufferedTime(): number;
250
+ /**
251
+ * Returns true if the playhead has become disconnected from the continuous buffer.
252
+ */
253
+ private needsBufferClear;
217
254
  /**
218
255
  * Cancels any currently buffering fragments and clears the source buffer.
219
256
  */
@@ -61,9 +61,17 @@ export interface MediaSourceController extends ReadonlyMediaSourceController {
61
61
  */
62
62
  endOfStream(error?: EndOfStreamError): void;
63
63
  /**
64
- * Creates an Object URL to use as the source for this stream.
64
+ * Creates the internal media source.
65
+ * Returns an Object URL to use as the source for this stream.
66
+ *
67
+ * Implementation note:
68
+ * Only the first
69
+ */
70
+ activate(): string;
71
+ /**
72
+ * Deactivates the controller, disposing underlying resources.
65
73
  */
66
- createUrl(): string;
74
+ deactivate(): void;
67
75
  }
68
76
  export interface MediaSourceControllerImplDeps {
69
77
  /**
@@ -83,8 +91,9 @@ export declare class MediaSourceControllerImpl extends EventHostImpl<MediaSource
83
91
  private readonly deps;
84
92
  get [Symbol.toStringTag](): string;
85
93
  private readonly sourceBuffers;
86
- private readonly mediaSource;
87
- private readonly disposer;
94
+ private mediaSource;
95
+ private objectUrl;
96
+ private activateDisposer;
88
97
  private contentTypes;
89
98
  private durationSet;
90
99
  /**
@@ -93,14 +102,11 @@ export declare class MediaSourceControllerImpl extends EventHostImpl<MediaSource
93
102
  */
94
103
  private durationToken;
95
104
  constructor(deps: MediaSourceControllerImplDeps);
105
+ get active(): boolean;
106
+ activate(): string;
107
+ deactivate(): void;
96
108
  private get sourceBufferCount();
97
109
  private readonly errorHandler;
98
- /**
99
- * Subscription to mediaTimelineTransformed; only attached while the media source is open
100
- * so the timeline pipeline isn't forced to evaluate before the source has opened.
101
- */
102
- private timelineSub;
103
- private initializeEvents;
104
110
  /**
105
111
  * Sets the duration on the media source from the current media timeline.
106
112
  * Live streams use LIVE_DURATION since not all browsers support +Infinity duration.
@@ -117,7 +123,6 @@ export declare class MediaSourceControllerImpl extends EventHostImpl<MediaSource
117
123
  */
118
124
  private readonly checkReady;
119
125
  endOfStream(error?: EndOfStreamError): void;
120
- createUrl(): string;
121
126
  get readyToAppend(): boolean;
122
127
  dispose(): void;
123
128
  }
@@ -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
@@ -2,12 +2,15 @@ import type { ObservableValue } from '@amazon/vinyl-observable';
2
2
  import type { Capabilities } from '../client/Capabilities';
3
3
  import type { DrmController } from '../drm/DrmController';
4
4
  import type { MediaTimeline } from './MediaTimeline';
5
+ import type { CodecOverrides } from '../util/media/codecOverrides';
5
6
  export interface DefaultMediaTimelineTransformerDeps {
6
7
  readonly capabilities: Capabilities;
7
8
  readonly drmController: DrmController;
8
9
  readonly mediaTimeline: ObservableValue<Promise<MediaTimeline>>;
9
10
  readonly options: ObservableValue<{
10
- readonly preferredAudioLanguage: string | null;
11
+ readonly preferredAudioLanguage: string | readonly string[] | null;
12
+ readonly preferDescriptiveAudio?: boolean;
13
+ readonly codecOverrides?: CodecOverrides;
11
14
  }>;
12
15
  }
13
16
  /**
@@ -0,0 +1,35 @@
1
+ import type { MediaQualityMetadata } from './MediaQualityMetadata';
2
+ import type { 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