rx-player 3.33.4-dev.2024090600 → 3.33.4

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 (728) hide show
  1. package/.prettierignore +1 -0
  2. package/.prettierrc +4 -0
  3. package/.vscode/settings.json +9 -0
  4. package/CHANGELOG.md +1662 -1078
  5. package/MAINTAINERS.md +9 -12
  6. package/README.md +111 -127
  7. package/VERSION +1 -1
  8. package/dist/_esm5.processed/compat/add_class_name.js +4 -3
  9. package/dist/_esm5.processed/compat/add_text_track.d.ts +1 -1
  10. package/dist/_esm5.processed/compat/add_text_track.js +4 -4
  11. package/dist/_esm5.processed/compat/browser_compatibility_types.d.ts +2 -1
  12. package/dist/_esm5.processed/compat/browser_compatibility_types.js +15 -10
  13. package/dist/_esm5.processed/compat/browser_detection.js +8 -9
  14. package/dist/_esm5.processed/compat/can_reuse_media_keys.js +1 -1
  15. package/dist/_esm5.processed/compat/change_source_buffer_type.d.ts +1 -1
  16. package/dist/_esm5.processed/compat/eme/close_session.d.ts +1 -1
  17. package/dist/_esm5.processed/compat/eme/close_session.js +17 -13
  18. package/dist/_esm5.processed/compat/eme/custom_key_system_access.d.ts +1 -1
  19. package/dist/_esm5.processed/compat/eme/custom_media_keys/ie11_media_keys.d.ts +1 -1
  20. package/dist/_esm5.processed/compat/eme/custom_media_keys/ie11_media_keys.js +8 -9
  21. package/dist/_esm5.processed/compat/eme/custom_media_keys/index.d.ts +3 -2
  22. package/dist/_esm5.processed/compat/eme/custom_media_keys/index.js +1 -1
  23. package/dist/_esm5.processed/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +1 -1
  24. package/dist/_esm5.processed/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +1 -1
  25. package/dist/_esm5.processed/compat/eme/custom_media_keys/old_webkit_media_keys.js +7 -9
  26. package/dist/_esm5.processed/compat/eme/custom_media_keys/types.d.ts +4 -1
  27. package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys.d.ts +2 -2
  28. package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys.js +6 -12
  29. package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts +2 -1
  30. package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +3 -3
  31. package/dist/_esm5.processed/compat/eme/eme-api-implementation.d.ts +4 -4
  32. package/dist/_esm5.processed/compat/eme/eme-api-implementation.js +26 -11
  33. package/dist/_esm5.processed/compat/eme/generate_key_request.d.ts +1 -1
  34. package/dist/_esm5.processed/compat/eme/generate_key_request.js +17 -20
  35. package/dist/_esm5.processed/compat/eme/get_init_data.d.ts +3 -1
  36. package/dist/_esm5.processed/compat/eme/get_init_data.js +7 -9
  37. package/dist/_esm5.processed/compat/eme/get_uuid_kid_from_keystatus_kid.js +2 -3
  38. package/dist/_esm5.processed/compat/eme/get_webkit_fairplay_initdata.js +12 -13
  39. package/dist/_esm5.processed/compat/eme/index.d.ts +8 -5
  40. package/dist/_esm5.processed/compat/eme/index.js +1 -1
  41. package/dist/_esm5.processed/compat/eme/load_session.d.ts +1 -1
  42. package/dist/_esm5.processed/compat/enable_audio_track.d.ts +1 -1
  43. package/dist/_esm5.processed/compat/event_listeners.d.ts +26 -24
  44. package/dist/_esm5.processed/compat/event_listeners.js +14 -29
  45. package/dist/_esm5.processed/compat/fullscreen.d.ts +1 -1
  46. package/dist/_esm5.processed/compat/fullscreen.js +1 -1
  47. package/dist/_esm5.processed/compat/generate_init_data.js +3 -5
  48. package/dist/_esm5.processed/compat/index.d.ts +6 -3
  49. package/dist/_esm5.processed/compat/index.js +2 -2
  50. package/dist/_esm5.processed/compat/is_vtt_cue.d.ts +1 -1
  51. package/dist/_esm5.processed/compat/make_vtt_cue.d.ts +1 -1
  52. package/dist/_esm5.processed/compat/on_height_width_change.d.ts +2 -2
  53. package/dist/_esm5.processed/compat/on_height_width_change.js +3 -2
  54. package/dist/_esm5.processed/compat/patch_webkit_source_buffer.js +28 -29
  55. package/dist/_esm5.processed/compat/should_favour_custom_safari_EME.js +2 -2
  56. package/dist/_esm5.processed/compat/should_reload_media_source_on_decipherability_update.js +1 -2
  57. package/dist/_esm5.processed/config.d.ts +1 -1
  58. package/dist/_esm5.processed/config.js +0 -15
  59. package/dist/_esm5.processed/core/adaptive/adaptive_representation_selector.d.ts +7 -6
  60. package/dist/_esm5.processed/core/adaptive/adaptive_representation_selector.js +45 -22
  61. package/dist/_esm5.processed/core/adaptive/buffer_based_chooser.d.ts +1 -1
  62. package/dist/_esm5.processed/core/adaptive/buffer_based_chooser.js +11 -10
  63. package/dist/_esm5.processed/core/adaptive/guess_based_chooser.d.ts +4 -4
  64. package/dist/_esm5.processed/core/adaptive/guess_based_chooser.js +7 -6
  65. package/dist/_esm5.processed/core/adaptive/index.d.ts +3 -2
  66. package/dist/_esm5.processed/core/adaptive/network_analyzer.d.ts +4 -4
  67. package/dist/_esm5.processed/core/adaptive/network_analyzer.js +43 -38
  68. package/dist/_esm5.processed/core/adaptive/utils/bandwidth_estimator.js +1 -1
  69. package/dist/_esm5.processed/core/adaptive/utils/ewma.js +1 -2
  70. package/dist/_esm5.processed/core/adaptive/utils/filter_by_bitrate.d.ts +1 -1
  71. package/dist/_esm5.processed/core/adaptive/utils/filter_by_width.d.ts +1 -1
  72. package/dist/_esm5.processed/core/adaptive/utils/filter_by_width.js +3 -6
  73. package/dist/_esm5.processed/core/adaptive/utils/get_buffer_levels.js +7 -4
  74. package/dist/_esm5.processed/core/adaptive/utils/last_estimate_storage.d.ts +1 -1
  75. package/dist/_esm5.processed/core/adaptive/utils/pending_requests_store.d.ts +2 -1
  76. package/dist/_esm5.processed/core/adaptive/utils/representation_score_calculator.d.ts +1 -1
  77. package/dist/_esm5.processed/core/adaptive/utils/representation_score_calculator.js +8 -5
  78. package/dist/_esm5.processed/core/adaptive/utils/select_optimal_representation.d.ts +1 -1
  79. package/dist/_esm5.processed/core/adaptive/utils/select_optimal_representation.js +5 -3
  80. package/dist/_esm5.processed/core/api/debug/buffer_graph.d.ts +1 -1
  81. package/dist/_esm5.processed/core/api/debug/buffer_graph.js +3 -8
  82. package/dist/_esm5.processed/core/api/debug/buffer_size_graph.js +1 -2
  83. package/dist/_esm5.processed/core/api/debug/modules/general_info.d.ts +2 -2
  84. package/dist/_esm5.processed/core/api/debug/modules/general_info.js +17 -13
  85. package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_content.d.ts +3 -3
  86. package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_content.js +4 -2
  87. package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_size.d.ts +2 -2
  88. package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_size.js +1 -1
  89. package/dist/_esm5.processed/core/api/debug/render.d.ts +2 -2
  90. package/dist/_esm5.processed/core/api/debug/utils.d.ts +5 -5
  91. package/dist/_esm5.processed/core/api/index.d.ts +1 -1
  92. package/dist/_esm5.processed/core/api/option_utils.d.ts +3 -3
  93. package/dist/_esm5.processed/core/api/option_utils.js +85 -48
  94. package/dist/_esm5.processed/core/api/playback_observer.d.ts +16 -18
  95. package/dist/_esm5.processed/core/api/playback_observer.js +65 -42
  96. package/dist/_esm5.processed/core/api/public_api.d.ts +10 -9
  97. package/dist/_esm5.processed/core/api/public_api.js +103 -94
  98. package/dist/_esm5.processed/core/api/tracks_management/media_element_track_choice_manager.d.ts +1 -1
  99. package/dist/_esm5.processed/core/api/tracks_management/media_element_track_choice_manager.js +25 -14
  100. package/dist/_esm5.processed/core/api/tracks_management/track_choice_manager.d.ts +3 -3
  101. package/dist/_esm5.processed/core/api/tracks_management/track_choice_manager.js +72 -80
  102. package/dist/_esm5.processed/core/api/utils.d.ts +5 -5
  103. package/dist/_esm5.processed/core/api/utils.js +5 -8
  104. package/dist/_esm5.processed/core/decrypt/__tests__/__global__/utils.d.ts +12 -54
  105. package/dist/_esm5.processed/core/decrypt/__tests__/__global__/utils.js +55 -66
  106. package/dist/_esm5.processed/core/decrypt/attach_media_keys.d.ts +10 -5
  107. package/dist/_esm5.processed/core/decrypt/attach_media_keys.js +16 -8
  108. package/dist/_esm5.processed/core/decrypt/content_decryptor.d.ts +11 -2
  109. package/dist/_esm5.processed/core/decrypt/content_decryptor.js +136 -65
  110. package/dist/_esm5.processed/core/decrypt/create_or_load_session.d.ts +5 -4
  111. package/dist/_esm5.processed/core/decrypt/create_or_load_session.js +18 -7
  112. package/dist/_esm5.processed/core/decrypt/create_session.d.ts +5 -4
  113. package/dist/_esm5.processed/core/decrypt/create_session.js +6 -12
  114. package/dist/_esm5.processed/core/decrypt/dispose_decryption_resources.js +1 -2
  115. package/dist/_esm5.processed/core/decrypt/find_key_system.d.ts +13 -3
  116. package/dist/_esm5.processed/core/decrypt/find_key_system.js +45 -22
  117. package/dist/_esm5.processed/core/decrypt/get_key_system_configuration.js +1 -2
  118. package/dist/_esm5.processed/core/decrypt/get_media_keys.d.ts +9 -4
  119. package/dist/_esm5.processed/core/decrypt/get_media_keys.js +17 -6
  120. package/dist/_esm5.processed/core/decrypt/init_media_keys.d.ts +3 -3
  121. package/dist/_esm5.processed/core/decrypt/session_events_listener.d.ts +2 -2
  122. package/dist/_esm5.processed/core/decrypt/session_events_listener.js +12 -16
  123. package/dist/_esm5.processed/core/decrypt/set_server_certificate.d.ts +3 -3
  124. package/dist/_esm5.processed/core/decrypt/set_server_certificate.js +6 -7
  125. package/dist/_esm5.processed/core/decrypt/types.d.ts +11 -5
  126. package/dist/_esm5.processed/core/decrypt/utils/are_init_values_compatible.js +20 -12
  127. package/dist/_esm5.processed/core/decrypt/utils/check_key_statuses.d.ts +2 -2
  128. package/dist/_esm5.processed/core/decrypt/utils/check_key_statuses.js +5 -4
  129. package/dist/_esm5.processed/core/decrypt/utils/clean_old_loaded_sessions.d.ts +1 -1
  130. package/dist/_esm5.processed/core/decrypt/utils/clean_old_stored_persistent_info.d.ts +1 -1
  131. package/dist/_esm5.processed/core/decrypt/utils/init_data_values_container.d.ts +1 -1
  132. package/dist/_esm5.processed/core/decrypt/utils/init_data_values_container.js +16 -9
  133. package/dist/_esm5.processed/core/decrypt/utils/is_session_usable.d.ts +1 -1
  134. package/dist/_esm5.processed/core/decrypt/utils/is_session_usable.js +1 -2
  135. package/dist/_esm5.processed/core/decrypt/utils/key_session_record.d.ts +1 -1
  136. package/dist/_esm5.processed/core/decrypt/utils/key_session_record.js +1 -2
  137. package/dist/_esm5.processed/core/decrypt/utils/loaded_sessions_store.d.ts +11 -13
  138. package/dist/_esm5.processed/core/decrypt/utils/loaded_sessions_store.js +13 -13
  139. package/dist/_esm5.processed/core/decrypt/utils/media_keys_infos_store.d.ts +8 -3
  140. package/dist/_esm5.processed/core/decrypt/utils/media_keys_infos_store.js +1 -2
  141. package/dist/_esm5.processed/core/decrypt/utils/persistent_sessions_store.d.ts +3 -3
  142. package/dist/_esm5.processed/core/decrypt/utils/persistent_sessions_store.js +27 -16
  143. package/dist/_esm5.processed/core/decrypt/utils/serializable_bytes.js +1 -1
  144. package/dist/_esm5.processed/core/decrypt/utils/server_certificate_store.d.ts +1 -1
  145. package/dist/_esm5.processed/core/decrypt/utils/server_certificate_store.js +19 -12
  146. package/dist/_esm5.processed/core/fetchers/cdn_prioritizer.d.ts +2 -2
  147. package/dist/_esm5.processed/core/fetchers/cdn_prioritizer.js +5 -6
  148. package/dist/_esm5.processed/core/fetchers/index.d.ts +6 -3
  149. package/dist/_esm5.processed/core/fetchers/index.js +1 -1
  150. package/dist/_esm5.processed/core/fetchers/manifest/index.d.ts +3 -2
  151. package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.d.ts +2 -2
  152. package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.js +68 -61
  153. package/dist/_esm5.processed/core/fetchers/segment/index.d.ts +4 -3
  154. package/dist/_esm5.processed/core/fetchers/segment/prioritized_segment_fetcher.d.ts +4 -3
  155. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.d.ts +9 -8
  156. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.js +41 -29
  157. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher_creator.d.ts +5 -5
  158. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher_creator.js +2 -3
  159. package/dist/_esm5.processed/core/fetchers/segment/task_prioritizer.d.ts +1 -1
  160. package/dist/_esm5.processed/core/fetchers/segment/task_prioritizer.js +19 -18
  161. package/dist/_esm5.processed/core/fetchers/utils/error_selector.d.ts +1 -1
  162. package/dist/_esm5.processed/core/fetchers/utils/error_selector.js +1 -1
  163. package/dist/_esm5.processed/core/fetchers/utils/schedule_request.d.ts +3 -3
  164. package/dist/_esm5.processed/core/fetchers/utils/schedule_request.js +25 -25
  165. package/dist/_esm5.processed/core/init/directfile_content_initializer.d.ts +4 -4
  166. package/dist/_esm5.processed/core/init/directfile_content_initializer.js +21 -17
  167. package/dist/_esm5.processed/core/init/index.d.ts +2 -1
  168. package/dist/_esm5.processed/core/init/index.js +1 -1
  169. package/dist/_esm5.processed/core/init/media_source_content_initializer.d.ts +9 -9
  170. package/dist/_esm5.processed/core/init/media_source_content_initializer.js +64 -32
  171. package/dist/_esm5.processed/core/init/types.d.ts +10 -12
  172. package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.d.ts +6 -5
  173. package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.js +20 -19
  174. package/dist/_esm5.processed/core/init/utils/create_media_source.d.ts +1 -1
  175. package/dist/_esm5.processed/core/init/utils/create_media_source.js +2 -3
  176. package/dist/_esm5.processed/core/init/utils/create_stream_playback_observer.d.ts +6 -6
  177. package/dist/_esm5.processed/core/init/utils/create_stream_playback_observer.js +5 -3
  178. package/dist/_esm5.processed/core/init/utils/end_of_stream.d.ts +1 -1
  179. package/dist/_esm5.processed/core/init/utils/get_initial_time.d.ts +1 -1
  180. package/dist/_esm5.processed/core/init/utils/get_initial_time.js +12 -15
  181. package/dist/_esm5.processed/core/init/utils/get_loaded_reference.d.ts +3 -3
  182. package/dist/_esm5.processed/core/init/utils/get_loaded_reference.js +1 -2
  183. package/dist/_esm5.processed/core/init/utils/initial_seek_and_play.d.ts +9 -9
  184. package/dist/_esm5.processed/core/init/utils/initial_seek_and_play.js +39 -3
  185. package/dist/_esm5.processed/core/init/utils/initialize_content_decryption.d.ts +9 -8
  186. package/dist/_esm5.processed/core/init/utils/initialize_content_decryption.js +12 -9
  187. package/dist/_esm5.processed/core/init/utils/media_source_duration_updater.js +10 -7
  188. package/dist/_esm5.processed/core/init/utils/rebuffering_controller.d.ts +7 -6
  189. package/dist/_esm5.processed/core/init/utils/rebuffering_controller.js +24 -24
  190. package/dist/_esm5.processed/core/init/utils/stream_events_emitter/are_same_stream_events.js +1 -3
  191. package/dist/_esm5.processed/core/init/utils/stream_events_emitter/index.d.ts +1 -1
  192. package/dist/_esm5.processed/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts +2 -2
  193. package/dist/_esm5.processed/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +14 -6
  194. package/dist/_esm5.processed/core/init/utils/stream_events_emitter/stream_events_emitter.d.ts +3 -3
  195. package/dist/_esm5.processed/core/init/utils/stream_events_emitter/stream_events_emitter.js +12 -19
  196. package/dist/_esm5.processed/core/init/utils/stream_events_emitter/types.d.ts +1 -1
  197. package/dist/_esm5.processed/core/init/utils/throw_on_media_error.d.ts +1 -1
  198. package/dist/_esm5.processed/core/init/utils/throw_on_media_error.js +11 -6
  199. package/dist/_esm5.processed/core/segment_buffers/garbage_collector.d.ts +6 -6
  200. package/dist/_esm5.processed/core/segment_buffers/garbage_collector.js +12 -13
  201. package/dist/_esm5.processed/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.d.ts +3 -2
  202. package/dist/_esm5.processed/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.js +6 -9
  203. package/dist/_esm5.processed/core/segment_buffers/implementations/image/image_segment_buffer.d.ts +3 -2
  204. package/dist/_esm5.processed/core/segment_buffers/implementations/image/image_segment_buffer.js +1 -1
  205. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/html_text_segment_buffer.d.ts +2 -1
  206. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/html_text_segment_buffer.js +7 -7
  207. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/text_track_cues_store.d.ts +1 -1
  208. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/text_track_cues_store.js +4 -4
  209. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/update_proportional_elements.js +1 -2
  210. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/utils.d.ts +1 -1
  211. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/utils.js +2 -6
  212. package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/native_text_segment_buffer.d.ts +2 -1
  213. package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/native_text_segment_buffer.js +2 -2
  214. package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/parsers.d.ts +1 -1
  215. package/dist/_esm5.processed/core/segment_buffers/implementations/types.d.ts +5 -7
  216. package/dist/_esm5.processed/core/segment_buffers/implementations/utils/manual_time_ranges.js +1 -1
  217. package/dist/_esm5.processed/core/segment_buffers/index.d.ts +8 -4
  218. package/dist/_esm5.processed/core/segment_buffers/index.js +2 -2
  219. package/dist/_esm5.processed/core/segment_buffers/inventory/buffered_history.d.ts +1 -1
  220. package/dist/_esm5.processed/core/segment_buffers/inventory/index.d.ts +6 -4
  221. package/dist/_esm5.processed/core/segment_buffers/inventory/segment_inventory.d.ts +4 -4
  222. package/dist/_esm5.processed/core/segment_buffers/inventory/segment_inventory.js +63 -54
  223. package/dist/_esm5.processed/core/segment_buffers/inventory/types.d.ts +1 -1
  224. package/dist/_esm5.processed/core/segment_buffers/segment_buffers_store.d.ts +2 -2
  225. package/dist/_esm5.processed/core/segment_buffers/segment_buffers_store.js +17 -23
  226. package/dist/_esm5.processed/core/stream/adaptation/adaptation_stream.d.ts +3 -3
  227. package/dist/_esm5.processed/core/stream/adaptation/adaptation_stream.js +49 -22
  228. package/dist/_esm5.processed/core/stream/adaptation/types.d.ts +8 -7
  229. package/dist/_esm5.processed/core/stream/adaptation/utils/create_representation_estimator.d.ts +7 -6
  230. package/dist/_esm5.processed/core/stream/adaptation/utils/create_representation_estimator.js +2 -1
  231. package/dist/_esm5.processed/core/stream/index.d.ts +6 -5
  232. package/dist/_esm5.processed/core/stream/orchestrator/get_time_ranges_for_content.d.ts +3 -3
  233. package/dist/_esm5.processed/core/stream/orchestrator/get_time_ranges_for_content.js +2 -2
  234. package/dist/_esm5.processed/core/stream/orchestrator/index.d.ts +3 -2
  235. package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.d.ts +9 -7
  236. package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.js +47 -34
  237. package/dist/_esm5.processed/core/stream/period/period_stream.d.ts +3 -3
  238. package/dist/_esm5.processed/core/stream/period/period_stream.js +49 -16
  239. package/dist/_esm5.processed/core/stream/period/types.d.ts +15 -12
  240. package/dist/_esm5.processed/core/stream/period/utils/get_adaptation_switch_strategy.d.ts +9 -9
  241. package/dist/_esm5.processed/core/stream/period/utils/get_adaptation_switch_strategy.js +26 -25
  242. package/dist/_esm5.processed/core/stream/representation/representation_stream.d.ts +3 -3
  243. package/dist/_esm5.processed/core/stream/representation/representation_stream.js +47 -23
  244. package/dist/_esm5.processed/core/stream/representation/types.d.ts +9 -8
  245. package/dist/_esm5.processed/core/stream/representation/utils/append_segment_to_buffer.d.ts +4 -4
  246. package/dist/_esm5.processed/core/stream/representation/utils/append_segment_to_buffer.js +10 -7
  247. package/dist/_esm5.processed/core/stream/representation/utils/check_for_discontinuity.d.ts +4 -3
  248. package/dist/_esm5.processed/core/stream/representation/utils/check_for_discontinuity.js +16 -18
  249. package/dist/_esm5.processed/core/stream/representation/utils/downloading_queue.d.ts +7 -6
  250. package/dist/_esm5.processed/core/stream/representation/utils/downloading_queue.js +11 -11
  251. package/dist/_esm5.processed/core/stream/representation/utils/force_garbage_collection.d.ts +2 -2
  252. package/dist/_esm5.processed/core/stream/representation/utils/force_garbage_collection.js +6 -8
  253. package/dist/_esm5.processed/core/stream/representation/utils/get_buffer_status.d.ts +5 -4
  254. package/dist/_esm5.processed/core/stream/representation/utils/get_buffer_status.js +40 -19
  255. package/dist/_esm5.processed/core/stream/representation/utils/get_needed_segments.d.ts +4 -3
  256. package/dist/_esm5.processed/core/stream/representation/utils/get_needed_segments.js +27 -28
  257. package/dist/_esm5.processed/core/stream/representation/utils/push_init_segment.d.ts +6 -5
  258. package/dist/_esm5.processed/core/stream/representation/utils/push_init_segment.js +7 -5
  259. package/dist/_esm5.processed/core/stream/representation/utils/push_media_segment.d.ts +8 -7
  260. package/dist/_esm5.processed/core/stream/representation/utils/push_media_segment.js +13 -10
  261. package/dist/_esm5.processed/default_config.js +20 -16
  262. package/dist/_esm5.processed/errors/encrypted_media_error.d.ts +2 -2
  263. package/dist/_esm5.processed/errors/encrypted_media_error.js +1 -1
  264. package/dist/_esm5.processed/errors/error_codes.d.ts +1 -1
  265. package/dist/_esm5.processed/errors/error_codes.js +1 -1
  266. package/dist/_esm5.processed/errors/format_error.d.ts +2 -2
  267. package/dist/_esm5.processed/errors/format_error.js +1 -2
  268. package/dist/_esm5.processed/errors/index.d.ts +6 -3
  269. package/dist/_esm5.processed/errors/index.js +2 -2
  270. package/dist/_esm5.processed/errors/is_known_error.d.ts +1 -1
  271. package/dist/_esm5.processed/errors/is_known_error.js +2 -2
  272. package/dist/_esm5.processed/errors/media_error.d.ts +3 -3
  273. package/dist/_esm5.processed/errors/media_error.js +4 -7
  274. package/dist/_esm5.processed/errors/network_error.d.ts +2 -2
  275. package/dist/_esm5.processed/errors/network_error.js +3 -3
  276. package/dist/_esm5.processed/errors/other_error.d.ts +1 -1
  277. package/dist/_esm5.processed/errors/other_error.js +1 -1
  278. package/dist/_esm5.processed/errors/request_error.d.ts +1 -1
  279. package/dist/_esm5.processed/experimental/features/dash_wasm.d.ts +2 -2
  280. package/dist/_esm5.processed/experimental/features/debug_element.d.ts +1 -1
  281. package/dist/_esm5.processed/experimental/features/local.d.ts +1 -1
  282. package/dist/_esm5.processed/experimental/features/metaplaylist.d.ts +1 -1
  283. package/dist/_esm5.processed/experimental/index.d.ts +1 -1
  284. package/dist/_esm5.processed/experimental/index.js +1 -1
  285. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/features/dash.d.ts +1 -1
  286. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/features/metaplaylist.d.ts +1 -1
  287. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/index.d.ts +1 -1
  288. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/index.js +2 -2
  289. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/load_and_push_segment.d.ts +3 -3
  290. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/load_and_push_segment.js +7 -3
  291. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +1 -1
  292. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +1 -2
  293. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +2 -2
  294. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +2 -2
  295. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/types.d.ts +3 -2
  296. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts +2 -2
  297. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +12 -18
  298. package/dist/_esm5.processed/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +13 -23
  299. package/dist/_esm5.processed/experimental/tools/createMetaplaylist/index.d.ts +1 -1
  300. package/dist/_esm5.processed/experimental/tools/createMetaplaylist/index.js +8 -7
  301. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/index.d.ts +1 -1
  302. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/index.js +9 -13
  303. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.d.ts +4 -3
  304. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.js +5 -3
  305. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/capabilities.d.ts +1 -1
  306. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/capabilities.js +10 -47
  307. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.d.ts +2 -1
  308. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +8 -5
  309. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.d.ts +2 -1
  310. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +21 -13
  311. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.d.ts +2 -1
  312. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +22 -18
  313. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +4 -7
  314. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/index.d.ts +1 -1
  315. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts +2 -1
  316. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +3 -5
  317. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.d.ts +1 -1
  318. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.js +4 -10
  319. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.d.ts +2 -1
  320. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +2 -3
  321. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts +2 -1
  322. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +2 -3
  323. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/types.d.ts +2 -2
  324. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/utils.d.ts +1 -1
  325. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/utils.js +6 -6
  326. package/dist/_esm5.processed/experimental/tools/parseBIFThumbnails.js +5 -4
  327. package/dist/_esm5.processed/features/add_features.d.ts +1 -1
  328. package/dist/_esm5.processed/features/features_object.d.ts +1 -1
  329. package/dist/_esm5.processed/features/features_object.js +4 -3
  330. package/dist/_esm5.processed/features/index.d.ts +3 -2
  331. package/dist/_esm5.processed/features/index.js +1 -1
  332. package/dist/_esm5.processed/features/list/bif_parser.d.ts +1 -1
  333. package/dist/_esm5.processed/features/list/dash.d.ts +1 -1
  334. package/dist/_esm5.processed/features/list/directfile.d.ts +1 -1
  335. package/dist/_esm5.processed/features/list/eme.d.ts +1 -1
  336. package/dist/_esm5.processed/features/list/html_sami_parser.d.ts +1 -1
  337. package/dist/_esm5.processed/features/list/html_srt_parser.d.ts +1 -1
  338. package/dist/_esm5.processed/features/list/html_text_buffer.d.ts +1 -1
  339. package/dist/_esm5.processed/features/list/html_ttml_parser.d.ts +1 -1
  340. package/dist/_esm5.processed/features/list/html_vtt_parser.d.ts +1 -1
  341. package/dist/_esm5.processed/features/list/image_buffer.d.ts +1 -1
  342. package/dist/_esm5.processed/features/list/native_sami_parser.d.ts +1 -1
  343. package/dist/_esm5.processed/features/list/native_srt_parser.d.ts +1 -1
  344. package/dist/_esm5.processed/features/list/native_text_buffer.d.ts +1 -1
  345. package/dist/_esm5.processed/features/list/native_ttml_parser.d.ts +1 -1
  346. package/dist/_esm5.processed/features/list/native_vtt_parser.d.ts +1 -1
  347. package/dist/_esm5.processed/features/list/smooth.d.ts +1 -1
  348. package/dist/_esm5.processed/features/types.d.ts +11 -11
  349. package/dist/_esm5.processed/manifest/adaptation.d.ts +3 -3
  350. package/dist/_esm5.processed/manifest/adaptation.js +24 -14
  351. package/dist/_esm5.processed/manifest/index.d.ts +9 -5
  352. package/dist/_esm5.processed/manifest/index.js +4 -8
  353. package/dist/_esm5.processed/manifest/manifest.d.ts +8 -7
  354. package/dist/_esm5.processed/manifest/manifest.js +37 -33
  355. package/dist/_esm5.processed/manifest/period.d.ts +4 -4
  356. package/dist/_esm5.processed/manifest/period.js +7 -14
  357. package/dist/_esm5.processed/manifest/representation.d.ts +4 -4
  358. package/dist/_esm5.processed/manifest/representation.js +5 -5
  359. package/dist/_esm5.processed/manifest/representation_index/index.d.ts +3 -2
  360. package/dist/_esm5.processed/manifest/representation_index/index.js +1 -1
  361. package/dist/_esm5.processed/manifest/representation_index/static.d.ts +1 -1
  362. package/dist/_esm5.processed/manifest/representation_index/static.js +6 -2
  363. package/dist/_esm5.processed/manifest/representation_index/types.d.ts +6 -5
  364. package/dist/_esm5.processed/manifest/update_period_in_place.d.ts +3 -3
  365. package/dist/_esm5.processed/manifest/update_period_in_place.js +9 -9
  366. package/dist/_esm5.processed/manifest/update_periods.d.ts +2 -2
  367. package/dist/_esm5.processed/manifest/update_periods.js +6 -3
  368. package/dist/_esm5.processed/manifest/utils.d.ts +4 -4
  369. package/dist/_esm5.processed/manifest/utils.js +6 -4
  370. package/dist/_esm5.processed/parsers/containers/isobmff/create_box.d.ts +1 -1
  371. package/dist/_esm5.processed/parsers/containers/isobmff/create_box.js +5 -4
  372. package/dist/_esm5.processed/parsers/containers/isobmff/drm/playready.js +2 -3
  373. package/dist/_esm5.processed/parsers/containers/isobmff/get_box.js +3 -5
  374. package/dist/_esm5.processed/parsers/containers/isobmff/index.d.ts +5 -4
  375. package/dist/_esm5.processed/parsers/containers/isobmff/index.js +4 -4
  376. package/dist/_esm5.processed/parsers/containers/isobmff/read.d.ts +1 -1
  377. package/dist/_esm5.processed/parsers/containers/isobmff/read.js +9 -9
  378. package/dist/_esm5.processed/parsers/containers/isobmff/take_pssh_out.js +3 -4
  379. package/dist/_esm5.processed/parsers/containers/isobmff/utils.js +51 -41
  380. package/dist/_esm5.processed/parsers/containers/matroska/index.d.ts +2 -1
  381. package/dist/_esm5.processed/parsers/containers/matroska/index.js +1 -1
  382. package/dist/_esm5.processed/parsers/containers/matroska/utils.js +29 -16
  383. package/dist/_esm5.processed/parsers/images/bif.js +15 -5
  384. package/dist/_esm5.processed/parsers/manifest/dash/common/attach_trickmode_track.d.ts +1 -1
  385. package/dist/_esm5.processed/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -3
  386. package/dist/_esm5.processed/parsers/manifest/dash/common/flatten_overlapping_periods.d.ts +1 -1
  387. package/dist/_esm5.processed/parsers/manifest/dash/common/flatten_overlapping_periods.js +1 -1
  388. package/dist/_esm5.processed/parsers/manifest/dash/common/get_hdr_information.js +4 -12
  389. package/dist/_esm5.processed/parsers/manifest/dash/common/get_http_utc-timing_url.d.ts +1 -1
  390. package/dist/_esm5.processed/parsers/manifest/dash/common/get_http_utc-timing_url.js +4 -5
  391. package/dist/_esm5.processed/parsers/manifest/dash/common/get_minimum_and_maximum_positions.d.ts +1 -1
  392. package/dist/_esm5.processed/parsers/manifest/dash/common/get_minimum_and_maximum_positions.js +5 -2
  393. package/dist/_esm5.processed/parsers/manifest/dash/common/get_periods_time_infos.d.ts +1 -1
  394. package/dist/_esm5.processed/parsers/manifest/dash/common/get_periods_time_infos.js +5 -6
  395. package/dist/_esm5.processed/parsers/manifest/dash/common/index.d.ts +3 -2
  396. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.d.ts +4 -4
  397. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.js +34 -28
  398. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_init_segment.d.ts +2 -2
  399. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_init_segment.js +7 -4
  400. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_segments_from_timeline.d.ts +4 -4
  401. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +15 -11
  402. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/index.d.ts +10 -5
  403. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.d.ts +2 -2
  404. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.js +30 -18
  405. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.d.ts +3 -3
  406. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.js +56 -55
  407. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.d.ts +1 -1
  408. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +2 -6
  409. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.d.ts +1 -1
  410. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +11 -15
  411. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.d.ts +1 -1
  412. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.js +12 -9
  413. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.d.ts +1 -1
  414. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +29 -19
  415. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/index.d.ts +3 -2
  416. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +6 -6
  417. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +73 -59
  418. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/tokens.js +2 -4
  419. package/dist/_esm5.processed/parsers/manifest/dash/common/infer_adaptation_type.d.ts +1 -1
  420. package/dist/_esm5.processed/parsers/manifest/dash/common/manifest_bounds_calculator.js +7 -8
  421. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.d.ts +4 -4
  422. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.js +52 -50
  423. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_availability_start_time.d.ts +1 -1
  424. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.d.ts +6 -6
  425. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.js +52 -31
  426. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.d.ts +4 -4
  427. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.js +41 -30
  428. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.d.ts +4 -4
  429. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.js +1 -2
  430. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.d.ts +4 -4
  431. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.js +63 -64
  432. package/dist/_esm5.processed/parsers/manifest/dash/common/resolve_base_urls.d.ts +1 -1
  433. package/dist/_esm5.processed/parsers/manifest/dash/common/resolve_base_urls.js +4 -2
  434. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.d.ts +1 -1
  435. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.js +73 -37
  436. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/BaseURL.d.ts +1 -1
  437. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/BaseURL.js +1 -2
  438. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/ContentComponent.d.ts +1 -1
  439. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/ContentProtection.d.ts +1 -1
  440. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/EventStream.d.ts +1 -1
  441. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/EventStream.js +13 -7
  442. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Initialization.d.ts +1 -1
  443. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Initialization.js +5 -3
  444. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/MPD.d.ts +1 -1
  445. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/MPD.js +44 -27
  446. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Period.d.ts +1 -1
  447. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Period.js +14 -8
  448. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Representation.d.ts +1 -1
  449. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Representation.js +36 -18
  450. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.d.ts +1 -1
  451. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.js +36 -18
  452. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentList.d.ts +1 -1
  453. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.d.ts +1 -1
  454. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.js +17 -8
  455. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentTimeline.d.ts +1 -1
  456. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.d.ts +1 -1
  457. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.js +9 -5
  458. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/utils.d.ts +8 -26
  459. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/utils.js +6 -12
  460. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/parse_from_document.d.ts +2 -2
  461. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/parse_from_document.js +9 -4
  462. package/dist/_esm5.processed/parsers/manifest/dash/parsers_types.d.ts +2 -2
  463. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/index.d.ts +3 -2
  464. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.d.ts +1 -1
  465. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +29 -16
  466. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.d.ts +3 -2
  467. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +22 -35
  468. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/BaseURL.d.ts +2 -2
  469. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.d.ts +2 -2
  470. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.d.ts +2 -2
  471. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +3 -1
  472. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.d.ts +3 -2
  473. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +2 -4
  474. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Label.d.ts +3 -0
  475. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Label.js +9 -0
  476. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/MPD.d.ts +3 -2
  477. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +5 -5
  478. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Period.d.ts +3 -2
  479. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +9 -6
  480. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Representation.d.ts +3 -2
  481. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +8 -16
  482. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.d.ts +2 -2
  483. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.d.ts +2 -2
  484. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.js +5 -10
  485. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentList.d.ts +3 -2
  486. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.d.ts +2 -2
  487. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.js +11 -18
  488. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.d.ts +2 -2
  489. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.js +2 -4
  490. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/XLink.d.ts +3 -2
  491. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/XLink.js +5 -5
  492. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/root.d.ts +2 -2
  493. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/root.js +5 -6
  494. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/parsers_stack.d.ts +1 -1
  495. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/parsers_stack.js +1 -2
  496. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/types.d.ts +2 -1
  497. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/utils.d.ts +1 -1
  498. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/utils.js +2 -4
  499. package/dist/_esm5.processed/parsers/manifest/local/index.d.ts +1 -1
  500. package/dist/_esm5.processed/parsers/manifest/local/parse_local_manifest.d.ts +2 -2
  501. package/dist/_esm5.processed/parsers/manifest/local/parse_local_manifest.js +25 -16
  502. package/dist/_esm5.processed/parsers/manifest/local/representation_index.d.ts +2 -2
  503. package/dist/_esm5.processed/parsers/manifest/local/representation_index.js +5 -10
  504. package/dist/_esm5.processed/parsers/manifest/metaplaylist/index.d.ts +3 -2
  505. package/dist/_esm5.processed/parsers/manifest/metaplaylist/metaplaylist_parser.d.ts +2 -2
  506. package/dist/_esm5.processed/parsers/manifest/metaplaylist/metaplaylist_parser.js +33 -29
  507. package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.d.ts +2 -2
  508. package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.js +9 -7
  509. package/dist/_esm5.processed/parsers/manifest/smooth/create_parser.d.ts +3 -3
  510. package/dist/_esm5.processed/parsers/manifest/smooth/create_parser.js +136 -109
  511. package/dist/_esm5.processed/parsers/manifest/smooth/get_codecs.js +3 -3
  512. package/dist/_esm5.processed/parsers/manifest/smooth/index.d.ts +4 -2
  513. package/dist/_esm5.processed/parsers/manifest/smooth/index.js +1 -1
  514. package/dist/_esm5.processed/parsers/manifest/smooth/parse_C_nodes.js +6 -6
  515. package/dist/_esm5.processed/parsers/manifest/smooth/parse_protection_node.js +12 -8
  516. package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.d.ts +2 -2
  517. package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.js +48 -53
  518. package/dist/_esm5.processed/parsers/manifest/smooth/utils/add_segment_infos.js +10 -7
  519. package/dist/_esm5.processed/parsers/manifest/smooth/utils/tokens.d.ts +1 -1
  520. package/dist/_esm5.processed/parsers/manifest/smooth/utils/tokens.js +2 -3
  521. package/dist/_esm5.processed/parsers/manifest/types.d.ts +2 -2
  522. package/dist/_esm5.processed/parsers/manifest/utils/check_manifest_ids.d.ts +1 -1
  523. package/dist/_esm5.processed/parsers/manifest/utils/clear_timeline_from_position.d.ts +1 -1
  524. package/dist/_esm5.processed/parsers/manifest/utils/clear_timeline_from_position.js +9 -6
  525. package/dist/_esm5.processed/parsers/manifest/utils/get_first_time_from_adaptation.d.ts +1 -1
  526. package/dist/_esm5.processed/parsers/manifest/utils/get_first_time_from_adaptation.js +5 -4
  527. package/dist/_esm5.processed/parsers/manifest/utils/get_last_time_from_adaptation.d.ts +1 -1
  528. package/dist/_esm5.processed/parsers/manifest/utils/get_last_time_from_adaptation.js +5 -4
  529. package/dist/_esm5.processed/parsers/manifest/utils/get_maximum_positions.d.ts +1 -1
  530. package/dist/_esm5.processed/parsers/manifest/utils/get_maximum_positions.js +10 -16
  531. package/dist/_esm5.processed/parsers/manifest/utils/get_minimum_position.d.ts +1 -1
  532. package/dist/_esm5.processed/parsers/manifest/utils/get_minimum_position.js +4 -10
  533. package/dist/_esm5.processed/parsers/manifest/utils/index_helpers.d.ts +1 -1
  534. package/dist/_esm5.processed/parsers/manifest/utils/index_helpers.js +4 -5
  535. package/dist/_esm5.processed/parsers/manifest/utils/update_segment_timeline.d.ts +1 -1
  536. package/dist/_esm5.processed/parsers/manifest/utils/update_segment_timeline.js +18 -18
  537. package/dist/_esm5.processed/parsers/texttracks/index.d.ts +1 -1
  538. package/dist/_esm5.processed/parsers/texttracks/sami/html.d.ts +1 -1
  539. package/dist/_esm5.processed/parsers/texttracks/sami/html.js +15 -15
  540. package/dist/_esm5.processed/parsers/texttracks/sami/native.d.ts +1 -1
  541. package/dist/_esm5.processed/parsers/texttracks/sami/native.js +7 -14
  542. package/dist/_esm5.processed/parsers/texttracks/srt/html.js +6 -6
  543. package/dist/_esm5.processed/parsers/texttracks/srt/native.d.ts +1 -1
  544. package/dist/_esm5.processed/parsers/texttracks/srt/native.js +1 -7
  545. package/dist/_esm5.processed/parsers/texttracks/srt/parse_cue.js +4 -8
  546. package/dist/_esm5.processed/parsers/texttracks/ttml/get_parameters.js +4 -8
  547. package/dist/_esm5.processed/parsers/texttracks/ttml/get_time_delimiters.d.ts +1 -1
  548. package/dist/_esm5.processed/parsers/texttracks/ttml/get_time_delimiters.js +6 -8
  549. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_default_ttml_paragraph_style.js +2 -2
  550. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_extent.js +2 -6
  551. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_font_size.js +3 -4
  552. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_origin.js +2 -6
  553. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_padding.js +2 -6
  554. package/dist/_esm5.processed/parsers/texttracks/ttml/html/create_element.d.ts +2 -2
  555. package/dist/_esm5.processed/parsers/texttracks/ttml/html/create_element.js +22 -21
  556. package/dist/_esm5.processed/parsers/texttracks/ttml/html/generate_css_test_outline.js +2 -2
  557. package/dist/_esm5.processed/parsers/texttracks/ttml/html/parse_cue.d.ts +1 -1
  558. package/dist/_esm5.processed/parsers/texttracks/ttml/html/parse_cue.js +5 -3
  559. package/dist/_esm5.processed/parsers/texttracks/ttml/html/parse_ttml_to_div.d.ts +1 -1
  560. package/dist/_esm5.processed/parsers/texttracks/ttml/html/ttml_color_to_css_color.js +34 -19
  561. package/dist/_esm5.processed/parsers/texttracks/ttml/native/parse_cue.d.ts +2 -2
  562. package/dist/_esm5.processed/parsers/texttracks/ttml/native/parse_cue.js +9 -10
  563. package/dist/_esm5.processed/parsers/texttracks/ttml/native/parse_ttml_to_vtt.d.ts +1 -1
  564. package/dist/_esm5.processed/parsers/texttracks/ttml/parse_ttml.d.ts +3 -3
  565. package/dist/_esm5.processed/parsers/texttracks/ttml/parse_ttml.js +28 -16
  566. package/dist/_esm5.processed/parsers/texttracks/ttml/resolve_styles_inheritance.d.ts +1 -1
  567. package/dist/_esm5.processed/parsers/texttracks/ttml/time_parsing.d.ts +1 -1
  568. package/dist/_esm5.processed/parsers/texttracks/ttml/time_parsing.js +2 -2
  569. package/dist/_esm5.processed/parsers/texttracks/types.d.ts +1 -1
  570. package/dist/_esm5.processed/parsers/texttracks/webvtt/get_cue_blocks.js +1 -1
  571. package/dist/_esm5.processed/parsers/texttracks/webvtt/get_style_blocks.js +2 -1
  572. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/convert_payload_to_html.d.ts +1 -1
  573. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_default_style_elements.d.ts +1 -1
  574. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_style_attribute.js +6 -12
  575. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_styled_element.d.ts +1 -1
  576. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_styled_element.js +7 -8
  577. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/index.d.ts +1 -1
  578. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/parse_style_block.js +4 -4
  579. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/parse_webvtt_to_div.d.ts +1 -1
  580. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/to_html.d.ts +1 -1
  581. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/to_html.js +4 -10
  582. package/dist/_esm5.processed/parsers/texttracks/webvtt/native/parse_vtt_to_cues.d.ts +1 -1
  583. package/dist/_esm5.processed/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +2 -6
  584. package/dist/_esm5.processed/parsers/texttracks/webvtt/native/set_settings_on_cue.d.ts +1 -1
  585. package/dist/_esm5.processed/parsers/texttracks/webvtt/native/to_native_cue.d.ts +1 -1
  586. package/dist/_esm5.processed/parsers/texttracks/webvtt/native/to_native_cue.js +1 -1
  587. package/dist/_esm5.processed/parsers/texttracks/webvtt/parse_cue_block.js +2 -4
  588. package/dist/_esm5.processed/parsers/texttracks/webvtt/parse_timestamp.js +1 -2
  589. package/dist/_esm5.processed/parsers/texttracks/webvtt/utils.js +6 -6
  590. package/dist/_esm5.processed/public_types.d.ts +13 -11
  591. package/dist/_esm5.processed/tools/TextTrackRenderer/index.d.ts +3 -2
  592. package/dist/_esm5.processed/tools/TextTrackRenderer/text_track_renderer.d.ts +2 -2
  593. package/dist/_esm5.processed/tools/TextTrackRenderer/text_track_renderer.js +15 -10
  594. package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.d.ts +1 -1
  595. package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.js +2 -3
  596. package/dist/_esm5.processed/transports/dash/construct_segment_url.d.ts +2 -2
  597. package/dist/_esm5.processed/transports/dash/construct_segment_url.js +5 -3
  598. package/dist/_esm5.processed/transports/dash/extract_complete_chunks.js +2 -2
  599. package/dist/_esm5.processed/transports/dash/get_events_out_of_emsgs.d.ts +2 -2
  600. package/dist/_esm5.processed/transports/dash/get_events_out_of_emsgs.js +9 -10
  601. package/dist/_esm5.processed/transports/dash/image_pipelines.d.ts +3 -3
  602. package/dist/_esm5.processed/transports/dash/image_pipelines.js +32 -19
  603. package/dist/_esm5.processed/transports/dash/init_segment_loader.d.ts +3 -3
  604. package/dist/_esm5.processed/transports/dash/init_segment_loader.js +46 -22
  605. package/dist/_esm5.processed/transports/dash/low_latency_segment_loader.d.ts +2 -2
  606. package/dist/_esm5.processed/transports/dash/low_latency_segment_loader.js +13 -9
  607. package/dist/_esm5.processed/transports/dash/manifest_parser.d.ts +2 -2
  608. package/dist/_esm5.processed/transports/dash/manifest_parser.js +35 -22
  609. package/dist/_esm5.processed/transports/dash/pipelines.d.ts +1 -1
  610. package/dist/_esm5.processed/transports/dash/pipelines.js +11 -15
  611. package/dist/_esm5.processed/transports/dash/segment_loader.d.ts +4 -4
  612. package/dist/_esm5.processed/transports/dash/segment_loader.js +30 -21
  613. package/dist/_esm5.processed/transports/dash/segment_parser.d.ts +2 -2
  614. package/dist/_esm5.processed/transports/dash/segment_parser.js +47 -21
  615. package/dist/_esm5.processed/transports/dash/text_loader.d.ts +2 -2
  616. package/dist/_esm5.processed/transports/dash/text_loader.js +19 -19
  617. package/dist/_esm5.processed/transports/dash/text_parser.d.ts +2 -2
  618. package/dist/_esm5.processed/transports/dash/text_parser.js +45 -24
  619. package/dist/_esm5.processed/transports/local/pipelines.d.ts +1 -1
  620. package/dist/_esm5.processed/transports/local/pipelines.js +7 -8
  621. package/dist/_esm5.processed/transports/local/segment_loader.d.ts +3 -3
  622. package/dist/_esm5.processed/transports/local/segment_loader.js +14 -6
  623. package/dist/_esm5.processed/transports/local/segment_parser.d.ts +1 -1
  624. package/dist/_esm5.processed/transports/local/segment_parser.js +31 -13
  625. package/dist/_esm5.processed/transports/local/text_parser.d.ts +1 -1
  626. package/dist/_esm5.processed/transports/local/text_parser.js +44 -19
  627. package/dist/_esm5.processed/transports/metaplaylist/manifest_loader.d.ts +4 -4
  628. package/dist/_esm5.processed/transports/metaplaylist/manifest_loader.js +9 -5
  629. package/dist/_esm5.processed/transports/metaplaylist/pipelines.d.ts +1 -1
  630. package/dist/_esm5.processed/transports/metaplaylist/pipelines.js +25 -18
  631. package/dist/_esm5.processed/transports/smooth/extract_timings_infos.d.ts +2 -2
  632. package/dist/_esm5.processed/transports/smooth/extract_timings_infos.js +16 -15
  633. package/dist/_esm5.processed/transports/smooth/isobmff/create_audio_init_segment.js +3 -3
  634. package/dist/_esm5.processed/transports/smooth/isobmff/create_boxes.js +14 -32
  635. package/dist/_esm5.processed/transports/smooth/isobmff/create_init_segment.js +2 -2
  636. package/dist/_esm5.processed/transports/smooth/isobmff/create_traf_box.js +2 -2
  637. package/dist/_esm5.processed/transports/smooth/isobmff/get_aaces_header.js +4 -16
  638. package/dist/_esm5.processed/transports/smooth/isobmff/index.d.ts +4 -2
  639. package/dist/_esm5.processed/transports/smooth/isobmff/parse_tfrf.js +2 -2
  640. package/dist/_esm5.processed/transports/smooth/isobmff/parse_tfxd.js +1 -1
  641. package/dist/_esm5.processed/transports/smooth/isobmff/patch_segment.js +11 -10
  642. package/dist/_esm5.processed/transports/smooth/pipelines.d.ts +1 -1
  643. package/dist/_esm5.processed/transports/smooth/pipelines.js +121 -79
  644. package/dist/_esm5.processed/transports/smooth/segment_loader.d.ts +3 -3
  645. package/dist/_esm5.processed/transports/smooth/segment_loader.js +53 -27
  646. package/dist/_esm5.processed/transports/smooth/utils.d.ts +2 -2
  647. package/dist/_esm5.processed/transports/smooth/utils.js +7 -5
  648. package/dist/_esm5.processed/transports/types.d.ts +11 -25
  649. package/dist/_esm5.processed/transports/utils/byte_range.js +1 -2
  650. package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.d.ts +3 -3
  651. package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.js +13 -7
  652. package/dist/_esm5.processed/transports/utils/check_isobmff_integrity.js +3 -3
  653. package/dist/_esm5.processed/transports/utils/find_complete_box.js +3 -2
  654. package/dist/_esm5.processed/transports/utils/generate_manifest_loader.d.ts +3 -3
  655. package/dist/_esm5.processed/transports/utils/generate_manifest_loader.js +18 -6
  656. package/dist/_esm5.processed/transports/utils/get_isobmff_timing_infos.d.ts +2 -2
  657. package/dist/_esm5.processed/transports/utils/get_isobmff_timing_infos.js +12 -11
  658. package/dist/_esm5.processed/transports/utils/infer_segment_container.d.ts +1 -1
  659. package/dist/_esm5.processed/transports/utils/infer_segment_container.js +1 -3
  660. package/dist/_esm5.processed/transports/utils/parse_text_track.d.ts +4 -4
  661. package/dist/_esm5.processed/transports/utils/parse_text_track.js +9 -6
  662. package/dist/_esm5.processed/utils/are_codecs_compatible.js +5 -1
  663. package/dist/_esm5.processed/utils/array_includes.js +2 -6
  664. package/dist/_esm5.processed/utils/assert.js +3 -4
  665. package/dist/_esm5.processed/utils/base64.js +87 -29
  666. package/dist/_esm5.processed/utils/byte_parsing.js +60 -56
  667. package/dist/_esm5.processed/utils/cancellable_sleep.d.ts +1 -1
  668. package/dist/_esm5.processed/utils/create_cancellable_promise.d.ts +1 -1
  669. package/dist/_esm5.processed/utils/deep_merge.js +4 -4
  670. package/dist/_esm5.processed/utils/event_emitter.d.ts +1 -1
  671. package/dist/_esm5.processed/utils/get_fuzzed_delay.js +1 -1
  672. package/dist/_esm5.processed/utils/hash_buffer.js +1 -1
  673. package/dist/_esm5.processed/utils/initialization_segment_cache.d.ts +2 -2
  674. package/dist/_esm5.processed/utils/languages/index.d.ts +4 -2
  675. package/dist/_esm5.processed/utils/languages/index.js +2 -2
  676. package/dist/_esm5.processed/utils/languages/normalize.d.ts +2 -1
  677. package/dist/_esm5.processed/utils/languages/normalize.js +5 -3
  678. package/dist/_esm5.processed/utils/logger.js +7 -14
  679. package/dist/_esm5.processed/utils/object_assign.js +5 -5
  680. package/dist/_esm5.processed/utils/object_values.d.ts +1 -1
  681. package/dist/_esm5.processed/utils/object_values.js +2 -3
  682. package/dist/_esm5.processed/utils/ranges.d.ts +2 -1
  683. package/dist/_esm5.processed/utils/ranges.js +19 -23
  684. package/dist/_esm5.processed/utils/reference.d.ts +3 -3
  685. package/dist/_esm5.processed/utils/reference.js +1 -3
  686. package/dist/_esm5.processed/utils/request/fetch.d.ts +1 -1
  687. package/dist/_esm5.processed/utils/request/fetch.js +34 -23
  688. package/dist/_esm5.processed/utils/request/index.d.ts +6 -3
  689. package/dist/_esm5.processed/utils/request/index.js +2 -2
  690. package/dist/_esm5.processed/utils/request/xhr.d.ts +1 -1
  691. package/dist/_esm5.processed/utils/request/xhr.js +28 -17
  692. package/dist/_esm5.processed/utils/retry_promise_with_backoff.d.ts +2 -2
  693. package/dist/_esm5.processed/utils/slice_uint8array.js +3 -3
  694. package/dist/_esm5.processed/utils/starts_with.js +3 -3
  695. package/dist/_esm5.processed/utils/string_parsing.js +16 -18
  696. package/dist/_esm5.processed/utils/task_canceller.js +1 -2
  697. package/dist/_esm5.processed/utils/uniq.d.ts +1 -1
  698. package/dist/_esm5.processed/utils/uniq.js +4 -3
  699. package/dist/_esm5.processed/utils/weak_map_memory.js +0 -1
  700. package/dist/_esm5.processed/utils/wrapInPromise.d.ts +1 -1
  701. package/dist/mpd-parser.wasm +0 -0
  702. package/dist/rx-player.js +334 -234
  703. package/dist/rx-player.min.js +1 -1
  704. package/experimental/features/index.d.ts-E +16 -0
  705. package/experimental/features/index.js-E +16 -0
  706. package/experimental/index.d.ts +1 -1
  707. package/experimental/index.d.ts-E +16 -0
  708. package/experimental/index.js +1 -1
  709. package/experimental/index.js-E +16 -0
  710. package/experimental/tools/VideoThumbnailLoader/index.d.ts-E +18 -0
  711. package/experimental/tools/VideoThumbnailLoader/index.js-E +18 -0
  712. package/experimental/tools/index.d.ts-E +16 -0
  713. package/experimental/tools/index.js-E +16 -0
  714. package/features/index.d.ts-E +16 -0
  715. package/features/index.js-E +16 -0
  716. package/logger/index.d.ts-E +17 -0
  717. package/logger/index.js-E +17 -0
  718. package/minimal/index.d.ts-E +17 -0
  719. package/minimal/index.js-E +17 -0
  720. package/package.json +27 -12
  721. package/tools/TextTrackRenderer.d.ts-E +18 -0
  722. package/tools/TextTrackRenderer.js-E +18 -0
  723. package/tools/index.d.ts-E +16 -0
  724. package/tools/index.js-E +16 -0
  725. package/tools/string-utils.d.ts-E +18 -0
  726. package/tools/string-utils.js-E +18 -0
  727. package/types/index.d.ts-E +16 -0
  728. package/types/index.js-E +15 -0
