@amazon/vinyl 1.2.0 → 1.2.2

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 (330) hide show
  1. package/dist/index.cjs +24 -6
  2. package/dist/index.cjs.map +2 -2
  3. package/dist/index.js +33 -13
  4. package/dist/index.js.map +3 -3
  5. package/dist/test/integ.es5.js +62 -62
  6. package/dist/test/integ.js +119 -6
  7. package/dist/test/integ.js.map +2 -2
  8. package/dist/types/current/ad/AdBreakInfo.d.ts +160 -0
  9. package/dist/types/current/ad/AdBreakInfo.d.ts.map +1 -0
  10. package/dist/types/current/ad/AdBreakInfo.js +5 -0
  11. package/dist/types/current/ad/AdController.d.ts +229 -0
  12. package/dist/types/current/ad/AdController.d.ts.map +1 -0
  13. package/dist/types/current/ad/AdController.js +19 -0
  14. package/dist/types/current/ad/AdControllerImpl.d.ts +162 -0
  15. package/dist/types/current/ad/AdControllerImpl.d.ts.map +1 -0
  16. package/dist/types/current/ad/AdControllerImpl.js +741 -0
  17. package/dist/types/current/ad/AdError.d.ts +6 -0
  18. package/dist/types/current/ad/AdError.d.ts.map +1 -0
  19. package/dist/types/current/ad/AdError.js +14 -0
  20. package/dist/types/current/ad/AdsProvider.d.ts +28 -0
  21. package/dist/types/current/ad/AdsProvider.d.ts.map +1 -0
  22. package/dist/types/current/ad/AdsProvider.js +5 -0
  23. package/dist/types/current/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
  24. package/dist/types/current/ad/defaultAdLoadOptionsResolver.d.ts.map +1 -0
  25. package/dist/types/current/ad/defaultAdLoadOptionsResolver.js +26 -0
  26. package/dist/types/current/ad/discoverHlsInterstitials.d.ts +22 -0
  27. package/dist/types/current/ad/discoverHlsInterstitials.d.ts.map +1 -0
  28. package/dist/types/current/ad/discoverHlsInterstitials.js +248 -0
  29. package/dist/types/current/drm/DrmControllerImpl.d.ts +6 -0
  30. package/dist/types/current/drm/DrmControllerImpl.d.ts.map +1 -1
  31. package/dist/types/current/drm/DrmControllerImpl.js +23 -1
  32. package/dist/types/current/playback/PlaybackControllerImpl.d.ts +1 -1
  33. package/dist/types/current/playback/createStallDetector.d.ts +43 -0
  34. package/dist/types/current/playback/createStallDetector.d.ts.map +1 -0
  35. package/dist/types/current/playback/createStallDetector.js +101 -0
  36. package/dist/types/current/playback/createStallMonitor.d.ts +45 -0
  37. package/dist/types/current/playback/createStallMonitor.d.ts.map +1 -0
  38. package/dist/types/current/playback/createStallMonitor.js +99 -0
  39. package/dist/types/current/streaming/AudioOptions.d.ts +66 -0
  40. package/dist/types/current/streaming/AudioOptions.d.ts.map +1 -0
  41. package/dist/types/current/streaming/AudioOptions.js +19 -0
  42. package/dist/types/current/streaming/LoadMetric.d.ts +72 -0
  43. package/dist/types/current/streaming/LoadMetric.d.ts.map +1 -0
  44. package/dist/types/current/streaming/LoadMetric.js +5 -0
  45. package/dist/types/current/streaming/ManifestControllerImpl.d.ts +43 -0
  46. package/dist/types/current/streaming/ManifestControllerImpl.d.ts.map +1 -0
  47. package/dist/types/current/streaming/ManifestControllerImpl.js +104 -0
  48. package/dist/types/current/streaming/buffering/codecDenylist.d.ts +23 -0
  49. package/dist/types/current/streaming/buffering/codecDenylist.d.ts.map +1 -0
  50. package/dist/types/current/streaming/buffering/codecDenylist.js +62 -0
  51. package/dist/types/current/streaming/createAllowedContentTypesValue.d.ts +30 -0
  52. package/dist/types/current/streaming/createAllowedContentTypesValue.d.ts.map +1 -0
  53. package/dist/types/current/streaming/createAllowedContentTypesValue.js +43 -0
  54. package/dist/types/current/streaming/createTimelineContentTypesValue.d.ts +21 -0
  55. package/dist/types/current/streaming/createTimelineContentTypesValue.d.ts.map +1 -0
  56. package/dist/types/current/streaming/createTimelineContentTypesValue.js +25 -0
  57. package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
  58. package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.d.ts.map +1 -0
  59. package/dist/types/current/streaming/mediaTimelineAccessibilityFilter.js +75 -0
  60. package/dist/types/current/text/HtmlTextTrackRenderer.d.ts +60 -0
  61. package/dist/types/current/text/HtmlTextTrackRenderer.d.ts.map +1 -0
  62. package/dist/types/current/text/HtmlTextTrackRenderer.js +231 -0
  63. package/dist/types/current/text/SidecarTextTrackController.d.ts +103 -0
  64. package/dist/types/current/text/SidecarTextTrackController.d.ts.map +1 -0
  65. package/dist/types/current/text/SidecarTextTrackController.js +250 -0
  66. package/dist/types/current/text/SidecarTextTrackLoader.d.ts +65 -0
  67. package/dist/types/current/text/SidecarTextTrackLoader.d.ts.map +1 -0
  68. package/dist/types/current/text/SidecarTextTrackLoader.js +150 -0
  69. package/dist/types/current/text/TextTrack.d.ts +179 -0
  70. package/dist/types/current/text/TextTrack.d.ts.map +1 -0
  71. package/dist/types/current/text/TextTrack.js +29 -0
  72. package/dist/types/current/text/TextTrackRenderer.d.ts +24 -0
  73. package/dist/types/current/text/TextTrackRenderer.d.ts.map +1 -0
  74. package/dist/types/current/text/TextTrackRenderer.js +5 -0
  75. package/dist/types/current/text/VttCueStyle.d.ts +41 -0
  76. package/dist/types/current/text/VttCueStyle.d.ts.map +1 -0
  77. package/dist/types/current/text/VttCueStyle.js +45 -0
  78. package/dist/types/current/text/discoverDashTextTracks.d.ts +24 -0
  79. package/dist/types/current/text/discoverDashTextTracks.d.ts.map +1 -0
  80. package/dist/types/current/text/discoverDashTextTracks.js +110 -0
  81. package/dist/types/current/text/discoverHlsTextTracks.d.ts +19 -0
  82. package/dist/types/current/text/discoverHlsTextTracks.d.ts.map +1 -0
  83. package/dist/types/current/text/discoverHlsTextTracks.js +49 -0
  84. package/dist/types/current/text/mediaTextTrackProvider.d.ts +34 -0
  85. package/dist/types/current/text/mediaTextTrackProvider.d.ts.map +1 -0
  86. package/dist/types/current/text/mediaTextTrackProvider.js +42 -0
  87. package/dist/types/current/text/parseWebVtt.d.ts +60 -0
  88. package/dist/types/current/text/parseWebVtt.d.ts.map +1 -0
  89. package/dist/types/current/text/parseWebVtt.js +249 -0
  90. package/dist/types/current/text/pickPreferredTextTrack.d.ts +15 -0
  91. package/dist/types/current/text/pickPreferredTextTrack.d.ts.map +1 -0
  92. package/dist/types/current/text/pickPreferredTextTrack.js +71 -0
  93. package/dist/types/current/track/SeekRange.d.ts +9 -0
  94. package/dist/types/current/track/SeekRange.d.ts.map +1 -0
  95. package/dist/types/current/track/SeekRange.js +5 -0
  96. package/dist/types/current/track/hls/HlsManifestData.d.ts +19 -0
  97. package/dist/types/current/track/hls/HlsManifestData.d.ts.map +1 -0
  98. package/dist/types/current/track/hls/HlsManifestData.js +5 -0
  99. package/dist/types/current/track/hls/createHlsManifestProvider.d.ts +6 -0
  100. package/dist/types/current/track/hls/createHlsManifestProvider.d.ts.map +1 -0
  101. package/dist/types/current/track/hls/createHlsManifestProvider.js +9 -0
  102. package/dist/types/current/track/inferLoadOptionsFromUri.d.ts +15 -0
  103. package/dist/types/current/track/inferLoadOptionsFromUri.d.ts.map +1 -0
  104. package/dist/types/current/track/inferLoadOptionsFromUri.js +55 -0
  105. package/dist/types/current/track/mse/MseTrack.d.ts +0 -1
  106. package/dist/types/current/track/mse/MseTrack.d.ts.map +1 -1
  107. package/dist/types/current/track/mse/MseTrack.js +4 -5
  108. package/dist/types/current/tsconfig.tsbuildinfo +1 -1
  109. package/dist/types/current/util/media/codecOverrides.d.ts +33 -0
  110. package/dist/types/current/util/media/codecOverrides.d.ts.map +1 -0
  111. package/dist/types/current/util/media/codecOverrides.js +37 -0
  112. package/dist/types/current/util/media/codecSupport.d.ts +6 -0
  113. package/dist/types/current/util/media/codecSupport.d.ts.map +1 -0
  114. package/dist/types/current/util/media/codecSupport.js +17 -0
  115. package/dist/types/current/util/media/mimeType.d.ts +8 -0
  116. package/dist/types/current/util/media/mimeType.d.ts.map +1 -0
  117. package/dist/types/current/util/media/mimeType.js +13 -0
  118. package/dist/types/ts3.7/ad/AdBreakInfo.d.ts +160 -0
  119. package/dist/types/ts3.7/ad/AdController.d.ts +243 -0
  120. package/dist/types/ts3.7/ad/AdControllerImpl.d.ts +162 -0
  121. package/dist/types/ts3.7/ad/AdError.d.ts +6 -0
  122. package/dist/types/ts3.7/ad/AdsProvider.d.ts +28 -0
  123. package/dist/types/ts3.7/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
  124. package/dist/types/ts3.7/ad/discoverHlsInterstitials.d.ts +22 -0
  125. package/dist/types/ts3.7/drm/DrmControllerImpl.d.ts +6 -0
  126. package/dist/types/ts3.7/playback/PlaybackControllerImpl.d.ts +1 -1
  127. package/dist/types/ts3.7/playback/createStallDetector.d.ts +43 -0
  128. package/dist/types/ts3.7/playback/createStallMonitor.d.ts +45 -0
  129. package/dist/types/ts3.7/streaming/AudioOptions.d.ts +66 -0
  130. package/dist/types/ts3.7/streaming/LoadMetric.d.ts +72 -0
  131. package/dist/types/ts3.7/streaming/ManifestControllerImpl.d.ts +40 -0
  132. package/dist/types/ts3.7/streaming/buffering/codecDenylist.d.ts +23 -0
  133. package/dist/types/ts3.7/streaming/createAllowedContentTypesValue.d.ts +30 -0
  134. package/dist/types/ts3.7/streaming/createTimelineContentTypesValue.d.ts +21 -0
  135. package/dist/types/ts3.7/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
  136. package/dist/types/ts3.7/text/HtmlTextTrackRenderer.d.ts +60 -0
  137. package/dist/types/ts3.7/text/SidecarTextTrackController.d.ts +103 -0
  138. package/dist/types/ts3.7/text/SidecarTextTrackLoader.d.ts +65 -0
  139. package/dist/types/ts3.7/text/TextTrack.d.ts +183 -0
  140. package/dist/types/ts3.7/text/TextTrackRenderer.d.ts +24 -0
  141. package/dist/types/ts3.7/text/VttCueStyle.d.ts +41 -0
  142. package/dist/types/ts3.7/text/discoverDashTextTracks.d.ts +24 -0
  143. package/dist/types/ts3.7/text/discoverHlsTextTracks.d.ts +19 -0
  144. package/dist/types/ts3.7/text/mediaTextTrackProvider.d.ts +34 -0
  145. package/dist/types/ts3.7/text/parseWebVtt.d.ts +60 -0
  146. package/dist/types/ts3.7/text/pickPreferredTextTrack.d.ts +15 -0
  147. package/dist/types/ts3.7/track/SeekRange.d.ts +9 -0
  148. package/dist/types/ts3.7/track/hls/HlsManifestData.d.ts +19 -0
  149. package/dist/types/ts3.7/track/hls/createHlsManifestProvider.d.ts +6 -0
  150. package/dist/types/ts3.7/track/inferLoadOptionsFromUri.d.ts +15 -0
  151. package/dist/types/ts3.7/track/mse/MseTrack.d.ts +0 -1
  152. package/dist/types/ts3.7/util/media/codecOverrides.d.ts +33 -0
  153. package/dist/types/ts3.7/util/media/codecSupport.d.ts +6 -0
  154. package/dist/types/ts3.7/util/media/mimeType.d.ts +8 -0
  155. package/dist/types/ts4.1/ad/AdBreakInfo.d.ts +160 -0
  156. package/dist/types/ts4.1/ad/AdController.d.ts +243 -0
  157. package/dist/types/ts4.1/ad/AdControllerImpl.d.ts +162 -0
  158. package/dist/types/ts4.1/ad/AdError.d.ts +6 -0
  159. package/dist/types/ts4.1/ad/AdsProvider.d.ts +28 -0
  160. package/dist/types/ts4.1/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
  161. package/dist/types/ts4.1/ad/discoverHlsInterstitials.d.ts +22 -0
  162. package/dist/types/ts4.1/drm/DrmControllerImpl.d.ts +6 -0
  163. package/dist/types/ts4.1/playback/PlaybackControllerImpl.d.ts +1 -1
  164. package/dist/types/ts4.1/playback/createStallDetector.d.ts +43 -0
  165. package/dist/types/ts4.1/playback/createStallMonitor.d.ts +45 -0
  166. package/dist/types/ts4.1/streaming/AudioOptions.d.ts +66 -0
  167. package/dist/types/ts4.1/streaming/LoadMetric.d.ts +72 -0
  168. package/dist/types/ts4.1/streaming/ManifestControllerImpl.d.ts +40 -0
  169. package/dist/types/ts4.1/streaming/buffering/codecDenylist.d.ts +23 -0
  170. package/dist/types/ts4.1/streaming/createAllowedContentTypesValue.d.ts +30 -0
  171. package/dist/types/ts4.1/streaming/createTimelineContentTypesValue.d.ts +21 -0
  172. package/dist/types/ts4.1/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
  173. package/dist/types/ts4.1/text/HtmlTextTrackRenderer.d.ts +60 -0
  174. package/dist/types/ts4.1/text/SidecarTextTrackController.d.ts +104 -0
  175. package/dist/types/ts4.1/text/SidecarTextTrackLoader.d.ts +65 -0
  176. package/dist/types/ts4.1/text/TextTrack.d.ts +183 -0
  177. package/dist/types/ts4.1/text/TextTrackRenderer.d.ts +24 -0
  178. package/dist/types/ts4.1/text/VttCueStyle.d.ts +41 -0
  179. package/dist/types/ts4.1/text/discoverDashTextTracks.d.ts +24 -0
  180. package/dist/types/ts4.1/text/discoverHlsTextTracks.d.ts +19 -0
  181. package/dist/types/ts4.1/text/mediaTextTrackProvider.d.ts +34 -0
  182. package/dist/types/ts4.1/text/parseWebVtt.d.ts +60 -0
  183. package/dist/types/ts4.1/text/pickPreferredTextTrack.d.ts +15 -0
  184. package/dist/types/ts4.1/track/SeekRange.d.ts +9 -0
  185. package/dist/types/ts4.1/track/hls/HlsManifestData.d.ts +19 -0
  186. package/dist/types/ts4.1/track/hls/createHlsManifestProvider.d.ts +6 -0
  187. package/dist/types/ts4.1/track/inferLoadOptionsFromUri.d.ts +15 -0
  188. package/dist/types/ts4.1/track/mse/MseTrack.d.ts +0 -1
  189. package/dist/types/ts4.1/util/media/codecOverrides.d.ts +33 -0
  190. package/dist/types/ts4.1/util/media/codecSupport.d.ts +6 -0
  191. package/dist/types/ts4.1/util/media/mimeType.d.ts +8 -0
  192. package/dist/types/ts4.7/ad/AdBreakInfo.d.ts +160 -0
  193. package/dist/types/ts4.7/ad/AdController.d.ts +243 -0
  194. package/dist/types/ts4.7/ad/AdControllerImpl.d.ts +162 -0
  195. package/dist/types/ts4.7/ad/AdError.d.ts +6 -0
  196. package/dist/types/ts4.7/ad/AdsProvider.d.ts +28 -0
  197. package/dist/types/ts4.7/ad/defaultAdLoadOptionsResolver.d.ts +12 -0
  198. package/dist/types/ts4.7/ad/discoverHlsInterstitials.d.ts +22 -0
  199. package/dist/types/ts4.7/drm/DrmControllerImpl.d.ts +6 -0
  200. package/dist/types/ts4.7/playback/PlaybackControllerImpl.d.ts +1 -1
  201. package/dist/types/ts4.7/playback/createStallDetector.d.ts +43 -0
  202. package/dist/types/ts4.7/playback/createStallMonitor.d.ts +45 -0
  203. package/dist/types/ts4.7/streaming/AudioOptions.d.ts +66 -0
  204. package/dist/types/ts4.7/streaming/LoadMetric.d.ts +72 -0
  205. package/dist/types/ts4.7/streaming/ManifestControllerImpl.d.ts +43 -0
  206. package/dist/types/ts4.7/streaming/buffering/codecDenylist.d.ts +23 -0
  207. package/dist/types/ts4.7/streaming/createAllowedContentTypesValue.d.ts +30 -0
  208. package/dist/types/ts4.7/streaming/createTimelineContentTypesValue.d.ts +21 -0
  209. package/dist/types/ts4.7/streaming/mediaTimelineAccessibilityFilter.d.ts +35 -0
  210. package/dist/types/ts4.7/text/HtmlTextTrackRenderer.d.ts +60 -0
  211. package/dist/types/ts4.7/text/SidecarTextTrackController.d.ts +103 -0
  212. package/dist/types/ts4.7/text/SidecarTextTrackLoader.d.ts +65 -0
  213. package/dist/types/ts4.7/text/TextTrack.d.ts +183 -0
  214. package/dist/types/ts4.7/text/TextTrackRenderer.d.ts +24 -0
  215. package/dist/types/ts4.7/text/VttCueStyle.d.ts +41 -0
  216. package/dist/types/ts4.7/text/discoverDashTextTracks.d.ts +24 -0
  217. package/dist/types/ts4.7/text/discoverHlsTextTracks.d.ts +19 -0
  218. package/dist/types/ts4.7/text/mediaTextTrackProvider.d.ts +34 -0
  219. package/dist/types/ts4.7/text/parseWebVtt.d.ts +60 -0
  220. package/dist/types/ts4.7/text/pickPreferredTextTrack.d.ts +15 -0
  221. package/dist/types/ts4.7/track/SeekRange.d.ts +9 -0
  222. package/dist/types/ts4.7/track/hls/HlsManifestData.d.ts +19 -0
  223. package/dist/types/ts4.7/track/hls/createHlsManifestProvider.d.ts +6 -0
  224. package/dist/types/ts4.7/track/inferLoadOptionsFromUri.d.ts +15 -0
  225. package/dist/types/ts4.7/track/mse/MseTrack.d.ts +0 -1
  226. package/dist/types/ts4.7/util/media/codecOverrides.d.ts +33 -0
  227. package/dist/types/ts4.7/util/media/codecSupport.d.ts +6 -0
  228. package/dist/types/ts4.7/util/media/mimeType.d.ts +8 -0
  229. package/dist/unit/types/current/ad/AdController.test.d.ts +2 -0
  230. package/dist/unit/types/current/ad/AdController.test.d.ts.map +1 -0
  231. package/dist/unit/types/current/ad/AdController.test.js +10 -0
  232. package/dist/unit/types/current/ad/AdControllerImpl.test.d.ts +2 -0
  233. package/dist/unit/types/current/ad/AdControllerImpl.test.d.ts.map +1 -0
  234. package/dist/unit/types/current/ad/AdControllerImpl.test.js +1654 -0
  235. package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.d.ts +2 -0
  236. package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.d.ts.map +1 -0
  237. package/dist/unit/types/current/ad/defaultAdLoadOptionsResolver.test.js +56 -0
  238. package/dist/unit/types/current/ad/discoverHlsInterstitials.test.d.ts +2 -0
  239. package/dist/unit/types/current/ad/discoverHlsInterstitials.test.d.ts.map +1 -0
  240. package/dist/unit/types/current/ad/discoverHlsInterstitials.test.js +757 -0
  241. package/dist/unit/types/current/drm/DrmControllerImpl.test.js +96 -2
  242. package/dist/unit/types/current/playback/createStallDetector.test.d.ts +2 -0
  243. package/dist/unit/types/current/playback/createStallDetector.test.d.ts.map +1 -0
  244. package/dist/unit/types/current/playback/createStallDetector.test.js +163 -0
  245. package/dist/unit/types/current/playback/createStallMonitor.test.d.ts +2 -0
  246. package/dist/unit/types/current/playback/createStallMonitor.test.d.ts.map +1 -0
  247. package/dist/unit/types/current/playback/createStallMonitor.test.js +163 -0
  248. package/dist/unit/types/current/streaming/ManifestControllerImpl.test.d.ts +2 -0
  249. package/dist/unit/types/current/streaming/ManifestControllerImpl.test.d.ts.map +1 -0
  250. package/dist/unit/types/current/streaming/ManifestControllerImpl.test.js +197 -0
  251. package/dist/unit/types/current/streaming/MseTrack.test.js +15 -0
  252. package/dist/unit/types/current/streaming/buffering/codecDenylist.test.d.ts +2 -0
  253. package/dist/unit/types/current/streaming/buffering/codecDenylist.test.d.ts.map +1 -0
  254. package/dist/unit/types/current/streaming/buffering/codecDenylist.test.js +56 -0
  255. package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.d.ts +2 -0
  256. package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.d.ts.map +1 -0
  257. package/dist/unit/types/current/streaming/createAllowedContentTypesValue.test.js +77 -0
  258. package/dist/unit/types/current/streaming/createTimelineContentTypesValue.test.d.ts +2 -0
  259. package/dist/unit/types/current/streaming/createTimelineContentTypesValue.test.d.ts.map +1 -0
  260. package/dist/unit/types/current/streaming/createTimelineContentTypesValue.test.js +57 -0
  261. package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.d.ts +2 -0
  262. package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.d.ts.map +1 -0
  263. package/dist/unit/types/current/streaming/mediaTimelineAccessibilityFilter.test.js +99 -0
  264. package/dist/unit/types/current/text/HtmlTextTrackRenderer.test.d.ts +2 -0
  265. package/dist/unit/types/current/text/HtmlTextTrackRenderer.test.d.ts.map +1 -0
  266. package/dist/unit/types/current/text/HtmlTextTrackRenderer.test.js +231 -0
  267. package/dist/unit/types/current/text/SidecarTextTrackController.test.d.ts +2 -0
  268. package/dist/unit/types/current/text/SidecarTextTrackController.test.d.ts.map +1 -0
  269. package/dist/unit/types/current/text/SidecarTextTrackController.test.js +686 -0
  270. package/dist/unit/types/current/text/SidecarTextTrackLoader.test.d.ts +2 -0
  271. package/dist/unit/types/current/text/SidecarTextTrackLoader.test.d.ts.map +1 -0
  272. package/dist/unit/types/current/text/SidecarTextTrackLoader.test.js +365 -0
  273. package/dist/unit/types/current/text/TextTrack.test.d.ts +2 -0
  274. package/dist/unit/types/current/text/TextTrack.test.d.ts.map +1 -0
  275. package/dist/unit/types/current/text/TextTrack.test.js +12 -0
  276. package/dist/unit/types/current/text/VttCueStyle.test.d.ts +2 -0
  277. package/dist/unit/types/current/text/VttCueStyle.test.d.ts.map +1 -0
  278. package/dist/unit/types/current/text/VttCueStyle.test.js +76 -0
  279. package/dist/unit/types/current/text/discoverDashTextTracks.test.d.ts +2 -0
  280. package/dist/unit/types/current/text/discoverDashTextTracks.test.d.ts.map +1 -0
  281. package/dist/unit/types/current/text/discoverDashTextTracks.test.js +216 -0
  282. package/dist/unit/types/current/text/discoverHlsTextTracks.test.d.ts +2 -0
  283. package/dist/unit/types/current/text/discoverHlsTextTracks.test.d.ts.map +1 -0
  284. package/dist/unit/types/current/text/discoverHlsTextTracks.test.js +177 -0
  285. package/dist/unit/types/current/text/mediaTextTrackProvider.test.d.ts +2 -0
  286. package/dist/unit/types/current/text/mediaTextTrackProvider.test.d.ts.map +1 -0
  287. package/dist/unit/types/current/text/mediaTextTrackProvider.test.js +86 -0
  288. package/dist/unit/types/current/text/parseWebVtt.test.d.ts +2 -0
  289. package/dist/unit/types/current/text/parseWebVtt.test.d.ts.map +1 -0
  290. package/dist/unit/types/current/text/parseWebVtt.test.js +419 -0
  291. package/dist/unit/types/current/text/pickPreferredTextTrack.test.d.ts +2 -0
  292. package/dist/unit/types/current/text/pickPreferredTextTrack.test.d.ts.map +1 -0
  293. package/dist/unit/types/current/text/pickPreferredTextTrack.test.js +78 -0
  294. package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.d.ts +2 -0
  295. package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.d.ts.map +1 -0
  296. package/dist/unit/types/current/track/inferLoadOptionsFromUri.test.js +165 -0
  297. package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
  298. package/dist/unit/types/current/util/media/codecOverrides.test.d.ts +2 -0
  299. package/dist/unit/types/current/util/media/codecOverrides.test.d.ts.map +1 -0
  300. package/dist/unit/types/current/util/media/codecOverrides.test.js +42 -0
  301. package/dist/unit/types/current/util/media/codecSupport.test.d.ts +2 -0
  302. package/dist/unit/types/current/util/media/codecSupport.test.d.ts.map +1 -0
  303. package/dist/unit/types/current/util/media/codecSupport.test.js +26 -0
  304. package/dist/unit/types/current/util/media/mimeType.test.d.ts +2 -0
  305. package/dist/unit/types/current/util/media/mimeType.test.d.ts.map +1 -0
  306. package/dist/unit/types/current/util/media/mimeType.test.js +22 -0
  307. package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.d.ts +2 -0
  308. package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.d.ts.map +1 -0
  309. package/dist/unit/types/current/vinyl/VinylPlayerAdBreaks.test.js +142 -0
  310. package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.d.ts +2 -0
  311. package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.d.ts.map +1 -0
  312. package/dist/unit/types/current/vinyl/VinylPlayerTextTracks.test.js +188 -0
  313. package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.d.ts +15 -0
  314. package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.d.ts.map +1 -0
  315. package/dist/vinylTestUtil/types/current/mock/ad/MockAdController.js +26 -0
  316. package/dist/vinylTestUtil/types/current/mock/dash/mockDashManifest.d.ts +84 -84
  317. package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.d.ts +10 -0
  318. package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.d.ts.map +1 -0
  319. package/dist/vinylTestUtil/types/current/mock/text/MockTextTrackController.js +14 -0
  320. package/dist/vinylTestUtil/types/current/tsconfig.tsbuildinfo +1 -1
  321. package/dist/vinylTestUtil/types/ts3.7/mock/ad/MockAdController.d.ts +15 -0
  322. package/dist/vinylTestUtil/types/ts3.7/mock/dash/mockDashManifest.d.ts +84 -84
  323. package/dist/vinylTestUtil/types/ts3.7/mock/text/MockTextTrackController.d.ts +10 -0
  324. package/dist/vinylTestUtil/types/ts4.1/mock/ad/MockAdController.d.ts +15 -0
  325. package/dist/vinylTestUtil/types/ts4.1/mock/dash/mockDashManifest.d.ts +84 -84
  326. package/dist/vinylTestUtil/types/ts4.1/mock/text/MockTextTrackController.d.ts +10 -0
  327. package/dist/vinylTestUtil/types/ts4.7/mock/ad/MockAdController.d.ts +15 -0
  328. package/dist/vinylTestUtil/types/ts4.7/mock/dash/mockDashManifest.d.ts +84 -84
  329. package/dist/vinylTestUtil/types/ts4.7/mock/text/MockTextTrackController.d.ts +10 -0
  330. package/package.json +10 -11
