rx-player 4.3.0-dev.2025012900 → 4.3.0-dev.2025030400

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 (372) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/VERSION +1 -1
  3. package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
  4. package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  5. package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  6. package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
  7. package/dist/commonjs/compat/browser_compatibility_types.d.ts +32 -13
  8. package/dist/commonjs/compat/browser_compatibility_types.d.ts.map +1 -1
  9. package/dist/commonjs/compat/browser_compatibility_types.js +12 -32
  10. package/dist/commonjs/compat/eme/close_session.d.ts +2 -2
  11. package/dist/commonjs/compat/eme/close_session.d.ts.map +1 -1
  12. package/dist/commonjs/compat/eme/custom_key_system_access.d.ts +4 -9
  13. package/dist/commonjs/compat/eme/custom_key_system_access.d.ts.map +1 -1
  14. package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.d.ts +5 -6
  15. package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.d.ts.map +1 -1
  16. package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.js +6 -4
  17. package/dist/commonjs/compat/eme/custom_media_keys/index.d.ts +0 -2
  18. package/dist/commonjs/compat/eme/custom_media_keys/index.d.ts.map +1 -1
  19. package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +4 -5
  20. package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts.map +1 -1
  21. package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +5 -6
  22. package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts.map +1 -1
  23. package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.js +1 -1
  24. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts +5 -11
  25. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
  26. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.js +2 -2
  27. package/dist/commonjs/compat/eme/eme-api-implementation.d.ts +5 -6
  28. package/dist/commonjs/compat/eme/eme-api-implementation.d.ts.map +1 -1
  29. package/dist/commonjs/compat/eme/eme-api-implementation.js +1 -0
  30. package/dist/commonjs/compat/eme/generate_key_request.d.ts +2 -2
  31. package/dist/commonjs/compat/eme/generate_key_request.d.ts.map +1 -1
  32. package/dist/commonjs/compat/eme/get_init_data.d.ts +2 -2
  33. package/dist/commonjs/compat/eme/get_init_data.d.ts.map +1 -1
  34. package/dist/commonjs/compat/eme/index.d.ts +1 -3
  35. package/dist/commonjs/compat/eme/index.d.ts.map +1 -1
  36. package/dist/commonjs/compat/eme/load_session.d.ts +2 -2
  37. package/dist/commonjs/compat/eme/load_session.d.ts.map +1 -1
  38. package/dist/commonjs/compat/eme/set_media_keys.d.ts +2 -3
  39. package/dist/commonjs/compat/eme/set_media_keys.d.ts.map +1 -1
  40. package/dist/commonjs/compat/event_listeners.d.ts +2 -3
  41. package/dist/commonjs/compat/event_listeners.d.ts.map +1 -1
  42. package/dist/commonjs/compat/remove_cue.d.ts +2 -1
  43. package/dist/commonjs/compat/remove_cue.d.ts.map +1 -1
  44. package/dist/commonjs/core/main/common/FreezeResolver.d.ts +176 -0
  45. package/dist/commonjs/core/main/common/FreezeResolver.d.ts.map +1 -0
  46. package/dist/commonjs/core/main/common/FreezeResolver.js +431 -0
  47. package/dist/commonjs/core/main/common/synchronize_sinks_on_observation.d.ts +11 -0
  48. package/dist/commonjs/core/main/common/synchronize_sinks_on_observation.d.ts.map +1 -0
  49. package/dist/commonjs/core/main/common/synchronize_sinks_on_observation.js +20 -0
  50. package/dist/commonjs/core/main/worker/content_preparer.d.ts +82 -5
  51. package/dist/commonjs/core/main/worker/content_preparer.d.ts.map +1 -1
  52. package/dist/commonjs/core/main/worker/content_preparer.js +83 -18
  53. package/dist/commonjs/core/main/worker/worker_main.d.ts.map +1 -1
  54. package/dist/commonjs/core/main/worker/worker_main.js +69 -14
  55. package/dist/commonjs/core/stream/adaptation/adaptation_stream.d.ts.map +1 -1
  56. package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +26 -4
  57. package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.d.ts.map +1 -1
  58. package/dist/commonjs/default_config.d.ts +26 -0
  59. package/dist/commonjs/default_config.d.ts.map +1 -1
  60. package/dist/commonjs/default_config.js +26 -0
  61. package/dist/commonjs/main_thread/api/option_utils.d.ts +26 -0
  62. package/dist/commonjs/main_thread/api/option_utils.d.ts.map +1 -1
  63. package/dist/commonjs/main_thread/api/option_utils.js +5 -2
  64. package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
  65. package/dist/commonjs/main_thread/api/public_api.js +14 -12
  66. package/dist/commonjs/main_thread/api/utils.d.ts +1 -2
  67. package/dist/commonjs/main_thread/api/utils.d.ts.map +1 -1
  68. package/dist/commonjs/main_thread/api/utils.js +2 -3
  69. package/dist/commonjs/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
  70. package/dist/commonjs/main_thread/decrypt/create_or_load_session.d.ts +2 -2
  71. package/dist/commonjs/main_thread/decrypt/create_or_load_session.d.ts.map +1 -1
  72. package/dist/commonjs/main_thread/decrypt/create_session.d.ts +3 -3
  73. package/dist/commonjs/main_thread/decrypt/create_session.d.ts.map +1 -1
  74. package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts +3 -4
  75. package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts.map +1 -1
  76. package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts +3 -4
  77. package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
  78. package/dist/commonjs/main_thread/decrypt/session_events_listener.d.ts +2 -2
  79. package/dist/commonjs/main_thread/decrypt/session_events_listener.d.ts.map +1 -1
  80. package/dist/commonjs/main_thread/decrypt/set_server_certificate.d.ts +3 -3
  81. package/dist/commonjs/main_thread/decrypt/set_server_certificate.d.ts.map +1 -1
  82. package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.d.ts +2 -2
  83. package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.d.ts.map +1 -1
  84. package/dist/commonjs/main_thread/decrypt/utils/is_session_usable.d.ts +2 -2
  85. package/dist/commonjs/main_thread/decrypt/utils/is_session_usable.d.ts.map +1 -1
  86. package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.d.ts +10 -10
  87. package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.d.ts.map +1 -1
  88. package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.js +2 -2
  89. package/dist/commonjs/main_thread/decrypt/utils/media_keys_attacher.d.ts +4 -4
  90. package/dist/commonjs/main_thread/decrypt/utils/media_keys_attacher.d.ts.map +1 -1
  91. package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.d.ts +5 -7
  92. package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.d.ts.map +1 -1
  93. package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.js +3 -5
  94. package/dist/commonjs/main_thread/decrypt/utils/server_certificate_store.d.ts +5 -5
  95. package/dist/commonjs/main_thread/decrypt/utils/server_certificate_store.d.ts.map +1 -1
  96. package/dist/commonjs/main_thread/init/directfile_content_initializer.js +1 -1
  97. package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts +6 -0
  98. package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts.map +1 -1
  99. package/dist/commonjs/main_thread/init/media_source_content_initializer.js +77 -25
  100. package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts +6 -0
  101. package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
  102. package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +8 -8
  103. package/dist/commonjs/main_thread/init/types.d.ts +3 -2
  104. package/dist/commonjs/main_thread/init/types.d.ts.map +1 -1
  105. package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.d.ts +2 -0
  106. package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.d.ts.map +1 -1
  107. package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.js +1 -0
  108. package/dist/commonjs/main_thread/init/utils/get_loaded_reference.d.ts +1 -3
  109. package/dist/commonjs/main_thread/init/utils/get_loaded_reference.d.ts.map +1 -1
  110. package/dist/commonjs/main_thread/init/utils/get_loaded_reference.js +4 -5
  111. package/dist/commonjs/main_thread/init/utils/rebuffering_controller.d.ts.map +1 -1
  112. package/dist/commonjs/main_thread/init/utils/rebuffering_controller.js +1 -13
  113. package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +1 -4
  114. package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts.map +1 -1
  115. package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.js +3 -5
  116. package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts +2 -2
  117. package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts.map +1 -1
  118. package/dist/commonjs/main_thread/tracks_store/tracks_store.js +16 -22
  119. package/dist/commonjs/manifest/classes/index.d.ts +2 -2
  120. package/dist/commonjs/manifest/classes/index.d.ts.map +1 -1
  121. package/dist/commonjs/manifest/classes/manifest.d.ts +17 -2
  122. package/dist/commonjs/manifest/classes/manifest.d.ts.map +1 -1
  123. package/dist/commonjs/manifest/classes/manifest.js +55 -12
  124. package/dist/commonjs/manifest/classes/representation.d.ts +9 -0
  125. package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
  126. package/dist/commonjs/manifest/classes/representation.js +1 -0
  127. package/dist/commonjs/manifest/index.d.ts +2 -2
  128. package/dist/commonjs/manifest/index.d.ts.map +1 -1
  129. package/dist/commonjs/manifest/utils.js +1 -1
  130. package/dist/commonjs/multithread_types.d.ts +8 -0
  131. package/dist/commonjs/multithread_types.d.ts.map +1 -1
  132. package/dist/commonjs/parsers/containers/isobmff/extract_complete_chunks.d.ts +1 -1
  133. package/dist/commonjs/parsers/containers/isobmff/extract_complete_chunks.js +1 -1
  134. package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.js +1 -1
  135. package/dist/commonjs/playback_observer/media_element_playback_observer.d.ts.map +1 -1
  136. package/dist/commonjs/playback_observer/media_element_playback_observer.js +6 -4
  137. package/dist/commonjs/playback_observer/types.d.ts +2 -0
  138. package/dist/commonjs/playback_observer/types.d.ts.map +1 -1
  139. package/dist/commonjs/playback_observer/worker_playback_observer.d.ts +2 -0
  140. package/dist/commonjs/playback_observer/worker_playback_observer.d.ts.map +1 -1
  141. package/dist/commonjs/public_types.d.ts +14 -0
  142. package/dist/commonjs/public_types.d.ts.map +1 -1
  143. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
  144. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  145. package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  146. package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
  147. package/dist/es2017/compat/browser_compatibility_types.d.ts +32 -13
  148. package/dist/es2017/compat/browser_compatibility_types.d.ts.map +1 -1
  149. package/dist/es2017/compat/browser_compatibility_types.js +12 -32
  150. package/dist/es2017/compat/eme/close_session.d.ts +2 -2
  151. package/dist/es2017/compat/eme/close_session.d.ts.map +1 -1
  152. package/dist/es2017/compat/eme/custom_key_system_access.d.ts +4 -9
  153. package/dist/es2017/compat/eme/custom_key_system_access.d.ts.map +1 -1
  154. package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts +5 -6
  155. package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts.map +1 -1
  156. package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.js +4 -4
  157. package/dist/es2017/compat/eme/custom_media_keys/index.d.ts +0 -2
  158. package/dist/es2017/compat/eme/custom_media_keys/index.d.ts.map +1 -1
  159. package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +4 -5
  160. package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts.map +1 -1
  161. package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +5 -6
  162. package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts.map +1 -1
  163. package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.js +1 -1
  164. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts +5 -11
  165. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
  166. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.js +2 -2
  167. package/dist/es2017/compat/eme/eme-api-implementation.d.ts +5 -6
  168. package/dist/es2017/compat/eme/eme-api-implementation.d.ts.map +1 -1
  169. package/dist/es2017/compat/eme/eme-api-implementation.js +1 -0
  170. package/dist/es2017/compat/eme/generate_key_request.d.ts +2 -2
  171. package/dist/es2017/compat/eme/generate_key_request.d.ts.map +1 -1
  172. package/dist/es2017/compat/eme/get_init_data.d.ts +2 -2
  173. package/dist/es2017/compat/eme/get_init_data.d.ts.map +1 -1
  174. package/dist/es2017/compat/eme/index.d.ts +1 -3
  175. package/dist/es2017/compat/eme/index.d.ts.map +1 -1
  176. package/dist/es2017/compat/eme/load_session.d.ts +2 -2
  177. package/dist/es2017/compat/eme/load_session.d.ts.map +1 -1
  178. package/dist/es2017/compat/eme/set_media_keys.d.ts +2 -3
  179. package/dist/es2017/compat/eme/set_media_keys.d.ts.map +1 -1
  180. package/dist/es2017/compat/event_listeners.d.ts +2 -3
  181. package/dist/es2017/compat/event_listeners.d.ts.map +1 -1
  182. package/dist/es2017/compat/remove_cue.d.ts +2 -1
  183. package/dist/es2017/compat/remove_cue.d.ts.map +1 -1
  184. package/dist/es2017/core/main/common/FreezeResolver.d.ts +176 -0
  185. package/dist/es2017/core/main/common/FreezeResolver.d.ts.map +1 -0
  186. package/dist/es2017/core/main/common/FreezeResolver.js +363 -0
  187. package/dist/es2017/core/main/common/synchronize_sinks_on_observation.d.ts +11 -0
  188. package/dist/es2017/core/main/common/synchronize_sinks_on_observation.d.ts.map +1 -0
  189. package/dist/es2017/core/main/common/synchronize_sinks_on_observation.js +17 -0
  190. package/dist/es2017/core/main/worker/content_preparer.d.ts +82 -5
  191. package/dist/es2017/core/main/worker/content_preparer.d.ts.map +1 -1
  192. package/dist/es2017/core/main/worker/content_preparer.js +82 -17
  193. package/dist/es2017/core/main/worker/worker_main.d.ts.map +1 -1
  194. package/dist/es2017/core/main/worker/worker_main.js +68 -14
  195. package/dist/es2017/core/stream/adaptation/adaptation_stream.d.ts.map +1 -1
  196. package/dist/es2017/core/stream/adaptation/adaptation_stream.js +24 -2
  197. package/dist/es2017/core/stream/orchestrator/stream_orchestrator.d.ts.map +1 -1
  198. package/dist/es2017/default_config.d.ts +26 -0
  199. package/dist/es2017/default_config.d.ts.map +1 -1
  200. package/dist/es2017/default_config.js +26 -0
  201. package/dist/es2017/main_thread/api/option_utils.d.ts +26 -0
  202. package/dist/es2017/main_thread/api/option_utils.d.ts.map +1 -1
  203. package/dist/es2017/main_thread/api/option_utils.js +4 -1
  204. package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
  205. package/dist/es2017/main_thread/api/public_api.js +14 -12
  206. package/dist/es2017/main_thread/api/utils.d.ts +1 -2
  207. package/dist/es2017/main_thread/api/utils.d.ts.map +1 -1
  208. package/dist/es2017/main_thread/api/utils.js +2 -3
  209. package/dist/es2017/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
  210. package/dist/es2017/main_thread/decrypt/create_or_load_session.d.ts +2 -2
  211. package/dist/es2017/main_thread/decrypt/create_or_load_session.d.ts.map +1 -1
  212. package/dist/es2017/main_thread/decrypt/create_session.d.ts +3 -3
  213. package/dist/es2017/main_thread/decrypt/create_session.d.ts.map +1 -1
  214. package/dist/es2017/main_thread/decrypt/find_key_system.d.ts +3 -4
  215. package/dist/es2017/main_thread/decrypt/find_key_system.d.ts.map +1 -1
  216. package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts +3 -4
  217. package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
  218. package/dist/es2017/main_thread/decrypt/session_events_listener.d.ts +2 -2
  219. package/dist/es2017/main_thread/decrypt/session_events_listener.d.ts.map +1 -1
  220. package/dist/es2017/main_thread/decrypt/set_server_certificate.d.ts +3 -3
  221. package/dist/es2017/main_thread/decrypt/set_server_certificate.d.ts.map +1 -1
  222. package/dist/es2017/main_thread/decrypt/utils/check_key_statuses.d.ts +2 -2
  223. package/dist/es2017/main_thread/decrypt/utils/check_key_statuses.d.ts.map +1 -1
  224. package/dist/es2017/main_thread/decrypt/utils/is_session_usable.d.ts +2 -2
  225. package/dist/es2017/main_thread/decrypt/utils/is_session_usable.d.ts.map +1 -1
  226. package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.d.ts +10 -10
  227. package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.d.ts.map +1 -1
  228. package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.js +2 -2
  229. package/dist/es2017/main_thread/decrypt/utils/media_keys_attacher.d.ts +4 -4
  230. package/dist/es2017/main_thread/decrypt/utils/media_keys_attacher.d.ts.map +1 -1
  231. package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.d.ts +5 -7
  232. package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.d.ts.map +1 -1
  233. package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.js +3 -5
  234. package/dist/es2017/main_thread/decrypt/utils/server_certificate_store.d.ts +5 -5
  235. package/dist/es2017/main_thread/decrypt/utils/server_certificate_store.d.ts.map +1 -1
  236. package/dist/es2017/main_thread/init/directfile_content_initializer.js +1 -1
  237. package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts +6 -0
  238. package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts.map +1 -1
  239. package/dist/es2017/main_thread/init/media_source_content_initializer.js +77 -26
  240. package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts +6 -0
  241. package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
  242. package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +8 -8
  243. package/dist/es2017/main_thread/init/types.d.ts +3 -2
  244. package/dist/es2017/main_thread/init/types.d.ts.map +1 -1
  245. package/dist/es2017/main_thread/init/utils/create_core_playback_observer.d.ts +2 -0
  246. package/dist/es2017/main_thread/init/utils/create_core_playback_observer.d.ts.map +1 -1
  247. package/dist/es2017/main_thread/init/utils/create_core_playback_observer.js +1 -0
  248. package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts +1 -3
  249. package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts.map +1 -1
  250. package/dist/es2017/main_thread/init/utils/get_loaded_reference.js +4 -5
  251. package/dist/es2017/main_thread/init/utils/rebuffering_controller.d.ts.map +1 -1
  252. package/dist/es2017/main_thread/init/utils/rebuffering_controller.js +1 -13
  253. package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +1 -4
  254. package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts.map +1 -1
  255. package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.js +3 -5
  256. package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts +2 -2
  257. package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts.map +1 -1
  258. package/dist/es2017/main_thread/tracks_store/tracks_store.js +16 -22
  259. package/dist/es2017/manifest/classes/index.d.ts +2 -2
  260. package/dist/es2017/manifest/classes/index.d.ts.map +1 -1
  261. package/dist/es2017/manifest/classes/manifest.d.ts +17 -2
  262. package/dist/es2017/manifest/classes/manifest.d.ts.map +1 -1
  263. package/dist/es2017/manifest/classes/manifest.js +32 -0
  264. package/dist/es2017/manifest/classes/representation.d.ts +9 -0
  265. package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
  266. package/dist/es2017/manifest/classes/representation.js +1 -0
  267. package/dist/es2017/manifest/index.d.ts +2 -2
  268. package/dist/es2017/manifest/index.d.ts.map +1 -1
  269. package/dist/es2017/manifest/utils.js +1 -1
  270. package/dist/es2017/multithread_types.d.ts +8 -0
  271. package/dist/es2017/multithread_types.d.ts.map +1 -1
  272. package/dist/es2017/parsers/containers/isobmff/extract_complete_chunks.d.ts +1 -1
  273. package/dist/es2017/parsers/containers/isobmff/extract_complete_chunks.js +1 -1
  274. package/dist/es2017/parsers/manifest/dash/common/parse_adaptation_sets.js +1 -1
  275. package/dist/es2017/playback_observer/media_element_playback_observer.d.ts.map +1 -1
  276. package/dist/es2017/playback_observer/media_element_playback_observer.js +6 -4
  277. package/dist/es2017/playback_observer/types.d.ts +2 -0
  278. package/dist/es2017/playback_observer/types.d.ts.map +1 -1
  279. package/dist/es2017/playback_observer/worker_playback_observer.d.ts +2 -0
  280. package/dist/es2017/playback_observer/worker_playback_observer.d.ts.map +1 -1
  281. package/dist/es2017/public_types.d.ts +14 -0
  282. package/dist/es2017/public_types.d.ts.map +1 -1
  283. package/dist/mpd-parser.wasm +0 -0
  284. package/dist/rx-player.js +489 -191
  285. package/dist/rx-player.min.js +18 -18
  286. package/dist/worker.js +6 -6
  287. package/package.json +18 -18
  288. package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
  289. package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
  290. package/src/compat/browser_compatibility_types.ts +45 -42
  291. package/src/compat/eme/close_session.ts +2 -4
  292. package/src/compat/eme/custom_key_system_access.ts +4 -11
  293. package/src/compat/eme/custom_media_keys/ie11_media_keys.ts +29 -23
  294. package/src/compat/eme/custom_media_keys/index.ts +0 -2
  295. package/src/compat/eme/custom_media_keys/moz_media_keys_constructor.ts +5 -9
  296. package/src/compat/eme/custom_media_keys/old_webkit_media_keys.ts +15 -20
  297. package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +28 -36
  298. package/src/compat/eme/eme-api-implementation.ts +16 -14
  299. package/src/compat/eme/generate_key_request.ts +2 -2
  300. package/src/compat/eme/get_init_data.ts +2 -2
  301. package/src/compat/eme/index.ts +1 -10
  302. package/src/compat/eme/load_session.ts +4 -10
  303. package/src/compat/eme/set_media_keys.ts +2 -3
  304. package/src/compat/event_listeners.ts +2 -2
  305. package/src/compat/remove_cue.ts +11 -4
  306. package/src/core/main/common/FreezeResolver.ts +584 -0
  307. package/src/core/main/common/synchronize_sinks_on_observation.ts +22 -0
  308. package/src/core/main/worker/content_preparer.ts +112 -24
  309. package/src/core/main/worker/worker_main.ts +90 -13
  310. package/src/core/stream/adaptation/adaptation_stream.ts +38 -4
  311. package/src/core/stream/orchestrator/stream_orchestrator.ts +2 -6
  312. package/src/default_config.ts +27 -0
  313. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/DRMInfos.test.ts +3 -3
  314. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/HDCPPolicy.test.ts +2 -2
  315. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/decodingInfos.test.ts +4 -4
  316. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaContentType.test.ts +2 -2
  317. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaDisplayInfos.test.ts +1 -1
  318. package/src/main_thread/api/__tests__/option_utils.test.ts +3 -0
  319. package/src/main_thread/api/option_utils.ts +30 -0
  320. package/src/main_thread/api/public_api.ts +16 -12
  321. package/src/main_thread/api/utils.ts +1 -3
  322. package/src/main_thread/decrypt/__tests__/__global__/media_key_system_access.test.ts +2 -2
  323. package/src/main_thread/decrypt/content_decryptor.ts +9 -8
  324. package/src/main_thread/decrypt/create_or_load_session.ts +3 -3
  325. package/src/main_thread/decrypt/create_session.ts +3 -3
  326. package/src/main_thread/decrypt/find_key_system.ts +5 -3
  327. package/src/main_thread/decrypt/get_media_keys.ts +9 -6
  328. package/src/main_thread/decrypt/session_events_listener.ts +3 -3
  329. package/src/main_thread/decrypt/set_server_certificate.ts +4 -4
  330. package/src/main_thread/decrypt/utils/check_key_statuses.ts +2 -2
  331. package/src/main_thread/decrypt/utils/is_session_usable.ts +2 -4
  332. package/src/main_thread/decrypt/utils/loaded_sessions_store.ts +15 -16
  333. package/src/main_thread/decrypt/utils/media_keys_attacher.ts +7 -7
  334. package/src/main_thread/decrypt/utils/persistent_sessions_store.ts +5 -7
  335. package/src/main_thread/decrypt/utils/server_certificate_store.ts +6 -12
  336. package/src/main_thread/init/directfile_content_initializer.ts +1 -1
  337. package/src/main_thread/init/media_source_content_initializer.ts +98 -36
  338. package/src/main_thread/init/multi_thread_content_initializer.ts +14 -15
  339. package/src/main_thread/init/types.ts +3 -2
  340. package/src/main_thread/init/utils/create_core_playback_observer.ts +3 -0
  341. package/src/main_thread/init/utils/get_loaded_reference.ts +3 -6
  342. package/src/main_thread/init/utils/rebuffering_controller.ts +2 -24
  343. package/src/main_thread/init/utils/stream_events_emitter/stream_events_emitter.ts +3 -7
  344. package/src/main_thread/tracks_store/tracks_store.ts +16 -26
  345. package/src/manifest/classes/__tests__/representation.test.ts +16 -0
  346. package/src/manifest/classes/index.ts +2 -2
  347. package/src/manifest/classes/manifest.ts +48 -4
  348. package/src/manifest/classes/representation.ts +10 -0
  349. package/src/manifest/index.ts +2 -2
  350. package/src/manifest/utils.ts +1 -1
  351. package/src/multithread_types.ts +8 -0
  352. package/src/parsers/containers/isobmff/extract_complete_chunks.ts +1 -1
  353. package/src/parsers/manifest/dash/common/parse_adaptation_sets.ts +1 -1
  354. package/src/playback_observer/media_element_playback_observer.ts +14 -24
  355. package/src/playback_observer/types.ts +2 -0
  356. package/src/playback_observer/worker_playback_observer.ts +2 -0
  357. package/src/public_types.ts +17 -0
  358. package/src/utils/__tests__/logger.test.ts +44 -60
  359. package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts +0 -48
  360. package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts.map +0 -1
  361. package/dist/commonjs/compat/eme/custom_media_keys/types.js +0 -17
  362. package/dist/commonjs/core/main/common/DecipherabilityFreezeDetector.d.ts +0 -80
  363. package/dist/commonjs/core/main/common/DecipherabilityFreezeDetector.d.ts.map +0 -1
  364. package/dist/commonjs/core/main/common/DecipherabilityFreezeDetector.js +0 -127
  365. package/dist/es2017/compat/eme/custom_media_keys/types.d.ts +0 -48
  366. package/dist/es2017/compat/eme/custom_media_keys/types.d.ts.map +0 -1
  367. package/dist/es2017/compat/eme/custom_media_keys/types.js +0 -16
  368. package/dist/es2017/core/main/common/DecipherabilityFreezeDetector.d.ts +0 -80
  369. package/dist/es2017/core/main/common/DecipherabilityFreezeDetector.d.ts.map +0 -1
  370. package/dist/es2017/core/main/common/DecipherabilityFreezeDetector.js +0 -91
  371. package/src/compat/eme/custom_media_keys/types.ts +0 -66
  372. package/src/core/main/common/DecipherabilityFreezeDetector.ts +0 -147
