rx-player 4.1.0 → 4.2.0-dev.2024080600

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 (1030) hide show
  1. package/CHANGELOG.md +5 -10
  2. package/VERSION +1 -1
  3. package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  4. package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  5. package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
  6. package/dist/commonjs/compat/add_class_name.js +1 -1
  7. package/dist/commonjs/compat/add_text_track.d.ts +2 -2
  8. package/dist/commonjs/compat/add_text_track.d.ts.map +1 -1
  9. package/dist/commonjs/compat/add_text_track.js +1 -1
  10. package/dist/commonjs/compat/browser_compatibility_types.d.ts +196 -13
  11. package/dist/commonjs/compat/browser_compatibility_types.d.ts.map +1 -1
  12. package/dist/commonjs/compat/browser_compatibility_types.js +29 -0
  13. package/dist/commonjs/compat/browser_version.js +1 -2
  14. package/dist/commonjs/compat/can_patch_isobmff.js +1 -1
  15. package/dist/commonjs/compat/can_rely_on_request_media_key_system_access.js +1 -2
  16. package/dist/commonjs/compat/can_rely_on_video_visibility_and_size.js +1 -1
  17. package/dist/commonjs/compat/can_reuse_media_keys.js +1 -1
  18. package/dist/commonjs/compat/change_source_buffer_type.js +1 -1
  19. package/dist/commonjs/compat/clear_element_src.d.ts +2 -1
  20. package/dist/commonjs/compat/clear_element_src.d.ts.map +1 -1
  21. package/dist/commonjs/compat/clear_element_src.js +1 -1
  22. package/dist/commonjs/compat/eme/close_session.js +1 -1
  23. package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.d.ts +3 -2
  24. package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.d.ts.map +1 -1
  25. package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.js +1 -1
  26. package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +2 -1
  27. package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts.map +1 -1
  28. package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.js +2 -3
  29. package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +3 -2
  30. package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts.map +1 -1
  31. package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.js +2 -3
  32. package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts +5 -1
  33. package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts.map +1 -1
  34. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts +4 -3
  35. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
  36. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.js +3 -4
  37. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts.map +1 -1
  38. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +1 -2
  39. package/dist/commonjs/compat/eme/eme-api-implementation.d.ts +4 -3
  40. package/dist/commonjs/compat/eme/eme-api-implementation.d.ts.map +1 -1
  41. package/dist/commonjs/compat/eme/eme-api-implementation.js +19 -5
  42. package/dist/commonjs/compat/eme/generate_key_request.js +2 -3
  43. package/dist/commonjs/compat/eme/get_init_data.d.ts +3 -1
  44. package/dist/commonjs/compat/eme/get_init_data.d.ts.map +1 -1
  45. package/dist/commonjs/compat/eme/get_init_data.js +3 -3
  46. package/dist/commonjs/compat/eme/get_uuid_kid_from_keystatus_kid.js +1 -1
  47. package/dist/commonjs/compat/eme/get_webkit_fairplay_initdata.js +1 -1
  48. package/dist/commonjs/compat/eme/load_session.js +1 -1
  49. package/dist/commonjs/compat/eme/set_media_keys.d.ts +2 -1
  50. package/dist/commonjs/compat/eme/set_media_keys.d.ts.map +1 -1
  51. package/dist/commonjs/compat/eme/set_media_keys.js +1 -2
  52. package/dist/commonjs/compat/enable_audio_track.js +1 -1
  53. package/dist/commonjs/compat/event_listeners.d.ts +26 -24
  54. package/dist/commonjs/compat/event_listeners.d.ts.map +1 -1
  55. package/dist/commonjs/compat/event_listeners.js +9 -21
  56. package/dist/commonjs/compat/generate_init_data.js +2 -2
  57. package/dist/commonjs/compat/get_start_date.d.ts +2 -1
  58. package/dist/commonjs/compat/get_start_date.d.ts.map +1 -1
  59. package/dist/commonjs/compat/get_start_date.js +1 -1
  60. package/dist/commonjs/compat/has_issues_with_high_media_source_duration.js +1 -1
  61. package/dist/commonjs/compat/has_worker_api.js +1 -1
  62. package/dist/commonjs/compat/is_codec_supported.js +1 -1
  63. package/dist/commonjs/compat/is_debug_mode_enabled.js +1 -1
  64. package/dist/commonjs/compat/is_vtt_cue.js +1 -1
  65. package/dist/commonjs/compat/make_vtt_cue.js +1 -1
  66. package/dist/commonjs/compat/on_height_width_change.js +1 -1
  67. package/dist/commonjs/compat/patch_webkit_source_buffer.js +1 -1
  68. package/dist/commonjs/compat/remove_cue.js +1 -1
  69. package/dist/commonjs/compat/should_await_set_media_keys.js +1 -1
  70. package/dist/commonjs/compat/should_favour_custom_safari_EME.js +1 -1
  71. package/dist/commonjs/compat/should_reload_media_source_on_decipherability_update.js +1 -1
  72. package/dist/commonjs/compat/should_renew_media_key_system_access.js +1 -1
  73. package/dist/commonjs/compat/should_unset_media_keys.js +1 -1
  74. package/dist/commonjs/compat/should_validate_metadata.js +1 -1
  75. package/dist/commonjs/compat/should_wait_for_data_before_loaded.js +1 -1
  76. package/dist/commonjs/compat/should_wait_for_have_enough_data.js +1 -1
  77. package/dist/commonjs/config.d.ts +1 -1
  78. package/dist/commonjs/core/adaptive/adaptive_representation_selector.js +1 -1
  79. package/dist/commonjs/core/adaptive/network_analyzer.js +1 -2
  80. package/dist/commonjs/core/adaptive/utils/filter_by_bitrate.js +1 -1
  81. package/dist/commonjs/core/adaptive/utils/filter_by_resolution.js +1 -1
  82. package/dist/commonjs/core/adaptive/utils/get_buffer_levels.js +1 -1
  83. package/dist/commonjs/core/adaptive/utils/select_optimal_representation.js +1 -1
  84. package/dist/commonjs/core/cmcd/cmcd_data_builder.d.ts +121 -0
  85. package/dist/commonjs/core/cmcd/cmcd_data_builder.d.ts.map +1 -0
  86. package/dist/commonjs/core/cmcd/cmcd_data_builder.js +341 -0
  87. package/dist/commonjs/core/cmcd/index.d.ts +4 -0
  88. package/dist/commonjs/core/cmcd/index.d.ts.map +1 -0
  89. package/dist/commonjs/core/cmcd/index.js +4 -0
  90. package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.d.ts +8 -0
  91. package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.d.ts.map +1 -1
  92. package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.js +14 -11
  93. package/dist/commonjs/core/fetchers/segment/prioritized_segment_fetcher.js +1 -1
  94. package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts +43 -23
  95. package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts.map +1 -1
  96. package/dist/commonjs/core/fetchers/segment/segment_fetcher.js +25 -37
  97. package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.d.ts +5 -3
  98. package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.d.ts.map +1 -1
  99. package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.js +13 -5
  100. package/dist/commonjs/core/fetchers/utils/error_selector.js +1 -1
  101. package/dist/commonjs/core/fetchers/utils/schedule_request.js +2 -3
  102. package/dist/commonjs/core/main/common/create_content_time_boundaries_observer.js +1 -1
  103. package/dist/commonjs/core/main/common/get_buffered_data_per_media_buffer.js +1 -1
  104. package/dist/commonjs/core/main/worker/content_preparer.d.ts +7 -0
  105. package/dist/commonjs/core/main/worker/content_preparer.d.ts.map +1 -1
  106. package/dist/commonjs/core/main/worker/content_preparer.js +5 -2
  107. package/dist/commonjs/core/main/worker/send_message.js +2 -3
  108. package/dist/commonjs/core/main/worker/worker_main.d.ts.map +1 -1
  109. package/dist/commonjs/core/main/worker/worker_main.js +28 -38
  110. package/dist/commonjs/core/segment_sinks/garbage_collector.js +1 -1
  111. package/dist/commonjs/core/segment_sinks/inventory/utils.js +2 -3
  112. package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +1 -1
  113. package/dist/commonjs/core/stream/adaptation/get_representations_switch_strategy.js +1 -1
  114. package/dist/commonjs/core/stream/orchestrator/get_time_ranges_for_content.js +1 -1
  115. package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.js +1 -1
  116. package/dist/commonjs/core/stream/period/period_stream.js +1 -1
  117. package/dist/commonjs/core/stream/period/utils/get_adaptation_switch_strategy.js +1 -1
  118. package/dist/commonjs/core/stream/representation/representation_stream.js +1 -1
  119. package/dist/commonjs/core/stream/representation/utils/append_segment_to_buffer.js +1 -1
  120. package/dist/commonjs/core/stream/representation/utils/check_for_discontinuity.js +1 -1
  121. package/dist/commonjs/core/stream/representation/utils/get_buffer_status.js +1 -1
  122. package/dist/commonjs/core/stream/representation/utils/get_needed_segments.js +1 -1
  123. package/dist/commonjs/core/stream/representation/utils/get_segment_priority.js +1 -1
  124. package/dist/commonjs/core/stream/representation/utils/push_init_segment.js +7 -7
  125. package/dist/commonjs/core/stream/representation/utils/push_media_segment.js +10 -10
  126. package/dist/commonjs/default_config.d.ts +1 -1
  127. package/dist/commonjs/default_config.d.ts.map +1 -1
  128. package/dist/commonjs/default_config.js +1 -0
  129. package/dist/commonjs/errors/error_message.js +1 -1
  130. package/dist/commonjs/errors/format_error.js +1 -1
  131. package/dist/commonjs/errors/is_known_error.js +1 -1
  132. package/dist/commonjs/experimental/features/local.d.ts.map +1 -1
  133. package/dist/commonjs/experimental/features/local.js +1 -4
  134. package/dist/commonjs/experimental/features/metaplaylist.d.ts.map +1 -1
  135. package/dist/commonjs/experimental/features/metaplaylist.js +1 -4
  136. package/dist/commonjs/experimental/features/multi_thread.js +1 -2
  137. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/features/dash.js +1 -1
  138. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/features/metaplaylist.js +1 -1
  139. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/load_and_push_segment.js +1 -1
  140. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +2 -1
  141. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts.map +1 -1
  142. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +1 -1
  143. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +2 -1
  144. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts.map +1 -1
  145. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +1 -1
  146. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts.map +1 -1
  147. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +14 -8
  148. package/dist/commonjs/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +1 -1
  149. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/index.d.ts.map +1 -1
  150. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/index.js +1 -1
  151. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/capabilities.js +1 -1
  152. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +1 -1
  153. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +1 -1
  154. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +1 -1
  155. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.d.ts.map +1 -1
  156. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +3 -3
  157. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +1 -1
  158. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.js +1 -1
  159. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +1 -1
  160. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +1 -1
  161. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/utils.js +2 -3
  162. package/dist/commonjs/features/add_features.js +1 -1
  163. package/dist/commonjs/features/features_object.d.ts.map +1 -1
  164. package/dist/commonjs/features/features_object.js +0 -1
  165. package/dist/commonjs/features/list/dash.d.ts.map +1 -1
  166. package/dist/commonjs/features/list/dash.js +1 -4
  167. package/dist/commonjs/features/list/dash_wasm.d.ts.map +1 -1
  168. package/dist/commonjs/features/list/dash_wasm.js +0 -2
  169. package/dist/commonjs/features/list/debug_element.js +1 -2
  170. package/dist/commonjs/features/list/directfile.js +1 -2
  171. package/dist/commonjs/features/list/eme.js +1 -2
  172. package/dist/commonjs/features/list/html_sami_parser.js +1 -2
  173. package/dist/commonjs/features/list/html_srt_parser.js +1 -2
  174. package/dist/commonjs/features/list/html_text_buffer.js +1 -2
  175. package/dist/commonjs/features/list/html_ttml_parser.js +1 -2
  176. package/dist/commonjs/features/list/html_vtt_parser.js +1 -2
  177. package/dist/commonjs/features/list/media_source_main.js +1 -2
  178. package/dist/commonjs/features/list/native_sami_parser.js +1 -2
  179. package/dist/commonjs/features/list/native_srt_parser.js +1 -2
  180. package/dist/commonjs/features/list/native_text_buffer.js +1 -2
  181. package/dist/commonjs/features/list/native_ttml_parser.js +1 -2
  182. package/dist/commonjs/features/list/native_vtt_parser.js +1 -2
  183. package/dist/commonjs/features/list/smooth.d.ts.map +1 -1
  184. package/dist/commonjs/features/list/smooth.js +1 -4
  185. package/dist/commonjs/features/types.d.ts +3 -11
  186. package/dist/commonjs/features/types.d.ts.map +1 -1
  187. package/dist/commonjs/index.js +2 -2
  188. package/dist/commonjs/main_thread/api/debug/modules/general_info.js +1 -1
  189. package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_content.js +1 -1
  190. package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_size.js +1 -1
  191. package/dist/commonjs/main_thread/api/debug/render.js +1 -1
  192. package/dist/commonjs/main_thread/api/debug/utils.js +5 -6
  193. package/dist/commonjs/main_thread/api/option_utils.d.ts +9 -2
  194. package/dist/commonjs/main_thread/api/option_utils.d.ts.map +1 -1
  195. package/dist/commonjs/main_thread/api/option_utils.js +7 -9
  196. package/dist/commonjs/main_thread/api/public_api.d.ts +23 -2
  197. package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
  198. package/dist/commonjs/main_thread/api/public_api.js +50 -12
  199. package/dist/commonjs/main_thread/api/utils.d.ts +5 -4
  200. package/dist/commonjs/main_thread/api/utils.d.ts.map +1 -1
  201. package/dist/commonjs/main_thread/api/utils.js +5 -6
  202. package/dist/commonjs/main_thread/decrypt/attach_media_keys.d.ts +3 -2
  203. package/dist/commonjs/main_thread/decrypt/attach_media_keys.d.ts.map +1 -1
  204. package/dist/commonjs/main_thread/decrypt/attach_media_keys.js +8 -9
  205. package/dist/commonjs/main_thread/decrypt/clear_on_stop.d.ts +2 -1
  206. package/dist/commonjs/main_thread/decrypt/clear_on_stop.d.ts.map +1 -1
  207. package/dist/commonjs/main_thread/decrypt/clear_on_stop.js +1 -1
  208. package/dist/commonjs/main_thread/decrypt/content_decryptor.d.ts +26 -1
  209. package/dist/commonjs/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
  210. package/dist/commonjs/main_thread/decrypt/content_decryptor.js +86 -13
  211. package/dist/commonjs/main_thread/decrypt/create_or_load_session.js +1 -1
  212. package/dist/commonjs/main_thread/decrypt/create_session.js +1 -1
  213. package/dist/commonjs/main_thread/decrypt/dispose_decryption_resources.d.ts +2 -1
  214. package/dist/commonjs/main_thread/decrypt/dispose_decryption_resources.d.ts.map +1 -1
  215. package/dist/commonjs/main_thread/decrypt/dispose_decryption_resources.js +1 -1
  216. package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts +17 -2
  217. package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts.map +1 -1
  218. package/dist/commonjs/main_thread/decrypt/find_key_system.js +73 -3
  219. package/dist/commonjs/main_thread/decrypt/get_key_system_configuration.d.ts +2 -1
  220. package/dist/commonjs/main_thread/decrypt/get_key_system_configuration.d.ts.map +1 -1
  221. package/dist/commonjs/main_thread/decrypt/get_key_system_configuration.js +1 -1
  222. package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts +5 -1
  223. package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
  224. package/dist/commonjs/main_thread/decrypt/get_media_keys.js +5 -3
  225. package/dist/commonjs/main_thread/decrypt/init_media_keys.d.ts +2 -1
  226. package/dist/commonjs/main_thread/decrypt/init_media_keys.d.ts.map +1 -1
  227. package/dist/commonjs/main_thread/decrypt/init_media_keys.js +1 -1
  228. package/dist/commonjs/main_thread/decrypt/session_events_listener.js +1 -1
  229. package/dist/commonjs/main_thread/decrypt/set_server_certificate.js +5 -4
  230. package/dist/commonjs/main_thread/decrypt/types.d.ts +1 -0
  231. package/dist/commonjs/main_thread/decrypt/types.d.ts.map +1 -1
  232. package/dist/commonjs/main_thread/decrypt/utils/are_init_values_compatible.js +1 -1
  233. package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.js +1 -1
  234. package/dist/commonjs/main_thread/decrypt/utils/clean_old_loaded_sessions.js +1 -1
  235. package/dist/commonjs/main_thread/decrypt/utils/clean_old_stored_persistent_info.js +1 -1
  236. package/dist/commonjs/main_thread/decrypt/utils/get_drm_system_id.js +1 -1
  237. package/dist/commonjs/main_thread/decrypt/utils/is_compatible_codec_supported.d.ts +14 -0
  238. package/dist/commonjs/main_thread/decrypt/utils/is_compatible_codec_supported.d.ts.map +1 -0
  239. package/dist/commonjs/main_thread/decrypt/utils/is_compatible_codec_supported.js +53 -0
  240. package/dist/commonjs/main_thread/decrypt/utils/is_session_usable.js +1 -1
  241. package/dist/commonjs/main_thread/decrypt/utils/key_id_comparison.js +2 -3
  242. package/dist/commonjs/main_thread/decrypt/utils/media_keys_infos_store.d.ts +4 -3
  243. package/dist/commonjs/main_thread/decrypt/utils/media_keys_infos_store.d.ts.map +1 -1
  244. package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts +6 -1
  245. package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
  246. package/dist/commonjs/main_thread/init/directfile_content_initializer.js +2 -13
  247. package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts +62 -4
  248. package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts.map +1 -1
  249. package/dist/commonjs/main_thread/init/media_source_content_initializer.js +163 -28
  250. package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts +46 -4
  251. package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
  252. package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +78 -140
  253. package/dist/commonjs/main_thread/init/send_message.js +1 -1
  254. package/dist/commonjs/main_thread/init/types.d.ts +6 -1
  255. package/dist/commonjs/main_thread/init/types.d.ts.map +1 -1
  256. package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.js +3 -4
  257. package/dist/commonjs/main_thread/init/utils/create_media_source.d.ts +3 -2
  258. package/dist/commonjs/main_thread/init/utils/create_media_source.d.ts.map +1 -1
  259. package/dist/commonjs/main_thread/init/utils/create_media_source.js +2 -3
  260. package/dist/commonjs/main_thread/init/utils/get_initial_time.js +1 -1
  261. package/dist/commonjs/main_thread/init/utils/get_loaded_reference.d.ts +2 -1
  262. package/dist/commonjs/main_thread/init/utils/get_loaded_reference.d.ts.map +1 -1
  263. package/dist/commonjs/main_thread/init/utils/get_loaded_reference.js +1 -1
  264. package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts +2 -1
  265. package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
  266. package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.js +1 -1
  267. package/dist/commonjs/main_thread/init/utils/initialize_content_decryption.d.ts +17 -6
  268. package/dist/commonjs/main_thread/init/utils/initialize_content_decryption.d.ts.map +1 -1
  269. package/dist/commonjs/main_thread/init/utils/initialize_content_decryption.js +17 -22
  270. package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +2 -1
  271. package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts.map +1 -1
  272. package/dist/commonjs/main_thread/init/utils/throw_on_media_error.d.ts +2 -1
  273. package/dist/commonjs/main_thread/init/utils/throw_on_media_error.d.ts.map +1 -1
  274. package/dist/commonjs/main_thread/init/utils/throw_on_media_error.js +1 -1
  275. package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.d.ts +33 -0
  276. package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.d.ts.map +1 -0
  277. package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.js +224 -0
  278. package/dist/commonjs/main_thread/text_displayer/html/html_parsers.js +1 -1
  279. package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.d.ts +2 -1
  280. package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.d.ts.map +1 -1
  281. package/dist/commonjs/main_thread/text_displayer/html/update_proportional_elements.js +1 -1
  282. package/dist/commonjs/main_thread/text_displayer/html/utils.js +5 -6
  283. package/dist/commonjs/main_thread/text_displayer/native/native_parsers.js +1 -1
  284. package/dist/commonjs/main_thread/text_displayer/native/native_text_displayer.d.ts +2 -1
  285. package/dist/commonjs/main_thread/text_displayer/native/native_text_displayer.d.ts.map +1 -1
  286. package/dist/commonjs/main_thread/tracks_store/media_element_tracks_store.d.ts +6 -1
  287. package/dist/commonjs/main_thread/tracks_store/media_element_tracks_store.d.ts.map +1 -1
  288. package/dist/commonjs/main_thread/tracks_store/track_dispatcher.d.ts +5 -2
  289. package/dist/commonjs/main_thread/tracks_store/track_dispatcher.d.ts.map +1 -1
  290. package/dist/commonjs/main_thread/tracks_store/track_dispatcher.js +7 -26
  291. package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts +49 -25
  292. package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts.map +1 -1
  293. package/dist/commonjs/main_thread/tracks_store/tracks_store.js +263 -103
  294. package/dist/commonjs/manifest/classes/adaptation.d.ts +9 -9
  295. package/dist/commonjs/manifest/classes/adaptation.d.ts.map +1 -1
  296. package/dist/commonjs/manifest/classes/adaptation.js +50 -24
  297. package/dist/commonjs/manifest/classes/codec_support_cache.d.ts +45 -0
  298. package/dist/commonjs/manifest/classes/codec_support_cache.d.ts.map +1 -0
  299. package/dist/commonjs/manifest/classes/codec_support_cache.js +84 -0
  300. package/dist/commonjs/manifest/classes/index.d.ts +2 -2
  301. package/dist/commonjs/manifest/classes/index.d.ts.map +1 -1
  302. package/dist/commonjs/manifest/classes/manifest.d.ts +28 -6
  303. package/dist/commonjs/manifest/classes/manifest.d.ts.map +1 -1
  304. package/dist/commonjs/manifest/classes/manifest.js +46 -7
  305. package/dist/commonjs/manifest/classes/period.d.ts +6 -7
  306. package/dist/commonjs/manifest/classes/period.d.ts.map +1 -1
  307. package/dist/commonjs/manifest/classes/period.js +23 -14
  308. package/dist/commonjs/manifest/classes/representation.d.ts +10 -11
  309. package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
  310. package/dist/commonjs/manifest/classes/representation.js +64 -68
  311. package/dist/commonjs/manifest/classes/update_period_in_place.js +1 -1
  312. package/dist/commonjs/manifest/classes/update_periods.js +2 -3
  313. package/dist/commonjs/manifest/classes/utils.js +2 -3
  314. package/dist/commonjs/manifest/index.d.ts +2 -2
  315. package/dist/commonjs/manifest/types.d.ts +32 -5
  316. package/dist/commonjs/manifest/types.d.ts.map +1 -1
  317. package/dist/commonjs/manifest/utils.d.ts +1 -1
  318. package/dist/commonjs/manifest/utils.d.ts.map +1 -1
  319. package/dist/commonjs/manifest/utils.js +36 -20
  320. package/dist/commonjs/minimal.d.ts.map +1 -1
  321. package/dist/commonjs/minimal.js +2 -8
  322. package/dist/commonjs/mse/index.d.ts +1 -1
  323. package/dist/commonjs/mse/index.d.ts.map +1 -1
  324. package/dist/commonjs/mse/main_media_source_interface.d.ts +2 -1
  325. package/dist/commonjs/mse/main_media_source_interface.d.ts.map +1 -1
  326. package/dist/commonjs/mse/main_media_source_interface.js +5 -4
  327. package/dist/commonjs/mse/types.d.ts +0 -29
  328. package/dist/commonjs/mse/types.d.ts.map +1 -1
  329. package/dist/commonjs/mse/utils/end_of_stream.d.ts +3 -2
  330. package/dist/commonjs/mse/utils/end_of_stream.d.ts.map +1 -1
  331. package/dist/commonjs/mse/utils/end_of_stream.js +2 -3
  332. package/dist/commonjs/mse/utils/media_source_duration_updater.d.ts +2 -1
  333. package/dist/commonjs/mse/utils/media_source_duration_updater.d.ts.map +1 -1
  334. package/dist/commonjs/multithread_types.d.ts +26 -14
  335. package/dist/commonjs/multithread_types.d.ts.map +1 -1
  336. package/dist/commonjs/parsers/containers/isobmff/create_box.js +2 -3
  337. package/dist/commonjs/parsers/containers/isobmff/drm/playready.js +1 -2
  338. package/dist/commonjs/parsers/containers/isobmff/extract_complete_chunks.js +1 -1
  339. package/dist/commonjs/parsers/containers/isobmff/find_complete_box.js +1 -1
  340. package/dist/commonjs/parsers/containers/isobmff/get_box.js +7 -8
  341. package/dist/commonjs/parsers/containers/isobmff/read.js +5 -6
  342. package/dist/commonjs/parsers/containers/isobmff/take_pssh_out.js +2 -3
  343. package/dist/commonjs/parsers/containers/isobmff/utils.js +9 -9
  344. package/dist/commonjs/parsers/containers/matroska/utils.js +2 -3
  345. package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -2
  346. package/dist/commonjs/parsers/manifest/dash/common/flatten_overlapping_periods.js +1 -1
  347. package/dist/commonjs/parsers/manifest/dash/common/get_clock_offset.js +1 -1
  348. package/dist/commonjs/parsers/manifest/dash/common/get_hdr_information.js +1 -2
  349. package/dist/commonjs/parsers/manifest/dash/common/get_http_utc-timing_url.js +1 -1
  350. package/dist/commonjs/parsers/manifest/dash/common/get_minimum_and_maximum_positions.js +1 -1
  351. package/dist/commonjs/parsers/manifest/dash/common/get_periods_time_infos.js +1 -1
  352. package/dist/commonjs/parsers/manifest/dash/common/indexes/get_init_segment.js +1 -1
  353. package/dist/commonjs/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +1 -1
  354. package/dist/commonjs/parsers/manifest/dash/common/indexes/template.d.ts.map +1 -1
  355. package/dist/commonjs/parsers/manifest/dash/common/indexes/template.js +1 -1
  356. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +1 -1
  357. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +1 -1
  358. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.js +1 -1
  359. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +1 -1
  360. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +2 -3
  361. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts.map +1 -1
  362. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +4 -4
  363. package/dist/commonjs/parsers/manifest/dash/common/indexes/tokens.js +3 -4
  364. package/dist/commonjs/parsers/manifest/dash/common/indexes/utils.js +1 -2
  365. package/dist/commonjs/parsers/manifest/dash/common/infer_adaptation_type.js +1 -1
  366. package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts +6 -2
  367. package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts.map +1 -1
  368. package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.js +7 -3
  369. package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.js +1 -1
  370. package/dist/commonjs/parsers/manifest/dash/common/parse_availability_start_time.js +1 -1
  371. package/dist/commonjs/parsers/manifest/dash/common/parse_mpd.js +16 -2
  372. package/dist/commonjs/parsers/manifest/dash/common/parse_periods.js +1 -1
  373. package/dist/commonjs/parsers/manifest/dash/common/parse_representation_index.js +1 -1
  374. package/dist/commonjs/parsers/manifest/dash/common/parse_representations.js +1 -1
  375. package/dist/commonjs/parsers/manifest/dash/common/resolve_base_urls.js +1 -1
  376. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +1 -2
  377. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.js +1 -1
  378. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.js +1 -1
  379. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.js +1 -1
  380. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.js +1 -2
  381. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.js +1 -1
  382. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +1 -2
  383. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +1 -2
  384. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +1 -2
  385. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.js +1 -1
  386. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.js +1 -1
  387. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.js +1 -1
  388. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.js +1 -1
  389. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.js +1 -1
  390. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
  391. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +13 -13
  392. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.js +1 -1
  393. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.js +1 -2
  394. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/BaseURL.js +1 -1
  395. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/ContentComponent.js +1 -1
  396. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/ContentProtection.js +1 -1
  397. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/EventStream.js +1 -1
  398. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Initialization.js +1 -1
  399. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/MPD.js +1 -2
  400. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Period.js +1 -2
  401. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Representation.js +1 -2
  402. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentBase.js +1 -1
  403. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentList.js +1 -1
  404. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentTemplate.js +1 -1
  405. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentTimeline.js +1 -1
  406. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentURL.js +1 -1
  407. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
  408. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.js +12 -12
  409. package/dist/commonjs/parsers/manifest/dash/native-parser/parse_from_document.js +1 -1
  410. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +2 -3
  411. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/BaseURL.js +1 -2
  412. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.js +1 -2
  413. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +1 -2
  414. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +2 -3
  415. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +2 -3
  416. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +2 -3
  417. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +2 -3
  418. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.js +1 -2
  419. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.js +1 -2
  420. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentList.js +1 -2
  421. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.js +1 -2
  422. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.js +1 -2
  423. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/XLink.js +1 -2
  424. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/root.js +1 -2
  425. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/utils.js +2 -3
  426. package/dist/commonjs/parsers/manifest/local/parse_local_manifest.js +1 -1
  427. package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.js +1 -1
  428. package/dist/commonjs/parsers/manifest/smooth/get_codecs.js +2 -3
  429. package/dist/commonjs/parsers/manifest/smooth/parse_C_nodes.js +1 -1
  430. package/dist/commonjs/parsers/manifest/smooth/parse_protection_node.js +1 -1
  431. package/dist/commonjs/parsers/manifest/smooth/utils/add_segment_infos.js +1 -1
  432. package/dist/commonjs/parsers/manifest/smooth/utils/parseBoolean.js +1 -1
  433. package/dist/commonjs/parsers/manifest/smooth/utils/reduceChildren.js +1 -1
  434. package/dist/commonjs/parsers/manifest/smooth/utils/tokens.js +2 -3
  435. package/dist/commonjs/parsers/manifest/utils/check_manifest_ids.js +1 -1
  436. package/dist/commonjs/parsers/manifest/utils/clear_timeline_from_position.js +1 -1
  437. package/dist/commonjs/parsers/manifest/utils/get_first_time_from_adaptation.js +1 -1
  438. package/dist/commonjs/parsers/manifest/utils/get_last_time_from_adaptation.js +1 -1
  439. package/dist/commonjs/parsers/manifest/utils/get_maximum_positions.js +1 -1
  440. package/dist/commonjs/parsers/manifest/utils/get_minimum_position.js +1 -1
  441. package/dist/commonjs/parsers/manifest/utils/index_helpers.js +6 -7
  442. package/dist/commonjs/parsers/manifest/utils/update_segment_timeline.js +1 -1
  443. package/dist/commonjs/parsers/texttracks/srt/find_end_of_cue_block.js +1 -1
  444. package/dist/commonjs/parsers/texttracks/srt/get_cue_blocks.js +1 -1
  445. package/dist/commonjs/parsers/texttracks/srt/html.js +1 -1
  446. package/dist/commonjs/parsers/texttracks/srt/native.js +1 -1
  447. package/dist/commonjs/parsers/texttracks/srt/parse_cue.js +1 -1
  448. package/dist/commonjs/parsers/texttracks/srt/parse_timestamp.js +1 -1
  449. package/dist/commonjs/parsers/texttracks/ttml/get_parameters.js +1 -1
  450. package/dist/commonjs/parsers/texttracks/ttml/get_styling.js +2 -3
  451. package/dist/commonjs/parsers/texttracks/ttml/get_time_delimiters.js +1 -1
  452. package/dist/commonjs/parsers/texttracks/ttml/html/apply_default_ttml_paragraph_style.js +2 -3
  453. package/dist/commonjs/parsers/texttracks/ttml/html/apply_extent.js +1 -1
  454. package/dist/commonjs/parsers/texttracks/ttml/html/apply_font_size.js +1 -1
  455. package/dist/commonjs/parsers/texttracks/ttml/html/apply_line_height.js +1 -1
  456. package/dist/commonjs/parsers/texttracks/ttml/html/apply_origin.js +1 -1
  457. package/dist/commonjs/parsers/texttracks/ttml/html/apply_padding.js +1 -1
  458. package/dist/commonjs/parsers/texttracks/ttml/html/create_element.js +1 -1
  459. package/dist/commonjs/parsers/texttracks/ttml/html/generate_css_test_outline.js +1 -1
  460. package/dist/commonjs/parsers/texttracks/ttml/html/parse_cue.js +1 -1
  461. package/dist/commonjs/parsers/texttracks/ttml/html/parse_ttml_to_div.js +1 -1
  462. package/dist/commonjs/parsers/texttracks/ttml/html/ttml_color_to_css_color.js +1 -1
  463. package/dist/commonjs/parsers/texttracks/ttml/native/parse_cue.js +1 -1
  464. package/dist/commonjs/parsers/texttracks/ttml/native/parse_ttml_to_vtt.js +1 -1
  465. package/dist/commonjs/parsers/texttracks/ttml/parse_ttml.js +1 -1
  466. package/dist/commonjs/parsers/texttracks/ttml/resolve_styles_inheritance.js +1 -1
  467. package/dist/commonjs/parsers/texttracks/ttml/xml_utils.js +9 -10
  468. package/dist/commonjs/parsers/texttracks/webvtt/get_cue_blocks.js +1 -1
  469. package/dist/commonjs/parsers/texttracks/webvtt/get_style_blocks.js +1 -1
  470. package/dist/commonjs/parsers/texttracks/webvtt/html/convert_payload_to_html.js +1 -1
  471. package/dist/commonjs/parsers/texttracks/webvtt/html/create_default_style_elements.js +1 -1
  472. package/dist/commonjs/parsers/texttracks/webvtt/html/create_style_attribute.js +1 -1
  473. package/dist/commonjs/parsers/texttracks/webvtt/html/create_styled_element.js +1 -1
  474. package/dist/commonjs/parsers/texttracks/webvtt/html/parse_style_block.js +1 -1
  475. package/dist/commonjs/parsers/texttracks/webvtt/html/parse_webvtt_to_div.js +1 -1
  476. package/dist/commonjs/parsers/texttracks/webvtt/html/to_html.js +1 -1
  477. package/dist/commonjs/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +1 -1
  478. package/dist/commonjs/parsers/texttracks/webvtt/native/set_settings_on_cue.js +1 -1
  479. package/dist/commonjs/parsers/texttracks/webvtt/native/to_native_cue.js +1 -1
  480. package/dist/commonjs/parsers/texttracks/webvtt/parse_cue_block.js +1 -1
  481. package/dist/commonjs/parsers/texttracks/webvtt/parse_timestamp.js +1 -1
  482. package/dist/commonjs/parsers/texttracks/webvtt/utils.js +6 -7
  483. package/dist/commonjs/playback_observer/media_element_playback_observer.d.ts +2 -1
  484. package/dist/commonjs/playback_observer/media_element_playback_observer.d.ts.map +1 -1
  485. package/dist/commonjs/playback_observer/media_element_playback_observer.js +3 -5
  486. package/dist/commonjs/playback_observer/utils/generate_read_only_observer.js +1 -1
  487. package/dist/commonjs/public_types.d.ts +77 -0
  488. package/dist/commonjs/public_types.d.ts.map +1 -1
  489. package/dist/commonjs/tools/TextTrackRenderer/text_track_renderer.d.ts.map +1 -1
  490. package/dist/commonjs/tools/parseBIFThumbnails/index.js +1 -1
  491. package/dist/commonjs/transports/dash/construct_segment_url.js +1 -1
  492. package/dist/commonjs/transports/dash/get_events_out_of_emsgs.js +1 -1
  493. package/dist/commonjs/transports/dash/init_segment_loader.d.ts +2 -2
  494. package/dist/commonjs/transports/dash/init_segment_loader.d.ts.map +1 -1
  495. package/dist/commonjs/transports/dash/init_segment_loader.js +26 -7
  496. package/dist/commonjs/transports/dash/integrity_checks.d.ts +18 -0
  497. package/dist/commonjs/transports/dash/integrity_checks.d.ts.map +1 -0
  498. package/dist/commonjs/transports/dash/integrity_checks.js +209 -0
  499. package/dist/commonjs/transports/dash/{low_latency_segment_loader.d.ts → load_chunked_segment_data.d.ts} +14 -5
  500. package/dist/commonjs/transports/dash/load_chunked_segment_data.d.ts.map +1 -0
  501. package/dist/commonjs/transports/dash/load_chunked_segment_data.js +126 -0
  502. package/dist/commonjs/transports/dash/manifest_parser.js +1 -1
  503. package/dist/commonjs/transports/dash/pipelines.d.ts.map +1 -1
  504. package/dist/commonjs/transports/dash/pipelines.js +4 -2
  505. package/dist/commonjs/transports/dash/segment_loader.d.ts +2 -2
  506. package/dist/commonjs/transports/dash/segment_loader.d.ts.map +1 -1
  507. package/dist/commonjs/transports/dash/segment_loader.js +105 -31
  508. package/dist/commonjs/transports/dash/segment_parser.js +1 -1
  509. package/dist/commonjs/transports/dash/text_loader.d.ts.map +1 -1
  510. package/dist/commonjs/transports/dash/text_loader.js +122 -46
  511. package/dist/commonjs/transports/dash/text_parser.js +1 -1
  512. package/dist/commonjs/transports/local/pipelines.d.ts.map +1 -1
  513. package/dist/commonjs/transports/local/pipelines.js +2 -1
  514. package/dist/commonjs/transports/local/segment_loader.js +1 -1
  515. package/dist/commonjs/transports/local/segment_parser.js +1 -1
  516. package/dist/commonjs/transports/local/text_parser.js +1 -1
  517. package/dist/commonjs/transports/metaplaylist/manifest_loader.d.ts.map +1 -1
  518. package/dist/commonjs/transports/metaplaylist/manifest_loader.js +12 -4
  519. package/dist/commonjs/transports/metaplaylist/pipelines.d.ts.map +1 -1
  520. package/dist/commonjs/transports/metaplaylist/pipelines.js +3 -1
  521. package/dist/commonjs/transports/smooth/extract_timings_infos.js +1 -1
  522. package/dist/commonjs/transports/smooth/is_mp4_embedded_track.js +1 -1
  523. package/dist/commonjs/transports/smooth/isobmff/create_audio_init_segment.js +1 -1
  524. package/dist/commonjs/transports/smooth/isobmff/create_boxes.js +23 -24
  525. package/dist/commonjs/transports/smooth/isobmff/create_init_segment.js +1 -1
  526. package/dist/commonjs/transports/smooth/isobmff/create_traf_box.js +1 -1
  527. package/dist/commonjs/transports/smooth/isobmff/create_video_init_segment.js +1 -1
  528. package/dist/commonjs/transports/smooth/isobmff/get_aaces_header.js +1 -1
  529. package/dist/commonjs/transports/smooth/isobmff/parse_tfrf.js +1 -1
  530. package/dist/commonjs/transports/smooth/isobmff/parse_tfxd.js +1 -1
  531. package/dist/commonjs/transports/smooth/isobmff/patch_segment.js +1 -1
  532. package/dist/commonjs/transports/smooth/pipelines.d.ts.map +1 -1
  533. package/dist/commonjs/transports/smooth/pipelines.js +17 -4
  534. package/dist/commonjs/transports/smooth/segment_loader.d.ts.map +1 -1
  535. package/dist/commonjs/transports/smooth/segment_loader.js +82 -26
  536. package/dist/commonjs/transports/smooth/utils.js +2 -3
  537. package/dist/commonjs/transports/types.d.ts +17 -1
  538. package/dist/commonjs/transports/types.d.ts.map +1 -1
  539. package/dist/commonjs/transports/utils/add_query_string.d.ts +13 -0
  540. package/dist/commonjs/transports/utils/add_query_string.d.ts.map +1 -0
  541. package/dist/commonjs/transports/utils/add_query_string.js +54 -0
  542. package/dist/commonjs/transports/utils/byte_range.js +1 -1
  543. package/dist/commonjs/transports/utils/call_custom_manifest_loader.js +3 -3
  544. package/dist/commonjs/transports/utils/check_isobmff_integrity.js +1 -1
  545. package/dist/commonjs/transports/utils/generate_manifest_loader.d.ts +4 -4
  546. package/dist/commonjs/transports/utils/generate_manifest_loader.d.ts.map +1 -1
  547. package/dist/commonjs/transports/utils/generate_manifest_loader.js +20 -8
  548. package/dist/commonjs/transports/utils/get_isobmff_timing_infos.js +1 -1
  549. package/dist/commonjs/transports/utils/infer_segment_container.js +1 -1
  550. package/dist/commonjs/transports/utils/parse_text_track.js +5 -6
  551. package/dist/commonjs/utils/are_arrays_of_numbers_equal.js +1 -1
  552. package/dist/commonjs/utils/are_codecs_compatible.d.ts +4 -0
  553. package/dist/commonjs/utils/are_codecs_compatible.d.ts.map +1 -1
  554. package/dist/commonjs/utils/are_codecs_compatible.js +18 -8
  555. package/dist/commonjs/utils/array_find.js +1 -1
  556. package/dist/commonjs/utils/array_find_index.js +1 -1
  557. package/dist/commonjs/utils/array_includes.js +1 -1
  558. package/dist/commonjs/utils/assert.js +4 -4
  559. package/dist/commonjs/utils/base64.js +2 -3
  560. package/dist/commonjs/utils/byte_parsing.js +15 -16
  561. package/dist/commonjs/utils/cancellable_sleep.js +1 -1
  562. package/dist/commonjs/utils/create_cancellable_promise.js +1 -1
  563. package/dist/commonjs/utils/create_uuid.d.ts +9 -0
  564. package/dist/commonjs/utils/create_uuid.d.ts.map +1 -0
  565. package/dist/commonjs/utils/create_uuid.js +32 -0
  566. package/dist/commonjs/utils/deep_merge.js +1 -1
  567. package/dist/commonjs/utils/flat_map.js +1 -1
  568. package/dist/commonjs/utils/get_fuzzed_delay.js +1 -1
  569. package/dist/commonjs/utils/hash_buffer.js +1 -1
  570. package/dist/commonjs/utils/id_generator.js +1 -1
  571. package/dist/commonjs/utils/is_non_empty_string.js +1 -1
  572. package/dist/commonjs/utils/is_null_or_undefined.js +1 -1
  573. package/dist/commonjs/utils/languages/normalize.js +2 -3
  574. package/dist/commonjs/utils/logger.d.ts +21 -4
  575. package/dist/commonjs/utils/logger.d.ts.map +1 -1
  576. package/dist/commonjs/utils/logger.js +106 -36
  577. package/dist/commonjs/utils/monotonic_timestamp.js +1 -2
  578. package/dist/commonjs/utils/noop.js +1 -1
  579. package/dist/commonjs/utils/object_values.js +1 -2
  580. package/dist/commonjs/utils/ranges.js +22 -23
  581. package/dist/commonjs/utils/reference.js +1 -2
  582. package/dist/commonjs/utils/request/fetch.d.ts +2 -4
  583. package/dist/commonjs/utils/request/fetch.d.ts.map +1 -1
  584. package/dist/commonjs/utils/request/fetch.js +2 -3
  585. package/dist/commonjs/utils/request/xhr.d.ts +1 -3
  586. package/dist/commonjs/utils/request/xhr.d.ts.map +1 -1
  587. package/dist/commonjs/utils/request/xhr.js +1 -1
  588. package/dist/commonjs/utils/resolve_url.js +2 -3
  589. package/dist/commonjs/utils/retry_promise_with_backoff.js +2 -3
  590. package/dist/commonjs/utils/sleep.js +1 -1
  591. package/dist/commonjs/utils/starts_with.js +1 -1
  592. package/dist/commonjs/utils/string_parsing.js +10 -11
  593. package/dist/commonjs/utils/sync_or_async.d.ts +1 -1
  594. package/dist/commonjs/utils/sync_or_async.d.ts.map +1 -1
  595. package/dist/commonjs/utils/warn_once.js +1 -1
  596. package/dist/commonjs/utils/weak_map_memory.js +1 -1
  597. package/dist/commonjs/utils/wrapInPromise.js +1 -1
  598. package/dist/commonjs/utils/xml-parser.js +5 -6
  599. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  600. package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  601. package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
  602. package/dist/es2017/compat/add_text_track.d.ts +2 -2
  603. package/dist/es2017/compat/add_text_track.d.ts.map +1 -1
  604. package/dist/es2017/compat/browser_compatibility_types.d.ts +196 -13
  605. package/dist/es2017/compat/browser_compatibility_types.d.ts.map +1 -1
  606. package/dist/es2017/compat/browser_compatibility_types.js +29 -0
  607. package/dist/es2017/compat/clear_element_src.d.ts +2 -1
  608. package/dist/es2017/compat/clear_element_src.d.ts.map +1 -1
  609. package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts +3 -2
  610. package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts.map +1 -1
  611. package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +2 -1
  612. package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts.map +1 -1
  613. package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.js +1 -2
  614. package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +3 -2
  615. package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts.map +1 -1
  616. package/dist/es2017/compat/eme/custom_media_keys/types.d.ts +5 -1
  617. package/dist/es2017/compat/eme/custom_media_keys/types.d.ts.map +1 -1
  618. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts +4 -3
  619. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
  620. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.js +2 -3
  621. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts.map +1 -1
  622. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +1 -2
  623. package/dist/es2017/compat/eme/eme-api-implementation.d.ts +4 -3
  624. package/dist/es2017/compat/eme/eme-api-implementation.d.ts.map +1 -1
  625. package/dist/es2017/compat/eme/eme-api-implementation.js +19 -5
  626. package/dist/es2017/compat/eme/get_init_data.d.ts +3 -1
  627. package/dist/es2017/compat/eme/get_init_data.d.ts.map +1 -1
  628. package/dist/es2017/compat/eme/get_init_data.js +2 -2
  629. package/dist/es2017/compat/eme/set_media_keys.d.ts +2 -1
  630. package/dist/es2017/compat/eme/set_media_keys.d.ts.map +1 -1
  631. package/dist/es2017/compat/event_listeners.d.ts +26 -24
  632. package/dist/es2017/compat/event_listeners.d.ts.map +1 -1
  633. package/dist/es2017/compat/event_listeners.js +2 -14
  634. package/dist/es2017/compat/get_start_date.d.ts +2 -1
  635. package/dist/es2017/compat/get_start_date.d.ts.map +1 -1
  636. package/dist/es2017/config.d.ts +1 -1
  637. package/dist/es2017/core/cmcd/cmcd_data_builder.d.ts +121 -0
  638. package/dist/es2017/core/cmcd/cmcd_data_builder.d.ts.map +1 -0
  639. package/dist/es2017/core/cmcd/cmcd_data_builder.js +313 -0
  640. package/dist/es2017/core/cmcd/index.d.ts +4 -0
  641. package/dist/es2017/core/cmcd/index.d.ts.map +1 -0
  642. package/dist/es2017/core/cmcd/index.js +2 -0
  643. package/dist/es2017/core/fetchers/manifest/manifest_fetcher.d.ts +8 -0
  644. package/dist/es2017/core/fetchers/manifest/manifest_fetcher.d.ts.map +1 -1
  645. package/dist/es2017/core/fetchers/manifest/manifest_fetcher.js +7 -2
  646. package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts +43 -23
  647. package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts.map +1 -1
  648. package/dist/es2017/core/fetchers/segment/segment_fetcher.js +21 -33
  649. package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.d.ts +5 -3
  650. package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.d.ts.map +1 -1
  651. package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.js +14 -6
  652. package/dist/es2017/core/main/worker/content_preparer.d.ts +7 -0
  653. package/dist/es2017/core/main/worker/content_preparer.d.ts.map +1 -1
  654. package/dist/es2017/core/main/worker/content_preparer.js +5 -2
  655. package/dist/es2017/core/main/worker/worker_main.d.ts.map +1 -1
  656. package/dist/es2017/core/main/worker/worker_main.js +19 -18
  657. package/dist/es2017/default_config.d.ts +1 -1
  658. package/dist/es2017/default_config.d.ts.map +1 -1
  659. package/dist/es2017/default_config.js +1 -0
  660. package/dist/es2017/experimental/features/local.d.ts.map +1 -1
  661. package/dist/es2017/experimental/features/local.js +0 -2
  662. package/dist/es2017/experimental/features/metaplaylist.d.ts.map +1 -1
  663. package/dist/es2017/experimental/features/metaplaylist.js +0 -2
  664. package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +2 -1
  665. package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts.map +1 -1
  666. package/dist/es2017/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +2 -1
  667. package/dist/es2017/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts.map +1 -1
  668. package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts.map +1 -1
  669. package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +14 -8
  670. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/index.d.ts.map +1 -1
  671. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/index.js +1 -1
  672. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.d.ts.map +1 -1
  673. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +1 -0
  674. package/dist/es2017/features/features_object.d.ts.map +1 -1
  675. package/dist/es2017/features/features_object.js +0 -1
  676. package/dist/es2017/features/list/dash.d.ts.map +1 -1
  677. package/dist/es2017/features/list/dash.js +0 -2
  678. package/dist/es2017/features/list/dash_wasm.d.ts.map +1 -1
  679. package/dist/es2017/features/list/dash_wasm.js +0 -2
  680. package/dist/es2017/features/list/smooth.d.ts.map +1 -1
  681. package/dist/es2017/features/list/smooth.js +0 -2
  682. package/dist/es2017/features/types.d.ts +3 -11
  683. package/dist/es2017/features/types.d.ts.map +1 -1
  684. package/dist/es2017/index.js +2 -2
  685. package/dist/es2017/main_thread/api/option_utils.d.ts +9 -2
  686. package/dist/es2017/main_thread/api/option_utils.d.ts.map +1 -1
  687. package/dist/es2017/main_thread/api/option_utils.js +4 -5
  688. package/dist/es2017/main_thread/api/public_api.d.ts +23 -2
  689. package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
  690. package/dist/es2017/main_thread/api/public_api.js +43 -11
  691. package/dist/es2017/main_thread/api/utils.d.ts +5 -4
  692. package/dist/es2017/main_thread/api/utils.d.ts.map +1 -1
  693. package/dist/es2017/main_thread/decrypt/attach_media_keys.d.ts +3 -2
  694. package/dist/es2017/main_thread/decrypt/attach_media_keys.d.ts.map +1 -1
  695. package/dist/es2017/main_thread/decrypt/clear_on_stop.d.ts +2 -1
  696. package/dist/es2017/main_thread/decrypt/clear_on_stop.d.ts.map +1 -1
  697. package/dist/es2017/main_thread/decrypt/content_decryptor.d.ts +26 -1
  698. package/dist/es2017/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
  699. package/dist/es2017/main_thread/decrypt/content_decryptor.js +70 -0
  700. package/dist/es2017/main_thread/decrypt/dispose_decryption_resources.d.ts +2 -1
  701. package/dist/es2017/main_thread/decrypt/dispose_decryption_resources.d.ts.map +1 -1
  702. package/dist/es2017/main_thread/decrypt/find_key_system.d.ts +17 -2
  703. package/dist/es2017/main_thread/decrypt/find_key_system.d.ts.map +1 -1
  704. package/dist/es2017/main_thread/decrypt/find_key_system.js +48 -0
  705. package/dist/es2017/main_thread/decrypt/get_key_system_configuration.d.ts +2 -1
  706. package/dist/es2017/main_thread/decrypt/get_key_system_configuration.d.ts.map +1 -1
  707. package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts +5 -1
  708. package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
  709. package/dist/es2017/main_thread/decrypt/get_media_keys.js +3 -1
  710. package/dist/es2017/main_thread/decrypt/init_media_keys.d.ts +2 -1
  711. package/dist/es2017/main_thread/decrypt/init_media_keys.d.ts.map +1 -1
  712. package/dist/es2017/main_thread/decrypt/types.d.ts +1 -0
  713. package/dist/es2017/main_thread/decrypt/types.d.ts.map +1 -1
  714. package/dist/es2017/main_thread/decrypt/utils/is_compatible_codec_supported.d.ts +14 -0
  715. package/dist/es2017/main_thread/decrypt/utils/is_compatible_codec_supported.d.ts.map +1 -0
  716. package/dist/es2017/main_thread/decrypt/utils/is_compatible_codec_supported.js +28 -0
  717. package/dist/es2017/main_thread/decrypt/utils/media_keys_infos_store.d.ts +4 -3
  718. package/dist/es2017/main_thread/decrypt/utils/media_keys_infos_store.d.ts.map +1 -1
  719. package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts +6 -1
  720. package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
  721. package/dist/es2017/main_thread/init/directfile_content_initializer.js +1 -12
  722. package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts +62 -4
  723. package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts.map +1 -1
  724. package/dist/es2017/main_thread/init/media_source_content_initializer.js +142 -19
  725. package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts +46 -4
  726. package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
  727. package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +67 -133
  728. package/dist/es2017/main_thread/init/types.d.ts +6 -1
  729. package/dist/es2017/main_thread/init/types.d.ts.map +1 -1
  730. package/dist/es2017/main_thread/init/utils/create_media_source.d.ts +3 -2
  731. package/dist/es2017/main_thread/init/utils/create_media_source.d.ts.map +1 -1
  732. package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts +2 -1
  733. package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts.map +1 -1
  734. package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts +2 -1
  735. package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
  736. package/dist/es2017/main_thread/init/utils/initialize_content_decryption.d.ts +17 -6
  737. package/dist/es2017/main_thread/init/utils/initialize_content_decryption.d.ts.map +1 -1
  738. package/dist/es2017/main_thread/init/utils/initialize_content_decryption.js +16 -21
  739. package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +2 -1
  740. package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts.map +1 -1
  741. package/dist/es2017/main_thread/init/utils/throw_on_media_error.d.ts +2 -1
  742. package/dist/es2017/main_thread/init/utils/throw_on_media_error.d.ts.map +1 -1
  743. package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.d.ts +33 -0
  744. package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.d.ts.map +1 -0
  745. package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.js +149 -0
  746. package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.d.ts +2 -1
  747. package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.d.ts.map +1 -1
  748. package/dist/es2017/main_thread/text_displayer/native/native_text_displayer.d.ts +2 -1
  749. package/dist/es2017/main_thread/text_displayer/native/native_text_displayer.d.ts.map +1 -1
  750. package/dist/es2017/main_thread/tracks_store/media_element_tracks_store.d.ts +6 -1
  751. package/dist/es2017/main_thread/tracks_store/media_element_tracks_store.d.ts.map +1 -1
  752. package/dist/es2017/main_thread/tracks_store/track_dispatcher.d.ts +5 -2
  753. package/dist/es2017/main_thread/tracks_store/track_dispatcher.d.ts.map +1 -1
  754. package/dist/es2017/main_thread/tracks_store/track_dispatcher.js +7 -26
  755. package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts +49 -25
  756. package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts.map +1 -1
  757. package/dist/es2017/main_thread/tracks_store/tracks_store.js +221 -98
  758. package/dist/es2017/manifest/classes/adaptation.d.ts +9 -9
  759. package/dist/es2017/manifest/classes/adaptation.d.ts.map +1 -1
  760. package/dist/es2017/manifest/classes/adaptation.js +50 -24
  761. package/dist/es2017/manifest/classes/codec_support_cache.d.ts +45 -0
  762. package/dist/es2017/manifest/classes/codec_support_cache.d.ts.map +1 -0
  763. package/dist/es2017/manifest/classes/codec_support_cache.js +58 -0
  764. package/dist/es2017/manifest/classes/index.d.ts +2 -2
  765. package/dist/es2017/manifest/classes/index.d.ts.map +1 -1
  766. package/dist/es2017/manifest/classes/manifest.d.ts +28 -6
  767. package/dist/es2017/manifest/classes/manifest.d.ts.map +1 -1
  768. package/dist/es2017/manifest/classes/manifest.js +45 -7
  769. package/dist/es2017/manifest/classes/period.d.ts +6 -7
  770. package/dist/es2017/manifest/classes/period.d.ts.map +1 -1
  771. package/dist/es2017/manifest/classes/period.js +23 -14
  772. package/dist/es2017/manifest/classes/representation.d.ts +10 -11
  773. package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
  774. package/dist/es2017/manifest/classes/representation.js +56 -60
  775. package/dist/es2017/manifest/index.d.ts +2 -2
  776. package/dist/es2017/manifest/types.d.ts +32 -5
  777. package/dist/es2017/manifest/types.d.ts.map +1 -1
  778. package/dist/es2017/manifest/utils.d.ts +1 -1
  779. package/dist/es2017/manifest/utils.d.ts.map +1 -1
  780. package/dist/es2017/manifest/utils.js +19 -3
  781. package/dist/es2017/minimal.d.ts.map +1 -1
  782. package/dist/es2017/minimal.js +2 -8
  783. package/dist/es2017/mse/index.d.ts +1 -1
  784. package/dist/es2017/mse/index.d.ts.map +1 -1
  785. package/dist/es2017/mse/main_media_source_interface.d.ts +2 -1
  786. package/dist/es2017/mse/main_media_source_interface.d.ts.map +1 -1
  787. package/dist/es2017/mse/main_media_source_interface.js +5 -4
  788. package/dist/es2017/mse/types.d.ts +0 -29
  789. package/dist/es2017/mse/types.d.ts.map +1 -1
  790. package/dist/es2017/mse/utils/end_of_stream.d.ts +3 -2
  791. package/dist/es2017/mse/utils/end_of_stream.d.ts.map +1 -1
  792. package/dist/es2017/mse/utils/media_source_duration_updater.d.ts +2 -1
  793. package/dist/es2017/mse/utils/media_source_duration_updater.d.ts.map +1 -1
  794. package/dist/es2017/multithread_types.d.ts +26 -14
  795. package/dist/es2017/multithread_types.d.ts.map +1 -1
  796. package/dist/es2017/parsers/manifest/dash/common/indexes/template.d.ts.map +1 -1
  797. package/dist/es2017/parsers/manifest/dash/common/indexes/template.js +1 -1
  798. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts.map +1 -1
  799. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +2 -1
  800. package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts +6 -2
  801. package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts.map +1 -1
  802. package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.js +7 -3
  803. package/dist/es2017/parsers/manifest/dash/common/parse_mpd.js +15 -1
  804. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
  805. package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
  806. package/dist/es2017/playback_observer/media_element_playback_observer.d.ts +2 -1
  807. package/dist/es2017/playback_observer/media_element_playback_observer.d.ts.map +1 -1
  808. package/dist/es2017/playback_observer/media_element_playback_observer.js +3 -5
  809. package/dist/es2017/public_types.d.ts +77 -0
  810. package/dist/es2017/public_types.d.ts.map +1 -1
  811. package/dist/es2017/tools/TextTrackRenderer/text_track_renderer.d.ts.map +1 -1
  812. package/dist/es2017/transports/dash/init_segment_loader.d.ts +2 -2
  813. package/dist/es2017/transports/dash/init_segment_loader.d.ts.map +1 -1
  814. package/dist/es2017/transports/dash/init_segment_loader.js +14 -6
  815. package/dist/es2017/transports/dash/integrity_checks.d.ts +18 -0
  816. package/dist/es2017/transports/dash/integrity_checks.d.ts.map +1 -0
  817. package/dist/es2017/transports/dash/integrity_checks.js +150 -0
  818. package/dist/es2017/transports/dash/{low_latency_segment_loader.d.ts → load_chunked_segment_data.d.ts} +14 -5
  819. package/dist/es2017/transports/dash/load_chunked_segment_data.d.ts.map +1 -0
  820. package/dist/es2017/transports/dash/{low_latency_segment_loader.js → load_chunked_segment_data.js} +15 -12
  821. package/dist/es2017/transports/dash/pipelines.d.ts.map +1 -1
  822. package/dist/es2017/transports/dash/pipelines.js +3 -1
  823. package/dist/es2017/transports/dash/segment_loader.d.ts +2 -2
  824. package/dist/es2017/transports/dash/segment_loader.d.ts.map +1 -1
  825. package/dist/es2017/transports/dash/segment_loader.js +29 -10
  826. package/dist/es2017/transports/dash/text_loader.d.ts.map +1 -1
  827. package/dist/es2017/transports/dash/text_loader.js +40 -20
  828. package/dist/es2017/transports/local/pipelines.d.ts.map +1 -1
  829. package/dist/es2017/transports/local/pipelines.js +1 -0
  830. package/dist/es2017/transports/metaplaylist/manifest_loader.d.ts.map +1 -1
  831. package/dist/es2017/transports/metaplaylist/manifest_loader.js +11 -3
  832. package/dist/es2017/transports/metaplaylist/pipelines.d.ts.map +1 -1
  833. package/dist/es2017/transports/metaplaylist/pipelines.js +2 -0
  834. package/dist/es2017/transports/smooth/pipelines.d.ts.map +1 -1
  835. package/dist/es2017/transports/smooth/pipelines.js +16 -3
  836. package/dist/es2017/transports/smooth/segment_loader.d.ts.map +1 -1
  837. package/dist/es2017/transports/smooth/segment_loader.js +27 -16
  838. package/dist/es2017/transports/types.d.ts +17 -1
  839. package/dist/es2017/transports/types.d.ts.map +1 -1
  840. package/dist/es2017/transports/utils/add_query_string.d.ts +13 -0
  841. package/dist/es2017/transports/utils/add_query_string.d.ts.map +1 -0
  842. package/dist/es2017/transports/utils/add_query_string.js +51 -0
  843. package/dist/es2017/transports/utils/call_custom_manifest_loader.js +2 -2
  844. package/dist/es2017/transports/utils/generate_manifest_loader.d.ts +4 -4
  845. package/dist/es2017/transports/utils/generate_manifest_loader.d.ts.map +1 -1
  846. package/dist/es2017/transports/utils/generate_manifest_loader.js +19 -7
  847. package/dist/es2017/utils/are_codecs_compatible.d.ts +4 -0
  848. package/dist/es2017/utils/are_codecs_compatible.d.ts.map +1 -1
  849. package/dist/es2017/utils/are_codecs_compatible.js +17 -8
  850. package/dist/es2017/utils/create_uuid.d.ts +9 -0
  851. package/dist/es2017/utils/create_uuid.d.ts.map +1 -0
  852. package/dist/es2017/utils/create_uuid.js +29 -0
  853. package/dist/es2017/utils/logger.d.ts +21 -4
  854. package/dist/es2017/utils/logger.d.ts.map +1 -1
  855. package/dist/es2017/utils/logger.js +73 -13
  856. package/dist/es2017/utils/request/fetch.d.ts +2 -4
  857. package/dist/es2017/utils/request/fetch.d.ts.map +1 -1
  858. package/dist/es2017/utils/request/xhr.d.ts +1 -3
  859. package/dist/es2017/utils/request/xhr.d.ts.map +1 -1
  860. package/dist/es2017/utils/sync_or_async.d.ts +1 -1
  861. package/dist/es2017/utils/sync_or_async.d.ts.map +1 -1
  862. package/dist/es2017/utils/weak_map_memory.js +1 -1
  863. package/dist/mpd-parser.wasm +0 -0
  864. package/dist/rx-player.js +18 -17
  865. package/dist/worker.js +6 -5
  866. package/package.json +31 -35
  867. package/src/README.md +23 -20
  868. package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
  869. package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
  870. package/src/compat/__tests__/add_text_track.test.ts +4 -3
  871. package/src/compat/__tests__/change_source_buffer_type.test.ts +4 -3
  872. package/src/compat/add_text_track.ts +2 -2
  873. package/src/compat/browser_compatibility_types.ts +247 -13
  874. package/src/compat/clear_element_src.ts +2 -1
  875. package/src/compat/eme/custom_media_keys/ie11_media_keys.ts +6 -6
  876. package/src/compat/eme/custom_media_keys/moz_media_keys_constructor.ts +3 -4
  877. package/src/compat/eme/custom_media_keys/old_webkit_media_keys.ts +4 -5
  878. package/src/compat/eme/custom_media_keys/types.ts +6 -1
  879. package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +11 -15
  880. package/src/compat/eme/custom_media_keys/webkit_media_keys_constructor.ts +2 -3
  881. package/src/compat/eme/eme-api-implementation.ts +40 -9
  882. package/src/compat/eme/get_init_data.ts +5 -3
  883. package/src/compat/eme/set_media_keys.ts +2 -1
  884. package/src/compat/event_listeners.ts +37 -12
  885. package/src/compat/get_start_date.ts +4 -2
  886. package/src/core/README.md +5 -0
  887. package/src/core/cmcd/cmcd_data_builder.ts +597 -0
  888. package/src/core/cmcd/index.ts +7 -0
  889. package/src/core/fetchers/manifest/manifest_fetcher.ts +18 -9
  890. package/src/core/fetchers/segment/segment_fetcher.ts +76 -42
  891. package/src/core/fetchers/segment/segment_fetcher_creator.ts +16 -10
  892. package/src/core/main/README.md +2 -2
  893. package/src/core/main/worker/content_preparer.ts +16 -1
  894. package/src/core/main/worker/worker_main.ts +34 -18
  895. package/src/core/segment_sinks/README.md +1 -1
  896. package/src/core/segment_sinks/inventory/segment_inventory.ts +1 -1
  897. package/src/default_config.ts +1 -0
  898. package/src/experimental/features/__tests__/local.test.ts +0 -3
  899. package/src/experimental/features/__tests__/metaplaylist.test.ts +0 -3
  900. package/src/experimental/features/local.ts +0 -2
  901. package/src/experimental/features/metaplaylist.ts +0 -2
  902. package/src/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.ts +2 -1
  903. package/src/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.ts +2 -1
  904. package/src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.ts +9 -8
  905. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/defaultCodecFinder.test.ts +1 -1
  906. package/src/experimental/tools/mediaCapabilitiesProber/api/index.ts +1 -1
  907. package/src/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.ts +1 -0
  908. package/src/features/features_object.ts +0 -1
  909. package/src/features/list/__tests__/dash.test.ts +0 -3
  910. package/src/features/list/__tests__/smooth.test.ts +0 -3
  911. package/src/features/list/dash.ts +0 -2
  912. package/src/features/list/dash_wasm.ts +0 -2
  913. package/src/features/list/smooth.ts +0 -2
  914. package/src/features/types.ts +3 -11
  915. package/src/index.ts +2 -2
  916. package/src/main_thread/README.md +1 -1
  917. package/src/main_thread/api/__tests__/option_utils.test.ts +1 -0
  918. package/src/main_thread/api/__tests__/utils.test.ts +12 -11
  919. package/src/main_thread/api/option_utils.ts +12 -3
  920. package/src/main_thread/api/public_api.ts +55 -13
  921. package/src/main_thread/api/utils.ts +5 -4
  922. package/src/main_thread/decrypt/__tests__/__global__/utils.ts +10 -5
  923. package/src/main_thread/decrypt/attach_media_keys.ts +3 -2
  924. package/src/main_thread/decrypt/clear_on_stop.ts +2 -1
  925. package/src/main_thread/decrypt/content_decryptor.ts +98 -5
  926. package/src/main_thread/decrypt/dispose_decryption_resources.ts +2 -1
  927. package/src/main_thread/decrypt/find_key_system.ts +85 -2
  928. package/src/main_thread/decrypt/get_key_system_configuration.ts +2 -1
  929. package/src/main_thread/decrypt/get_media_keys.ts +8 -2
  930. package/src/main_thread/decrypt/init_media_keys.ts +2 -1
  931. package/src/main_thread/decrypt/types.ts +2 -0
  932. package/src/main_thread/decrypt/utils/__tests__/is_compatible_codec_supported.test.ts +38 -0
  933. package/src/main_thread/decrypt/utils/is_compatible_codec_supported.ts +39 -0
  934. package/src/main_thread/decrypt/utils/media_keys_infos_store.ts +5 -7
  935. package/src/main_thread/init/directfile_content_initializer.ts +5 -13
  936. package/src/main_thread/init/media_source_content_initializer.ts +221 -42
  937. package/src/main_thread/init/multi_thread_content_initializer.ts +144 -151
  938. package/src/main_thread/init/types.ts +6 -1
  939. package/src/main_thread/init/utils/create_media_source.ts +4 -3
  940. package/src/main_thread/init/utils/get_loaded_reference.ts +2 -1
  941. package/src/main_thread/init/utils/initial_seek_and_play.ts +2 -1
  942. package/src/main_thread/init/utils/initialize_content_decryption.ts +40 -33
  943. package/src/main_thread/init/utils/stream_events_emitter/stream_events_emitter.ts +3 -2
  944. package/src/main_thread/init/utils/throw_on_media_error.ts +2 -2
  945. package/src/main_thread/init/utils/update_manifest_codec_support.ts +193 -0
  946. package/src/main_thread/text_displayer/html/html_text_displayer.ts +3 -2
  947. package/src/main_thread/text_displayer/native/native_text_displayer.ts +6 -3
  948. package/src/main_thread/tracks_store/media_element_tracks_store.ts +4 -4
  949. package/src/main_thread/tracks_store/track_dispatcher.ts +7 -26
  950. package/src/main_thread/tracks_store/tracks_store.ts +314 -184
  951. package/src/manifest/classes/__tests__/adaptation.test.ts +50 -19
  952. package/src/manifest/classes/__tests__/manifest.test.ts +37 -6
  953. package/src/manifest/classes/__tests__/period.test.ts +212 -99
  954. package/src/manifest/classes/__tests__/representation.test.ts +96 -103
  955. package/src/manifest/classes/__tests__/update_period_in_place.test.ts +20 -20
  956. package/src/manifest/classes/adaptation.ts +61 -28
  957. package/src/manifest/classes/codec_support_cache.ts +82 -0
  958. package/src/manifest/classes/index.ts +2 -2
  959. package/src/manifest/classes/manifest.ts +61 -7
  960. package/src/manifest/classes/period.ts +30 -14
  961. package/src/manifest/classes/representation.ts +73 -70
  962. package/src/manifest/index.ts +2 -2
  963. package/src/manifest/types.ts +33 -5
  964. package/src/manifest/utils.ts +25 -4
  965. package/src/minimal.ts +2 -9
  966. package/src/mse/index.ts +0 -1
  967. package/src/mse/main_media_source_interface.ts +11 -8
  968. package/src/mse/types.ts +1 -30
  969. package/src/mse/utils/end_of_stream.ts +9 -4
  970. package/src/mse/utils/media_source_duration_updater.ts +10 -6
  971. package/src/multithread_types.ts +27 -14
  972. package/src/parsers/manifest/dash/common/__tests__/manifest_bounds_calculator.test.ts +29 -17
  973. package/src/parsers/manifest/dash/common/indexes/template.ts +3 -1
  974. package/src/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.ts +3 -1
  975. package/src/parsers/manifest/dash/common/manifest_bounds_calculator.ts +7 -3
  976. package/src/parsers/manifest/dash/common/parse_mpd.ts +15 -1
  977. package/src/parsers/manifest/utils/__tests__/update_segment_timeline.test.ts +1 -1
  978. package/src/parsers/texttracks/ttml/html/__tests__/__global__/html_ttml_parser.test.ts +6 -2
  979. package/src/playback_observer/media_element_playback_observer.ts +11 -11
  980. package/src/public_types.ts +86 -0
  981. package/src/tools/TextTrackRenderer/text_track_renderer.ts +1 -0
  982. package/src/transports/dash/init_segment_loader.ts +26 -6
  983. package/src/transports/dash/integrity_checks.ts +170 -0
  984. package/src/transports/dash/{low_latency_segment_loader.ts → load_chunked_segment_data.ts} +20 -17
  985. package/src/transports/dash/pipelines.ts +3 -0
  986. package/src/transports/dash/segment_loader.ts +47 -12
  987. package/src/transports/dash/text_loader.ts +50 -21
  988. package/src/transports/local/pipelines.ts +1 -0
  989. package/src/transports/metaplaylist/manifest_loader.ts +14 -3
  990. package/src/transports/metaplaylist/pipelines.ts +2 -0
  991. package/src/transports/smooth/pipelines.ts +19 -3
  992. package/src/transports/smooth/segment_loader.ts +33 -17
  993. package/src/transports/types.ts +19 -0
  994. package/src/transports/utils/__tests__/add_query_string.test.ts +108 -0
  995. package/src/transports/utils/add_query_string.ts +54 -0
  996. package/src/transports/utils/call_custom_manifest_loader.ts +2 -2
  997. package/src/transports/utils/generate_manifest_loader.ts +34 -13
  998. package/src/utils/__tests__/array_find.test.ts +3 -3
  999. package/src/utils/__tests__/array_find_index.test.ts +3 -3
  1000. package/src/utils/__tests__/logger.test.ts +174 -17
  1001. package/src/utils/are_codecs_compatible.ts +19 -11
  1002. package/src/utils/create_uuid.ts +28 -0
  1003. package/src/utils/logger.ts +83 -13
  1004. package/src/utils/request/fetch.ts +3 -3
  1005. package/src/utils/request/xhr.ts +2 -2
  1006. package/src/utils/weak_map_memory.ts +1 -1
  1007. package/dist/commonjs/mse/main_codec_support_prober.d.ts +0 -27
  1008. package/dist/commonjs/mse/main_codec_support_prober.d.ts.map +0 -1
  1009. package/dist/commonjs/mse/main_codec_support_prober.js +0 -44
  1010. package/dist/commonjs/mse/worker_codec_support_prober.d.ts +0 -43
  1011. package/dist/commonjs/mse/worker_codec_support_prober.d.ts.map +0 -1
  1012. package/dist/commonjs/mse/worker_codec_support_prober.js +0 -61
  1013. package/dist/commonjs/transports/dash/add_segment_integrity_checks_to_loader.d.ts +0 -25
  1014. package/dist/commonjs/transports/dash/add_segment_integrity_checks_to_loader.d.ts.map +0 -1
  1015. package/dist/commonjs/transports/dash/add_segment_integrity_checks_to_loader.js +0 -95
  1016. package/dist/commonjs/transports/dash/low_latency_segment_loader.d.ts.map +0 -1
  1017. package/dist/commonjs/transports/dash/low_latency_segment_loader.js +0 -77
  1018. package/dist/es2017/mse/main_codec_support_prober.d.ts +0 -27
  1019. package/dist/es2017/mse/main_codec_support_prober.d.ts.map +0 -1
  1020. package/dist/es2017/mse/main_codec_support_prober.js +0 -41
  1021. package/dist/es2017/mse/worker_codec_support_prober.d.ts +0 -43
  1022. package/dist/es2017/mse/worker_codec_support_prober.d.ts.map +0 -1
  1023. package/dist/es2017/mse/worker_codec_support_prober.js +0 -58
  1024. package/dist/es2017/transports/dash/add_segment_integrity_checks_to_loader.d.ts +0 -25
  1025. package/dist/es2017/transports/dash/add_segment_integrity_checks_to_loader.d.ts.map +0 -1
  1026. package/dist/es2017/transports/dash/add_segment_integrity_checks_to_loader.js +0 -81
  1027. package/dist/es2017/transports/dash/low_latency_segment_loader.d.ts.map +0 -1
  1028. package/src/mse/main_codec_support_prober.ts +0 -52
  1029. package/src/mse/worker_codec_support_prober.ts +0 -75
  1030. package/src/transports/dash/add_segment_integrity_checks_to_loader.ts +0 -97