@@ -0,0 +1,162 @@
1
+ import { EventHostImpl } from '@amazon/vinyl-util';
2
+ import { AdBreakInfo, AdInfo, TrackAds } from './AdBreakInfo';
3
+ import { AdController, AdEventMap } from './AdController';
4
+ import { ReadonlyPlaybackController } from '../playback/ReadonlyPlaybackController';
5
+ import { AdsProvider } from './AdsProvider';
6
+ /**
7
+ * The % playhead start tolerance for playback progress when emitting ad progress events.
8
+ */
9
+ export declare const AD_START_TOLERANCE = 0.05;
10
+ /**
11
+ * When a break's X-PLAYOUT-LIMIT budget is reached, an ad whose real media end is
12
+ * within this many seconds is allowed to finish on its own `ended` rather than
13
+ * being cut. The limit is a coarse, often whole-second budget while the media's
14
+ * true length is fractional, so without this grace an ad effectively as long as
15
+ * its budget would be clipped a fraction short. The tolerance is measured against
16
+ * the playback-reported (media) duration, not the ad's declared duration.
17
+ */
18
+ export declare const PLAYOUT_LIMIT_TOLERANCE = 1;
19
+ export interface AdControllerImplDeps {
20
+ readonly playbackController: ReadonlyPlaybackController;
21
+ }
22
+ export interface AdControllerImplOptions {
23
+ /**
24
+ * After an ad is set, the number of seconds to wait for playback to begin
25
+ * before marking the ad as failed.
26
+ * Default: 15
27
+ */
28
+ readonly adLoadTimeout: number;
29
+ /**
30
+ * How many seconds ahead of a midroll or postroll break to emit `adPreload`
31
+ * (so its ad assets can be warmed before the playhead reaches it). Used only
32
+ * when the break itself carries no {@link AdBreakInfo.resolutionTimeOffset};
33
+ * a break's own offset always takes precedence.
34
+ * Default: 10
35
+ */
36
+ readonly preloadAheadTime: number;
37
+ }
38
+ export declare const defaultAdControllerImplOptions: AdControllerImplOptions;
39
+ /**
40
+ * Provider-agnostic {@link AdController}. Holds the discovered ad breaks and
41
+ * derives enter/exit region events from playhead time updates.
42
+ *
43
+ * This controller is the *model* for ad playback: it knows which breaks exist,
44
+ * which break contains the playhead, and which ad within that break is current.
45
+ * It does NOT create, preload, or activate any tracks — that is the
46
+ * responsibility of the {@link TrackController}.
47
+ *
48
+ * A break is considered active while `startTime <= currentTime < endTime`,
49
+ * where `endTime` is `startTime + duration`. Breaks whose duration is unknown
50
+ * (null) or breaks which restrict `jump` will become active at
51
+ * `currentTime > startTime`
52
+ *
53
+ * This class contains no HLS- or DASH-specific logic; discovery code maps its
54
+ * protocol's signals to {@link AdBreakInfo} exposed by an
55
+ * {@link AdsProvider.getAds}, which this controller reads once the provider is
56
+ * set via {@link AdController.setAdsProvider} (and re-reads on `adsChange`).
57
+ */
58
+ export declare class AdControllerImpl extends EventHostImpl<AdEventMap> implements AdController {
59
+ private readonly deps;
60
+ get [Symbol.toStringTag](): string;
61
+ private readonly options;
62
+ private _trackAds;
63
+ private adsProviderSub;
64
+ private adsProvider;
65
+ private midrollAds;
66
+ private preloadableBreaks;
67
+ private readonly preloadedBreakIds;
68
+ private lastPlaybackTime;
69
+ private pendingAdBreaks;
70
+ private readonly completeAdBreakIds;
71
+ private readonly spentBreakIds;
72
+ private readonly disposer;
73
+ private adBreakState;
74
+ private loadingNext;
75
+ constructor(deps: AdControllerImplDeps, options?: Partial<AdControllerImplOptions>);
76
+ clearCompletedAds(): void;
77
+ private isBreakSuppressed;
78
+ /** The media-time the current ad has actually played, or 0 if not playing. */
79
+ private adElapsed;
80
+ /**
81
+ * Computes whether the current ad may be skipped and, when not yet, how many
82
+ * seconds remain until it can. A `skip` restriction blocks it outright;
83
+ * otherwise a resolved skip window gates it by the elapsed break playout, and
84
+ * with no window the ad is freely skippable.
85
+ */
86
+ private resolveSkipState;
87
+ get currentTrackAds(): (TrackAds | null);
88
+ private setTrackAds;
89
+ /**
90
+ * Returns a function that returns true if the ads provider has changed
91
+ * since the callback was created.
92
+ */
93
+ private providerInterrupted;
94
+ setAdsProvider(provider: AdsProvider | null): void;
95
+ enterPreroll(): Promise<AdBreakInfo | null>;
96
+ enterPostroll(): Promise<AdBreakInfo | null>;
97
+ private enterRoll;
98
+ private get hasProvider();
99
+ skipAdBreak(): void;
100
+ /**
101
+ * Marks an ad break as completed (or 'spent' and replayable), emits an `adBreakCompleted` event.
102
+ */
103
+ private completeAdBreak;
104
+ get currentAdBreak(): (AdBreakInfo | null);
105
+ /**
106
+ * Marks an ad as completed and emits an `adCompleted` event.
107
+ */
108
+ private completeAd;
109
+ /**
110
+ * Polls the next pending ad and activates it.
111
+ * When there are no remaining ads, activates the next ad break (if any).
112
+ */
113
+ private nextAdOrBreak;
114
+ get currentAd(): (AdInfo | null);
115
+ private get adState();
116
+ private startAd;
117
+ /**
118
+ * Checks if the playhead has entered a time to activate a midroll ad.
119
+ */
120
+ private onTimeUpdate;
121
+ /**
122
+ * Emits `adPreload` once for each midroll/postroll break the playhead is
123
+ * approaching — within (the break's {@link AdBreakInfo.resolutionTimeOffset}
124
+ * or, when absent, the `preloadAheadTime` option) seconds before its start —
125
+ * so a consumer can resolve and warm the break's assets before entry.
126
+ * Suppressed (played-once/spent) breaks are skipped.
127
+ */
128
+ private checkAdPreload;
129
+ /**
130
+ * Main content with ad breaks is playing, check if we have entered a midroll region.
131
+ */
132
+ private checkMidrollIngress;
133
+ /**
134
+ * Emits events for `adTimeUpdate`, `adFirstQuartile`, `adMidpoint`, and
135
+ * `adThirdQuartile`.
136
+ * (Does not emit `adCompleted`)
137
+ */
138
+ private emitAdProgressEvents;
139
+ private emitTimeUpdate;
140
+ /**
141
+ * Enforces the break-level playout limit (X-PLAYOUT-LIMIT): a budget shared
142
+ * across all of the break's ads. When cumulative playout reaches it, the
143
+ * whole break ends, dropping any ads that have not started.
144
+ *
145
+ * This is deliberately NOT a per-ad cap. Each ad asset is its own source and
146
+ * ends on its media `ended` (see the 'ended' handler), which is what advances
147
+ * a multi-ad break. Ending an ad at its declared per-ad DURATION instead would
148
+ * truncate the real asset whenever a packager under-declares it — e.g. rounds
149
+ * a 6.732s asset down to a whole-second 6 — cutting off the fractional tail.
150
+ */
151
+ private enforcePlayoutLimits;
152
+ private setPendingBreaks;
153
+ skipAd(): void;
154
+ failAd(error: Error): void;
155
+ private endAd;
156
+ get disposed(): boolean;
157
+ /**
158
+ * Disposes this controller, removes all listeners.
159
+ */
160
+ dispose(): void;
161
+ }
162
+ //# sourceMappingURL=AdControllerImpl.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { ErrorLevel, ReportableError } from '@amazon/vinyl-util';
2
+ export declare class AdError extends ReportableError {
3
+ get [Symbol.toStringTag](): string;
4
+ constructor(message: string, origin?: string, level?: ErrorLevel);
5
+ }
6
+ //# sourceMappingURL=AdError.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { 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
@@ -11,6 +11,12 @@ import { MediaFormatMetadata } from '../streaming/MediaQualityMetadata';
11
11
  * indicates a stalled promise result from the license provider.