package/MAINTAINERS.md CHANGED
@@ -1,28 +1,25 @@
1
- # Maintainers ##################################################################
1
+ # Maintainers
2
2
 
3
- This file contains information about current and previous maintainers, which are
4
- the people allowed to update directly the code of the RxPlayer library and its
5
- associated tools.
3
+ This file contains information about current and previous maintainers, which are the
4
+ people allowed to update directly the code of the RxPlayer library and its associated
5
+ tools.
6
6
 
7
7
  Note that there are other external contributors which are not listed here. Their
8
8
  contributions had to be validated and merged by a maintainer.
9
9
 
10
- Please do not contact the people in this file to report an issue, ask an
11
- RxPlayer-related question or to propose new features.
10
+ Please do not contact the people in this file to report an issue, ask an RxPlayer-related
11
+ question or to propose new features.
12
12
 
13
-
14
- ## Current maintainers #########################################################
13
+ ## Current maintainers
15
14
 
16
15
  Here is the list of current maintainers:
17
16
 
18
17
  - Paul Berberian <paul.berberian@canal-plus.com>
19
18
  - Florent Bouisset <florent.bouisset@canal-plus.com>
20
19
 
20
+ ## Previous maintainers
21
21
 
22
- ## Previous maintainers ########################################################
23
-
24
- Here is the list of previous maintainers, which are not working on the project
25
- anymore:
22
+ Here is the list of previous maintainers, which are not working on the project anymore:
26
23
 