@@ -1,6 +1,6 @@
1
- import { describe, beforeEach, afterEach, it, expect, vi } from "vitest";
2
- import features from "../../../features";
1
+ import { describe, it, expect, vi } from "vitest";
3
2
  import type { IParsedRepresentation } from "../../../parsers/manifest";
3
+ import CodecSupportCache from "../codec_support_cache";
4
4
  import Representation from "../representation";
5
5
  import type { IRepresentationIndex } from "../representation_index";
6
6
 
@@ -55,28 +55,16 @@ const minimalIndex: IRepresentationIndex = {
55
55
  },
56
56
  };
57
57
 
58
- const defaultIsCodecSupported = vi.fn(
59
- (_mimetype: string, _codec: string): boolean | undefined => true,
60
- );
61
-
62
58
  describe("Manifest - Representation", () => {
63
- beforeEach(() => {
64
- features.codecSupportProber = {
65
- isSupported: defaultIsCodecSupported,
66
- };
67
- });
68
- afterEach(() => {
69
- features.codecSupportProber = null;
70
- defaultIsCodecSupported.mockClear();
71
- });
72
-
59
+ const cache = new CodecSupportCache([]);
73
60
  it("should be able to create Representation with the minimum arguments given", () => {
74
61
  const args = {
75
62
  bitrate: 12,
76
63
  id: "test",
77
64
  index: minimalIndex,
78
65
  } as unknown as IParsedRepresentation;
79
- const representation = new Representation(args, "audio");
66
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
67
+ const representation = new Representation(args, "audio", cache);
80
68
  expect(representation.id).toBe("test");
81
69
  expect(representation.bitrate).toBe(12);
82
70
  expect(representation.index).toBe(minimalIndex);
@@ -87,10 +75,10 @@ describe("Manifest - Representation", () => {
87
75
  expect(representation.mimeType).toBe(undefined);
88
76
  expect(representation.width).toBe(undefined);
89
77
  expect(representation.getMimeTypeString()).toBe(';codecs=""');
90
- expect(representation.isSupported).toBe(true);
78
+ expect(representation.isSupported).toBe(undefined);
91
79
  expect(representation.decipherable).toBe(undefined);
92
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
93
- expect(defaultIsCodecSupported).toHaveBeenCalledWith("", "");
80
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
81
+ expect(spyCodecCache).toHaveBeenCalledWith("", "", false);
94
82
  });
95
83
 
96
84
  it("should be able to add a height attribute", () => {
@@ -100,7 +88,8 @@ describe("Manifest - Representation", () => {
100
88
  height: 57,
101
89
  index: minimalIndex,
102
90
  } as unknown as IParsedRepresentation;
103
- const representation = new Representation(args, "video");
91
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
92
+ const representation = new Representation(args, "video", cache);
104
93
  expect(representation.id).toBe("test");
105
94
  expect(representation.bitrate).toBe(12);
106
95
  expect(representation.index).toBe(minimalIndex);
@@ -111,9 +100,9 @@ describe("Manifest - Representation", () => {
111
100
  expect(representation.mimeType).toBe(undefined);
112
101
  expect(representation.width).toBe(undefined);
113
102
  expect(representation.getMimeTypeString()).toBe(';codecs=""');
114
- expect(representation.isSupported).toBe(true);
103
+ expect(representation.isSupported).toBe(undefined);
115
104
  expect(representation.decipherable).toBe(undefined);
116
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
105
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
117
106
  });
118
107
 
119
108
  it("should be able to add a width attribute", () => {
@@ -123,7 +112,8 @@ describe("Manifest - Representation", () => {
123
112
  width: 2,
124
113
  index: minimalIndex,
125
114
  } as unknown as IParsedRepresentation;
126
- const representation = new Representation(args, "video");
115
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
116
+ const representation = new Representation(args, "video", cache);
127
117
  expect(representation.id).toBe("test");
128
118
  expect(representation.bitrate).toBe(12);
129
119
  expect(representation.index).toBe(minimalIndex);
@@ -134,9 +124,9 @@ describe("Manifest - Representation", () => {
134
124
  expect(representation.mimeType).toBe(undefined);
135
125
  expect(representation.width).toBe(2);
136
126
  expect(representation.getMimeTypeString()).toBe(';codecs=""');
137
- expect(representation.isSupported).toBe(true);
127
+ expect(representation.isSupported).toBe(undefined);
138
128
  expect(representation.decipherable).toBe(undefined);
139
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
129
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
140
130
  });
141
131
 
142
132
  it("should be able to add a codecs attribute", () => {
@@ -146,7 +136,8 @@ describe("Manifest - Representation", () => {
146
136
  codecs: "vp9",
147
137
  index: minimalIndex,
148
138
  } as unknown as IParsedRepresentation;
149
- const representation = new Representation(args, "audio");
139
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
140
+ const representation = new Representation(args, "audio", cache);
150
141
  expect(representation.id).toBe("test");
151
142
  expect(representation.bitrate).toBe(12);
152
143
  expect(representation.index).toBe(minimalIndex);
@@ -157,9 +148,9 @@ describe("Manifest - Representation", () => {
157
148
  expect(representation.mimeType).toBe(undefined);
158
149
  expect(representation.width).toBe(undefined);
159
150
  expect(representation.getMimeTypeString()).toBe(';codecs="vp9"');
160
- expect(representation.isSupported).toBe(true);
151
+ expect(representation.isSupported).toBe(undefined);
161
152
  expect(representation.decipherable).toBe(undefined);
162
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
153
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
163
154
  });
164
155
 
165
156
  it("should be able to add a supplementalCodecs attribute", () => {
@@ -170,20 +161,21 @@ describe("Manifest - Representation", () => {
170
161
  supplementalCodecs: "test",
171
162
  index: minimalIndex,
172
163
  } as unknown as IParsedRepresentation;
173
- const representation = new Representation(args, "audio");
164
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
165
+ const representation = new Representation(args, "audio", cache);
174
166
  expect(representation.id).toBe("test");
175
167
  expect(representation.bitrate).toBe(12);
176
168
  expect(representation.index).toBe(minimalIndex);
177
- expect(representation.codecs).toEqual(["test"]);
169
+ expect(representation.codecs).toEqual(["test", "vp9"]);
178
170
  expect(representation.contentProtections).toBe(undefined);
179
171
  expect(representation.frameRate).toBe(undefined);
180
172
  expect(representation.height).toBe(undefined);
181
173
  expect(representation.mimeType).toBe(undefined);
182
174
  expect(representation.width).toBe(undefined);
183
175
  expect(representation.getMimeTypeString()).toBe(';codecs="test"');
184
- expect(representation.isSupported).toBe(true);
176
+ expect(representation.isSupported).toBe(undefined);
185
177
  expect(representation.decipherable).toBe(undefined);
186
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
178
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
187
179
  });
188
180
 
189
181
  it("should be able to add a mimeType attribute", () => {
@@ -193,7 +185,8 @@ describe("Manifest - Representation", () => {
193
185
  mimeType: "audio/mp4",
194
186
  index: minimalIndex,
195
187
  } as unknown as IParsedRepresentation;
196
- const representation = new Representation(args, "audio");
188
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
189
+ const representation = new Representation(args, "audio", cache);
197
190
  expect(representation.id).toBe("test");
198
191
  expect(representation.bitrate).toBe(12);
199
192
  expect(representation.index).toBe(minimalIndex);
@@ -204,9 +197,9 @@ describe("Manifest - Representation", () => {
204
197
  expect(representation.mimeType).toBe("audio/mp4");
205
198
  expect(representation.width).toBe(undefined);
206
199
  expect(representation.getMimeTypeString()).toBe('audio/mp4;codecs=""');
207
- expect(representation.isSupported).toBe(true);
200
+ expect(representation.isSupported).toBe(undefined);
208
201
  expect(representation.decipherable).toBe(undefined);
209
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
202
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
210
203
  });
211
204
 
212
205
  it("should be able to add a contentProtections attribute", () => {
@@ -228,7 +221,8 @@ describe("Manifest - Representation", () => {
228
221
  },
229
222
  },
230
223
  } as unknown as IParsedRepresentation;
231
- const representation = new Representation(args, "video");
224
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
225
+ const representation = new Representation(args, "video", cache);
232
226
  expect(representation.id).toBe("test");
233
227
  expect(representation.bitrate).toBe(12);
234
228
  expect(representation.index).toBe(minimalIndex);
@@ -239,9 +233,9 @@ describe("Manifest - Representation", () => {
239
233
  expect(representation.mimeType).toBe("video/mp4");
240
234
  expect(representation.width).toBe(undefined);
241
235
  expect(representation.getMimeTypeString()).toBe('video/mp4;codecs="vp12"');
242
- expect(representation.isSupported).toBe(true);
236
+ expect(representation.isSupported).toBe(undefined);
243
237
  expect(representation.decipherable).toBe(undefined);
244
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
238
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
245
239
  });
246
240
 
247
241
  it("should be able to add a frameRate attribute", () => {
@@ -253,7 +247,8 @@ describe("Manifest - Representation", () => {
253
247
  codecs: "mp4a.40.2",
254
248
  index: minimalIndex,
255
249
  } as unknown as IParsedRepresentation;
256
- const representation = new Representation(args, "audio");
250
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
251
+ const representation = new Representation(args, "audio", cache);
257
252
  expect(representation.id).toBe("test");
258
253
  expect(representation.bitrate).toBe(12);
259
254
  expect(representation.index).toBe(minimalIndex);
@@ -264,9 +259,9 @@ describe("Manifest - Representation", () => {
264
259
  expect(representation.mimeType).toBe("audio/mp4");
265
260
  expect(representation.width).toBe(undefined);
266
261
  expect(representation.getMimeTypeString()).toBe('audio/mp4;codecs="mp4a.40.2"');
267
- expect(representation.isSupported).toBe(true);
262
+ expect(representation.isSupported).toBe(undefined);
268
263
  expect(representation.decipherable).toBe(undefined);
269
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
264
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
270
265
  });
271
266
 
272
267
  it("should be able to return an exploitable codecs + mimeType string", () => {
@@ -275,7 +270,9 @@ describe("Manifest - Representation", () => {
275
270
  id: "test",
276
271
  index: minimalIndex,
277
272
  } as unknown as IParsedRepresentation;
278
- expect(new Representation(args1, "audio").getMimeTypeString()).toBe(';codecs=""');
273
+ expect(new Representation(args1, "audio", cache).getMimeTypeString()).toBe(
274
+ ';codecs=""',
275
+ );
279
276
 
280
277
  const args2 = {
281
278
  bitrate: 12,
@@ -283,7 +280,9 @@ describe("Manifest - Representation", () => {
283
280
  mimeType: "foo",
284
281
  index: minimalIndex,
285
282
  } as unknown as IParsedRepresentation;
286
- expect(new Representation(args2, "audio").getMimeTypeString()).toBe('foo;codecs=""');
283
+ expect(new Representation(args2, "audio", cache).getMimeTypeString()).toBe(
284
+ 'foo;codecs=""',
285
+ );
287
286
 
288
287
  const args3 = {
289
288
  bitrate: 12,
@@ -291,7 +290,9 @@ describe("Manifest - Representation", () => {
291
290
  codecs: "bar",
292
291
  index: minimalIndex,
293
292
  } as unknown as IParsedRepresentation;
294
- expect(new Representation(args3, "audio").getMimeTypeString()).toBe(';codecs="bar"');
293
+ expect(new Representation(args3, "audio", cache).getMimeTypeString()).toBe(
294
+ ';codecs="bar"',
295
+ );
295
296
 
296
297
  const args4 = {
297
298
  bitrate: 12,
@@ -300,13 +301,12 @@ describe("Manifest - Representation", () => {
300
301
  codecs: "bar",
301
302
  index: minimalIndex,
302
303
  } as unknown as IParsedRepresentation;
303
- expect(new Representation(args4, "audio").getMimeTypeString()).toBe(
304
+ expect(new Representation(args4, "audio", cache).getMimeTypeString()).toBe(
304
305
  'foo;codecs="bar"',
305
306
  );
306
307
  });
307
308
 
308
309
  it("should set `isSupported` of non-supported codecs or mime-type to `false`", () => {
309
- defaultIsCodecSupported.mockImplementation(() => false);
310
310
  const args = {
311
311
  bitrate: 12,
312
312
  id: "test",
@@ -315,7 +315,16 @@ describe("Manifest - Representation", () => {
315
315
  codecs: "mp4a.40.2",
316
316
  index: minimalIndex,
317
317
  } as unknown as IParsedRepresentation;
318
- const representation = new Representation(args, "audio");
318
+ const customCache = new CodecSupportCache([
319
+ {
320
+ mimeType: "audio/mp4",
321
+ codec: "mp4a.40.2",
322
+ supported: false,
323
+ supportedIfEncrypted: false,
324
+ },
325
+ ]);
326
+ const spyCodecCache = vi.spyOn(customCache, "isSupported");
327
+ const representation = new Representation(args, "audio", customCache);
319
328
  expect(representation.id).toBe("test");
320
329
  expect(representation.bitrate).toBe(12);
321
330
  expect(representation.index).toBe(minimalIndex);
@@ -328,8 +337,8 @@ describe("Manifest - Representation", () => {
328
337
  expect(representation.getMimeTypeString()).toBe('audio/mp4;codecs="mp4a.40.2"');
329
338
  expect(representation.isSupported).toBe(false);
330
339
  expect(representation.decipherable).toBe(undefined);
331
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
332
- expect(defaultIsCodecSupported).toHaveBeenCalledWith("audio/mp4", "mp4a.40.2");
340
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
341
+ expect(spyCodecCache).toHaveBeenCalledWith("audio/mp4", "mp4a.40.2", false);
333
342
  });
334
343
 
335
344
  it("should not check support for a text media buffer", () => {
@@ -341,17 +350,17 @@ describe("Manifest - Representation", () => {
341
350
  codecs: "boop",
342
351
  index: minimalIndex,
343
352
  } as unknown as IParsedRepresentation;
344
- const representation = new Representation(args, "text");
353
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
354
+ const representation = new Representation(args, "text", cache);
345
355
  expect(representation.codecs).toEqual(["boop"]);
346
356
  expect(representation.mimeType).toBe("bip");
347
357
  expect(representation.getMimeTypeString()).toBe('bip;codecs="boop"');
348
358
  expect(representation.isSupported).toBe(true);
349
359
  expect(representation.decipherable).toBe(undefined);
350
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(0);
360
+ expect(spyCodecCache).toHaveBeenCalledTimes(0);
351
361
  });
352
362
 
353
- it("should not check support if no feature to check support exists", () => {
354
- features.codecSupportProber = null;
363
+ it("should not set isSupported if codec cache returns undefined", () => {
355
364
  const args = {
356
365
  bitrate: 12,
357
366
  id: "test",
@@ -360,36 +369,17 @@ describe("Manifest - Representation", () => {
360
369
  codecs: "boop",
361
370
  index: minimalIndex,
362
371
  } as unknown as IParsedRepresentation;
363
- const representation = new Representation(args, "audio");
372
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
373
+ const representation = new Representation(args, "audio", cache);
364
374
  expect(representation.codecs).toEqual(["boop"]);
365
375
  expect(representation.mimeType).toBe("bip");
366
376
  expect(representation.getMimeTypeString()).toBe('bip;codecs="boop"');
367
377
  expect(representation.isSupported).toBe(undefined);
368
378
  expect(representation.decipherable).toBe(undefined);
369
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(0);
379
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
370
380
  });
371
381
 
372
- it("should not set isSupported if support prober returns undefined", () => {
373
- defaultIsCodecSupported.mockImplementation(() => undefined);
374
- const args = {
375
- bitrate: 12,
376
- id: "test",
377
- frameRate: "1/60",
378
- mimeType: "bip",
379
- codecs: "boop",
380
- index: minimalIndex,
381
- } as unknown as IParsedRepresentation;
382
- const representation = new Representation(args, "audio");
383
- expect(representation.codecs).toEqual(["boop"]);
384
- expect(representation.mimeType).toBe("bip");
385
- expect(representation.getMimeTypeString()).toBe('bip;codecs="boop"');
386
- expect(representation.isSupported).toBe(undefined);
387
- expect(representation.decipherable).toBe(undefined);
388
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
389
- });
390
-
391
- it("should have both supplementalCodecs and codecs if support prober returns undefined", () => {
392
- defaultIsCodecSupported.mockImplementation(() => undefined);
382
+ it("should have both supplementalCodecs and codecs if codec cache returns undefined", () => {
393
383
  const args = {
394
384
  bitrate: 12,
395
385
  id: "test",
@@ -399,21 +389,23 @@ describe("Manifest - Representation", () => {
399
389
  supplementalCodecs: "bap",
400
390
  index: minimalIndex,
401
391
  } as unknown as IParsedRepresentation;
402
- const representation = new Representation(args, "audio");
392
+ const spyCodecCache = vi.spyOn(cache, "isSupported");
393
+ const representation = new Representation(args, "audio", cache);
403
394
  expect(representation.codecs).toEqual(["bap", "boop"]);
404
395
  expect(representation.mimeType).toBe("bip");
405
396
  expect(representation.getMimeTypeString()).toBe('bip;codecs="bap"');
406
397
  expect(representation.isSupported).toBe(undefined);
407
398
  expect(representation.decipherable).toBe(undefined);
408
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
399
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
409
400
  });
410
401
 
411
- it("should only have codecs if support prober returns false for the supplementalCodecs and true for the codecs", () => {
412
- defaultIsCodecSupported.mockImplementation(
413
- (_arg1: string, arg2: string): boolean | undefined => {
414
- return arg2 === "boop";
415
- },
416
- );
402
+ it("should only have codecs if codec cache returns false for the supplementalCodecs and true for the codecs", () => {
403
+ const spyCodecCache = vi
404
+ .spyOn(cache, "isSupported")
405
+ .mockImplementation((_mimeType: string, codec: string, _encrypted: boolean) => {
406
+ return codec === "boop";
407
+ });
408
+
417
409
  const args = {
418
410
  bitrate: 12,
419
411
  id: "test",
@@ -423,21 +415,22 @@ describe("Manifest - Representation", () => {
423
415
  supplementalCodecs: "bap",
424
416
  index: minimalIndex,
425
417
  } as unknown as IParsedRepresentation;
426
- const representation = new Representation(args, "audio");
418
+ const representation = new Representation(args, "audio", cache);
427
419
  expect(representation.codecs).toEqual(["boop"]);
428
420
  expect(representation.mimeType).toBe("bip");
429
421
  expect(representation.getMimeTypeString()).toBe('bip;codecs="boop"');
430
422
  expect(representation.isSupported).toBe(true);
431
423
  expect(representation.decipherable).toBe(undefined);
432
- expect(defaultIsCodecSupported).toHaveBeenCalled();
424
+ expect(spyCodecCache).toHaveBeenCalled();
433
425
  });
434
426
 
435
- it("should have both supplementalCodecs and codecs if support prober returns undefined for the former and true for the latter", () => {
436
- defaultIsCodecSupported.mockImplementation(
437
- (_arg1: string, arg2: string): boolean | undefined => {
438
- return arg2 === "boop" ? true : undefined;
439
- },
440
- );
427
+ it("should have both supplementalCodecs and codecs if codec cache returns undefined for the former and true for the latter", () => {
428
+ const spyCodecCache = vi
429
+ .spyOn(cache, "isSupported")
430
+ .mockImplementation((_mimeType: string, codec: string, _encrypted: boolean) => {
431
+ return codec === "boop" ? true : undefined;
432
+ });
433
+
441
434
  const args = {
442
435
  bitrate: 12,
443
436
  id: "test",
@@ -447,21 +440,16 @@ describe("Manifest - Representation", () => {
447
440
  supplementalCodecs: "bap",
448
441
  index: minimalIndex,
449
442
  } as unknown as IParsedRepresentation;
450
- const representation = new Representation(args, "audio");
443
+ const representation = new Representation(args, "audio", cache);
451
444
  expect(representation.codecs).toEqual(["bap", "boop"]);
452
445
  expect(representation.mimeType).toBe("bip");
453
446
  expect(representation.getMimeTypeString()).toBe('bip;codecs="bap"');
454
447
  expect(representation.isSupported).toBe(undefined);
455
448
  expect(representation.decipherable).toBe(undefined);
456
- expect(defaultIsCodecSupported).toHaveBeenCalled();
449
+ expect(spyCodecCache).toHaveBeenCalled();
457
450
  });
458
451
 
459
- it("should only have supplementalCodecs if support prober returns true for the former", () => {
460
- defaultIsCodecSupported.mockImplementation(
461
- (_arg1: string, arg2: string): boolean | undefined => {
462
- return arg2 === "bap" ? true : undefined;
463
- },
464
- );
452
+ it("should only have supplementalCodecs if codec cache returns true for the former", () => {
465
453
  const args = {
466
454
  bitrate: 12,
467
455
  id: "test",
@@ -471,12 +459,17 @@ describe("Manifest - Representation", () => {
471
459
  supplementalCodecs: "bap",
472
460
  index: minimalIndex,
473
461
  } as unknown as IParsedRepresentation;
474
- const representation = new Representation(args, "audio");
462
+ const spyCodecCache = vi
463
+ .spyOn(cache, "isSupported")
464
+ .mockImplementation((_mimeType: string, codec: string, _encrypted: boolean) => {
465
+ return codec === "bap" ? true : undefined;
466
+ });
467
+ const representation = new Representation(args, "audio", cache);
475
468
  expect(representation.codecs).toEqual(["bap"]);
476
469
  expect(representation.mimeType).toBe("bip");
477
470
  expect(representation.getMimeTypeString()).toBe('bip;codecs="bap"');
478
471
  expect(representation.isSupported).toBe(true);
479
472
  expect(representation.decipherable).toBe(undefined);
480
- expect(defaultIsCodecSupported).toHaveBeenCalledTimes(1);
473
+ expect(spyCodecCache).toHaveBeenCalledTimes(1);
481
474
  });
482
475
  });
@@ -169,26 +169,26 @@ function generateFakeAdaptation({
169
169
  }
170
170
 
171
171
  describe("Manifest - updatePeriodInPlace", () => {
172
- let mockOldVideoRepresentation1Replace: MockInstance<[], void> | undefined;
173
- let mockOldVideoRepresentation2Replace: MockInstance<[], void> | undefined;
174
- let mockOldVideoRepresentation3Replace: MockInstance<[], void> | undefined;
175
- let mockOldVideoRepresentation4Replace: MockInstance<[], void> | undefined;
176
- let mockOldAudioRepresentationReplace: MockInstance<[], void> | undefined;
177
- let mockOldVideoRepresentation1Update: MockInstance<[], void> | undefined;
178
- let mockOldVideoRepresentation2Update: MockInstance<[], void> | undefined;
179
- let mockOldVideoRepresentation3Update: MockInstance<[], void> | undefined;
180
- let mockOldVideoRepresentation4Update: MockInstance<[], void> | undefined;
181
- let mockOldAudioRepresentationUpdate: MockInstance<[], void> | undefined;
182
- let mockNewVideoRepresentation1Replace: MockInstance<[], void> | undefined;
183
- let mockNewVideoRepresentation2Replace: MockInstance<[], void> | undefined;
184
- let mockNewVideoRepresentation3Replace: MockInstance<[], void> | undefined;
185
- let mockNewVideoRepresentation4Replace: MockInstance<[], void> | undefined;
186
- let mockNewAudioRepresentationReplace: MockInstance<[], void> | undefined;
187
- let mockNewVideoRepresentation1Update: MockInstance<[], void> | undefined;
188
- let mockNewVideoRepresentation2Update: MockInstance<[], void> | undefined;
189
- let mockNewVideoRepresentation3Update: MockInstance<[], void> | undefined;
190
- let mockNewVideoRepresentation4Update: MockInstance<[], void> | undefined;
191
- let mockNewAudioRepresentationUpdate: MockInstance<[], void> | undefined;
172
+ let mockOldVideoRepresentation1Replace: MockInstance | undefined;
173
+ let mockOldVideoRepresentation2Replace: MockInstance | undefined;
174
+ let mockOldVideoRepresentation3Replace: MockInstance | undefined;
175
+ let mockOldVideoRepresentation4Replace: MockInstance | undefined;
176
+ let mockOldAudioRepresentationReplace: MockInstance | undefined;
177
+ let mockOldVideoRepresentation1Update: MockInstance | undefined;
178
+ let mockOldVideoRepresentation2Update: MockInstance | undefined;
179
+ let mockOldVideoRepresentation3Update: MockInstance | undefined;
180
+ let mockOldVideoRepresentation4Update: MockInstance | undefined;
181
+ let mockOldAudioRepresentationUpdate: MockInstance | undefined;
182
+ let mockNewVideoRepresentation1Replace: MockInstance | undefined;
183
+ let mockNewVideoRepresentation2Replace: MockInstance | undefined;
184
+ let mockNewVideoRepresentation3Replace: MockInstance | undefined;
185
+ let mockNewVideoRepresentation4Replace: MockInstance | undefined;
186
+ let mockNewAudioRepresentationReplace: MockInstance | undefined;
187
+ let mockNewVideoRepresentation1Update: MockInstance | undefined;
188
+ let mockNewVideoRepresentation2Update: MockInstance | undefined;
189
+ let mockNewVideoRepresentation3Update: MockInstance | undefined;
190
+ let mockNewVideoRepresentation4Update: MockInstance | undefined;
191
+ let mockNewAudioRepresentationUpdate: MockInstance | undefined;
192
192
 
193
193
  beforeEach(() => {
194
194
  mockOldVideoRepresentation1Replace = vi.spyOn(