12
12
  */
13
13
  export declare const LICENSE_TIMEOUT = 90;
14
+ /**
15
+ * An excessive number of concurrent key sessions. Sessions are expected to be
16
+ * closed as tracks deactivate; a count this high signals sessions are leaking
17
+ * (never closing) rather than a legitimate playback need.
18
+ */
19
+ export declare const EXCESSIVE_SESSION_COUNT = 20;
14
20
  /**
15
21
  * Dependencies for creating DrmController.
16
22
  */
@@ -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(): 2 | 5;
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,43 @@
1
+ export interface StallDetectorOptions {
2
+ /**
3
+ * Called when playback resumes without emitting a `playing` event (or after the detector
4
+ * revived it), so the caller can announce playback.
5
+ */
6
+ readonly fabricatePlaying: () => void;
7
+ /** Poll interval in seconds. Default: 0.25 */
8
+ readonly pollInterval?: number;
9
+ /** Seconds the play head must be frozen before recovering. Default: 0.75 */
10
+ readonly stallThreshold?: number;
11
+ /**
12
+ * Don't nudge this close to the end of buffered data; a freeze there is a
13
+ * legitimate wait for more data. Seconds. Default: 0.5
14
+ */
15
+ readonly bufferEndMargin?: number;
16
+ /** Seconds to nudge the play head forward to prod a resume. Default: 0.1 */
17
+ readonly stallSkip?: number;
18
+ /** Max recovery attempts before giving up. Default: 3 */
19
+ readonly maxAttempts?: number;
20
+ /**
21
+ * Nudge even when the playhead isn't inside a buffered range. Some WebKit versions leave a
22
+ * seek perpetually pending (no `seeked`) with a stale empty `buffered` even though data is
23
+ * appended; re-issuing the seek via a nudge can complete it. Off by default (only nudge over
24
+ * genuinely buffered data). Default: false
25
+ */
26
+ readonly nudgeUnbuffered?: boolean;
27
+ }
28
+ /**
29
+ * Watches a media element after a seek/play and drives it back into a playing state. Some WebKit
30
+ * versions stall: the play head freezes inside buffered data and playback never resumes (often with
31
+ * a stale low readyState). This polls the play head and, while the element should be advancing:
32
+ *
33
+ * - if it's frozen inside buffered data, nudges currentTime forward to prod a resume;
34
+ * - if there's no data at the playhead, waits (it's legitimately buffering, or between sources).
35
+ *
36
+ * When the play head progresses it calls {@link StallDetectorOptions.fabricatePlaying} if playback
37
+ * resumed without a `playing` event (or after the detector revived it), then stops. It also stops
38
+ * on pause/ended/emptied or after {@link StallDetectorOptions.maxAttempts}.
39
+ *
40
+ * Start it after a seek or play only when playback is intended — a paused element won't advance.
41
+ */
42
+ export declare function createStallDetector(media: HTMLMediaElement, options: StallDetectorOptions): () => void;
43
+ //# sourceMappingURL=createStallDetector.d.ts.map
@@ -0,0 +1,45 @@
1
+ import { Timestamp } from '@amazon/vinyl-util';
2
+ import { ReadonlyPlaybackController } from './ReadonlyPlaybackController';
3
+ import { StallEndedReason } from './ReadonlyPlaybackController';
4
+ export interface StallMonitorOptions {
5
+ /**
6
+ * Seconds the play head must be frozen (no `timeUpdate`) while playing before a stall is
7
+ * reported. Default: 1
8
+ */
9
+ readonly stallThreshold?: number;
10
+ /**
11
+ * How often (seconds) the play head freeze is checked. Default: 0.25
12
+ */
13
+ readonly pollInterval?: number;
14
+ }
15
+ export interface StallEndedInfo {
16
+ /** Time of the last `timeUpdate` observed before the play head froze. */
17
+ readonly started: Timestamp;
18
+ /** Time the stall ended. */
19
+ readonly ended: Timestamp;
20
+ /** Total seconds the play head was frozen. */
21
+ readonly duration: number;
22
+ /** Why the stall ended. */
23
+ readonly reason: StallEndedReason;
24
+ }
25
+ export interface StallMonitorCallbacks {
26
+ /** Called when a stall is first detected. */
27
+ readonly onStallEntered: () => void;
28
+ /** Called when a detected stall ends. */
29
+ readonly onStallEnded: (info: StallEndedInfo) => void;
30
+ }
31
+ /**
32
+ * Watches a {@link ReadonlyPlaybackController} for stalls while playing: the play head freezing
33
+ * (no `timeUpdate`) for longer than {@link StallMonitorOptions.stallThreshold} seconds.
34
+ *
35
+ * Detection only runs once playback has actually been observed (a `playing` event) and is
36
+ * suspended on `pause`/`seeking`/`emptied` until playback is observed again — so a stall is never
37
+ * reported during initial loading or while awaiting a seek. A detected stall ends when the play
38
+ * head advances again (`playing`) or playback stops for another reason (`pause`/`seeking`/
39
+ * `emptied`); {@link StallEndedInfo.duration} is measured from the last `timeUpdate` before the
40
+ * freeze, so it reflects the full frozen time rather than only the time past the threshold.
41
+ *
42
+ * Returns a function that stops the monitor.
43
+ */
44
+ export declare function createStallMonitor(controller: ReadonlyPlaybackController, callbacks: StallMonitorCallbacks, options?: StallMonitorOptions): () => void;
45
+ //# sourceMappingURL=createStallMonitor.d.ts.map
@@ -0,0 +1,66 @@
1
+ import { ObjectSchema } from '@amazon/vinyl-validation';
2
+ import { Maybe } from '@amazon/vinyl-util';
3
+ /**
4
+ * Criteria used to pick which audio rendition to play.
5
+ */
6
+ export interface AudioSelection {
7
+ /**
8
+ * Preferred language(s) for audio content, as RFC 5646 codes (e.g. `'en'`,
9
+ * `'ja'`, `'fr-CA'`). May be a single tag or an ordered list of tags —
10
+ * earlier entries are preferred, with the best relatedness match kept for
11
+ * each period (audio without a language tag is always kept). `null` (the
12
+ * default) is NOT "no preference": it orders by the platform's
13
+ * `navigator.languages`. To keep every language, this option is not the
14
+ * mechanism — omit language content or pass a tag matching all.
15
+ */
16
+ readonly language?: string | readonly string[] | null;
17
+ /**
18
+ * Opt in to audio-description (a.k.a. described-video / DVS) audio: audio
19
+ * renditions carrying an accessibility "describes video" characteristic that
20
+ * narrate on-screen action. `false` (the default) keeps them out of the
21
+ * automatic default-audio selection — they are chosen only when this is set.
22
+ * When `true`, a description rendition is preferred where one exists for the
23
+ * selected language. Changing this reselects audio immediately.
24
+ */
25
+ readonly descriptive?: boolean;
26
+ }
27
+ /**
28
+ * Declarative audio configuration. Mirrors `VinylOptions.text`: the audio
29
+ * rendition is chosen from {@link selection}; changing it reselects audio
30
+ * immediately.
31
+ */
32
+ export interface AudioOptions {
33
+ /**
34
+ * The audio selection criteria (language / descriptive).
35
+ */
36
+ readonly selection?: AudioSelection;
37
+ /**
38
+ * When `true`, disables the audio sampling-rate support filter, so audio
39
+ * renditions whose sampling rate exceeds what the platform reports (via the
40
+ * `AudioContext` output rate) are kept and offered to playback anyway.
41
+ * `false` (the default) applies the filter. Changing this re-filters the
42
+ * timeline immediately.
43
+ */
44
+ readonly disableSampleRateFilter?: boolean;
45
+ /**
46
+ * The maximum audio sampling rate (Hz) the sampling-rate filter treats as
47
+ * supported. When set, it takes precedence over the platform's
48
+ * `AudioContext`-reported output rate. Ignored when
49
+ * {@link disableSampleRateFilter} is `true`. Changing this re-filters the
50
+ * timeline immediately. `null`/`undefined` falls back to the reported rate.
51
+ */
52
+ readonly maxSampleRate?: Maybe<number>;
53
+ /**
54
+ * The minimum audio sampling rate (Hz) the sampling-rate filter treats as
55
+ * supported. When set, renditions below it are filtered out as a soft floor
56
+ * (if every audio rendition is below it, the highest is kept so playback is
57
+ * never stranded). Applied alongside the max cap whenever the filter runs,
58
+ * regardless of how the max was determined; ignored when
59
+ * {@link disableSampleRateFilter} is `true`. Changing this re-filters the
60
+ * timeline immediately.
61
+ */
62
+ readonly minSampleRate?: Maybe<number>;
63
+ }
64
+ export declare const defaultAudioOptions: AudioOptions;
65
+ export declare const audioOptionsValidator: ObjectSchema<AudioOptions>;
66
+ //# sourceMappingURL=AudioOptions.d.ts.map
@@ -0,0 +1,72 @@
1
+ import { Timestamp } from '@amazon/vinyl-util';
2
+ import { TrackUri } from '../track/Track';
3
+ import { ContentType } from './MediaQualityMetadata';
4
+ /**
5
+ * The stage of the track-load journey a {@link LoadSpanMeasurement} describes.
6
+ *
7
+ * - `manifest`: fetching and parsing the DASH/HLS manifest.
8
+ * - `keySetup`: the EME/CDM setup, from session creation to the CDM's first
9
+ * license message. Precedes and is contiguous with `license`.
10
+ * - `license`: the DRM license request/response exchange.
11
+ * - `initSegment`: fetching the initialization segment.
12
+ * - `firstSegment`: fetching the first media segment.
13
+ */
14
+ export type LoadSpanKind = 'manifest' | 'keySetup' | 'license' | 'initSegment' | 'firstSegment';
15
+ /**
16
+ * A timed span for one stage of a track load.
17
+ *
18
+ * Dispatched by the controller that owns the stage. Emitters attribute the span
19
+ * to the track it was measured for at the source (see {@link trackUri}); the
20
+ * player republishes it as a {@link LoadSpanEvent}. When the emitter cannot know
21
+ * the owning track, `trackUri` is omitted and the span is dropped rather than
22
+ * misattributed.
23
+ */
24
+ export interface LoadSpanMeasurement {
25
+ readonly kind: LoadSpanKind;
26
+ /**
27
+ * When the stage began, as a unix millisecond timestamp.
28
+ */
29
+ readonly startTime: Timestamp;
30
+ /**
31
+ * When the stage completed, as a unix millisecond timestamp.
32
+ */
33
+ readonly endTime: Timestamp;
34
+ /**
35
+ * The track this span was measured for, stamped at the source by the
36
+ * emitter that knows which track initiated the load. Omitted only when the
37
+ * initiating track is not yet known (e.g. an encrypted event handled before
38
+ * buffering DRM info is set).
39
+ */
40
+ readonly trackUri?: TrackUri;
41
+ /**
42
+ * The MIME type of the content this span was measured for, when known. Set
43
+ * for DRM `license` spans so a certificate exchange and the per-content-type
44
+ * license exchanges are distinguishable.
45
+ */
46
+ readonly mimeType?: string;
47
+ /**
48
+ * The content type this span was measured for, when known. Set alongside
49
+ * {@link mimeType} for DRM `license` spans.
50
+ */
51
+ readonly contentType?: ContentType;
52
+ }
53
+ /**
54
+ * A {@link LoadSpanMeasurement} attributed to the track it was measured for.
55
+ *
56
+ * Emitted on the player as the `loadSpan` event.
57
+ */
58
+ export interface LoadSpanEvent extends LoadSpanMeasurement {
59
+ readonly trackUri: TrackUri;
60
+ }
61
+ /**
62
+ * Player-level load metric events.
63
+ */
64
+ export interface LoadMetricEventMap {
65
+ /**
66
+ * A stage of a track load completed. Reports the time span of the stage
67
+ * together with the track it belongs to. Consumers measuring end-to-end
68
+ * load latency key on the first event per `kind` and `trackUri`.
69
+ */
70
+ readonly loadSpan: LoadSpanEvent;
71
+ }
72
+ //# 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,21 @@
1
+ import { ContentTypesValue } from './ContentTypesValue';
2
+ import { MediaTimeline } from './MediaTimeline';
3
+ import { ObservableValue } from '@amazon/vinyl-observable';
4
+ export interface TimelineContentTypesValueDeps {
5
+ /**
6
+ * The filtered, playable timeline. Content types are derived from the
7
+ * qualities that survive filtering, so a content type whose renditions are
8
+ * all filtered out (e.g. every audio rendition dropped by the sample-rate
9
+ * filter) is not reported — it never gates readiness and no source buffer
10
+ * is expected for it, so the remaining content types still play.
11
+ */
12
+ readonly mediaTimelineTransformed: ObservableValue<Promise<MediaTimeline>>;
13
+ }
14
+ /**
15
+ * Provides the MSE content types to create source buffers for, derived from the
16
+ * qualities that survive timeline filtering rather than the raw manifest. Only
17
+ * `'audio'`/`'video'` are reported; text is a sidecar pipeline, never an MSE
18
+ * source buffer.
19
+ */
20
+ export declare function createTimelineContentTypesValue(deps: TimelineContentTypesValueDeps): ContentTypesValue;
21
+ //# sourceMappingURL=createTimelineContentTypesValue.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