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.
- package/CHANGELOG.md +10 -2
- package/VERSION +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/commonjs/compat/browser_compatibility_types.d.ts +32 -13
- package/dist/commonjs/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/commonjs/compat/browser_compatibility_types.js +12 -32
- package/dist/commonjs/compat/eme/close_session.d.ts +2 -2
- package/dist/commonjs/compat/eme/close_session.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_key_system_access.d.ts +4 -9
- package/dist/commonjs/compat/eme/custom_key_system_access.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.d.ts +5 -6
- package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.js +6 -4
- package/dist/commonjs/compat/eme/custom_media_keys/index.d.ts +0 -2
- package/dist/commonjs/compat/eme/custom_media_keys/index.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +4 -5
- package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +5 -6
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.js +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts +5 -11
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.js +2 -2
- package/dist/commonjs/compat/eme/eme-api-implementation.d.ts +5 -6
- package/dist/commonjs/compat/eme/eme-api-implementation.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/eme-api-implementation.js +1 -0
- package/dist/commonjs/compat/eme/generate_key_request.d.ts +2 -2
- package/dist/commonjs/compat/eme/generate_key_request.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/get_init_data.d.ts +2 -2
- package/dist/commonjs/compat/eme/get_init_data.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/index.d.ts +1 -3
- package/dist/commonjs/compat/eme/index.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/load_session.d.ts +2 -2
- package/dist/commonjs/compat/eme/load_session.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/set_media_keys.d.ts +2 -3
- package/dist/commonjs/compat/eme/set_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/event_listeners.d.ts +2 -3
- package/dist/commonjs/compat/event_listeners.d.ts.map +1 -1
- package/dist/commonjs/compat/remove_cue.d.ts +2 -1
- package/dist/commonjs/compat/remove_cue.d.ts.map +1 -1
- package/dist/commonjs/core/main/common/FreezeResolver.d.ts +176 -0
- package/dist/commonjs/core/main/common/FreezeResolver.d.ts.map +1 -0
- package/dist/commonjs/core/main/common/FreezeResolver.js +431 -0
- package/dist/commonjs/core/main/common/synchronize_sinks_on_observation.d.ts +11 -0
- package/dist/commonjs/core/main/common/synchronize_sinks_on_observation.d.ts.map +1 -0
- package/dist/commonjs/core/main/common/synchronize_sinks_on_observation.js +20 -0
- package/dist/commonjs/core/main/worker/content_preparer.d.ts +82 -5
- package/dist/commonjs/core/main/worker/content_preparer.d.ts.map +1 -1
- package/dist/commonjs/core/main/worker/content_preparer.js +83 -18
- package/dist/commonjs/core/main/worker/worker_main.d.ts.map +1 -1
- package/dist/commonjs/core/main/worker/worker_main.js +69 -14
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.d.ts.map +1 -1
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +26 -4
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.d.ts.map +1 -1
- package/dist/commonjs/default_config.d.ts +26 -0
- package/dist/commonjs/default_config.d.ts.map +1 -1
- package/dist/commonjs/default_config.js +26 -0
- package/dist/commonjs/main_thread/api/option_utils.d.ts +26 -0
- package/dist/commonjs/main_thread/api/option_utils.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/option_utils.js +5 -2
- package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/public_api.js +14 -12
- package/dist/commonjs/main_thread/api/utils.d.ts +1 -2
- package/dist/commonjs/main_thread/api/utils.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/utils.js +2 -3
- package/dist/commonjs/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/create_or_load_session.d.ts +2 -2
- package/dist/commonjs/main_thread/decrypt/create_or_load_session.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/create_session.d.ts +3 -3
- package/dist/commonjs/main_thread/decrypt/create_session.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts +3 -4
- package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts +3 -4
- package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/session_events_listener.d.ts +2 -2
- package/dist/commonjs/main_thread/decrypt/session_events_listener.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/set_server_certificate.d.ts +3 -3
- package/dist/commonjs/main_thread/decrypt/set_server_certificate.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.d.ts +2 -2
- package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/is_session_usable.d.ts +2 -2
- package/dist/commonjs/main_thread/decrypt/utils/is_session_usable.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.d.ts +10 -10
- package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.js +2 -2
- package/dist/commonjs/main_thread/decrypt/utils/media_keys_attacher.d.ts +4 -4
- package/dist/commonjs/main_thread/decrypt/utils/media_keys_attacher.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.d.ts +5 -7
- package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.js +3 -5
- package/dist/commonjs/main_thread/decrypt/utils/server_certificate_store.d.ts +5 -5
- package/dist/commonjs/main_thread/decrypt/utils/server_certificate_store.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/directfile_content_initializer.js +1 -1
- package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts +6 -0
- package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/media_source_content_initializer.js +77 -25
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts +6 -0
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +8 -8
- package/dist/commonjs/main_thread/init/types.d.ts +3 -2
- package/dist/commonjs/main_thread/init/types.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.d.ts +2 -0
- package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.js +1 -0
- package/dist/commonjs/main_thread/init/utils/get_loaded_reference.d.ts +1 -3
- package/dist/commonjs/main_thread/init/utils/get_loaded_reference.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/get_loaded_reference.js +4 -5
- package/dist/commonjs/main_thread/init/utils/rebuffering_controller.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/rebuffering_controller.js +1 -13
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +1 -4
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.js +3 -5
- package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts +2 -2
- package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts.map +1 -1
- package/dist/commonjs/main_thread/tracks_store/tracks_store.js +16 -22
- package/dist/commonjs/manifest/classes/index.d.ts +2 -2
- package/dist/commonjs/manifest/classes/index.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/manifest.d.ts +17 -2
- package/dist/commonjs/manifest/classes/manifest.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/manifest.js +55 -12
- package/dist/commonjs/manifest/classes/representation.d.ts +9 -0
- package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/representation.js +1 -0
- package/dist/commonjs/manifest/index.d.ts +2 -2
- package/dist/commonjs/manifest/index.d.ts.map +1 -1
- package/dist/commonjs/manifest/utils.js +1 -1
- package/dist/commonjs/multithread_types.d.ts +8 -0
- package/dist/commonjs/multithread_types.d.ts.map +1 -1
- package/dist/commonjs/parsers/containers/isobmff/extract_complete_chunks.d.ts +1 -1
- package/dist/commonjs/parsers/containers/isobmff/extract_complete_chunks.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.js +1 -1
- package/dist/commonjs/playback_observer/media_element_playback_observer.d.ts.map +1 -1
- package/dist/commonjs/playback_observer/media_element_playback_observer.js +6 -4
- package/dist/commonjs/playback_observer/types.d.ts +2 -0
- package/dist/commonjs/playback_observer/types.d.ts.map +1 -1
- package/dist/commonjs/playback_observer/worker_playback_observer.d.ts +2 -0
- package/dist/commonjs/playback_observer/worker_playback_observer.d.ts.map +1 -1
- package/dist/commonjs/public_types.d.ts +14 -0
- package/dist/commonjs/public_types.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/es2017/compat/browser_compatibility_types.d.ts +32 -13
- package/dist/es2017/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/es2017/compat/browser_compatibility_types.js +12 -32
- package/dist/es2017/compat/eme/close_session.d.ts +2 -2
- package/dist/es2017/compat/eme/close_session.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_key_system_access.d.ts +4 -9
- package/dist/es2017/compat/eme/custom_key_system_access.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts +5 -6
- package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.js +4 -4
- package/dist/es2017/compat/eme/custom_media_keys/index.d.ts +0 -2
- package/dist/es2017/compat/eme/custom_media_keys/index.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +4 -5
- package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +5 -6
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.js +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts +5 -11
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.js +2 -2
- package/dist/es2017/compat/eme/eme-api-implementation.d.ts +5 -6
- package/dist/es2017/compat/eme/eme-api-implementation.d.ts.map +1 -1
- package/dist/es2017/compat/eme/eme-api-implementation.js +1 -0
- package/dist/es2017/compat/eme/generate_key_request.d.ts +2 -2
- package/dist/es2017/compat/eme/generate_key_request.d.ts.map +1 -1
- package/dist/es2017/compat/eme/get_init_data.d.ts +2 -2
- package/dist/es2017/compat/eme/get_init_data.d.ts.map +1 -1
- package/dist/es2017/compat/eme/index.d.ts +1 -3
- package/dist/es2017/compat/eme/index.d.ts.map +1 -1
- package/dist/es2017/compat/eme/load_session.d.ts +2 -2
- package/dist/es2017/compat/eme/load_session.d.ts.map +1 -1
- package/dist/es2017/compat/eme/set_media_keys.d.ts +2 -3
- package/dist/es2017/compat/eme/set_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/event_listeners.d.ts +2 -3
- package/dist/es2017/compat/event_listeners.d.ts.map +1 -1
- package/dist/es2017/compat/remove_cue.d.ts +2 -1
- package/dist/es2017/compat/remove_cue.d.ts.map +1 -1
- package/dist/es2017/core/main/common/FreezeResolver.d.ts +176 -0
- package/dist/es2017/core/main/common/FreezeResolver.d.ts.map +1 -0
- package/dist/es2017/core/main/common/FreezeResolver.js +363 -0
- package/dist/es2017/core/main/common/synchronize_sinks_on_observation.d.ts +11 -0
- package/dist/es2017/core/main/common/synchronize_sinks_on_observation.d.ts.map +1 -0
- package/dist/es2017/core/main/common/synchronize_sinks_on_observation.js +17 -0
- package/dist/es2017/core/main/worker/content_preparer.d.ts +82 -5
- package/dist/es2017/core/main/worker/content_preparer.d.ts.map +1 -1
- package/dist/es2017/core/main/worker/content_preparer.js +82 -17
- package/dist/es2017/core/main/worker/worker_main.d.ts.map +1 -1
- package/dist/es2017/core/main/worker/worker_main.js +68 -14
- package/dist/es2017/core/stream/adaptation/adaptation_stream.d.ts.map +1 -1
- package/dist/es2017/core/stream/adaptation/adaptation_stream.js +24 -2
- package/dist/es2017/core/stream/orchestrator/stream_orchestrator.d.ts.map +1 -1
- package/dist/es2017/default_config.d.ts +26 -0
- package/dist/es2017/default_config.d.ts.map +1 -1
- package/dist/es2017/default_config.js +26 -0
- package/dist/es2017/main_thread/api/option_utils.d.ts +26 -0
- package/dist/es2017/main_thread/api/option_utils.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/option_utils.js +4 -1
- package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/public_api.js +14 -12
- package/dist/es2017/main_thread/api/utils.d.ts +1 -2
- package/dist/es2017/main_thread/api/utils.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/utils.js +2 -3
- package/dist/es2017/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/create_or_load_session.d.ts +2 -2
- package/dist/es2017/main_thread/decrypt/create_or_load_session.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/create_session.d.ts +3 -3
- package/dist/es2017/main_thread/decrypt/create_session.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/find_key_system.d.ts +3 -4
- package/dist/es2017/main_thread/decrypt/find_key_system.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts +3 -4
- package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/session_events_listener.d.ts +2 -2
- package/dist/es2017/main_thread/decrypt/session_events_listener.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/set_server_certificate.d.ts +3 -3
- package/dist/es2017/main_thread/decrypt/set_server_certificate.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/utils/check_key_statuses.d.ts +2 -2
- package/dist/es2017/main_thread/decrypt/utils/check_key_statuses.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/utils/is_session_usable.d.ts +2 -2
- package/dist/es2017/main_thread/decrypt/utils/is_session_usable.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.d.ts +10 -10
- package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.js +2 -2
- package/dist/es2017/main_thread/decrypt/utils/media_keys_attacher.d.ts +4 -4
- package/dist/es2017/main_thread/decrypt/utils/media_keys_attacher.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.d.ts +5 -7
- package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.js +3 -5
- package/dist/es2017/main_thread/decrypt/utils/server_certificate_store.d.ts +5 -5
- package/dist/es2017/main_thread/decrypt/utils/server_certificate_store.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/directfile_content_initializer.js +1 -1
- package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts +6 -0
- package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/media_source_content_initializer.js +77 -26
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts +6 -0
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +8 -8
- package/dist/es2017/main_thread/init/types.d.ts +3 -2
- package/dist/es2017/main_thread/init/types.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/create_core_playback_observer.d.ts +2 -0
- package/dist/es2017/main_thread/init/utils/create_core_playback_observer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/create_core_playback_observer.js +1 -0
- package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts +1 -3
- package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/get_loaded_reference.js +4 -5
- package/dist/es2017/main_thread/init/utils/rebuffering_controller.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/rebuffering_controller.js +1 -13
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +1 -4
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.js +3 -5
- package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts +2 -2
- package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts.map +1 -1
- package/dist/es2017/main_thread/tracks_store/tracks_store.js +16 -22
- package/dist/es2017/manifest/classes/index.d.ts +2 -2
- package/dist/es2017/manifest/classes/index.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/manifest.d.ts +17 -2
- package/dist/es2017/manifest/classes/manifest.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/manifest.js +32 -0
- package/dist/es2017/manifest/classes/representation.d.ts +9 -0
- package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/representation.js +1 -0
- package/dist/es2017/manifest/index.d.ts +2 -2
- package/dist/es2017/manifest/index.d.ts.map +1 -1
- package/dist/es2017/manifest/utils.js +1 -1
- package/dist/es2017/multithread_types.d.ts +8 -0
- package/dist/es2017/multithread_types.d.ts.map +1 -1
- package/dist/es2017/parsers/containers/isobmff/extract_complete_chunks.d.ts +1 -1
- package/dist/es2017/parsers/containers/isobmff/extract_complete_chunks.js +1 -1
- package/dist/es2017/parsers/manifest/dash/common/parse_adaptation_sets.js +1 -1
- package/dist/es2017/playback_observer/media_element_playback_observer.d.ts.map +1 -1
- package/dist/es2017/playback_observer/media_element_playback_observer.js +6 -4
- package/dist/es2017/playback_observer/types.d.ts +2 -0
- package/dist/es2017/playback_observer/types.d.ts.map +1 -1
- package/dist/es2017/playback_observer/worker_playback_observer.d.ts +2 -0
- package/dist/es2017/playback_observer/worker_playback_observer.d.ts.map +1 -1
- package/dist/es2017/public_types.d.ts +14 -0
- package/dist/es2017/public_types.d.ts.map +1 -1
- package/dist/mpd-parser.wasm +0 -0
- package/dist/rx-player.js +489 -191
- package/dist/rx-player.min.js +18 -18
- package/dist/worker.js +6 -6
- package/package.json +18 -18
- package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/compat/browser_compatibility_types.ts +45 -42
- package/src/compat/eme/close_session.ts +2 -4
- package/src/compat/eme/custom_key_system_access.ts +4 -11
- package/src/compat/eme/custom_media_keys/ie11_media_keys.ts +29 -23
- package/src/compat/eme/custom_media_keys/index.ts +0 -2
- package/src/compat/eme/custom_media_keys/moz_media_keys_constructor.ts +5 -9
- package/src/compat/eme/custom_media_keys/old_webkit_media_keys.ts +15 -20
- package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +28 -36
- package/src/compat/eme/eme-api-implementation.ts +16 -14
- package/src/compat/eme/generate_key_request.ts +2 -2
- package/src/compat/eme/get_init_data.ts +2 -2
- package/src/compat/eme/index.ts +1 -10
- package/src/compat/eme/load_session.ts +4 -10
- package/src/compat/eme/set_media_keys.ts +2 -3
- package/src/compat/event_listeners.ts +2 -2
- package/src/compat/remove_cue.ts +11 -4
- package/src/core/main/common/FreezeResolver.ts +584 -0
- package/src/core/main/common/synchronize_sinks_on_observation.ts +22 -0
- package/src/core/main/worker/content_preparer.ts +112 -24
- package/src/core/main/worker/worker_main.ts +90 -13
- package/src/core/stream/adaptation/adaptation_stream.ts +38 -4
- package/src/core/stream/orchestrator/stream_orchestrator.ts +2 -6
- package/src/default_config.ts +27 -0
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/DRMInfos.test.ts +3 -3
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/HDCPPolicy.test.ts +2 -2
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/decodingInfos.test.ts +4 -4
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaContentType.test.ts +2 -2
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaDisplayInfos.test.ts +1 -1
- package/src/main_thread/api/__tests__/option_utils.test.ts +3 -0
- package/src/main_thread/api/option_utils.ts +30 -0
- package/src/main_thread/api/public_api.ts +16 -12
- package/src/main_thread/api/utils.ts +1 -3
- package/src/main_thread/decrypt/__tests__/__global__/media_key_system_access.test.ts +2 -2
- package/src/main_thread/decrypt/content_decryptor.ts +9 -8
- package/src/main_thread/decrypt/create_or_load_session.ts +3 -3
- package/src/main_thread/decrypt/create_session.ts +3 -3
- package/src/main_thread/decrypt/find_key_system.ts +5 -3
- package/src/main_thread/decrypt/get_media_keys.ts +9 -6
- package/src/main_thread/decrypt/session_events_listener.ts +3 -3
- package/src/main_thread/decrypt/set_server_certificate.ts +4 -4
- package/src/main_thread/decrypt/utils/check_key_statuses.ts +2 -2
- package/src/main_thread/decrypt/utils/is_session_usable.ts +2 -4
- package/src/main_thread/decrypt/utils/loaded_sessions_store.ts +15 -16
- package/src/main_thread/decrypt/utils/media_keys_attacher.ts +7 -7
- package/src/main_thread/decrypt/utils/persistent_sessions_store.ts +5 -7
- package/src/main_thread/decrypt/utils/server_certificate_store.ts +6 -12
- package/src/main_thread/init/directfile_content_initializer.ts +1 -1
- package/src/main_thread/init/media_source_content_initializer.ts +98 -36
- package/src/main_thread/init/multi_thread_content_initializer.ts +14 -15
- package/src/main_thread/init/types.ts +3 -2
- package/src/main_thread/init/utils/create_core_playback_observer.ts +3 -0
- package/src/main_thread/init/utils/get_loaded_reference.ts +3 -6
- package/src/main_thread/init/utils/rebuffering_controller.ts +2 -24
- package/src/main_thread/init/utils/stream_events_emitter/stream_events_emitter.ts +3 -7
- package/src/main_thread/tracks_store/tracks_store.ts +16 -26
- package/src/manifest/classes/__tests__/representation.test.ts +16 -0
- package/src/manifest/classes/index.ts +2 -2
- package/src/manifest/classes/manifest.ts +48 -4
- package/src/manifest/classes/representation.ts +10 -0
- package/src/manifest/index.ts +2 -2
- package/src/manifest/utils.ts +1 -1
- package/src/multithread_types.ts +8 -0
- package/src/parsers/containers/isobmff/extract_complete_chunks.ts +1 -1
- package/src/parsers/manifest/dash/common/parse_adaptation_sets.ts +1 -1
- package/src/playback_observer/media_element_playback_observer.ts +14 -24
- package/src/playback_observer/types.ts +2 -0
- package/src/playback_observer/worker_playback_observer.ts +2 -0
- package/src/public_types.ts +17 -0
- package/src/utils/__tests__/logger.test.ts +44 -60
- package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts +0 -48
- package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts.map +0 -1
- package/dist/commonjs/compat/eme/custom_media_keys/types.js +0 -17
- package/dist/commonjs/core/main/common/DecipherabilityFreezeDetector.d.ts +0 -80
- package/dist/commonjs/core/main/common/DecipherabilityFreezeDetector.d.ts.map +0 -1
- package/dist/commonjs/core/main/common/DecipherabilityFreezeDetector.js +0 -127
- package/dist/es2017/compat/eme/custom_media_keys/types.d.ts +0 -48
- package/dist/es2017/compat/eme/custom_media_keys/types.d.ts.map +0 -1
- package/dist/es2017/compat/eme/custom_media_keys/types.js +0 -16
- package/dist/es2017/core/main/common/DecipherabilityFreezeDetector.d.ts +0 -80
- package/dist/es2017/core/main/common/DecipherabilityFreezeDetector.d.ts.map +0 -1
- package/dist/es2017/core/main/common/DecipherabilityFreezeDetector.js +0 -91
- package/src/compat/eme/custom_media_keys/types.ts +0 -66
- package/src/core/main/common/DecipherabilityFreezeDetector.ts +0 -147
|
@@ -65,29 +65,55 @@ export interface IParsedConstructorOptions {
|
|
|
65
65
|
/**
|
|
66
66
|
* Base type which the types for the parsed options of the RxPlayer's
|
|
67
67
|
* `loadVideo` method exend.
|
|
68
|
+
* @see ILoadVideoOptions
|
|
68
69
|
*/
|
|
69
70
|
interface IParsedLoadVideoOptionsBase {
|
|
71
|
+
/** @see ILoadVideoOptions.url */
|
|
70
72
|
url: string | undefined;
|
|
73
|
+
/** @see ILoadVideoOptions.transport */
|
|
71
74
|
transport: string;
|
|
75
|
+
/** @see ILoadVideoOptions.autoPlay */
|
|
72
76
|
autoPlay: boolean;
|
|
77
|
+
/** @see ILoadVideoOptions.initialManifest */
|
|
73
78
|
initialManifest: ILoadedManifestFormat | undefined;
|
|
79
|
+
/** @see ILoadVideoOptions.keySystems */
|
|
74
80
|
keySystems: IKeySystemOption[];
|
|
81
|
+
/** @see ILoadVideoOptions.lowLatencyMode */
|
|
75
82
|
lowLatencyMode: boolean;
|
|
83
|
+
/** @see ILoadVideoOptions.minimumManifestUpdateInterval */
|
|
76
84
|
minimumManifestUpdateInterval: number;
|
|
85
|
+
/** @see ILoadVideoOptions.requestConfig */
|
|
77
86
|
requestConfig: IRequestConfig;
|
|
87
|
+
/** @see ILoadVideoOptions.startAt */
|
|
78
88
|
startAt: IParsedStartAtOption | undefined;
|
|
89
|
+
/** @see ILoadVideoOptions.enableFastSwitching */
|
|
79
90
|
enableFastSwitching: boolean;
|
|
91
|
+
/** @see ILoadVideoOptions.defaultAudioTrackSwitchingMode */
|
|
80
92
|
defaultAudioTrackSwitchingMode: IAudioTrackSwitchingMode | undefined;
|
|
93
|
+
/** @see ILoadVideoOptions.onCodecSwitch */
|
|
81
94
|
onCodecSwitch: "continue" | "reload";
|
|
95
|
+
/** @see ILoadVideoOptions.checkMediaSegmentIntegrity */
|
|
82
96
|
checkMediaSegmentIntegrity?: boolean | undefined;
|
|
97
|
+
/** @see ILoadVideoOptions.checkManifestIntegrity */
|
|
83
98
|
checkManifestIntegrity?: boolean | undefined;
|
|
99
|
+
/** @see ILoadVideoOptions.manifestLoader */
|
|
84
100
|
manifestLoader?: IManifestLoader | undefined;
|
|
101
|
+
/** @see ILoadVideoOptions.referenceDateTime */
|
|
85
102
|
referenceDateTime?: number | undefined;
|
|
103
|
+
/** @see ILoadVideoOptions.representationFilter */
|
|
86
104
|
representationFilter?: IRepresentationFilter | string | undefined;
|
|
105
|
+
/** @see ILoadVideoOptions.segmentLoader */
|
|
87
106
|
segmentLoader?: ISegmentLoader | undefined;
|
|
107
|
+
/** @see ILoadVideoOptions.serverSyncInfos */
|
|
88
108
|
serverSyncInfos?: IServerSyncInfos | undefined;
|
|
109
|
+
/** @see ILoadVideoOptions.mode */
|
|
89
110
|
mode: IRxPlayerMode;
|
|
111
|
+
/** @see ILoadVideoOptions.cmcd */
|
|
90
112
|
cmcd: ICmcdOptions | undefined;
|
|
113
|
+
/** @see ILoadVideoOptions.experimentalOptions */
|
|
114
|
+
experimentalOptions: {
|
|
115
|
+
enableRepresentationAvoidance: boolean;
|
|
116
|
+
};
|
|
91
117
|
__priv_manifestUpdateUrl?: string | undefined;
|
|
92
118
|
__priv_patchLastSegmentInSidx?: boolean | undefined;
|
|
93
119
|
}
|
|
@@ -461,6 +487,10 @@ function parseLoadVideoOptions(options: ILoadVideoOptions): IParsedLoadVideoOpti
|
|
|
461
487
|
mode,
|
|
462
488
|
url,
|
|
463
489
|
cmcd: options.cmcd,
|
|
490
|
+
experimentalOptions: {
|
|
491
|
+
enableRepresentationAvoidance:
|
|
492
|
+
options.experimentalOptions?.enableRepresentationAvoidance === true,
|
|
493
|
+
},
|
|
464
494
|
};
|
|
465
495
|
}
|
|
466
496
|
|
|
@@ -411,7 +411,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
411
411
|
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
|
|
412
412
|
videoElement.preload = "auto";
|
|
413
413
|
|
|
414
|
-
this.version = /* PLAYER_VERSION */ "4.3.0-dev.
|
|
414
|
+
this.version = /* PLAYER_VERSION */ "4.3.0-dev.2025030400";
|
|
415
415
|
this.log = log;
|
|
416
416
|
this.state = "STOPPED";
|
|
417
417
|
this.videoElement = videoElement;
|
|
@@ -783,6 +783,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
783
783
|
segmentLoader,
|
|
784
784
|
serverSyncInfos,
|
|
785
785
|
mode,
|
|
786
|
+
experimentalOptions,
|
|
786
787
|
__priv_manifestUpdateUrl,
|
|
787
788
|
__priv_patchLastSegmentInSidx,
|
|
788
789
|
url,
|
|
@@ -935,6 +936,8 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
935
936
|
autoPlay,
|
|
936
937
|
bufferOptions,
|
|
937
938
|
cmcd,
|
|
939
|
+
enableRepresentationAvoidance:
|
|
940
|
+
experimentalOptions.enableRepresentationAvoidance,
|
|
938
941
|
keySystems,
|
|
939
942
|
lowLatencyMode,
|
|
940
943
|
transport: transportPipelines,
|
|
@@ -977,6 +980,8 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
977
980
|
autoPlay,
|
|
978
981
|
bufferOptions,
|
|
979
982
|
cmcd,
|
|
983
|
+
enableRepresentationAvoidance:
|
|
984
|
+
experimentalOptions.enableRepresentationAvoidance,
|
|
980
985
|
keySystems,
|
|
981
986
|
lowLatencyMode,
|
|
982
987
|
transportOptions,
|
|
@@ -1241,7 +1246,6 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
1241
1246
|
seekEventsCanceller = new TaskCanceller();
|
|
1242
1247
|
seekEventsCanceller.linkToSignal(currentContentCanceller.signal);
|
|
1243
1248
|
emitSeekEvents(
|
|
1244
|
-
videoElement,
|
|
1245
1249
|
playbackObserver,
|
|
1246
1250
|
() => this.trigger("seeking", null),
|
|
1247
1251
|
() => this.trigger("seeked", null),
|
|
@@ -2849,12 +2853,12 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
2849
2853
|
*/
|
|
2850
2854
|
private _priv_onPeriodStreamCleared(
|
|
2851
2855
|
contentInfos: IPublicApiContentInfos,
|
|
2852
|
-
value: { type: IBufferType;
|
|
2856
|
+
value: { type: IBufferType; periodId: string },
|
|
2853
2857
|
): void {
|
|
2854
2858
|
if (contentInfos.contentId !== this._priv_contentInfos?.contentId) {
|
|
2855
2859
|
return; // Event for another content
|
|
2856
2860
|
}
|
|
2857
|
-
const { type,
|
|
2861
|
+
const { type, periodId } = value;
|
|
2858
2862
|
const tracksStore = contentInfos.tracksStore;
|
|
2859
2863
|
|
|
2860
2864
|
// Clean-up track choices from TracksStore
|
|
@@ -2863,7 +2867,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
2863
2867
|
case "text":
|
|
2864
2868
|
case "video":
|
|
2865
2869
|
if (!isNullOrUndefined(tracksStore)) {
|
|
2866
|
-
tracksStore.removeTrackReference(type,
|
|
2870
|
+
tracksStore.removeTrackReference(type, periodId);
|
|
2867
2871
|
}
|
|
2868
2872
|
break;
|
|
2869
2873
|
}
|
|
@@ -2872,23 +2876,23 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
2872
2876
|
const { activeAdaptations, activeRepresentations } = contentInfos;
|
|
2873
2877
|
if (
|
|
2874
2878
|
!isNullOrUndefined(activeAdaptations) &&
|
|
2875
|
-
!isNullOrUndefined(activeAdaptations[
|
|
2879
|
+
!isNullOrUndefined(activeAdaptations[periodId])
|
|
2876
2880
|
) {
|
|
2877
|
-
const activePeriodAdaptations = activeAdaptations[
|
|
2881
|
+
const activePeriodAdaptations = activeAdaptations[periodId];
|
|
2878
2882
|
delete activePeriodAdaptations[type];
|
|
2879
2883
|
if (Object.keys(activePeriodAdaptations).length === 0) {
|
|
2880
|
-
delete activeAdaptations[
|
|
2884
|
+
delete activeAdaptations[periodId];
|
|
2881
2885
|
}
|
|
2882
2886
|
}
|
|
2883
2887
|
|
|
2884
2888
|
if (
|
|
2885
2889
|
!isNullOrUndefined(activeRepresentations) &&
|
|
2886
|
-
!isNullOrUndefined(activeRepresentations[
|
|
2890
|
+
!isNullOrUndefined(activeRepresentations[periodId])
|
|
2887
2891
|
) {
|
|
2888
|
-
const activePeriodRepresentations = activeRepresentations[
|
|
2892
|
+
const activePeriodRepresentations = activeRepresentations[periodId];
|
|
2889
2893
|
delete activePeriodRepresentations[type];
|
|
2890
2894
|
if (Object.keys(activePeriodRepresentations).length === 0) {
|
|
2891
|
-
delete activeRepresentations[
|
|
2895
|
+
delete activeRepresentations[periodId];
|
|
2892
2896
|
}
|
|
2893
2897
|
}
|
|
2894
2898
|
}
|
|
@@ -3330,7 +3334,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
3330
3334
|
}
|
|
3331
3335
|
}
|
|
3332
3336
|
}
|
|
3333
|
-
Player.version = /* PLAYER_VERSION */ "4.3.0-dev.
|
|
3337
|
+
Player.version = /* PLAYER_VERSION */ "4.3.0-dev.2025030400";
|
|
3334
3338
|
|
|
3335
3339
|
/** Every events sent by the RxPlayer's public API. */
|
|
3336
3340
|
interface IPublicAPIEvent {
|
|
@@ -30,7 +30,6 @@ import type { CancellationSignal } from "../../utils/task_canceller";
|
|
|
30
30
|
import type { ContentInitializer, IStallingSituation } from "../init";
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* @param {HTMLMediaElement} mediaElement
|
|
34
33
|
* @param {Object} playbackObserver - Observes playback conditions on
|
|
35
34
|
* `mediaElement`.
|
|
36
35
|
* @param {function} onSeeking - Callback called when a seeking operation starts
|
|
@@ -41,13 +40,12 @@ import type { ContentInitializer, IStallingSituation } from "../init";
|
|
|
41
40
|
* remove all listeners this function has registered.
|
|
42
41
|
*/
|
|
43
42
|
export function emitSeekEvents(
|
|
44
|
-
mediaElement: IMediaElement | null,
|
|
45
43
|
playbackObserver: IReadOnlyPlaybackObserver<IPlaybackObservation>,
|
|
46
44
|
onSeeking: () => void,
|
|
47
45
|
onSeeked: () => void,
|
|
48
46
|
cancelSignal: CancellationSignal,
|
|
49
47
|
): void {
|
|
50
|
-
if (cancelSignal.isCancelled()
|
|
48
|
+
if (cancelSignal.isCancelled()) {
|
|
51
49
|
return;
|
|
52
50
|
}
|
|
53
51
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, beforeEach, afterEach, it, expect, vi } from "vitest";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IMediaKeySystemAccess } from "../../../../compat/browser_compatibility_types";
|
|
3
3
|
import type { IKeySystemOption } from "../../../../public_types";
|
|
4
4
|
import type IContentDecryptor from "../../content_decryptor";
|
|
5
5
|
import {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
function requestMediaKeySystemAccessNoMediaKeys(
|
|
14
14
|
keySystem: string,
|
|
15
15
|
config: MediaKeySystemConfiguration[],
|
|
16
|
-
): Promise<
|
|
16
|
+
): Promise<IMediaKeySystemAccess> {
|
|
17
17
|
if (config.length === 0) {
|
|
18
18
|
throw new Error("requestMediaKeySystemAccessNoMediaKeys: no config given");
|
|
19
19
|
}
|
|
@@ -14,8 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
18
|
-
|
|
17
|
+
import type {
|
|
18
|
+
IMediaElement,
|
|
19
|
+
IMediaKeySystemAccess,
|
|
20
|
+
IMediaKeys,
|
|
21
|
+
} from "../../compat/browser_compatibility_types";
|
|
19
22
|
import eme, { getInitData } from "../../compat/eme";
|
|
20
23
|
import config from "../../config";
|
|
21
24
|
import { EncryptedMediaError, OtherError } from "../../errors";
|
|
@@ -992,7 +995,7 @@ export default class ContentDecryptor extends EventEmitter<IContentDecryptorEven
|
|
|
992
995
|
* @returns {Boolean}
|
|
993
996
|
*/
|
|
994
997
|
function canCreatePersistentSession(
|
|
995
|
-
mediaKeySystemAccess:
|
|
998
|
+
mediaKeySystemAccess: IMediaKeySystemAccess,
|
|
996
999
|
): boolean {
|
|
997
1000
|
const { sessionTypes } = mediaKeySystemAccess.getConfiguration();
|
|
998
1001
|
return sessionTypes !== undefined && arrayIncludes(sessionTypes, "persistent-license");
|
|
@@ -1004,9 +1007,7 @@ function canCreatePersistentSession(
|
|
|
1004
1007
|
* @param {MediaKeySystemAccess} mediaKeySystemAccess
|
|
1005
1008
|
* @returns {Boolean}
|
|
1006
1009
|
*/
|
|
1007
|
-
function canCreateTemporarySession(
|
|
1008
|
-
mediaKeySystemAccess: MediaKeySystemAccess | ICustomMediaKeySystemAccess,
|
|
1009
|
-
): boolean {
|
|
1010
|
+
function canCreateTemporarySession(mediaKeySystemAccess: IMediaKeySystemAccess): boolean {
|
|
1010
1011
|
const { sessionTypes } = mediaKeySystemAccess.getConfiguration();
|
|
1011
1012
|
return sessionTypes !== undefined && arrayIncludes(sessionTypes, "temporary");
|
|
1012
1013
|
}
|
|
@@ -1381,9 +1382,9 @@ interface IActiveSessionInfo {
|
|
|
1381
1382
|
*/
|
|
1382
1383
|
interface IAttachedMediaKeysData {
|
|
1383
1384
|
/** The MediaKeySystemAccess which allowed to create the MediaKeys instance. */
|
|
1384
|
-
mediaKeySystemAccess:
|
|
1385
|
+
mediaKeySystemAccess: IMediaKeySystemAccess;
|
|
1385
1386
|
/** The MediaKeys instance. */
|
|
1386
|
-
mediaKeys:
|
|
1387
|
+
mediaKeys: IMediaKeys;
|
|
1387
1388
|
stores: IMediaKeySessionStores;
|
|
1388
1389
|
options: IKeySystemOption;
|
|
1389
1390
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { IMediaKeySession } from "../../compat/browser_compatibility_types";
|
|
18
18
|
import log from "../../log";
|
|
19
19
|
import type { CancellationSignal } from "../../utils/task_canceller";
|
|
20
20
|
import createSession from "./create_session";
|
|
@@ -49,7 +49,7 @@ export default async function createOrLoadSession(
|
|
|
49
49
|
cancelSignal: CancellationSignal,
|
|
50
50
|
): Promise<ICreateOrLoadSessionResult> {
|
|
51
51
|
/** Store previously-loaded compatible MediaKeySession, if one. */
|
|
52
|
-
let previousLoadedSession:
|
|
52
|
+
let previousLoadedSession: IMediaKeySession | null = null;
|
|
53
53
|
|
|
54
54
|
const { loadedSessionsStore, persistentSessionsStore } = stores;
|
|
55
55
|
const entry = loadedSessionsStore.reuse(initializationData);
|
|
@@ -111,7 +111,7 @@ export default async function createOrLoadSession(
|
|
|
111
111
|
/** Information concerning a MediaKeySession. */
|
|
112
112
|
export interface IMediaKeySessionContext {
|
|
113
113
|
/** The MediaKeySession itself. */
|
|
114
|
-
mediaKeySession:
|
|
114
|
+
mediaKeySession: IMediaKeySession;
|
|
115
115
|
/** The type of MediaKeySession (e.g. "temporary"). */
|
|
116
116
|
sessionType: MediaKeySessionType;
|
|
117
117
|
/** `KeySessionRecord` assiociated to this MediaKeySession. */
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { IMediaKeySession } from "../../compat/browser_compatibility_types";
|
|
18
18
|
import log from "../../log";
|
|
19
19
|
import type { CancellationSignal } from "../../utils/task_canceller";
|
|
20
20
|
import type { IProcessedProtectionData, IMediaKeySessionStores } from "./types";
|
|
@@ -193,7 +193,7 @@ async function createAndTryToRetrievePersistentSession(
|
|
|
193
193
|
export interface INewSessionCreatedEvent {
|
|
194
194
|
type: MediaKeySessionLoadingType.Created;
|
|
195
195
|
value: {
|
|
196
|
-
mediaKeySession:
|
|
196
|
+
mediaKeySession: IMediaKeySession;
|
|
197
197
|
sessionType: MediaKeySessionType;
|
|
198
198
|
keySessionRecord: KeySessionRecord;
|
|
199
199
|
};
|
|
@@ -202,7 +202,7 @@ export interface INewSessionCreatedEvent {
|
|
|
202
202
|
export interface IPersistentSessionRecoveryEvent {
|
|
203
203
|
type: MediaKeySessionLoadingType.LoadedPersistentSession;
|
|
204
204
|
value: {
|
|
205
|
-
mediaKeySession:
|
|
205
|
+
mediaKeySession: IMediaKeySession;
|
|
206
206
|
sessionType: MediaKeySessionType;
|
|
207
207
|
keySessionRecord: KeySessionRecord;
|
|
208
208
|
};
|
|
@@ -14,9 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type {
|
|
18
|
+
IMediaElement,
|
|
19
|
+
IMediaKeySystemAccess,
|
|
20
|
+
} from "../../compat/browser_compatibility_types";
|
|
18
21
|
import { canRelyOnRequestMediaKeySystemAccess } from "../../compat/can_rely_on_request_media_key_system_access";
|
|
19
|
-
import type { ICustomMediaKeySystemAccess } from "../../compat/eme";
|
|
20
22
|
import eme from "../../compat/eme";
|
|
21
23
|
import {
|
|
22
24
|
generatePlayReadyInitData,
|
|
@@ -44,7 +46,7 @@ export type ICodecSupportList = Array<{
|
|
|
44
46
|
|
|
45
47
|
export interface IMediaKeySystemAccessInfos {
|
|
46
48
|
/** `MediaKeySystemAccess` to use to create `MediaKeys` instances. */
|
|
47
|
-
mediaKeySystemAccess:
|
|
49
|
+
mediaKeySystemAccess: IMediaKeySystemAccess;
|
|
48
50
|
/**
|
|
49
51
|
* The MediaKeySystemConfiguration that has been provided to the
|
|
50
52
|
* `requestMediaKeySystemAccess` API.
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type {
|
|
18
|
+
IMediaElement,
|
|
19
|
+
IMediaKeySystemAccess,
|
|
20
|
+
IMediaKeys,
|
|
21
|
+
} from "../../compat/browser_compatibility_types";
|
|
18
22
|
import canReuseMediaKeys from "../../compat/can_reuse_media_keys";
|
|
19
|
-
import type { ICustomMediaKeys, ICustomMediaKeySystemAccess } from "../../compat/eme";
|
|
20
23
|
import { EncryptedMediaError } from "../../errors";
|
|
21
24
|
import log from "../../log";
|
|
22
25
|
import type { IKeySystemOption } from "../../public_types";
|
|
@@ -50,14 +53,14 @@ function createPersistentSessionsStorage(
|
|
|
50
53
|
/** Object returned by `getMediaKeysInfos`. */
|
|
51
54
|
export interface IMediaKeysInfos {
|
|
52
55
|
/** The MediaKeySystemAccess which allowed to create the MediaKeys instance. */
|
|
53
|
-
mediaKeySystemAccess:
|
|
56
|
+
mediaKeySystemAccess: IMediaKeySystemAccess;
|
|
54
57
|
/**
|
|
55
58
|
* The MediaKeySystemConfiguration that has been provided to the
|
|
56
59
|
* `requestMediaKeySystemAccess` API.
|
|
57
60
|
*/
|
|
58
61
|
askedConfiguration: MediaKeySystemConfiguration;
|
|
59
62
|
/** The MediaKeys instance. */
|
|
60
|
-
mediaKeys:
|
|
63
|
+
mediaKeys: IMediaKeys;
|
|
61
64
|
/** Stores allowing to create and retrieve MediaKeySessions. */
|
|
62
65
|
stores: IMediaKeySessionStores;
|
|
63
66
|
/** IKeySystemOption compatible to the created MediaKeys instance. */
|
|
@@ -145,8 +148,8 @@ export default async function getMediaKeysInfos(
|
|
|
145
148
|
* @returns {Promise.<MediaKeys>}
|
|
146
149
|
*/
|
|
147
150
|
async function createMediaKeys(
|
|
148
|
-
mediaKeySystemAccess:
|
|
149
|
-
): Promise<
|
|
151
|
+
mediaKeySystemAccess: IMediaKeySystemAccess,
|
|
152
|
+
): Promise<IMediaKeys> {
|
|
150
153
|
log.info("DRM: Calling createMediaKeys on the MediaKeySystemAccess");
|
|
151
154
|
try {
|
|
152
155
|
const mediaKeys = await mediaKeySystemAccess.createMediaKeys();
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { IMediaKeySession } from "../../compat/browser_compatibility_types";
|
|
18
18
|
import {
|
|
19
19
|
onKeyError,
|
|
20
20
|
onKeyMessage,
|
|
@@ -40,7 +40,7 @@ import checkKeyStatuses from "./utils/check_key_statuses";
|
|
|
40
40
|
* @param {Object} cancelSignal
|
|
41
41
|
*/
|
|
42
42
|
export default function SessionEventsListener(
|
|
43
|
-
session:
|
|
43
|
+
session: IMediaKeySession,
|
|
44
44
|
keySystemOptions: IKeySystemOption,
|
|
45
45
|
keySystem: string,
|
|
46
46
|
callbacks: ISessionEventListenerCallbacks,
|
|
@@ -286,7 +286,7 @@ function formatGetLicenseError(error: unknown): IPlayerError {
|
|
|
286
286
|
* @returns {Promise}
|
|
287
287
|
*/
|
|
288
288
|
async function updateSessionWithMessage(
|
|
289
|
-
session:
|
|
289
|
+
session: IMediaKeySession,
|
|
290
290
|
message: BufferSource,
|
|
291
291
|
): Promise<void> {
|
|
292
292
|
log.info("DRM: Updating MediaKeySession with message");
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { IMediaKeys } from "../../compat/browser_compatibility_types";
|
|
18
18
|
import { EncryptedMediaError, isKnownError } from "../../errors";
|
|
19
19
|
import log from "../../log";
|
|
20
20
|
import type { IPlayerError } from "../../public_types";
|
|
@@ -35,11 +35,11 @@ import ServerCertificateStore from "./utils/server_certificate_store";
|
|
|
35
35
|
* @returns {Promise}
|
|
36
36
|
*/
|
|
37
37
|
async function setServerCertificate(
|
|
38
|
-
mediaKeys:
|
|
38
|
+
mediaKeys: IMediaKeys,
|
|
39
39
|
serverCertificate: BufferSource,
|
|
40
40
|
): Promise<unknown> {
|
|
41
41
|
try {
|
|
42
|
-
const res = await
|
|
42
|
+
const res = await mediaKeys.setServerCertificate(serverCertificate);
|
|
43
43
|
// Note: Even if `setServerCertificate` technically should return a
|
|
44
44
|
// Promise.<boolean>, this is not technically always true.
|
|
45
45
|
// Thus we prefer to return unknown here.
|
|
@@ -63,7 +63,7 @@ async function setServerCertificate(
|
|
|
63
63
|
* @returns {Promise.<Object>}
|
|
64
64
|
*/
|
|
65
65
|
export default async function trySettingServerCertificate(
|
|
66
|
-
mediaKeys:
|
|
66
|
+
mediaKeys: IMediaKeys,
|
|
67
67
|
serverCertificate: BufferSource,
|
|
68
68
|
): Promise<
|
|
69
69
|
| { type: "success"; value: unknown }
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { IMediaKeySession } from "../../../compat/browser_compatibility_types";
|
|
18
18
|
import getUUIDKidFromKeyStatusKID from "../../../compat/eme/get_uuid_kid_from_keystatus_kid";
|
|
19
19
|
import { EncryptedMediaError } from "../../../errors";
|
|
20
20
|
import log from "../../../log";
|
|
@@ -83,7 +83,7 @@ type IKeyStatusesForEach = (
|
|
|
83
83
|
* @returns {Object} - Warnings to send, whitelisted and blacklisted key ids.
|
|
84
84
|
*/
|
|
85
85
|
export default function checkKeyStatuses(
|
|
86
|
-
session:
|
|
86
|
+
session: IMediaKeySession,
|
|
87
87
|
options: IKeyStatusesCheckingOptions,
|
|
88
88
|
keySystem: string,
|
|
89
89
|
): {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { IMediaKeySession } from "../../../compat/browser_compatibility_types";
|
|
18
18
|
import log from "../../../log";
|
|
19
19
|
import arrayIncludes from "../../../utils/array_includes";
|
|
20
20
|
|
|
@@ -25,9 +25,7 @@ import arrayIncludes from "../../../utils/array_includes";
|
|
|
25
25
|
* @param {MediaKeySession} loadedSession
|
|
26
26
|
* @returns {MediaKeySession}
|
|
27
27
|
*/
|
|
28
|
-
export default function isSessionUsable(
|
|
29
|
-
loadedSession: MediaKeySession | ICustomMediaKeySession,
|
|
30
|
-
): boolean {
|
|
28
|
+
export default function isSessionUsable(loadedSession: IMediaKeySession): boolean {
|
|
31
29
|
if (loadedSession.sessionId === "") {
|
|
32
30
|
return false;
|
|
33
31
|
}
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type {
|
|
18
|
+
IMediaKeySession,
|
|
19
|
+
IMediaKeys,
|
|
20
|
+
} from "../../../compat/browser_compatibility_types";
|
|
18
21
|
import { closeSession, generateKeyRequest, loadSession } from "../../../compat/eme";
|
|
19
22
|
import log from "../../../log";
|
|
20
23
|
import assert from "../../../utils/assert";
|
|
@@ -32,7 +35,7 @@ import KeySessionRecord from "./key_session_record";
|
|
|
32
35
|
*/
|
|
33
36
|
export default class LoadedSessionsStore {
|
|
34
37
|
/** MediaKeys instance on which the MediaKeySessions are created. */
|
|
35
|
-
private readonly _mediaKeys:
|
|
38
|
+
private readonly _mediaKeys: IMediaKeys;
|
|
36
39
|
|
|
37
40
|
/** Store unique MediaKeySession information per initialization data. */
|
|
38
41
|
private _storage: IStoredSessionEntry[];
|
|
@@ -42,7 +45,7 @@ export default class LoadedSessionsStore {
|
|
|
42
45
|
* loaded MediaKeySessions on the given MediaKeys instance.
|
|
43
46
|
* @param {MediaKeys} mediaKeys
|
|
44
47
|
*/
|
|
45
|
-
constructor(mediaKeys:
|
|
48
|
+
constructor(mediaKeys: IMediaKeys) {
|
|
46
49
|
this._mediaKeys = mediaKeys;
|
|
47
50
|
this._storage = [];
|
|
48
51
|
}
|
|
@@ -128,7 +131,7 @@ export default class LoadedSessionsStore {
|
|
|
128
131
|
* @returns {Object|null}
|
|
129
132
|
*/
|
|
130
133
|
public getEntryForSession(
|
|
131
|
-
mediaKeySession:
|
|
134
|
+
mediaKeySession: IMediaKeySession,
|
|
132
135
|
): IStoredSessionEntry | null {
|
|
133
136
|
for (let i = this._storage.length - 1; i >= 0; i--) {
|
|
134
137
|
const stored = this._storage[i];
|
|
@@ -144,14 +147,14 @@ export default class LoadedSessionsStore {
|
|
|
144
147
|
* to the LoadedSessionsStore that a license-request is pending so
|
|
145
148
|
* session-closing orders are properly scheduled after it is done.
|
|
146
149
|
* @param {Object} mediaKeySession
|
|
147
|
-
* @param {string} initializationDataType - Initialization data type
|
|
148
|
-
* e.g. by the "encrypted" event for the corresponding request.
|
|
150
|
+
* @param {string|undefined} initializationDataType - Initialization data type
|
|
151
|
+
* given e.g. by the "encrypted" event for the corresponding request.
|
|
149
152
|
* @param {Uint8Array} initializationData - Initialization data given e.g. by
|
|
150
153
|
* the "encrypted" event for the corresponding request.
|
|
151
154
|
* @returns {Promise}
|
|
152
155
|
*/
|
|
153
156
|
public async generateLicenseRequest(
|
|
154
|
-
mediaKeySession:
|
|
157
|
+
mediaKeySession: IMediaKeySession,
|
|
155
158
|
initializationDataType: string | undefined,
|
|
156
159
|
initializationData: Uint8Array,
|
|
157
160
|
): Promise<unknown> {
|
|
@@ -212,7 +215,7 @@ export default class LoadedSessionsStore {
|
|
|
212
215
|
* @returns {Promise}
|
|
213
216
|
*/
|
|
214
217
|
public async loadPersistentSession(
|
|
215
|
-
mediaKeySession:
|
|
218
|
+
mediaKeySession: IMediaKeySession,
|
|
216
219
|
sessionId: string,
|
|
217
220
|
): Promise<boolean> {
|
|
218
221
|
let entry: IStoredSessionEntry | undefined;
|
|
@@ -266,9 +269,7 @@ export default class LoadedSessionsStore {
|
|
|
266
269
|
* @param {Object} mediaKeySession
|
|
267
270
|
* @returns {Promise}
|
|
268
271
|
*/
|
|
269
|
-
public async closeSession(
|
|
270
|
-
mediaKeySession: MediaKeySession | ICustomMediaKeySession,
|
|
271
|
-
): Promise<boolean> {
|
|
272
|
+
public async closeSession(mediaKeySession: IMediaKeySession): Promise<boolean> {
|
|
272
273
|
let entry: IStoredSessionEntry | undefined;
|
|
273
274
|
for (const stored of this._storage) {
|
|
274
275
|
if (stored.mediaKeySession === mediaKeySession) {
|
|
@@ -333,9 +334,7 @@ export default class LoadedSessionsStore {
|
|
|
333
334
|
* @param {MediaKeySession} mediaKeySession
|
|
334
335
|
* @returns {boolean}
|
|
335
336
|
*/
|
|
336
|
-
public removeSessionWithoutClosingIt(
|
|
337
|
-
mediaKeySession: MediaKeySession | ICustomMediaKeySession,
|
|
338
|
-
): boolean {
|
|
337
|
+
public removeSessionWithoutClosingIt(mediaKeySession: IMediaKeySession): boolean {
|
|
339
338
|
assert(
|
|
340
339
|
mediaKeySession.sessionId === "",
|
|
341
340
|
"Initialized `MediaKeySession`s should always be properly closed",
|
|
@@ -433,7 +432,7 @@ export interface IStoredSessionEntry {
|
|
|
433
432
|
keySessionRecord: KeySessionRecord;
|
|
434
433
|
|
|
435
434
|
/** The MediaKeySession created. */
|
|
436
|
-
mediaKeySession:
|
|
435
|
+
mediaKeySession: IMediaKeySession;
|
|
437
436
|
|
|
438
437
|
/**
|
|
439
438
|
* The MediaKeySessionType (e.g. "temporary" or "persistent-license") with
|
|
@@ -494,7 +493,7 @@ export interface IStoredSessionEntry {
|
|
|
494
493
|
* @returns {Promise}
|
|
495
494
|
*/
|
|
496
495
|
async function safelyCloseMediaKeySession(
|
|
497
|
-
mediaKeySession:
|
|
496
|
+
mediaKeySession: IMediaKeySession,
|
|
498
497
|
): Promise<void> {
|
|
499
498
|
log.debug("DRM: Trying to close a MediaKeySession", mediaKeySession.sessionId);
|
|
500
499
|
try {
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type { IMediaElement } from "../../../compat/browser_compatibility_types";
|
|
18
17
|
import type {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "../../../compat/
|
|
18
|
+
IMediaElement,
|
|
19
|
+
IMediaKeys,
|
|
20
|
+
IMediaKeySystemAccess,
|
|
21
|
+
} from "../../../compat/browser_compatibility_types";
|
|
22
|
+
import type { IEmeApiImplementation } from "../../../compat/eme";
|
|
23
23
|
import { setMediaKeys } from "../../../compat/eme/set_media_keys";
|
|
24
24
|
import { EncryptedMediaError } from "../../../errors";
|
|
25
25
|
import log from "../../../log";
|
|
@@ -44,10 +44,10 @@ export interface IMediaElementMediaKeysInfos {
|
|
|
44
44
|
* Last MediaKeySystemAccess used to create a MediaKeys bound to that
|
|
45
45
|
* HTMLMediaElement.
|
|
46
46
|
*/
|
|
47
|
-
mediaKeySystemAccess:
|
|
47
|
+
mediaKeySystemAccess: IMediaKeySystemAccess;
|
|
48
48
|
|
|
49
49
|
/** Last MediaKeys instance bound to that HTMLMediaElement. */
|
|
50
|
-
mediaKeys:
|
|
50
|
+
mediaKeys: IMediaKeys;
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Store containing information about every MediaKeySession active on the
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { IMediaKeySession } from "../../../compat/browser_compatibility_types";
|
|
18
18
|
import log from "../../../log";
|
|
19
19
|
import type {
|
|
20
20
|
IPersistentLicenseConfig,
|
|
@@ -99,7 +99,6 @@ export default class PersistentSessionsStore {
|
|
|
99
99
|
/**
|
|
100
100
|
* Retrieve an entry based on its initialization data.
|
|
101
101
|
* @param {Object} initData
|
|
102
|
-
* @param {string|undefined} initDataType
|
|
103
102
|
* @returns {Object|null}
|
|
104
103
|
*/
|
|
105
104
|
public get(initData: IProcessedProtectionData): IPersistentSessionInfo | null {
|
|
@@ -114,8 +113,7 @@ export default class PersistentSessionsStore {
|
|
|
114
113
|
* re-used to then be able to implement a caching replacement algorithm based
|
|
115
114
|
* on the least-recently-used values by just evicting the first values
|
|
116
115
|
* returned by `getAll`.
|
|
117
|
-
* @param {
|
|
118
|
-
* @param {string|undefined} initDataType
|
|
116
|
+
* @param {Object} initData
|
|
119
117
|
* @returns {*}
|
|
120
118
|
*/
|
|
121
119
|
public getAndReuse(initData: IProcessedProtectionData): IPersistentSessionInfo | null {
|
|
@@ -130,14 +128,14 @@ export default class PersistentSessionsStore {
|
|
|
130
128
|
|
|
131
129
|
/**
|
|
132
130
|
* Add a new entry in the PersistentSessionsStore.
|
|
133
|
-
* @param {
|
|
134
|
-
* @param {
|
|
131
|
+
* @param {Object} initData
|
|
132
|
+
* @param {Array.<Uint8Array>|undefined} keyIds
|
|
135
133
|
* @param {MediaKeySession} session
|
|
136
134
|
*/
|
|
137
135
|
public add(
|
|
138
136
|
initData: IProcessedProtectionData,
|
|
139
137
|
keyIds: Uint8Array[] | undefined,
|
|
140
|
-
session:
|
|
138
|
+
session: IMediaKeySession,
|
|
141
139
|
): void {
|
|
142
140
|
if (isNullOrUndefined(session) || !isNonEmptyString(session.sessionId)) {
|
|
143
141
|
log.warn("DRM-PSS: Invalid Persisten Session given.");
|