27
24
  - Achraf Laamoum <achraf.laamoum@canal-plus.com>
28
25
  - Alexandre Duros <alexandre.duros@canal-plus.com>
package/README.md CHANGED
@@ -28,72 +28,71 @@
28
28
  </a>
29
29
  </p>
30
30
 
31
- The RxPlayer is a library implementing a [DASH](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP)
32
- and [Microsoft Smooth Streaming](https://en.wikipedia.org/wiki/Adaptive_bitrate_streaming#Microsoft_Smooth_Streaming)
31
+ The RxPlayer is a library implementing a
32
+ [DASH](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP) and
33
+ [Microsoft Smooth Streaming](https://en.wikipedia.org/wiki/Adaptive_bitrate_streaming#Microsoft_Smooth_Streaming)
33
34
  media player on a browser, by relying on the HTML5
34
- [Media Source Extensions](https://en.wikipedia.org/wiki/Media_Source_Extensions)
35
- and [Encrypted Media extensions](https://en.wikipedia.org/wiki/Encrypted_Media_Extensions)
35
+ [Media Source Extensions](https://en.wikipedia.org/wiki/Media_Source_Extensions) and
36
+ [Encrypted Media extensions](https://en.wikipedia.org/wiki/Encrypted_Media_Extensions)
36
37
  browser APIs.
37
38
 
38
39
  ---
39
40
 
40
- Originally designed to power Canal+ many applications, the RxPlayer is today
41
- used in production by several companies in multiple countries and runs on most
42
- devices where a browser can run: Computers, phones, set-top-boxes, smart TVs,
43
- game consoles and other peculiar environments are all supported and able to
44
- profit from its many features.
41
+ Originally designed to power Canal+ many applications, the RxPlayer is today used in
42
+ production by several companies in multiple countries and runs on most devices where a
43
+ browser can run: Computers, phones, set-top-boxes, smart TVs, game consoles and other
44
+ peculiar environments are all supported and able to profit from its many features.
45
45
 
46
46
  Its main goals are:
47
47
 
48
- - __Stability__: The RxPlayer can play live and On Demand DASH and Smooth
49
- contents for extended amounts of time, with or without DRM - without any
50
- performance, memory or logic issue.
48
+ - **Stability**: The RxPlayer can play live and On Demand DASH and Smooth contents for
49
+ extended amounts of time, with or without DRM - without any performance, memory or logic
50
+ issue.
51
51
 
52
- If you encounter a new issue while using it, we'll be very happy to help
53
- fixing it. Any encountered bug is put at high priority.
52
+ If you encounter a new issue while using it, we'll be very happy to help fixing it. Any
53
+ encountered bug is put at high priority.
54
54
 
55
- - __Quality of experience__: It aims to play the best possible quality
56
- without any rebuffering.
55
+ - **Quality of experience**: It aims to play the best possible quality without any
56
+ rebuffering.
57
57
 
58
- Unsupported codecs and undecipherable qualities (e.g. higher qualities with
59
- more drastic DRM conditions on untrusted devices) are automatically
60
- filtered out, even if this happens during playback.
58
+ Unsupported codecs and undecipherable qualities (e.g. higher qualities with more drastic
59
+ DRM conditions on untrusted devices) are automatically filtered out, even if this
60
+ happens during playback.
61
61
 
62
- The player is also very resilient: any temporary network issue, fall in
63
- bandwidth, poorly-packaged content or platform quirk should be properly
64
- handled with the main goal of avoiding playback interruption.
62
+ The player is also very resilient: any temporary network issue, fall in bandwidth,
63
+ poorly-packaged content or platform quirk should be properly handled with the main goal
64
+ of avoiding playback interruption.
65
65
 
66
- - __Portability__: The RxPlayer has been ported to a lot of devices, some on
67
- the lower-end of performance and memory capabilities and others on the higher end.
66
+ - **Portability**: The RxPlayer has been ported to a lot of devices, some on the lower-end
67
+ of performance and memory capabilities and others on the higher end.
68
68
 
69
- As such, it can adapt to important memory and performance constraints while
70
- still being able to retain its many features.
69
+ As such, it can adapt to important memory and performance constraints while still being
70
+ able to retain its many features.
71
71
 
72
- - __Configurability__: The RxPlayer has a plethora of options to let you tweak
73
- its behavior.
74
- You should be able to play any content the way you want, on any device.
72
+ - **Configurability**: The RxPlayer has a plethora of options to let you tweak its
73
+ behavior. You should be able to play any content the way you want, on any device.
75
74
 
76
- You should also be able to integrate complex supplementary logic like
77
- Peer-to-Peer solutions.
75
+ You should also be able to integrate complex supplementary logic like Peer-to-Peer
76
+ solutions.
78
77
 
79
- - __Easy to use__: We try hard to make this player easy to integrate and to
80
- use in various codebases.
78
+ - **Easy to use**: We try hard to make this player easy to integrate and to use in various
79
+ codebases.
81
80
 
82
- Even for the more advanced options, we aim to make our documentation as
83
- legible and as complete as possible.
81
+ Even for the more advanced options, we aim to make our documentation as legible and as
82
+ complete as possible.
84
83
 
85
84
  The RxPlayer has probably already all the features you want :)!
86
85
 
87
- Even if that's not the case, we will be very pleased to exchange with you on it
88
- and look forward for external contributions.
86
+ Even if that's not the case, we will be very pleased to exchange with you on it and look
87
+ forward for external contributions.
89
88
 
89
+ ## How to use it?
90
90
 
91
- ## How to use it? ##############################################################
92
-
93
- The fastest way to use the player directly in your code is to add this
94
- repository as a dependency.
91
+ The fastest way to use the player directly in your code is to add this repository as a
92
+ dependency.
95
93
 
96
94
  You can do it via [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/):
95
+
97
96
  ```sh
98
97
  # when using npm:
99
98
  npm install --save rx-player
@@ -103,6 +102,7 @@ yarn add rx-player
103
102
  ```
104
103
 
105
104
  You can then directly import and use the RxPlayer in your code:
105
+
106
106
  ```js
107
107
  // import it ES6 style:
108
108
  import RxPlayer from "rx-player";
@@ -112,37 +112,39 @@ import RxPlayer from "rx-player";
112
112
 
113
113
  // instantiate it
114
114
  const player = new RxPlayer({
115
- videoElement: document.querySelector("video")
115
+ videoElement: document.querySelector("video"),
116
116
  });
117
117
 
118
118
  // play a video
119
119
  player.loadVideo({
120
120
  url: "http://vm2.dashif.org/livesim-dev/segtimeline_1/testpic_6s/Manifest.mpd",
121
121
  transport: "dash",
122
- autoPlay: true
122
+ autoPlay: true,
123
123
  });
124
124
  ```
125
125
 
126
126
  We've also written short tutorials to help you familiarize with the RxPlayer API:
127
- - [Quick start into the API](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/Quick_Start.html).
128
- - [Playing contents with DRMs](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/Content_with_DRM.html).
129
- - [Selecting a track](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/Selecting_a_Track.html)
130
- - [Listening to events contained in the content](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/EventStream_Handling.html)
131
127
 
132
- To be able to play with the player without needing to perform any setup we also
133
- created multiple live-editable demos:
134
- - [Playing a clear DASH content](https://codesandbox.io/s/rx-player-classic-wc38j)
135
- - [Playing an encrypted DASH content](https://codesandbox.io/s/rx-player-drm-g51hb)
136
- - [Playing an RxPlayer-specific MetaPlaylist content](https://codesandbox.io/s/rx-player-metaplaylist-l0t0d)
128
+ - [Quick start into the API](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/Quick_Start.html).
129
+ - [Playing contents with DRMs](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/Content_with_DRM.html).
130
+ - [Selecting a track](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/Selecting_a_Track.html)
131
+ - [Listening to events contained in the content](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/EventStream_Handling.html)
132
+
133
+ To be able to play with the player without needing to perform any setup we also created
134
+ multiple live-editable demos:
135
+
136
+ - [Playing a clear DASH content](https://codesandbox.io/s/rx-player-classic-wc38j)
137
+ - [Playing an encrypted DASH content](https://codesandbox.io/s/rx-player-drm-g51hb)
138
+ - [Playing an RxPlayer-specific MetaPlaylist content](https://codesandbox.io/s/rx-player-metaplaylist-l0t0d)
137
139
 
138
- ### Minimal Builds #############################################################
140
+ ### Minimal Builds
139
141
 
140
- To reduce the size of the final code, you might also want to import a minimal
141
- version of the player and only import the features you need. This is documented
142
- [here
143
- ](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Minimal_Player.html):
142
+ To reduce the size of the final code, you might also want to import a minimal version of
143
+ the player and only import the features you need. This is documented
144
+ [here ](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Minimal_Player.html):
144
145
 
145
146
  For example, to play encrypted DASH contents, you could just write:
147
+
146
148
  ```js
147
149
  import RxPlayer from "rx-player/minimal";
148
150
  import { DASH, EME } from "rx-player/features";
@@ -151,11 +153,10 @@ import { DASH, EME } from "rx-player/features";
151
153
  RxPlayer.addFeatures([DASH, EME]);
152
154
  ```
153
155
 
156
+ ## API
154
157
 
155
- ## API #########################################################################
156
-
157
- We documented the API in every little details in [the API
158
- documentation](https://developers.canal-plus.com/rx-player/doc/api/Overview.html).
158
+ We documented the API in every little details in
159
+ [the API documentation](https://developers.canal-plus.com/rx-player/doc/api/Overview.html).
159
160
 
160
161
  You can also refer to the documentation of our previous versions
161
162
  [here](https://developers.canal-plus.com/rx-player/documentation_pages_by_version.html)
@@ -163,41 +164,35 @@ You can also refer to the documentation of our previous versions
163
164
  These documentation pages are automatically generated from the content of the
164
165
  [doc/api](./doc/api/Overview.md) directory in this repository.
165
166
 
166
-
167
-
168
- ## Demo ########################################################################
167
+ ## Demo
169
168
 
170
169
  You can view our online Demo, built from our last version,
171
170
  [here](https://developers.canal-plus.com/rx-player/).
172
171
 
173
- This demo is a small application written in
174
- [React](https://github.com/facebook/react) demonstrating a simple usage of the
175
- player.
172
+ This demo is a small application written in [React](https://github.com/facebook/react)
173
+ demonstrating a simple usage of the player.
176
174
 
177
175
  Demo pages for our previous versions are also available
178
176
  [here](https://developers.canal-plus.com/rx-player/demo_page_by_version.html).
179
177
 
178
+ ## Contribute
180
179
 
180
+ Details on how to contribute is written in the [CONTRIBUTING.md file](./CONTRIBUTING.md)
181
+ at the root of this repository.
181
182
 
182
- ## Contribute ##################################################################
183
-
184
- Details on how to contribute is written in the [CONTRIBUTING.md
185
- file](./CONTRIBUTING.md) at the root of this repository.
186
-
187
-
188
-
189
- ### Dependencies ###############################################################
183
+ ### Dependencies
190
184
 
191
185
  After cloning our repo, you should first install our dependencies via either
192
186
  [npm](https://www.npmjs.com/):
187
+
193
188
  ```sh
194
189
  npm install
195
190
  ```
196
191
 
197
-
198
- ### Build ######################################################################
192
+ ### Build
199
193
 
200
194
  We use npm scripts to bundle, lint and test the player. Here are some examples:
195
+
201
196
  ```sh
202
197
  # build the player in dist/rx-player.js
203
198
  npm run build
@@ -215,74 +210,63 @@ npm run test
215
210
  npm run list
216
211
  ```
217
212
 
218
- Builds are included in the ``dist/`` directory (builds based on the last version
219
- are already included there).
220
-
213
+ Builds are included in the `dist/` directory (builds based on the last version are already
214
+ included there).
221
215
 
216
+ ## Why a new player?
222
217
 
223
- ## Why a new player? ###########################################################
218
+ ### A need for an advanced media player
224
219
 
225
- ### A need for an advanced media player ########################################
220
+ Canal+ Group is a media company with many advanced needs when it comes to media playback:
221
+ it provides both live and VoD stream with multiple encryption requirements, supports a
222
+ very large panel of devices and has many other specificities (like adult content
223
+ restrictions, ad-insertion, Peer-To-Peer integration, low-latency live streaming...).
226
224
 
227
- Canal+ Group is a media company with many advanced needs when it comes to media
228
- playback: it provides both live and VoD stream with multiple encryption
229
- requirements, supports a very large panel of devices and has many other
230
- specificities (like adult content restrictions, ad-insertion, Peer-To-Peer
231
- integration, low-latency live streaming...).
225
+ When the time came to switch from a plugin-based web player approach to an HTML5 one back
226
+ in 2015, no media player had the key features we wanted, and including those needs into an
227
+ already existing media player would not be straightforward either.
232
228
 
233
- When the time came to switch from a plugin-based web player approach to an HTML5
234
- one back in 2015, no media player had the key features we wanted, and including
235
- those needs into an already existing media player would not be straightforward
236
- either.
229
+ The R&D department of Canal+ Group thus started to work on a new featureful media-player:
230
+ the RxPlayer. To both help and profit from the community, it also decided to share it to
231
+ everyone under a permissive open-source licence.
237
232
 
238
- The R&D department of Canal+ Group thus started to work on a new featureful
239
- media-player: the RxPlayer. To both help and profit from the community, it also
240
- decided to share it to everyone under a permissive open-source licence.
241
-
242
- Now, more than 8 years later, the RxPlayer continues to evolve at the same fast
243
- pace to include a lot of features and improvements you may not find in other
244
- media players.
245
- You can look at our
233
+ Now, more than 8 years later, the RxPlayer continues to evolve at the same fast pace to
234
+ include a lot of features and improvements you may not find in other media players. You
235
+ can look at our
246
236
  [API documentation](https://developers.canal-plus.com/rx-player/doc/api/Overview.html),
247
237
  [tutorials](https://developers.canal-plus.com/rx-player/doc/Getting_Started/Tutorials/Quick_Start.html)
248
- and our [demo page](https://developers.canal-plus.com/rx-player/)
249
- (an RxPlayer instance is available in the console through the global `player`
250
- variable there) to see if it matches your need.
251
-
238
+ and our [demo page](https://developers.canal-plus.com/rx-player/) (an RxPlayer instance is
239
+ available in the console through the global `player` variable there) to see if it matches
240
+ your need.
252
241
 
253
- ### A featureful player ########################################################
242
+ ### A featureful player
254
243
 
255
- With the help of a carefully-crafted and well-documented architecture, we were
256
- able to quickly support avanced features when we - or the community - needed
257
- them. Amongst those:
244
+ With the help of a carefully-crafted and well-documented architecture, we were able to
245
+ quickly support avanced features when we - or the community - needed them. Amongst those:
258
246
 
259
- - support for live and VoD DASH / Smooth / HLS* / Downloaded contents /
260
- MP4* / WebM* contents and more
247
+ - support for live and VoD DASH / Smooth / HLS* / Downloaded contents / MP4* / WebM\*
248
+ contents and more
261
249
 
262
- - support of advanced encryption configuration, such as multiple keys in a
263
- single or separate licences for a given content (with automatic fallbacks
264
- when we found an un-decipherable content), persistent licenses, and
265
- other device-specific restrictions.
250
+ - support of advanced encryption configuration, such as multiple keys in a single or
251
+ separate licences for a given content (with automatic fallbacks when we found an
252
+ un-decipherable content), persistent licenses, and other device-specific restrictions.
266
253
 
267
- - support for low-latency DASH streams
254
+ - support for low-latency DASH streams
268
255
 
269
- - support of TTML, WebVTT, SAMI and SRT subtitles
256
+ - support of TTML, WebVTT, SAMI and SRT subtitles
270
257
 
271
- - an available WebAssembly-based MPD parser for DASH contents, allowing to
272
- drastically reduce the loading time and memory usage of larger contents.
258
+ - an available WebAssembly-based MPD parser for DASH contents, allowing to drastically
259
+ reduce the loading time and memory usage of larger contents.
273
260
 
274
- - advanced APIs for advanced use-cases (audio-only mode, video track
275
- selection, manual garbage collection of segments, Peer-To-Peer
276
- integration, quality filtering...)
261
+ - advanced APIs for advanced use-cases (audio-only mode, video track selection, manual
262
+ garbage collection of segments, Peer-To-Peer integration, quality filtering...)
277
263
 
278
- - advanced adaptive streaming algorithms making use of both a network-based
279
- approach (for quick start-up) and a buffer-based one (to provide the best
280
- quality possible).
264
+ - advanced adaptive streaming algorithms making use of both a network-based approach (for
265
+ quick start-up) and a buffer-based one (to provide the best quality possible).
281
266
 
282
- - advanced optimizations for devices with low memory constraints
267
+ - advanced optimizations for devices with low memory constraints
283
268
 
284
- - a complex segment scheduling logic, prioritizing closer media segments while
285
- making sure that the bandwidth usage is always optimal and the rebuffering
286
- risks always low.
269
+ - a complex segment scheduling logic, prioritizing closer media segments while making sure
270
+ that the bandwidth usage is always optimal and the rebuffering risks always low.
287
271
 
288
272
  \* In "directfile" mode, on compatible browsers
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.33.4-dev.2024090600
1
+ 3.33.4
@@ -22,9 +22,10 @@ var hasClassList;
22
22
  */
23
23
  export default function addClassName(elt, className) {
24
24
  if (hasClassList === undefined) {
25
- hasClassList = elt.classList !== undefined &&
26
- /* eslint-disable @typescript-eslint/unbound-method */
27
- typeof elt.classList.add === "function";
25
+ hasClassList =
26
+ elt.classList !== undefined &&
27
+ /* eslint-disable @typescript-eslint/unbound-method */
28
+ typeof elt.classList.add === "function";
28
29
  /* eslint-enable @typescript-eslint/unbound-method */
29
30
  }
30
31
  if (hasClassList) {
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ICompatTextTrack } from "./browser_compatibility_types";
16
+ import type { ICompatTextTrack } from "./browser_compatibility_types";
17
17
  /**
18
18
  * Add text track to the given media element.
19
19
  *
@@ -34,10 +34,10 @@ export default function addTextTrack(mediaElement, hidden) {
34
34
  var kind = "subtitles";
35
35
  if (isIEOrEdge) {
36
36
  var tracksLength = mediaElement.textTracks.length;
37
- track = (tracksLength > 0 ? mediaElement.textTracks[tracksLength - 1] :
38
- mediaElement.addTextTrack(kind));
39
- track.mode = hidden ? ((_a = track.HIDDEN) !== null && _a !== void 0 ? _a : "hidden") :
40
- ((_b = track.SHOWING) !== null && _b !== void 0 ? _b : "showing");
37
+ track = (tracksLength > 0
38
+ ? mediaElement.textTracks[tracksLength - 1]
39
+ : mediaElement.addTextTrack(kind));
40
+ track.mode = hidden ? ((_a = track.HIDDEN) !== null && _a !== void 0 ? _a : "hidden") : ((_b = track.SHOWING) !== null && _b !== void 0 ? _b : "showing");
41
41
  }
42
42
  else {
43
43
  trackElement = document.createElement("track");
@@ -169,4 +169,5 @@ export interface ICompatTextTrackList extends TextTrackList {
169
169
  onremovetrack: ((ev: TrackEvent) => void) | null;
170
170
  onchange: (() => void) | null;
171
171
  }
172
- export { ICompatDocument, ICompatHTMLMediaElement, ICompatAudioTrackList, ICompatVideoTrackList, ICompatAudioTrack, ICompatVideoTrack, ICompatMediaKeysConstructor, ICompatTextTrack, ICompatVTTCue, ICompatVTTCueConstructor, MediaSource_, READY_STATES, };
172
+ export type { ICompatDocument, ICompatHTMLMediaElement, ICompatAudioTrackList, ICompatVideoTrackList, ICompatAudioTrack, ICompatVideoTrack, ICompatMediaKeysConstructor, ICompatTextTrack, ICompatVTTCue, ICompatVTTCueConstructor, };
173
+ export { MediaSource_, READY_STATES };
@@ -15,18 +15,23 @@
15
15
  */
16
16
  import isNullOrUndefined from "../utils/is_null_or_undefined";
17
17
  import isNode from "./is_node";
18
- var win = isNode ? undefined :
19
- window;
18
+ var win = isNode ? undefined : window;
20
19
  /** MediaSource implementation, including vendored implementations. */
21
- var MediaSource_ = win === undefined ? undefined :
22
- !isNullOrUndefined(win.MediaSource) ? win.MediaSource :
23
- !isNullOrUndefined(win.MozMediaSource) ? win.MozMediaSource :
24
- !isNullOrUndefined(win.WebKitMediaSource) ? win.WebKitMediaSource :
25
- win.MSMediaSource;
20
+ var MediaSource_ = win === undefined
21
+ ? undefined
22
+ : !isNullOrUndefined(win.MediaSource)
23
+ ? win.MediaSource
24
+ : !isNullOrUndefined(win.MozMediaSource)
25
+ ? win.MozMediaSource
26
+ : !isNullOrUndefined(win.WebKitMediaSource)
27
+ ? win.WebKitMediaSource
28
+ : win.MSMediaSource;
26
29
  /** List an HTMLMediaElement's possible values for its readyState property. */
27
- var READY_STATES = { HAVE_NOTHING: 0,
30
+ var READY_STATES = {
31
+ HAVE_NOTHING: 0,
28
32
  HAVE_METADATA: 1,
29
33
  HAVE_CURRENT_DATA: 2,
30
34
  HAVE_FUTURE_DATA: 3,
31
- HAVE_ENOUGH_DATA: 4 };
32
- export { MediaSource_, READY_STATES, };
35
+ HAVE_ENOUGH_DATA: 4,
36
+ };
37
+ export { MediaSource_, READY_STATES };
@@ -46,7 +46,7 @@ var isPlayStation5 = false;
46
46
  var isXbox = false;
47
47
  /** `true` for specific A1 STB: KSTB 40xx from Kaon Media. */
48
48
  var isA1KStb40xx = false;
49
- ((function findCurrentBrowser() {
49
+ (function findCurrentBrowser() {
50
50
  var _a, _b, _c;
51
51
  if (isNode) {
52
52
  return;
@@ -58,8 +58,7 @@ var isA1KStb40xx = false;
58
58
  isIEOrEdge = true;
59
59
  }
60
60
  else if (navigator.appName === "Microsoft Internet Explorer" ||
61
- navigator.appName === "Netscape" &&
62
- /(Trident|Edge)\//.test(navigator.userAgent)) {
61
+ (navigator.appName === "Netscape" && /(Trident|Edge)\//.test(navigator.userAgent))) {
63
62
  isIEOrEdge = true;
64
63
  }
65
64
  else if (navigator.userAgent.toLowerCase().indexOf("edg/") !== -1) {
@@ -84,12 +83,12 @@ var isA1KStb40xx = false;
84
83
  // and the absence of the Chrome string
85
84
  // eslint-disable-next-line max-len
86
85
  // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#which_part_of_the_user_agent_contains_the_information_you_are_looking_for
87
- ((/Safari\/(\d+)/).test(navigator.userAgent) &&
86
+ (/Safari\/(\d+)/.test(navigator.userAgent) &&
88
87
  // Safari should contain Version/ in userAgent
89
- (/Version\/(\d+)/).test(navigator.userAgent) &&
90
- (((_c = navigator.vendor) === null || _c === void 0 ? void 0 : _c.indexOf("Apple")) !== -1) &&
91
- !(/Chrome\/(\d+)/).test(navigator.userAgent) &&
92
- !(/Chromium\/(\d+)/).test(navigator.userAgent))) {
88
+ /Version\/(\d+)/.test(navigator.userAgent) &&
89
+ ((_c = navigator.vendor) === null || _c === void 0 ? void 0 : _c.indexOf("Apple")) !== -1 &&
90
+ !/Chrome\/(\d+)/.test(navigator.userAgent) &&
91
+ !/Chromium\/(\d+)/.test(navigator.userAgent))) {
93
92
  isSafariDesktop = true;
94
93
  }
95
94
  // 2 - Find out specific device/platform information
@@ -130,7 +129,7 @@ var isA1KStb40xx = false;
130
129
  else if (navigator.userAgent.indexOf("Model/a1-kstb40xx")) {
131
130
  isA1KStb40xx = true;
132
131
  }
133
- })());
132
+ })();
134
133
  export {
135
134
  // browsers
136
135
  isEdgeChromium, isFirefox, isIE11, isIEOrEdge, isSafariDesktop, isSafariMobile,
@@ -1,4 +1,4 @@
1
- import { isA1KStb40xx, isPanasonic, isPhilipsNetTv, isWebOs, } from "./browser_detection";
1
+ import { isA1KStb40xx, isPanasonic, isPhilipsNetTv, isWebOs } from "./browser_detection";
2
2
  /**
3
3
  * Returns `true` if a `MediaKeys` instance (the `Encrypted Media Extension`
4
4
  * concept) can be reused between contents.
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { IEventEmitter } from "../utils/event_emitter";
16
+ import type { IEventEmitter } from "../utils/event_emitter";
17
17
  interface ICompatSourceBufferEvents {
18
18
  updatestart: Event | undefined;
19
19
  update: Event | undefined;
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ICustomMediaKeySession } from "./custom_media_keys";
16
+ import type { ICustomMediaKeySession } from "./custom_media_keys";
17
17
  /**
18
18
  * Close the given `MediaKeySession` and returns a Promise resolving when the
19
19
  * session is closed.
@@ -51,7 +51,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
51
51
  };
52
52
  import log from "../../log";
53
53
  import cancellableSleep from "../../utils/cancellable_sleep";
54
- import TaskCanceller, { CancellationError, } from "../../utils/task_canceller";
54
+ import TaskCanceller, { CancellationError } from "../../utils/task_canceller";
55
55
  /**
56
56
  * Close the given `MediaKeySession` and returns a Promise resolving when the
57
57
  * session is closed.
@@ -68,12 +68,14 @@ import TaskCanceller, { CancellationError, } from "../../utils/task_canceller";
68
68
  export default function closeSession(session) {
69
69
  var timeoutCanceller = new TaskCanceller();
70
70
  return Promise.race([
71
- session.close()
72
- .then(function () { timeoutCanceller.cancel(); }),
71
+ session.close().then(function () {
72
+ timeoutCanceller.cancel();
73
+ }),
73
74
  // The `closed` promise may resolve, even if `close()` result has not
74
75
  // (seen at some point on Firefox).
75
- session.closed
76
- .then(function () { timeoutCanceller.cancel(); }),
76
+ session.closed.then(function () {
77
+ timeoutCanceller.cancel();
78
+ }),
77
79
  waitTimeoutAndCheck(),
78
80
  ]);
79
81
  /**
@@ -101,12 +103,13 @@ export default function closeSession(session) {
101
103
  return [3 /*break*/, 4];
102
104
  case 3:
103
105
  err_1 = _a.sent();
104
- if (err_1 instanceof CancellationError) { // cancelled == session closed
106
+ if (err_1 instanceof CancellationError) {
107
+ // cancelled == session closed
105
108
  return [2 /*return*/];
106
109
  }
107
- message = err_1 instanceof Error ?
108
- err_1.message :
109
- "Unknown error made it impossible to close the session";
110
+ message = err_1 instanceof Error
111
+ ? err_1.message
112
+ : "Unknown error made it impossible to close the session";
110
113
  log.error("DRM: ".concat(message));
111
114
  return [3 /*break*/, 4];
112
115
  case 4: return [2 /*return*/];
@@ -136,14 +139,14 @@ export default function closeSession(session) {
136
139
  return [3 /*break*/, 4];
137
140
  case 2:
138
141
  err_2 = _a.sent();
139
- if (timeoutCanceller.isUsed()) { // Reminder: cancelled == session closed
142
+ if (timeoutCanceller.isUsed()) {
143
+ // Reminder: cancelled == session closed
140
144
  return [2 /*return*/];
141
145
  }
142
146
  // The caught error can tell if session is closed
143
147
  // (Chrome may throw this error)
144
148
  // I know... Checking the error message is not the best practice ever.
145
- if (err_2 instanceof Error &&
146
- err_2.message === "The session is already closed.") {
149
+ if (err_2 instanceof Error && err_2.message === "The session is already closed.") {
147
150
  return [2 /*return*/];
148
151
  }
149
152
  return [4 /*yield*/, cancellableSleep(1000, timeoutCanceller.signal)];
@@ -151,7 +154,8 @@ export default function closeSession(session) {
151
154
  _a.sent();
152
155
  return [3 /*break*/, 4];
153
156
  case 4:
154
- if (timeoutCanceller.isUsed()) { // Reminder: cancelled == session closed
157
+ if (timeoutCanceller.isUsed()) {
158
+ // Reminder: cancelled == session closed
155
159
  return [2 /*return*/];
156
160
  }
157
161
  throw new Error("Compat: Couldn't know if session is closed");