@@ -1,80 +0,0 @@
1
- /**
2
- * Copyright 2015 CANAL+ Group
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IFreezingStatus, IRebufferingStatus } from "../../../playback_observer";
17
- import type SegmentSinksStore from "../../segment_sinks";
18
- export default class DecipherabilityFreezeDetector {
19
- /** Emit the current playback conditions */
20
- private _segmentSinksStore;
21
- /**
22
- * If set to something else than `null`, this is the monotonically-raising
23
- * timestamp used by the RxPlayer when playback begin to seem to not start
24
- * despite having decipherable data in the buffer(s).
25
- *
26
- * If enough time in that condition is spent, special considerations are
27
- * taken at which point `_currentFreezeTimestamp` is reset to `null`.
28
- *
29
- * It is also reset to `null` when and if there is no such issue anymore.
30
- */
31
- private _currentFreezeTimestamp;
32
- constructor(segmentSinksStore: SegmentSinksStore);
33
- /**
34
- * Support of contents with DRM on all the platforms out there is a pain in
35
- * the *ss considering all the DRM-related bugs there are.
36
- *
37
- * We found out a frequent issue which is to be unable to play despite having
38
- * all the decryption keys to play what is currently buffered.
39
- * When this happens, re-creating the buffers from scratch, with a reload, is
40
- * usually sufficient to unlock the situation.
41
- *
42
- * Although we prefer providing more targeted fixes or telling to platform
43
- * developpers to fix their implementation, it's not always possible.
44
- * We thus resorted to developping an heuristic which detects such situation
45
- * and reload in that case.
46
- *
47
- * @param {Object} observation - The last playback observation produced, it
48
- * has to be recent (just triggered for example).
49
- * @returns {boolean} - Returns `true` if it seems to be such kind of
50
- * decipherability freeze, in which case you should probably reload the
51
- * content.
52
- */
53
- needToReload(observation: IDecipherabilityFreezeDetectorObservation): boolean;
54
- }
55
- /** Playback observation needed by the `DecipherabilityFreezeDetector`. */
56
- export interface IDecipherabilityFreezeDetectorObservation {
57
- /** Current `readyState` value on the media element. */
58
- readyState: number;
59
- /**
60
- * Set if the player is short on audio and/or video media data and is a such,
61
- * rebuffering.
62
- * `null` if not.
63
- */
64
- rebuffering: IRebufferingStatus | null;
65
- /**
66
- * Set if the player is frozen, that is, stuck in place for unknown reason.
67
- * Note that this reason can be a valid one, such as a necessary license not
68
- * being obtained yet.
69
- *
70
- * `null` if the player is not frozen.
71
- */
72
- freezing: IFreezingStatus | null;
73
- /**
74
- * Gap between `currentTime` and the next position with un-buffered data.
75
- * `Infinity` if we don't have buffered data right now.
76
- * `undefined` if we cannot determine the buffer gap.
77
- */
78
- bufferGap: number | undefined;
79
- }
80
- //# sourceMappingURL=DecipherabilityFreezeDetector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DecipherabilityFreezeDetector.d.ts","sourceRoot":"","sources":["../../../../../src/core/main/common/DecipherabilityFreezeDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEtF,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AAEzD,MAAM,CAAC,OAAO,OAAO,6BAA6B;IAChD,2CAA2C;IAC3C,OAAO,CAAC,kBAAkB,CAAoB;IAE9C;;;;;;;;;OASG;IACH,OAAO,CAAC,uBAAuB,CAAgB;gBAEnC,iBAAiB,EAAE,iBAAiB;IAKhD;;;;;;;;;;;;;;;;;;;OAmBG;IACI,YAAY,CAAC,WAAW,EAAE,yCAAyC,GAAG,OAAO;CA0DrF;AAED,0EAA0E;AAC1E,MAAM,WAAW,yCAAyC;IACxD,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,WAAW,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B"}
@@ -1,127 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright 2015 CANAL+ Group
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- var __values = (this && this.__values) || function(o) {
18
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
19
- if (m) return m.call(o);
20
- if (o && typeof o.length === "number") return {
21
- next: function () {
22
- if (o && i >= o.length) o = void 0;
23
- return { value: o && o[i++], done: !o };
24
- }
25
- };
26
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- var log_1 = require("../../../log");
30
- var monotonic_timestamp_1 = require("../../../utils/monotonic_timestamp");
31
- var DecipherabilityFreezeDetector = /** @class */ (function () {
32
- function DecipherabilityFreezeDetector(segmentSinksStore) {
33
- this._segmentSinksStore = segmentSinksStore;
34
- this._currentFreezeTimestamp = null;
35
- }
36
- /**
37
- * Support of contents with DRM on all the platforms out there is a pain in
38
- * the *ss considering all the DRM-related bugs there are.
39
- *
40
- * We found out a frequent issue which is to be unable to play despite having
41
- * all the decryption keys to play what is currently buffered.
42
- * When this happens, re-creating the buffers from scratch, with a reload, is
43
- * usually sufficient to unlock the situation.
44
- *
45
- * Although we prefer providing more targeted fixes or telling to platform
46
- * developpers to fix their implementation, it's not always possible.
47
- * We thus resorted to developping an heuristic which detects such situation
48
- * and reload in that case.
49
- *
50
- * @param {Object} observation - The last playback observation produced, it
51
- * has to be recent (just triggered for example).
52
- * @returns {boolean} - Returns `true` if it seems to be such kind of
53
- * decipherability freeze, in which case you should probably reload the
54
- * content.
55
- */
56
- DecipherabilityFreezeDetector.prototype.needToReload = function (observation) {
57
- var e_1, _a, e_2, _b;
58
- var readyState = observation.readyState, rebuffering = observation.rebuffering, freezing = observation.freezing;
59
- var bufferGap = observation.bufferGap !== undefined && isFinite(observation.bufferGap)
60
- ? observation.bufferGap
61
- : 0;
62
- if (bufferGap < 6 || (rebuffering === null && freezing === null) || readyState > 1) {
63
- this._currentFreezeTimestamp = null;
64
- return false;
65
- }
66
- var now = (0, monotonic_timestamp_1.default)();
67
- if (this._currentFreezeTimestamp === null) {
68
- this._currentFreezeTimestamp = now;
69
- }
70
- var rebufferingForTooLong = rebuffering !== null && now - rebuffering.timestamp > 4000;
71
- var frozenForTooLong = freezing !== null && now - freezing.timestamp > 4000;
72
- if ((rebufferingForTooLong || frozenForTooLong) &&
73
- (0, monotonic_timestamp_1.default)() - this._currentFreezeTimestamp > 4000) {
74
- var statusAudio = this._segmentSinksStore.getStatus("audio");
75
- var statusVideo = this._segmentSinksStore.getStatus("video");
76
- var hasOnlyDecipherableSegments = true;
77
- var isClear = true;
78
- try {
79
- for (var _c = __values([statusAudio, statusVideo]), _d = _c.next(); !_d.done; _d = _c.next()) {
80
- var status_1 = _d.value;
81
- if (status_1.type === "initialized") {
82
- try {
83
- for (var _e = (e_2 = void 0, __values(status_1.value.getLastKnownInventory())), _f = _e.next(); !_f.done; _f = _e.next()) {
84
- var segment = _f.value;
85
- var representation = segment.infos.representation;
86
- if (representation.decipherable === false) {
87
- log_1.default.warn("Init: we have undecipherable segments left in the buffer, reloading");
88
- this._currentFreezeTimestamp = null;
89
- return true;
90
- }
91
- else if (representation.contentProtections !== undefined) {
92
- isClear = false;
93
- if (representation.decipherable !== true) {
94
- hasOnlyDecipherableSegments = false;
95
- }
96
- }
97
- }
98
- }
99
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
100
- finally {
101
- try {
102
- if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
103
- }
104
- finally { if (e_2) throw e_2.error; }
105
- }
106
- }
107
- }
108
- }
109
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
110
- finally {
111
- try {
112
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
113
- }
114
- finally { if (e_1) throw e_1.error; }
115
- }
116
- if (!isClear && hasOnlyDecipherableSegments) {
117
- log_1.default.warn("Init: we are frozen despite only having decipherable " +
118
- "segments left in the buffer, reloading");
119
- this._currentFreezeTimestamp = null;
120
- return true;
121
- }
122
- }
123
- return false;
124
- };
125
- return DecipherabilityFreezeDetector;
126
- }());
127
- exports.default = DecipherabilityFreezeDetector;
@@ -1,48 +0,0 @@
1
- /**
2
- * Copyright 2015 CANAL+ Group
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IEventEmitter } from "../../../utils/event_emitter";
17
- import type { IMediaElement } from "../../browser_compatibility_types";
18
- export interface ICustomMediaKeySession extends IEventEmitter<IMediaKeySessionEvents> {
19
- readonly closed: Promise<void>;
20
- expiration: number;
21
- keyStatuses: ICustomMediaKeyStatusMap;
22
- sessionId: string;
23
- onmessage?: (message: MediaKeyMessageEvent) => void;
24
- onkeystatusesChange?: (evt: Event) => void;
25
- generateRequest(initDataType: string, initData: BufferSource | null): Promise<void>;
26
- load(sessionId: string): Promise<boolean>;
27
- update(response: BufferSource | null): Promise<void>;
28
- close(): Promise<void>;
29
- remove(): Promise<void>;
30
- }
31
- export interface ICustomMediaKeys {
32
- _setVideo: (vid: IMediaElement) => Promise<unknown>;
33
- createSession(sessionType?: MediaKeySessionType): ICustomMediaKeySession;
34
- setServerCertificate(setServerCertificate: BufferSource): Promise<void>;
35
- }
36
- export interface ICustomMediaKeyStatusMap {
37
- readonly size: number;
38
- forEach(callback: (status: MediaKeyStatus) => void, thisArg?: unknown): void;
39
- get(keyId: BufferSource | null): MediaKeyStatus | undefined;
40
- has(keyId: BufferSource | null): boolean;
41
- }
42
- export interface IMediaKeySessionEvents {
43
- [key: string]: MediaKeyMessageEvent | Event;
44
- }
45
- export interface ICustomMediaEncryptedEvent extends MediaEncryptedEvent {
46
- forceSessionRecreation?: boolean | undefined;
47
- }
48
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/compat/eme/custom_media_keys/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,WAAW,sBAAuB,SAAQ,aAAa,CAAC,sBAAsB,CAAC;IAEnF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,wBAAwB,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACpD,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IAI3C,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpF,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,aAAa,CAAC,WAAW,CAAC,EAAE,mBAAmB,GAAG,sBAAsB,CAAC;IACzE,oBAAoB,CAAC,oBAAoB,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzE;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7E,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,cAAc,GAAG,SAAS,CAAC;IAC5D,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,OAAO,CAAC;CAC1C;AAED,MAAM,WAAW,sBAAsB;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,GAAG,KAAK,CAAC;CAO7C;AAED,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB;IACrE,sBAAsB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9C"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright 2015 CANAL+ Group
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export {};
@@ -1,80 +0,0 @@
1
- /**
2
- * Copyright 2015 CANAL+ Group
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IFreezingStatus, IRebufferingStatus } from "../../../playback_observer";
17
- import type SegmentSinksStore from "../../segment_sinks";
18
- export default class DecipherabilityFreezeDetector {
19
- /** Emit the current playback conditions */
20
- private _segmentSinksStore;
21
- /**
22
- * If set to something else than `null`, this is the monotonically-raising
23
- * timestamp used by the RxPlayer when playback begin to seem to not start
24
- * despite having decipherable data in the buffer(s).
25
- *
26
- * If enough time in that condition is spent, special considerations are
27
- * taken at which point `_currentFreezeTimestamp` is reset to `null`.
28
- *
29
- * It is also reset to `null` when and if there is no such issue anymore.
30
- */
31
- private _currentFreezeTimestamp;
32
- constructor(segmentSinksStore: SegmentSinksStore);
33
- /**
34
- * Support of contents with DRM on all the platforms out there is a pain in
35
- * the *ss considering all the DRM-related bugs there are.
36
- *
37
- * We found out a frequent issue which is to be unable to play despite having
38
- * all the decryption keys to play what is currently buffered.
39
- * When this happens, re-creating the buffers from scratch, with a reload, is
40
- * usually sufficient to unlock the situation.
41
- *
42
- * Although we prefer providing more targeted fixes or telling to platform
43
- * developpers to fix their implementation, it's not always possible.
44
- * We thus resorted to developping an heuristic which detects such situation
45
- * and reload in that case.
46
- *
47
- * @param {Object} observation - The last playback observation produced, it
48
- * has to be recent (just triggered for example).
49
- * @returns {boolean} - Returns `true` if it seems to be such kind of
50
- * decipherability freeze, in which case you should probably reload the
51
- * content.
52
- */
53
- needToReload(observation: IDecipherabilityFreezeDetectorObservation): boolean;
54
- }
55
- /** Playback observation needed by the `DecipherabilityFreezeDetector`. */
56
- export interface IDecipherabilityFreezeDetectorObservation {
57
- /** Current `readyState` value on the media element. */
58
- readyState: number;
59
- /**
60
- * Set if the player is short on audio and/or video media data and is a such,
61
- * rebuffering.
62
- * `null` if not.
63
- */
64
- rebuffering: IRebufferingStatus | null;
65
- /**
66
- * Set if the player is frozen, that is, stuck in place for unknown reason.
67
- * Note that this reason can be a valid one, such as a necessary license not
68
- * being obtained yet.
69
- *
70
- * `null` if the player is not frozen.
71
- */
72
- freezing: IFreezingStatus | null;
73
- /**
74
- * Gap between `currentTime` and the next position with un-buffered data.
75
- * `Infinity` if we don't have buffered data right now.
76
- * `undefined` if we cannot determine the buffer gap.
77
- */
78
- bufferGap: number | undefined;
79
- }
80
- //# sourceMappingURL=DecipherabilityFreezeDetector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DecipherabilityFreezeDetector.d.ts","sourceRoot":"","sources":["../../../../../src/core/main/common/DecipherabilityFreezeDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEtF,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AAEzD,MAAM,CAAC,OAAO,OAAO,6BAA6B;IAChD,2CAA2C;IAC3C,OAAO,CAAC,kBAAkB,CAAoB;IAE9C;;;;;;;;;OASG;IACH,OAAO,CAAC,uBAAuB,CAAgB;gBAEnC,iBAAiB,EAAE,iBAAiB;IAKhD;;;;;;;;;;;;;;;;;;;OAmBG;IACI,YAAY,CAAC,WAAW,EAAE,yCAAyC,GAAG,OAAO;CA0DrF;AAED,0EAA0E;AAC1E,MAAM,WAAW,yCAAyC;IACxD,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,WAAW,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B"}
@@ -1,91 +0,0 @@
1
- /**
2
- * Copyright 2015 CANAL+ Group
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import log from "../../../log";
17
- import getMonotonicTimeStamp from "../../../utils/monotonic_timestamp";
18
- export default class DecipherabilityFreezeDetector {
19
- constructor(segmentSinksStore) {
20
- this._segmentSinksStore = segmentSinksStore;
21
- this._currentFreezeTimestamp = null;
22
- }
23
- /**
24
- * Support of contents with DRM on all the platforms out there is a pain in
25
- * the *ss considering all the DRM-related bugs there are.
26
- *
27
- * We found out a frequent issue which is to be unable to play despite having
28
- * all the decryption keys to play what is currently buffered.
29
- * When this happens, re-creating the buffers from scratch, with a reload, is
30
- * usually sufficient to unlock the situation.
31
- *
32
- * Although we prefer providing more targeted fixes or telling to platform
33
- * developpers to fix their implementation, it's not always possible.
34
- * We thus resorted to developping an heuristic which detects such situation
35
- * and reload in that case.
36
- *
37
- * @param {Object} observation - The last playback observation produced, it
38
- * has to be recent (just triggered for example).
39
- * @returns {boolean} - Returns `true` if it seems to be such kind of
40
- * decipherability freeze, in which case you should probably reload the
41
- * content.
42
- */
43
- needToReload(observation) {
44
- const { readyState, rebuffering, freezing } = observation;
45
- const bufferGap = observation.bufferGap !== undefined && isFinite(observation.bufferGap)
46
- ? observation.bufferGap
47
- : 0;
48
- if (bufferGap < 6 || (rebuffering === null && freezing === null) || readyState > 1) {
49
- this._currentFreezeTimestamp = null;
50
- return false;
51
- }
52
- const now = getMonotonicTimeStamp();
53
- if (this._currentFreezeTimestamp === null) {
54
- this._currentFreezeTimestamp = now;
55
- }
56
- const rebufferingForTooLong = rebuffering !== null && now - rebuffering.timestamp > 4000;
57
- const frozenForTooLong = freezing !== null && now - freezing.timestamp > 4000;
58
- if ((rebufferingForTooLong || frozenForTooLong) &&
59
- getMonotonicTimeStamp() - this._currentFreezeTimestamp > 4000) {
60
- const statusAudio = this._segmentSinksStore.getStatus("audio");
61
- const statusVideo = this._segmentSinksStore.getStatus("video");
62
- let hasOnlyDecipherableSegments = true;
63
- let isClear = true;
64
- for (const status of [statusAudio, statusVideo]) {
65
- if (status.type === "initialized") {
66
- for (const segment of status.value.getLastKnownInventory()) {
67
- const { representation } = segment.infos;
68
- if (representation.decipherable === false) {
69
- log.warn("Init: we have undecipherable segments left in the buffer, reloading");
70
- this._currentFreezeTimestamp = null;
71
- return true;
72
- }
73
- else if (representation.contentProtections !== undefined) {
74
- isClear = false;
75
- if (representation.decipherable !== true) {
76
- hasOnlyDecipherableSegments = false;
77
- }
78
- }
79
- }
80
- }
81
- }
82
- if (!isClear && hasOnlyDecipherableSegments) {
83
- log.warn("Init: we are frozen despite only having decipherable " +
84
- "segments left in the buffer, reloading");
85
- this._currentFreezeTimestamp = null;
86
- return true;
87
- }
88
- }
89
- return false;
90
- }
91
- }
@@ -1,66 +0,0 @@
1
- /**
2
- * Copyright 2015 CANAL+ Group
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import type { IEventEmitter } from "../../../utils/event_emitter";
18
- import type { IMediaElement } from "../../browser_compatibility_types";
19
-
20
- export interface ICustomMediaKeySession extends IEventEmitter<IMediaKeySessionEvents> {
21
- // Attributes
22
- readonly closed: Promise<void>;
23
- expiration: number;
24
- keyStatuses: ICustomMediaKeyStatusMap;
25
- sessionId: string;
26
-
27
- // Event handlers
28
- onmessage?: (message: MediaKeyMessageEvent) => void;
29
- onkeystatusesChange?: (evt: Event) => void;
30
-
31
- // Functions
32
-
33
- generateRequest(initDataType: string, initData: BufferSource | null): Promise<void>;
34
-
35
- load(sessionId: string): Promise<boolean>;
36
- update(response: BufferSource | null): Promise<void>;
37
- close(): Promise<void>;
38
- remove(): Promise<void>;
39
- }
40
-
41
- export interface ICustomMediaKeys {
42
- _setVideo: (vid: IMediaElement) => Promise<unknown>;
43
- createSession(sessionType?: MediaKeySessionType): ICustomMediaKeySession;
44
- setServerCertificate(setServerCertificate: BufferSource): Promise<void>;
45
- }
46
-
47
- export interface ICustomMediaKeyStatusMap {
48
- readonly size: number;
49
- forEach(callback: (status: MediaKeyStatus) => void, thisArg?: unknown): void;
50
- get(keyId: BufferSource | null): MediaKeyStatus | undefined;
51
- has(keyId: BufferSource | null): boolean;
52
- }
53
-
54
- export interface IMediaKeySessionEvents {
55
- [key: string]: MediaKeyMessageEvent | Event;
56
- // "keymessage"
57
- // "message"
58
- // "keyadded"
59
- // "ready"
60
- // "keyerror"
61
- /* "error" */
62
- }
63
-
64
- export interface ICustomMediaEncryptedEvent extends MediaEncryptedEvent {
65
- forceSessionRecreation?: boolean | undefined;
66
- }
@@ -1,147 +0,0 @@
1
- /**
2
- * Copyright 2015 CANAL+ Group
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import log from "../../../log";
18
- import type { IFreezingStatus, IRebufferingStatus } from "../../../playback_observer";
19
- import getMonotonicTimeStamp from "../../../utils/monotonic_timestamp";
20
- import type SegmentSinksStore from "../../segment_sinks";
21
-
22
- export default class DecipherabilityFreezeDetector {
23
- /** Emit the current playback conditions */
24
- private _segmentSinksStore: SegmentSinksStore;
25
-
26
- /**
27
- * If set to something else than `null`, this is the monotonically-raising
28
- * timestamp used by the RxPlayer when playback begin to seem to not start
29
- * despite having decipherable data in the buffer(s).
30
- *
31
- * If enough time in that condition is spent, special considerations are
32
- * taken at which point `_currentFreezeTimestamp` is reset to `null`.
33
- *
34
- * It is also reset to `null` when and if there is no such issue anymore.
35
- */
36
- private _currentFreezeTimestamp: number | null;
37
-
38
- constructor(segmentSinksStore: SegmentSinksStore) {
39
- this._segmentSinksStore = segmentSinksStore;
40
- this._currentFreezeTimestamp = null;
41
- }
42
-
43
- /**
44
- * Support of contents with DRM on all the platforms out there is a pain in
45
- * the *ss considering all the DRM-related bugs there are.
46
- *
47
- * We found out a frequent issue which is to be unable to play despite having
48
- * all the decryption keys to play what is currently buffered.
49
- * When this happens, re-creating the buffers from scratch, with a reload, is
50
- * usually sufficient to unlock the situation.
51
- *
52
- * Although we prefer providing more targeted fixes or telling to platform
53
- * developpers to fix their implementation, it's not always possible.
54
- * We thus resorted to developping an heuristic which detects such situation
55
- * and reload in that case.
56
- *
57
- * @param {Object} observation - The last playback observation produced, it
58
- * has to be recent (just triggered for example).
59
- * @returns {boolean} - Returns `true` if it seems to be such kind of
60
- * decipherability freeze, in which case you should probably reload the
61
- * content.
62
- */
63
- public needToReload(observation: IDecipherabilityFreezeDetectorObservation): boolean {
64
- const { readyState, rebuffering, freezing } = observation;
65
- const bufferGap =
66
- observation.bufferGap !== undefined && isFinite(observation.bufferGap)
67
- ? observation.bufferGap
68
- : 0;
69
- if (bufferGap < 6 || (rebuffering === null && freezing === null) || readyState > 1) {
70
- this._currentFreezeTimestamp = null;
71
- return false;
72
- }
73
-
74
- const now = getMonotonicTimeStamp();
75
- if (this._currentFreezeTimestamp === null) {
76
- this._currentFreezeTimestamp = now;
77
- }
78
- const rebufferingForTooLong =
79
- rebuffering !== null && now - rebuffering.timestamp > 4000;
80
- const frozenForTooLong = freezing !== null && now - freezing.timestamp > 4000;
81
-
82
- if (
83
- (rebufferingForTooLong || frozenForTooLong) &&
84
- getMonotonicTimeStamp() - this._currentFreezeTimestamp > 4000
85
- ) {
86
- const statusAudio = this._segmentSinksStore.getStatus("audio");
87
- const statusVideo = this._segmentSinksStore.getStatus("video");
88
- let hasOnlyDecipherableSegments = true;
89
- let isClear = true;
90
- for (const status of [statusAudio, statusVideo]) {
91
- if (status.type === "initialized") {
92
- for (const segment of status.value.getLastKnownInventory()) {
93
- const { representation } = segment.infos;
94
- if (representation.decipherable === false) {
95
- log.warn(
96
- "Init: we have undecipherable segments left in the buffer, reloading",
97
- );
98
- this._currentFreezeTimestamp = null;
99
- return true;
100
- } else if (representation.contentProtections !== undefined) {
101
- isClear = false;
102
- if (representation.decipherable !== true) {
103
- hasOnlyDecipherableSegments = false;
104
- }
105
- }
106
- }
107
- }
108
- }
109
-
110
- if (!isClear && hasOnlyDecipherableSegments) {
111
- log.warn(
112
- "Init: we are frozen despite only having decipherable " +
113
- "segments left in the buffer, reloading",
114
- );
115
- this._currentFreezeTimestamp = null;
116
- return true;
117
- }
118
- }
119
- return false;
120
- }
121
- }
122
-
123
- /** Playback observation needed by the `DecipherabilityFreezeDetector`. */
124
- export interface IDecipherabilityFreezeDetectorObservation {
125
- /** Current `readyState` value on the media element. */
126
- readyState: number;
127
- /**
128
- * Set if the player is short on audio and/or video media data and is a such,
129
- * rebuffering.
130
- * `null` if not.
131
- */
132
- rebuffering: IRebufferingStatus | null;
133
- /**
134
- * Set if the player is frozen, that is, stuck in place for unknown reason.
135
- * Note that this reason can be a valid one, such as a necessary license not
136
- * being obtained yet.
137
- *
138
- * `null` if the player is not frozen.
139
- */
140
- freezing: IFreezingStatus | null;
141
- /**
142
- * Gap between `currentTime` and the next position with un-buffered data.
143
- * `Infinity` if we don't have buffered data right now.
144
- * `undefined` if we cannot determine the buffer gap.
145
- */
146
- bufferGap: number | undefined;
147
- }