rx-player 4.1.0 → 4.2.0-dev.2024080600
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -10
- package/VERSION +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/add_class_name.js +1 -1
- package/dist/commonjs/compat/add_text_track.d.ts +2 -2
- package/dist/commonjs/compat/add_text_track.d.ts.map +1 -1
- package/dist/commonjs/compat/add_text_track.js +1 -1
- package/dist/commonjs/compat/browser_compatibility_types.d.ts +196 -13
- package/dist/commonjs/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/commonjs/compat/browser_compatibility_types.js +29 -0
- package/dist/commonjs/compat/browser_version.js +1 -2
- package/dist/commonjs/compat/can_patch_isobmff.js +1 -1
- package/dist/commonjs/compat/can_rely_on_request_media_key_system_access.js +1 -2
- package/dist/commonjs/compat/can_rely_on_video_visibility_and_size.js +1 -1
- package/dist/commonjs/compat/can_reuse_media_keys.js +1 -1
- package/dist/commonjs/compat/change_source_buffer_type.js +1 -1
- package/dist/commonjs/compat/clear_element_src.d.ts +2 -1
- package/dist/commonjs/compat/clear_element_src.d.ts.map +1 -1
- package/dist/commonjs/compat/clear_element_src.js +1 -1
- package/dist/commonjs/compat/eme/close_session.js +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.d.ts +3 -2
- 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 +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +2 -1
- 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/moz_media_keys_constructor.js +2 -3
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +3 -2
- 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 +2 -3
- package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts +5 -1
- package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts +4 -3
- 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 +3 -4
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +1 -2
- package/dist/commonjs/compat/eme/eme-api-implementation.d.ts +4 -3
- package/dist/commonjs/compat/eme/eme-api-implementation.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/eme-api-implementation.js +19 -5
- package/dist/commonjs/compat/eme/generate_key_request.js +2 -3
- package/dist/commonjs/compat/eme/get_init_data.d.ts +3 -1
- package/dist/commonjs/compat/eme/get_init_data.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/get_init_data.js +3 -3
- package/dist/commonjs/compat/eme/get_uuid_kid_from_keystatus_kid.js +1 -1
- package/dist/commonjs/compat/eme/get_webkit_fairplay_initdata.js +1 -1
- package/dist/commonjs/compat/eme/load_session.js +1 -1
- package/dist/commonjs/compat/eme/set_media_keys.d.ts +2 -1
- package/dist/commonjs/compat/eme/set_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/set_media_keys.js +1 -2
- package/dist/commonjs/compat/enable_audio_track.js +1 -1
- package/dist/commonjs/compat/event_listeners.d.ts +26 -24
- package/dist/commonjs/compat/event_listeners.d.ts.map +1 -1
- package/dist/commonjs/compat/event_listeners.js +9 -21
- package/dist/commonjs/compat/generate_init_data.js +2 -2
- package/dist/commonjs/compat/get_start_date.d.ts +2 -1
- package/dist/commonjs/compat/get_start_date.d.ts.map +1 -1
- package/dist/commonjs/compat/get_start_date.js +1 -1
- package/dist/commonjs/compat/has_issues_with_high_media_source_duration.js +1 -1
- package/dist/commonjs/compat/has_worker_api.js +1 -1
- package/dist/commonjs/compat/is_codec_supported.js +1 -1
- package/dist/commonjs/compat/is_debug_mode_enabled.js +1 -1
- package/dist/commonjs/compat/is_vtt_cue.js +1 -1
- package/dist/commonjs/compat/make_vtt_cue.js +1 -1
- package/dist/commonjs/compat/on_height_width_change.js +1 -1
- package/dist/commonjs/compat/patch_webkit_source_buffer.js +1 -1
- package/dist/commonjs/compat/remove_cue.js +1 -1
- package/dist/commonjs/compat/should_await_set_media_keys.js +1 -1
- package/dist/commonjs/compat/should_favour_custom_safari_EME.js +1 -1
- package/dist/commonjs/compat/should_reload_media_source_on_decipherability_update.js +1 -1
- package/dist/commonjs/compat/should_renew_media_key_system_access.js +1 -1
- package/dist/commonjs/compat/should_unset_media_keys.js +1 -1
- package/dist/commonjs/compat/should_validate_metadata.js +1 -1
- package/dist/commonjs/compat/should_wait_for_data_before_loaded.js +1 -1
- package/dist/commonjs/compat/should_wait_for_have_enough_data.js +1 -1
- package/dist/commonjs/config.d.ts +1 -1
- package/dist/commonjs/core/adaptive/adaptive_representation_selector.js +1 -1
- package/dist/commonjs/core/adaptive/network_analyzer.js +1 -2
- package/dist/commonjs/core/adaptive/utils/filter_by_bitrate.js +1 -1
- package/dist/commonjs/core/adaptive/utils/filter_by_resolution.js +1 -1
- package/dist/commonjs/core/adaptive/utils/get_buffer_levels.js +1 -1
- package/dist/commonjs/core/adaptive/utils/select_optimal_representation.js +1 -1
- package/dist/commonjs/core/cmcd/cmcd_data_builder.d.ts +121 -0
- package/dist/commonjs/core/cmcd/cmcd_data_builder.d.ts.map +1 -0
- package/dist/commonjs/core/cmcd/cmcd_data_builder.js +341 -0
- package/dist/commonjs/core/cmcd/index.d.ts +4 -0
- package/dist/commonjs/core/cmcd/index.d.ts.map +1 -0
- package/dist/commonjs/core/cmcd/index.js +4 -0
- package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.d.ts +8 -0
- package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.js +14 -11
- package/dist/commonjs/core/fetchers/segment/prioritized_segment_fetcher.js +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts +43 -23
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.js +25 -37
- package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.d.ts +5 -3
- package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.js +13 -5
- package/dist/commonjs/core/fetchers/utils/error_selector.js +1 -1
- package/dist/commonjs/core/fetchers/utils/schedule_request.js +2 -3
- package/dist/commonjs/core/main/common/create_content_time_boundaries_observer.js +1 -1
- package/dist/commonjs/core/main/common/get_buffered_data_per_media_buffer.js +1 -1
- package/dist/commonjs/core/main/worker/content_preparer.d.ts +7 -0
- package/dist/commonjs/core/main/worker/content_preparer.d.ts.map +1 -1
- package/dist/commonjs/core/main/worker/content_preparer.js +5 -2
- package/dist/commonjs/core/main/worker/send_message.js +2 -3
- package/dist/commonjs/core/main/worker/worker_main.d.ts.map +1 -1
- package/dist/commonjs/core/main/worker/worker_main.js +28 -38
- package/dist/commonjs/core/segment_sinks/garbage_collector.js +1 -1
- package/dist/commonjs/core/segment_sinks/inventory/utils.js +2 -3
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +1 -1
- package/dist/commonjs/core/stream/adaptation/get_representations_switch_strategy.js +1 -1
- package/dist/commonjs/core/stream/orchestrator/get_time_ranges_for_content.js +1 -1
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.js +1 -1
- package/dist/commonjs/core/stream/period/period_stream.js +1 -1
- package/dist/commonjs/core/stream/period/utils/get_adaptation_switch_strategy.js +1 -1
- package/dist/commonjs/core/stream/representation/representation_stream.js +1 -1
- package/dist/commonjs/core/stream/representation/utils/append_segment_to_buffer.js +1 -1
- package/dist/commonjs/core/stream/representation/utils/check_for_discontinuity.js +1 -1
- package/dist/commonjs/core/stream/representation/utils/get_buffer_status.js +1 -1
- package/dist/commonjs/core/stream/representation/utils/get_needed_segments.js +1 -1
- package/dist/commonjs/core/stream/representation/utils/get_segment_priority.js +1 -1
- package/dist/commonjs/core/stream/representation/utils/push_init_segment.js +7 -7
- package/dist/commonjs/core/stream/representation/utils/push_media_segment.js +10 -10
- package/dist/commonjs/default_config.d.ts +1 -1
- package/dist/commonjs/default_config.d.ts.map +1 -1
- package/dist/commonjs/default_config.js +1 -0
- package/dist/commonjs/errors/error_message.js +1 -1
- package/dist/commonjs/errors/format_error.js +1 -1
- package/dist/commonjs/errors/is_known_error.js +1 -1
- package/dist/commonjs/experimental/features/local.d.ts.map +1 -1
- package/dist/commonjs/experimental/features/local.js +1 -4
- package/dist/commonjs/experimental/features/metaplaylist.d.ts.map +1 -1
- package/dist/commonjs/experimental/features/metaplaylist.js +1 -4
- package/dist/commonjs/experimental/features/multi_thread.js +1 -2
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/features/dash.js +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/features/metaplaylist.js +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/load_and_push_segment.js +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +2 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +2 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +14 -8
- package/dist/commonjs/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/index.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/index.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/capabilities.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +3 -3
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/utils.js +2 -3
- package/dist/commonjs/features/add_features.js +1 -1
- package/dist/commonjs/features/features_object.d.ts.map +1 -1
- package/dist/commonjs/features/features_object.js +0 -1
- package/dist/commonjs/features/list/dash.d.ts.map +1 -1
- package/dist/commonjs/features/list/dash.js +1 -4
- package/dist/commonjs/features/list/dash_wasm.d.ts.map +1 -1
- package/dist/commonjs/features/list/dash_wasm.js +0 -2
- package/dist/commonjs/features/list/debug_element.js +1 -2
- package/dist/commonjs/features/list/directfile.js +1 -2
- package/dist/commonjs/features/list/eme.js +1 -2
- package/dist/commonjs/features/list/html_sami_parser.js +1 -2
- package/dist/commonjs/features/list/html_srt_parser.js +1 -2
- package/dist/commonjs/features/list/html_text_buffer.js +1 -2
- package/dist/commonjs/features/list/html_ttml_parser.js +1 -2
- package/dist/commonjs/features/list/html_vtt_parser.js +1 -2
- package/dist/commonjs/features/list/media_source_main.js +1 -2
- package/dist/commonjs/features/list/native_sami_parser.js +1 -2
- package/dist/commonjs/features/list/native_srt_parser.js +1 -2
- package/dist/commonjs/features/list/native_text_buffer.js +1 -2
- package/dist/commonjs/features/list/native_ttml_parser.js +1 -2
- package/dist/commonjs/features/list/native_vtt_parser.js +1 -2
- package/dist/commonjs/features/list/smooth.d.ts.map +1 -1
- package/dist/commonjs/features/list/smooth.js +1 -4
- package/dist/commonjs/features/types.d.ts +3 -11
- package/dist/commonjs/features/types.d.ts.map +1 -1
- package/dist/commonjs/index.js +2 -2
- package/dist/commonjs/main_thread/api/debug/modules/general_info.js +1 -1
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_content.js +1 -1
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_size.js +1 -1
- package/dist/commonjs/main_thread/api/debug/render.js +1 -1
- package/dist/commonjs/main_thread/api/debug/utils.js +5 -6
- package/dist/commonjs/main_thread/api/option_utils.d.ts +9 -2
- package/dist/commonjs/main_thread/api/option_utils.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/option_utils.js +7 -9
- package/dist/commonjs/main_thread/api/public_api.d.ts +23 -2
- package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/public_api.js +50 -12
- package/dist/commonjs/main_thread/api/utils.d.ts +5 -4
- package/dist/commonjs/main_thread/api/utils.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/utils.js +5 -6
- package/dist/commonjs/main_thread/decrypt/attach_media_keys.d.ts +3 -2
- package/dist/commonjs/main_thread/decrypt/attach_media_keys.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/attach_media_keys.js +8 -9
- package/dist/commonjs/main_thread/decrypt/clear_on_stop.d.ts +2 -1
- package/dist/commonjs/main_thread/decrypt/clear_on_stop.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/clear_on_stop.js +1 -1
- package/dist/commonjs/main_thread/decrypt/content_decryptor.d.ts +26 -1
- package/dist/commonjs/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/content_decryptor.js +86 -13
- package/dist/commonjs/main_thread/decrypt/create_or_load_session.js +1 -1
- package/dist/commonjs/main_thread/decrypt/create_session.js +1 -1
- package/dist/commonjs/main_thread/decrypt/dispose_decryption_resources.d.ts +2 -1
- package/dist/commonjs/main_thread/decrypt/dispose_decryption_resources.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/dispose_decryption_resources.js +1 -1
- package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts +17 -2
- package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/find_key_system.js +73 -3
- package/dist/commonjs/main_thread/decrypt/get_key_system_configuration.d.ts +2 -1
- package/dist/commonjs/main_thread/decrypt/get_key_system_configuration.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/get_key_system_configuration.js +1 -1
- package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts +5 -1
- package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/get_media_keys.js +5 -3
- package/dist/commonjs/main_thread/decrypt/init_media_keys.d.ts +2 -1
- package/dist/commonjs/main_thread/decrypt/init_media_keys.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/init_media_keys.js +1 -1
- package/dist/commonjs/main_thread/decrypt/session_events_listener.js +1 -1
- package/dist/commonjs/main_thread/decrypt/set_server_certificate.js +5 -4
- package/dist/commonjs/main_thread/decrypt/types.d.ts +1 -0
- package/dist/commonjs/main_thread/decrypt/types.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/are_init_values_compatible.js +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.js +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/clean_old_loaded_sessions.js +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/clean_old_stored_persistent_info.js +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/get_drm_system_id.js +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/is_compatible_codec_supported.d.ts +14 -0
- package/dist/commonjs/main_thread/decrypt/utils/is_compatible_codec_supported.d.ts.map +1 -0
- package/dist/commonjs/main_thread/decrypt/utils/is_compatible_codec_supported.js +53 -0
- package/dist/commonjs/main_thread/decrypt/utils/is_session_usable.js +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/key_id_comparison.js +2 -3
- package/dist/commonjs/main_thread/decrypt/utils/media_keys_infos_store.d.ts +4 -3
- package/dist/commonjs/main_thread/decrypt/utils/media_keys_infos_store.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts +6 -1
- package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/directfile_content_initializer.js +2 -13
- package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts +62 -4
- 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 +163 -28
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts +46 -4
- 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 +78 -140
- package/dist/commonjs/main_thread/init/send_message.js +1 -1
- package/dist/commonjs/main_thread/init/types.d.ts +6 -1
- package/dist/commonjs/main_thread/init/types.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.js +3 -4
- package/dist/commonjs/main_thread/init/utils/create_media_source.d.ts +3 -2
- package/dist/commonjs/main_thread/init/utils/create_media_source.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/create_media_source.js +2 -3
- package/dist/commonjs/main_thread/init/utils/get_initial_time.js +1 -1
- package/dist/commonjs/main_thread/init/utils/get_loaded_reference.d.ts +2 -1
- 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 +1 -1
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts +2 -1
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.js +1 -1
- package/dist/commonjs/main_thread/init/utils/initialize_content_decryption.d.ts +17 -6
- package/dist/commonjs/main_thread/init/utils/initialize_content_decryption.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/initialize_content_decryption.js +17 -22
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +2 -1
- 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/throw_on_media_error.d.ts +2 -1
- package/dist/commonjs/main_thread/init/utils/throw_on_media_error.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/throw_on_media_error.js +1 -1
- package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.d.ts +33 -0
- package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.d.ts.map +1 -0
- package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.js +224 -0
- package/dist/commonjs/main_thread/text_displayer/html/html_parsers.js +1 -1
- package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.d.ts +2 -1
- package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/text_displayer/html/update_proportional_elements.js +1 -1
- package/dist/commonjs/main_thread/text_displayer/html/utils.js +5 -6
- package/dist/commonjs/main_thread/text_displayer/native/native_parsers.js +1 -1
- package/dist/commonjs/main_thread/text_displayer/native/native_text_displayer.d.ts +2 -1
- package/dist/commonjs/main_thread/text_displayer/native/native_text_displayer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/tracks_store/media_element_tracks_store.d.ts +6 -1
- package/dist/commonjs/main_thread/tracks_store/media_element_tracks_store.d.ts.map +1 -1
- package/dist/commonjs/main_thread/tracks_store/track_dispatcher.d.ts +5 -2
- package/dist/commonjs/main_thread/tracks_store/track_dispatcher.d.ts.map +1 -1
- package/dist/commonjs/main_thread/tracks_store/track_dispatcher.js +7 -26
- package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts +49 -25
- package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts.map +1 -1
- package/dist/commonjs/main_thread/tracks_store/tracks_store.js +263 -103
- package/dist/commonjs/manifest/classes/adaptation.d.ts +9 -9
- package/dist/commonjs/manifest/classes/adaptation.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/adaptation.js +50 -24
- package/dist/commonjs/manifest/classes/codec_support_cache.d.ts +45 -0
- package/dist/commonjs/manifest/classes/codec_support_cache.d.ts.map +1 -0
- package/dist/commonjs/manifest/classes/codec_support_cache.js +84 -0
- 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 +28 -6
- package/dist/commonjs/manifest/classes/manifest.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/manifest.js +46 -7
- package/dist/commonjs/manifest/classes/period.d.ts +6 -7
- package/dist/commonjs/manifest/classes/period.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/period.js +23 -14
- package/dist/commonjs/manifest/classes/representation.d.ts +10 -11
- package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/representation.js +64 -68
- package/dist/commonjs/manifest/classes/update_period_in_place.js +1 -1
- package/dist/commonjs/manifest/classes/update_periods.js +2 -3
- package/dist/commonjs/manifest/classes/utils.js +2 -3
- package/dist/commonjs/manifest/index.d.ts +2 -2
- package/dist/commonjs/manifest/types.d.ts +32 -5
- package/dist/commonjs/manifest/types.d.ts.map +1 -1
- package/dist/commonjs/manifest/utils.d.ts +1 -1
- package/dist/commonjs/manifest/utils.d.ts.map +1 -1
- package/dist/commonjs/manifest/utils.js +36 -20
- package/dist/commonjs/minimal.d.ts.map +1 -1
- package/dist/commonjs/minimal.js +2 -8
- package/dist/commonjs/mse/index.d.ts +1 -1
- package/dist/commonjs/mse/index.d.ts.map +1 -1
- package/dist/commonjs/mse/main_media_source_interface.d.ts +2 -1
- package/dist/commonjs/mse/main_media_source_interface.d.ts.map +1 -1
- package/dist/commonjs/mse/main_media_source_interface.js +5 -4
- package/dist/commonjs/mse/types.d.ts +0 -29
- package/dist/commonjs/mse/types.d.ts.map +1 -1
- package/dist/commonjs/mse/utils/end_of_stream.d.ts +3 -2
- package/dist/commonjs/mse/utils/end_of_stream.d.ts.map +1 -1
- package/dist/commonjs/mse/utils/end_of_stream.js +2 -3
- package/dist/commonjs/mse/utils/media_source_duration_updater.d.ts +2 -1
- package/dist/commonjs/mse/utils/media_source_duration_updater.d.ts.map +1 -1
- package/dist/commonjs/multithread_types.d.ts +26 -14
- package/dist/commonjs/multithread_types.d.ts.map +1 -1
- package/dist/commonjs/parsers/containers/isobmff/create_box.js +2 -3
- package/dist/commonjs/parsers/containers/isobmff/drm/playready.js +1 -2
- package/dist/commonjs/parsers/containers/isobmff/extract_complete_chunks.js +1 -1
- package/dist/commonjs/parsers/containers/isobmff/find_complete_box.js +1 -1
- package/dist/commonjs/parsers/containers/isobmff/get_box.js +7 -8
- package/dist/commonjs/parsers/containers/isobmff/read.js +5 -6
- package/dist/commonjs/parsers/containers/isobmff/take_pssh_out.js +2 -3
- package/dist/commonjs/parsers/containers/isobmff/utils.js +9 -9
- package/dist/commonjs/parsers/containers/matroska/utils.js +2 -3
- package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/common/flatten_overlapping_periods.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_clock_offset.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_hdr_information.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/common/get_http_utc-timing_url.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_minimum_and_maximum_positions.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_periods_time_infos.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/get_init_segment.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/template.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/template.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +2 -3
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +4 -4
- package/dist/commonjs/parsers/manifest/dash/common/indexes/tokens.js +3 -4
- package/dist/commonjs/parsers/manifest/dash/common/indexes/utils.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/common/infer_adaptation_type.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts +6 -2
- package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.js +7 -3
- package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/parse_availability_start_time.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/parse_mpd.js +16 -2
- package/dist/commonjs/parsers/manifest/dash/common/parse_periods.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/parse_representation_index.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/parse_representations.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/resolve_base_urls.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +13 -13
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/BaseURL.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/ContentComponent.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/ContentProtection.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/EventStream.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Initialization.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/MPD.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Period.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Representation.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentBase.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentList.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentTemplate.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentTimeline.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentURL.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.js +12 -12
- package/dist/commonjs/parsers/manifest/dash/native-parser/parse_from_document.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +2 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/BaseURL.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +2 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +2 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +2 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +2 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentList.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/XLink.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/root.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/utils.js +2 -3
- package/dist/commonjs/parsers/manifest/local/parse_local_manifest.js +1 -1
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.js +1 -1
- package/dist/commonjs/parsers/manifest/smooth/get_codecs.js +2 -3
- package/dist/commonjs/parsers/manifest/smooth/parse_C_nodes.js +1 -1
- package/dist/commonjs/parsers/manifest/smooth/parse_protection_node.js +1 -1
- package/dist/commonjs/parsers/manifest/smooth/utils/add_segment_infos.js +1 -1
- package/dist/commonjs/parsers/manifest/smooth/utils/parseBoolean.js +1 -1
- package/dist/commonjs/parsers/manifest/smooth/utils/reduceChildren.js +1 -1
- package/dist/commonjs/parsers/manifest/smooth/utils/tokens.js +2 -3
- package/dist/commonjs/parsers/manifest/utils/check_manifest_ids.js +1 -1
- package/dist/commonjs/parsers/manifest/utils/clear_timeline_from_position.js +1 -1
- package/dist/commonjs/parsers/manifest/utils/get_first_time_from_adaptation.js +1 -1
- package/dist/commonjs/parsers/manifest/utils/get_last_time_from_adaptation.js +1 -1
- package/dist/commonjs/parsers/manifest/utils/get_maximum_positions.js +1 -1
- package/dist/commonjs/parsers/manifest/utils/get_minimum_position.js +1 -1
- package/dist/commonjs/parsers/manifest/utils/index_helpers.js +6 -7
- package/dist/commonjs/parsers/manifest/utils/update_segment_timeline.js +1 -1
- package/dist/commonjs/parsers/texttracks/srt/find_end_of_cue_block.js +1 -1
- package/dist/commonjs/parsers/texttracks/srt/get_cue_blocks.js +1 -1
- package/dist/commonjs/parsers/texttracks/srt/html.js +1 -1
- package/dist/commonjs/parsers/texttracks/srt/native.js +1 -1
- package/dist/commonjs/parsers/texttracks/srt/parse_cue.js +1 -1
- package/dist/commonjs/parsers/texttracks/srt/parse_timestamp.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/get_parameters.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/get_styling.js +2 -3
- package/dist/commonjs/parsers/texttracks/ttml/get_time_delimiters.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_default_ttml_paragraph_style.js +2 -3
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_extent.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_font_size.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_line_height.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_origin.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_padding.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/create_element.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/generate_css_test_outline.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/parse_cue.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/parse_ttml_to_div.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/ttml_color_to_css_color.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/native/parse_cue.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/native/parse_ttml_to_vtt.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/parse_ttml.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/resolve_styles_inheritance.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/xml_utils.js +9 -10
- package/dist/commonjs/parsers/texttracks/webvtt/get_cue_blocks.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/get_style_blocks.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/convert_payload_to_html.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/create_default_style_elements.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/create_style_attribute.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/create_styled_element.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/parse_style_block.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/parse_webvtt_to_div.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/to_html.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/native/set_settings_on_cue.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/native/to_native_cue.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/parse_cue_block.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/parse_timestamp.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/utils.js +6 -7
- package/dist/commonjs/playback_observer/media_element_playback_observer.d.ts +2 -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 +3 -5
- package/dist/commonjs/playback_observer/utils/generate_read_only_observer.js +1 -1
- package/dist/commonjs/public_types.d.ts +77 -0
- package/dist/commonjs/public_types.d.ts.map +1 -1
- package/dist/commonjs/tools/TextTrackRenderer/text_track_renderer.d.ts.map +1 -1
- package/dist/commonjs/tools/parseBIFThumbnails/index.js +1 -1
- package/dist/commonjs/transports/dash/construct_segment_url.js +1 -1
- package/dist/commonjs/transports/dash/get_events_out_of_emsgs.js +1 -1
- package/dist/commonjs/transports/dash/init_segment_loader.d.ts +2 -2
- package/dist/commonjs/transports/dash/init_segment_loader.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/init_segment_loader.js +26 -7
- package/dist/commonjs/transports/dash/integrity_checks.d.ts +18 -0
- package/dist/commonjs/transports/dash/integrity_checks.d.ts.map +1 -0
- package/dist/commonjs/transports/dash/integrity_checks.js +209 -0
- package/dist/commonjs/transports/dash/{low_latency_segment_loader.d.ts → load_chunked_segment_data.d.ts} +14 -5
- package/dist/commonjs/transports/dash/load_chunked_segment_data.d.ts.map +1 -0
- package/dist/commonjs/transports/dash/load_chunked_segment_data.js +126 -0
- package/dist/commonjs/transports/dash/manifest_parser.js +1 -1
- package/dist/commonjs/transports/dash/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/pipelines.js +4 -2
- package/dist/commonjs/transports/dash/segment_loader.d.ts +2 -2
- package/dist/commonjs/transports/dash/segment_loader.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/segment_loader.js +105 -31
- package/dist/commonjs/transports/dash/segment_parser.js +1 -1
- package/dist/commonjs/transports/dash/text_loader.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/text_loader.js +122 -46
- package/dist/commonjs/transports/dash/text_parser.js +1 -1
- package/dist/commonjs/transports/local/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/local/pipelines.js +2 -1
- package/dist/commonjs/transports/local/segment_loader.js +1 -1
- package/dist/commonjs/transports/local/segment_parser.js +1 -1
- package/dist/commonjs/transports/local/text_parser.js +1 -1
- package/dist/commonjs/transports/metaplaylist/manifest_loader.d.ts.map +1 -1
- package/dist/commonjs/transports/metaplaylist/manifest_loader.js +12 -4
- package/dist/commonjs/transports/metaplaylist/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/metaplaylist/pipelines.js +3 -1
- package/dist/commonjs/transports/smooth/extract_timings_infos.js +1 -1
- package/dist/commonjs/transports/smooth/is_mp4_embedded_track.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/create_audio_init_segment.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/create_boxes.js +23 -24
- package/dist/commonjs/transports/smooth/isobmff/create_init_segment.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/create_traf_box.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/create_video_init_segment.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/get_aaces_header.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/parse_tfrf.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/parse_tfxd.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/patch_segment.js +1 -1
- package/dist/commonjs/transports/smooth/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/smooth/pipelines.js +17 -4
- package/dist/commonjs/transports/smooth/segment_loader.d.ts.map +1 -1
- package/dist/commonjs/transports/smooth/segment_loader.js +82 -26
- package/dist/commonjs/transports/smooth/utils.js +2 -3
- package/dist/commonjs/transports/types.d.ts +17 -1
- package/dist/commonjs/transports/types.d.ts.map +1 -1
- package/dist/commonjs/transports/utils/add_query_string.d.ts +13 -0
- package/dist/commonjs/transports/utils/add_query_string.d.ts.map +1 -0
- package/dist/commonjs/transports/utils/add_query_string.js +54 -0
- package/dist/commonjs/transports/utils/byte_range.js +1 -1
- package/dist/commonjs/transports/utils/call_custom_manifest_loader.js +3 -3
- package/dist/commonjs/transports/utils/check_isobmff_integrity.js +1 -1
- package/dist/commonjs/transports/utils/generate_manifest_loader.d.ts +4 -4
- package/dist/commonjs/transports/utils/generate_manifest_loader.d.ts.map +1 -1
- package/dist/commonjs/transports/utils/generate_manifest_loader.js +20 -8
- package/dist/commonjs/transports/utils/get_isobmff_timing_infos.js +1 -1
- package/dist/commonjs/transports/utils/infer_segment_container.js +1 -1
- package/dist/commonjs/transports/utils/parse_text_track.js +5 -6
- package/dist/commonjs/utils/are_arrays_of_numbers_equal.js +1 -1
- package/dist/commonjs/utils/are_codecs_compatible.d.ts +4 -0
- package/dist/commonjs/utils/are_codecs_compatible.d.ts.map +1 -1
- package/dist/commonjs/utils/are_codecs_compatible.js +18 -8
- package/dist/commonjs/utils/array_find.js +1 -1
- package/dist/commonjs/utils/array_find_index.js +1 -1
- package/dist/commonjs/utils/array_includes.js +1 -1
- package/dist/commonjs/utils/assert.js +4 -4
- package/dist/commonjs/utils/base64.js +2 -3
- package/dist/commonjs/utils/byte_parsing.js +15 -16
- package/dist/commonjs/utils/cancellable_sleep.js +1 -1
- package/dist/commonjs/utils/create_cancellable_promise.js +1 -1
- package/dist/commonjs/utils/create_uuid.d.ts +9 -0
- package/dist/commonjs/utils/create_uuid.d.ts.map +1 -0
- package/dist/commonjs/utils/create_uuid.js +32 -0
- package/dist/commonjs/utils/deep_merge.js +1 -1
- package/dist/commonjs/utils/flat_map.js +1 -1
- package/dist/commonjs/utils/get_fuzzed_delay.js +1 -1
- package/dist/commonjs/utils/hash_buffer.js +1 -1
- package/dist/commonjs/utils/id_generator.js +1 -1
- package/dist/commonjs/utils/is_non_empty_string.js +1 -1
- package/dist/commonjs/utils/is_null_or_undefined.js +1 -1
- package/dist/commonjs/utils/languages/normalize.js +2 -3
- package/dist/commonjs/utils/logger.d.ts +21 -4
- package/dist/commonjs/utils/logger.d.ts.map +1 -1
- package/dist/commonjs/utils/logger.js +106 -36
- package/dist/commonjs/utils/monotonic_timestamp.js +1 -2
- package/dist/commonjs/utils/noop.js +1 -1
- package/dist/commonjs/utils/object_values.js +1 -2
- package/dist/commonjs/utils/ranges.js +22 -23
- package/dist/commonjs/utils/reference.js +1 -2
- package/dist/commonjs/utils/request/fetch.d.ts +2 -4
- package/dist/commonjs/utils/request/fetch.d.ts.map +1 -1
- package/dist/commonjs/utils/request/fetch.js +2 -3
- package/dist/commonjs/utils/request/xhr.d.ts +1 -3
- package/dist/commonjs/utils/request/xhr.d.ts.map +1 -1
- package/dist/commonjs/utils/request/xhr.js +1 -1
- package/dist/commonjs/utils/resolve_url.js +2 -3
- package/dist/commonjs/utils/retry_promise_with_backoff.js +2 -3
- package/dist/commonjs/utils/sleep.js +1 -1
- package/dist/commonjs/utils/starts_with.js +1 -1
- package/dist/commonjs/utils/string_parsing.js +10 -11
- package/dist/commonjs/utils/sync_or_async.d.ts +1 -1
- package/dist/commonjs/utils/sync_or_async.d.ts.map +1 -1
- package/dist/commonjs/utils/warn_once.js +1 -1
- package/dist/commonjs/utils/weak_map_memory.js +1 -1
- package/dist/commonjs/utils/wrapInPromise.js +1 -1
- package/dist/commonjs/utils/xml-parser.js +5 -6
- 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/add_text_track.d.ts +2 -2
- package/dist/es2017/compat/add_text_track.d.ts.map +1 -1
- package/dist/es2017/compat/browser_compatibility_types.d.ts +196 -13
- package/dist/es2017/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/es2017/compat/browser_compatibility_types.js +29 -0
- package/dist/es2017/compat/clear_element_src.d.ts +2 -1
- package/dist/es2017/compat/clear_element_src.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts +3 -2
- package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +2 -1
- 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/moz_media_keys_constructor.js +1 -2
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +3 -2
- 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/types.d.ts +5 -1
- package/dist/es2017/compat/eme/custom_media_keys/types.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts +4 -3
- 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 -3
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +1 -2
- package/dist/es2017/compat/eme/eme-api-implementation.d.ts +4 -3
- package/dist/es2017/compat/eme/eme-api-implementation.d.ts.map +1 -1
- package/dist/es2017/compat/eme/eme-api-implementation.js +19 -5
- package/dist/es2017/compat/eme/get_init_data.d.ts +3 -1
- package/dist/es2017/compat/eme/get_init_data.d.ts.map +1 -1
- package/dist/es2017/compat/eme/get_init_data.js +2 -2
- package/dist/es2017/compat/eme/set_media_keys.d.ts +2 -1
- package/dist/es2017/compat/eme/set_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/event_listeners.d.ts +26 -24
- package/dist/es2017/compat/event_listeners.d.ts.map +1 -1
- package/dist/es2017/compat/event_listeners.js +2 -14
- package/dist/es2017/compat/get_start_date.d.ts +2 -1
- package/dist/es2017/compat/get_start_date.d.ts.map +1 -1
- package/dist/es2017/config.d.ts +1 -1
- package/dist/es2017/core/cmcd/cmcd_data_builder.d.ts +121 -0
- package/dist/es2017/core/cmcd/cmcd_data_builder.d.ts.map +1 -0
- package/dist/es2017/core/cmcd/cmcd_data_builder.js +313 -0
- package/dist/es2017/core/cmcd/index.d.ts +4 -0
- package/dist/es2017/core/cmcd/index.d.ts.map +1 -0
- package/dist/es2017/core/cmcd/index.js +2 -0
- package/dist/es2017/core/fetchers/manifest/manifest_fetcher.d.ts +8 -0
- package/dist/es2017/core/fetchers/manifest/manifest_fetcher.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/manifest/manifest_fetcher.js +7 -2
- package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts +43 -23
- package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/segment/segment_fetcher.js +21 -33
- package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.d.ts +5 -3
- package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.js +14 -6
- package/dist/es2017/core/main/worker/content_preparer.d.ts +7 -0
- package/dist/es2017/core/main/worker/content_preparer.d.ts.map +1 -1
- package/dist/es2017/core/main/worker/content_preparer.js +5 -2
- package/dist/es2017/core/main/worker/worker_main.d.ts.map +1 -1
- package/dist/es2017/core/main/worker/worker_main.js +19 -18
- package/dist/es2017/default_config.d.ts +1 -1
- package/dist/es2017/default_config.d.ts.map +1 -1
- package/dist/es2017/default_config.js +1 -0
- package/dist/es2017/experimental/features/local.d.ts.map +1 -1
- package/dist/es2017/experimental/features/local.js +0 -2
- package/dist/es2017/experimental/features/metaplaylist.d.ts.map +1 -1
- package/dist/es2017/experimental/features/metaplaylist.js +0 -2
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +2 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +2 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +14 -8
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/index.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/index.js +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +1 -0
- package/dist/es2017/features/features_object.d.ts.map +1 -1
- package/dist/es2017/features/features_object.js +0 -1
- package/dist/es2017/features/list/dash.d.ts.map +1 -1
- package/dist/es2017/features/list/dash.js +0 -2
- package/dist/es2017/features/list/dash_wasm.d.ts.map +1 -1
- package/dist/es2017/features/list/dash_wasm.js +0 -2
- package/dist/es2017/features/list/smooth.d.ts.map +1 -1
- package/dist/es2017/features/list/smooth.js +0 -2
- package/dist/es2017/features/types.d.ts +3 -11
- package/dist/es2017/features/types.d.ts.map +1 -1
- package/dist/es2017/index.js +2 -2
- package/dist/es2017/main_thread/api/option_utils.d.ts +9 -2
- package/dist/es2017/main_thread/api/option_utils.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/option_utils.js +4 -5
- package/dist/es2017/main_thread/api/public_api.d.ts +23 -2
- package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/public_api.js +43 -11
- package/dist/es2017/main_thread/api/utils.d.ts +5 -4
- package/dist/es2017/main_thread/api/utils.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/attach_media_keys.d.ts +3 -2
- package/dist/es2017/main_thread/decrypt/attach_media_keys.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/clear_on_stop.d.ts +2 -1
- package/dist/es2017/main_thread/decrypt/clear_on_stop.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/content_decryptor.d.ts +26 -1
- package/dist/es2017/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/content_decryptor.js +70 -0
- package/dist/es2017/main_thread/decrypt/dispose_decryption_resources.d.ts +2 -1
- package/dist/es2017/main_thread/decrypt/dispose_decryption_resources.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/find_key_system.d.ts +17 -2
- package/dist/es2017/main_thread/decrypt/find_key_system.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/find_key_system.js +48 -0
- package/dist/es2017/main_thread/decrypt/get_key_system_configuration.d.ts +2 -1
- package/dist/es2017/main_thread/decrypt/get_key_system_configuration.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts +5 -1
- package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/get_media_keys.js +3 -1
- package/dist/es2017/main_thread/decrypt/init_media_keys.d.ts +2 -1
- package/dist/es2017/main_thread/decrypt/init_media_keys.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/types.d.ts +1 -0
- package/dist/es2017/main_thread/decrypt/types.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/utils/is_compatible_codec_supported.d.ts +14 -0
- package/dist/es2017/main_thread/decrypt/utils/is_compatible_codec_supported.d.ts.map +1 -0
- package/dist/es2017/main_thread/decrypt/utils/is_compatible_codec_supported.js +28 -0
- package/dist/es2017/main_thread/decrypt/utils/media_keys_infos_store.d.ts +4 -3
- package/dist/es2017/main_thread/decrypt/utils/media_keys_infos_store.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts +6 -1
- package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/directfile_content_initializer.js +1 -12
- package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts +62 -4
- 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 +142 -19
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts +46 -4
- 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 +67 -133
- package/dist/es2017/main_thread/init/types.d.ts +6 -1
- package/dist/es2017/main_thread/init/types.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/create_media_source.d.ts +3 -2
- package/dist/es2017/main_thread/init/utils/create_media_source.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts +2 -1
- package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts +2 -1
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/initialize_content_decryption.d.ts +17 -6
- package/dist/es2017/main_thread/init/utils/initialize_content_decryption.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/initialize_content_decryption.js +16 -21
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +2 -1
- 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/throw_on_media_error.d.ts +2 -1
- package/dist/es2017/main_thread/init/utils/throw_on_media_error.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.d.ts +33 -0
- package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.d.ts.map +1 -0
- package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.js +149 -0
- package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.d.ts +2 -1
- package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.d.ts.map +1 -1
- package/dist/es2017/main_thread/text_displayer/native/native_text_displayer.d.ts +2 -1
- package/dist/es2017/main_thread/text_displayer/native/native_text_displayer.d.ts.map +1 -1
- package/dist/es2017/main_thread/tracks_store/media_element_tracks_store.d.ts +6 -1
- package/dist/es2017/main_thread/tracks_store/media_element_tracks_store.d.ts.map +1 -1
- package/dist/es2017/main_thread/tracks_store/track_dispatcher.d.ts +5 -2
- package/dist/es2017/main_thread/tracks_store/track_dispatcher.d.ts.map +1 -1
- package/dist/es2017/main_thread/tracks_store/track_dispatcher.js +7 -26
- package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts +49 -25
- package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts.map +1 -1
- package/dist/es2017/main_thread/tracks_store/tracks_store.js +221 -98
- package/dist/es2017/manifest/classes/adaptation.d.ts +9 -9
- package/dist/es2017/manifest/classes/adaptation.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/adaptation.js +50 -24
- package/dist/es2017/manifest/classes/codec_support_cache.d.ts +45 -0
- package/dist/es2017/manifest/classes/codec_support_cache.d.ts.map +1 -0
- package/dist/es2017/manifest/classes/codec_support_cache.js +58 -0
- 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 +28 -6
- package/dist/es2017/manifest/classes/manifest.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/manifest.js +45 -7
- package/dist/es2017/manifest/classes/period.d.ts +6 -7
- package/dist/es2017/manifest/classes/period.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/period.js +23 -14
- package/dist/es2017/manifest/classes/representation.d.ts +10 -11
- package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/representation.js +56 -60
- package/dist/es2017/manifest/index.d.ts +2 -2
- package/dist/es2017/manifest/types.d.ts +32 -5
- package/dist/es2017/manifest/types.d.ts.map +1 -1
- package/dist/es2017/manifest/utils.d.ts +1 -1
- package/dist/es2017/manifest/utils.d.ts.map +1 -1
- package/dist/es2017/manifest/utils.js +19 -3
- package/dist/es2017/minimal.d.ts.map +1 -1
- package/dist/es2017/minimal.js +2 -8
- package/dist/es2017/mse/index.d.ts +1 -1
- package/dist/es2017/mse/index.d.ts.map +1 -1
- package/dist/es2017/mse/main_media_source_interface.d.ts +2 -1
- package/dist/es2017/mse/main_media_source_interface.d.ts.map +1 -1
- package/dist/es2017/mse/main_media_source_interface.js +5 -4
- package/dist/es2017/mse/types.d.ts +0 -29
- package/dist/es2017/mse/types.d.ts.map +1 -1
- package/dist/es2017/mse/utils/end_of_stream.d.ts +3 -2
- package/dist/es2017/mse/utils/end_of_stream.d.ts.map +1 -1
- package/dist/es2017/mse/utils/media_source_duration_updater.d.ts +2 -1
- package/dist/es2017/mse/utils/media_source_duration_updater.d.ts.map +1 -1
- package/dist/es2017/multithread_types.d.ts +26 -14
- package/dist/es2017/multithread_types.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/template.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/template.js +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +2 -1
- package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts +6 -2
- package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.js +7 -3
- package/dist/es2017/parsers/manifest/dash/common/parse_mpd.js +15 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/es2017/playback_observer/media_element_playback_observer.d.ts +2 -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 +3 -5
- package/dist/es2017/public_types.d.ts +77 -0
- package/dist/es2017/public_types.d.ts.map +1 -1
- package/dist/es2017/tools/TextTrackRenderer/text_track_renderer.d.ts.map +1 -1
- package/dist/es2017/transports/dash/init_segment_loader.d.ts +2 -2
- package/dist/es2017/transports/dash/init_segment_loader.d.ts.map +1 -1
- package/dist/es2017/transports/dash/init_segment_loader.js +14 -6
- package/dist/es2017/transports/dash/integrity_checks.d.ts +18 -0
- package/dist/es2017/transports/dash/integrity_checks.d.ts.map +1 -0
- package/dist/es2017/transports/dash/integrity_checks.js +150 -0
- package/dist/es2017/transports/dash/{low_latency_segment_loader.d.ts → load_chunked_segment_data.d.ts} +14 -5
- package/dist/es2017/transports/dash/load_chunked_segment_data.d.ts.map +1 -0
- package/dist/es2017/transports/dash/{low_latency_segment_loader.js → load_chunked_segment_data.js} +15 -12
- package/dist/es2017/transports/dash/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/dash/pipelines.js +3 -1
- package/dist/es2017/transports/dash/segment_loader.d.ts +2 -2
- package/dist/es2017/transports/dash/segment_loader.d.ts.map +1 -1
- package/dist/es2017/transports/dash/segment_loader.js +29 -10
- package/dist/es2017/transports/dash/text_loader.d.ts.map +1 -1
- package/dist/es2017/transports/dash/text_loader.js +40 -20
- package/dist/es2017/transports/local/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/local/pipelines.js +1 -0
- package/dist/es2017/transports/metaplaylist/manifest_loader.d.ts.map +1 -1
- package/dist/es2017/transports/metaplaylist/manifest_loader.js +11 -3
- package/dist/es2017/transports/metaplaylist/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/metaplaylist/pipelines.js +2 -0
- package/dist/es2017/transports/smooth/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/smooth/pipelines.js +16 -3
- package/dist/es2017/transports/smooth/segment_loader.d.ts.map +1 -1
- package/dist/es2017/transports/smooth/segment_loader.js +27 -16
- package/dist/es2017/transports/types.d.ts +17 -1
- package/dist/es2017/transports/types.d.ts.map +1 -1
- package/dist/es2017/transports/utils/add_query_string.d.ts +13 -0
- package/dist/es2017/transports/utils/add_query_string.d.ts.map +1 -0
- package/dist/es2017/transports/utils/add_query_string.js +51 -0
- package/dist/es2017/transports/utils/call_custom_manifest_loader.js +2 -2
- package/dist/es2017/transports/utils/generate_manifest_loader.d.ts +4 -4
- package/dist/es2017/transports/utils/generate_manifest_loader.d.ts.map +1 -1
- package/dist/es2017/transports/utils/generate_manifest_loader.js +19 -7
- package/dist/es2017/utils/are_codecs_compatible.d.ts +4 -0
- package/dist/es2017/utils/are_codecs_compatible.d.ts.map +1 -1
- package/dist/es2017/utils/are_codecs_compatible.js +17 -8
- package/dist/es2017/utils/create_uuid.d.ts +9 -0
- package/dist/es2017/utils/create_uuid.d.ts.map +1 -0
- package/dist/es2017/utils/create_uuid.js +29 -0
- package/dist/es2017/utils/logger.d.ts +21 -4
- package/dist/es2017/utils/logger.d.ts.map +1 -1
- package/dist/es2017/utils/logger.js +73 -13
- package/dist/es2017/utils/request/fetch.d.ts +2 -4
- package/dist/es2017/utils/request/fetch.d.ts.map +1 -1
- package/dist/es2017/utils/request/xhr.d.ts +1 -3
- package/dist/es2017/utils/request/xhr.d.ts.map +1 -1
- package/dist/es2017/utils/sync_or_async.d.ts +1 -1
- package/dist/es2017/utils/sync_or_async.d.ts.map +1 -1
- package/dist/es2017/utils/weak_map_memory.js +1 -1
- package/dist/mpd-parser.wasm +0 -0
- package/dist/rx-player.js +18 -17
- package/dist/worker.js +6 -5
- package/package.json +31 -35
- package/src/README.md +23 -20
- package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/compat/__tests__/add_text_track.test.ts +4 -3
- package/src/compat/__tests__/change_source_buffer_type.test.ts +4 -3
- package/src/compat/add_text_track.ts +2 -2
- package/src/compat/browser_compatibility_types.ts +247 -13
- package/src/compat/clear_element_src.ts +2 -1
- package/src/compat/eme/custom_media_keys/ie11_media_keys.ts +6 -6
- package/src/compat/eme/custom_media_keys/moz_media_keys_constructor.ts +3 -4
- package/src/compat/eme/custom_media_keys/old_webkit_media_keys.ts +4 -5
- package/src/compat/eme/custom_media_keys/types.ts +6 -1
- package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +11 -15
- package/src/compat/eme/custom_media_keys/webkit_media_keys_constructor.ts +2 -3
- package/src/compat/eme/eme-api-implementation.ts +40 -9
- package/src/compat/eme/get_init_data.ts +5 -3
- package/src/compat/eme/set_media_keys.ts +2 -1
- package/src/compat/event_listeners.ts +37 -12
- package/src/compat/get_start_date.ts +4 -2
- package/src/core/README.md +5 -0
- package/src/core/cmcd/cmcd_data_builder.ts +597 -0
- package/src/core/cmcd/index.ts +7 -0
- package/src/core/fetchers/manifest/manifest_fetcher.ts +18 -9
- package/src/core/fetchers/segment/segment_fetcher.ts +76 -42
- package/src/core/fetchers/segment/segment_fetcher_creator.ts +16 -10
- package/src/core/main/README.md +2 -2
- package/src/core/main/worker/content_preparer.ts +16 -1
- package/src/core/main/worker/worker_main.ts +34 -18
- package/src/core/segment_sinks/README.md +1 -1
- package/src/core/segment_sinks/inventory/segment_inventory.ts +1 -1
- package/src/default_config.ts +1 -0
- package/src/experimental/features/__tests__/local.test.ts +0 -3
- package/src/experimental/features/__tests__/metaplaylist.test.ts +0 -3
- package/src/experimental/features/local.ts +0 -2
- package/src/experimental/features/metaplaylist.ts +0 -2
- package/src/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.ts +2 -1
- package/src/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.ts +2 -1
- package/src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.ts +9 -8
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/defaultCodecFinder.test.ts +1 -1
- package/src/experimental/tools/mediaCapabilitiesProber/api/index.ts +1 -1
- package/src/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.ts +1 -0
- package/src/features/features_object.ts +0 -1
- package/src/features/list/__tests__/dash.test.ts +0 -3
- package/src/features/list/__tests__/smooth.test.ts +0 -3
- package/src/features/list/dash.ts +0 -2
- package/src/features/list/dash_wasm.ts +0 -2
- package/src/features/list/smooth.ts +0 -2
- package/src/features/types.ts +3 -11
- package/src/index.ts +2 -2
- package/src/main_thread/README.md +1 -1
- package/src/main_thread/api/__tests__/option_utils.test.ts +1 -0
- package/src/main_thread/api/__tests__/utils.test.ts +12 -11
- package/src/main_thread/api/option_utils.ts +12 -3
- package/src/main_thread/api/public_api.ts +55 -13
- package/src/main_thread/api/utils.ts +5 -4
- package/src/main_thread/decrypt/__tests__/__global__/utils.ts +10 -5
- package/src/main_thread/decrypt/attach_media_keys.ts +3 -2
- package/src/main_thread/decrypt/clear_on_stop.ts +2 -1
- package/src/main_thread/decrypt/content_decryptor.ts +98 -5
- package/src/main_thread/decrypt/dispose_decryption_resources.ts +2 -1
- package/src/main_thread/decrypt/find_key_system.ts +85 -2
- package/src/main_thread/decrypt/get_key_system_configuration.ts +2 -1
- package/src/main_thread/decrypt/get_media_keys.ts +8 -2
- package/src/main_thread/decrypt/init_media_keys.ts +2 -1
- package/src/main_thread/decrypt/types.ts +2 -0
- package/src/main_thread/decrypt/utils/__tests__/is_compatible_codec_supported.test.ts +38 -0
- package/src/main_thread/decrypt/utils/is_compatible_codec_supported.ts +39 -0
- package/src/main_thread/decrypt/utils/media_keys_infos_store.ts +5 -7
- package/src/main_thread/init/directfile_content_initializer.ts +5 -13
- package/src/main_thread/init/media_source_content_initializer.ts +221 -42
- package/src/main_thread/init/multi_thread_content_initializer.ts +144 -151
- package/src/main_thread/init/types.ts +6 -1
- package/src/main_thread/init/utils/create_media_source.ts +4 -3
- package/src/main_thread/init/utils/get_loaded_reference.ts +2 -1
- package/src/main_thread/init/utils/initial_seek_and_play.ts +2 -1
- package/src/main_thread/init/utils/initialize_content_decryption.ts +40 -33
- package/src/main_thread/init/utils/stream_events_emitter/stream_events_emitter.ts +3 -2
- package/src/main_thread/init/utils/throw_on_media_error.ts +2 -2
- package/src/main_thread/init/utils/update_manifest_codec_support.ts +193 -0
- package/src/main_thread/text_displayer/html/html_text_displayer.ts +3 -2
- package/src/main_thread/text_displayer/native/native_text_displayer.ts +6 -3
- package/src/main_thread/tracks_store/media_element_tracks_store.ts +4 -4
- package/src/main_thread/tracks_store/track_dispatcher.ts +7 -26
- package/src/main_thread/tracks_store/tracks_store.ts +314 -184
- package/src/manifest/classes/__tests__/adaptation.test.ts +50 -19
- package/src/manifest/classes/__tests__/manifest.test.ts +37 -6
- package/src/manifest/classes/__tests__/period.test.ts +212 -99
- package/src/manifest/classes/__tests__/representation.test.ts +96 -103
- package/src/manifest/classes/__tests__/update_period_in_place.test.ts +20 -20
- package/src/manifest/classes/adaptation.ts +61 -28
- package/src/manifest/classes/codec_support_cache.ts +82 -0
- package/src/manifest/classes/index.ts +2 -2
- package/src/manifest/classes/manifest.ts +61 -7
- package/src/manifest/classes/period.ts +30 -14
- package/src/manifest/classes/representation.ts +73 -70
- package/src/manifest/index.ts +2 -2
- package/src/manifest/types.ts +33 -5
- package/src/manifest/utils.ts +25 -4
- package/src/minimal.ts +2 -9
- package/src/mse/index.ts +0 -1
- package/src/mse/main_media_source_interface.ts +11 -8
- package/src/mse/types.ts +1 -30
- package/src/mse/utils/end_of_stream.ts +9 -4
- package/src/mse/utils/media_source_duration_updater.ts +10 -6
- package/src/multithread_types.ts +27 -14
- package/src/parsers/manifest/dash/common/__tests__/manifest_bounds_calculator.test.ts +29 -17
- package/src/parsers/manifest/dash/common/indexes/template.ts +3 -1
- package/src/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.ts +3 -1
- package/src/parsers/manifest/dash/common/manifest_bounds_calculator.ts +7 -3
- package/src/parsers/manifest/dash/common/parse_mpd.ts +15 -1
- package/src/parsers/manifest/utils/__tests__/update_segment_timeline.test.ts +1 -1
- package/src/parsers/texttracks/ttml/html/__tests__/__global__/html_ttml_parser.test.ts +6 -2
- package/src/playback_observer/media_element_playback_observer.ts +11 -11
- package/src/public_types.ts +86 -0
- package/src/tools/TextTrackRenderer/text_track_renderer.ts +1 -0
- package/src/transports/dash/init_segment_loader.ts +26 -6
- package/src/transports/dash/integrity_checks.ts +170 -0
- package/src/transports/dash/{low_latency_segment_loader.ts → load_chunked_segment_data.ts} +20 -17
- package/src/transports/dash/pipelines.ts +3 -0
- package/src/transports/dash/segment_loader.ts +47 -12
- package/src/transports/dash/text_loader.ts +50 -21
- package/src/transports/local/pipelines.ts +1 -0
- package/src/transports/metaplaylist/manifest_loader.ts +14 -3
- package/src/transports/metaplaylist/pipelines.ts +2 -0
- package/src/transports/smooth/pipelines.ts +19 -3
- package/src/transports/smooth/segment_loader.ts +33 -17
- package/src/transports/types.ts +19 -0
- package/src/transports/utils/__tests__/add_query_string.test.ts +108 -0
- package/src/transports/utils/add_query_string.ts +54 -0
- package/src/transports/utils/call_custom_manifest_loader.ts +2 -2
- package/src/transports/utils/generate_manifest_loader.ts +34 -13
- package/src/utils/__tests__/array_find.test.ts +3 -3
- package/src/utils/__tests__/array_find_index.test.ts +3 -3
- package/src/utils/__tests__/logger.test.ts +174 -17
- package/src/utils/are_codecs_compatible.ts +19 -11
- package/src/utils/create_uuid.ts +28 -0
- package/src/utils/logger.ts +83 -13
- package/src/utils/request/fetch.ts +3 -3
- package/src/utils/request/xhr.ts +2 -2
- package/src/utils/weak_map_memory.ts +1 -1
- package/dist/commonjs/mse/main_codec_support_prober.d.ts +0 -27
- package/dist/commonjs/mse/main_codec_support_prober.d.ts.map +0 -1
- package/dist/commonjs/mse/main_codec_support_prober.js +0 -44
- package/dist/commonjs/mse/worker_codec_support_prober.d.ts +0 -43
- package/dist/commonjs/mse/worker_codec_support_prober.d.ts.map +0 -1
- package/dist/commonjs/mse/worker_codec_support_prober.js +0 -61
- package/dist/commonjs/transports/dash/add_segment_integrity_checks_to_loader.d.ts +0 -25
- package/dist/commonjs/transports/dash/add_segment_integrity_checks_to_loader.d.ts.map +0 -1
- package/dist/commonjs/transports/dash/add_segment_integrity_checks_to_loader.js +0 -95
- package/dist/commonjs/transports/dash/low_latency_segment_loader.d.ts.map +0 -1
- package/dist/commonjs/transports/dash/low_latency_segment_loader.js +0 -77
- package/dist/es2017/mse/main_codec_support_prober.d.ts +0 -27
- package/dist/es2017/mse/main_codec_support_prober.d.ts.map +0 -1
- package/dist/es2017/mse/main_codec_support_prober.js +0 -41
- package/dist/es2017/mse/worker_codec_support_prober.d.ts +0 -43
- package/dist/es2017/mse/worker_codec_support_prober.d.ts.map +0 -1
- package/dist/es2017/mse/worker_codec_support_prober.js +0 -58
- package/dist/es2017/transports/dash/add_segment_integrity_checks_to_loader.d.ts +0 -25
- package/dist/es2017/transports/dash/add_segment_integrity_checks_to_loader.d.ts.map +0 -1
- package/dist/es2017/transports/dash/add_segment_integrity_checks_to_loader.js +0 -81
- package/dist/es2017/transports/dash/low_latency_segment_loader.d.ts.map +0 -1
- package/src/mse/main_codec_support_prober.ts +0 -52
- package/src/mse/worker_codec_support_prober.ts +0 -75
- package/src/transports/dash/add_segment_integrity_checks_to_loader.ts +0 -97
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { IMediaElement } from "../../compat/browser_compatibility_types";
|
|
16
17
|
import type { IKeySystemOption } from "../../public_types";
|
|
17
18
|
import EventEmitter from "../../utils/event_emitter";
|
|
18
19
|
import type { IProtectionData, IProcessedProtectionData, IContentDecryptorEvent } from "./types";
|
|
@@ -80,6 +81,10 @@ export default class ContentDecryptor extends EventEmitter<IContentDecryptorEven
|
|
|
80
81
|
* initializing so it can be processed when the initialization is done.
|
|
81
82
|
*/
|
|
82
83
|
private _initDataQueue;
|
|
84
|
+
/**
|
|
85
|
+
* Store the list of supported codecs with the current key system configuration.
|
|
86
|
+
*/
|
|
87
|
+
private _supportedCodecWhenEncrypted;
|
|
83
88
|
/**
|
|
84
89
|
* `true` if the EME API are available on the current platform according to
|
|
85
90
|
* the default EME implementation used.
|
|
@@ -101,7 +106,7 @@ export default class ContentDecryptor extends EventEmitter<IContentDecryptorEven
|
|
|
101
106
|
* configurations. It will choose the appropriate one depending on user
|
|
102
107
|
* settings and browser support.
|
|
103
108
|
*/
|
|
104
|
-
constructor(mediaElement:
|
|
109
|
+
constructor(mediaElement: IMediaElement, ksOptions: IKeySystemOption[]);
|
|
105
110
|
/**
|
|
106
111
|
* Returns the current state of the ContentDecryptor.
|
|
107
112
|
* @see ContentDecryptorState
|
|
@@ -126,6 +131,18 @@ export default class ContentDecryptor extends EventEmitter<IContentDecryptorEven
|
|
|
126
131
|
* Once disposed, a `ContentDecryptor` cannot be used anymore.
|
|
127
132
|
*/
|
|
128
133
|
dispose(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Returns `true` if the given mimeType and codec couple should be supported
|
|
136
|
+
* by the current key system.
|
|
137
|
+
* Returns `false` if it isn't.
|
|
138
|
+
*
|
|
139
|
+
* Returns `undefined` if we cannot determine if it is supported.
|
|
140
|
+
*
|
|
141
|
+
* @param {string} mimeType
|
|
142
|
+
* @param {string} codec
|
|
143
|
+
* @returns {boolean}
|
|
144
|
+
*/
|
|
145
|
+
isCodecSupported(mimeType: string, codec: string): boolean | undefined;
|
|
129
146
|
/**
|
|
130
147
|
* Method to call when new protection initialization data is encounted on the
|
|
131
148
|
* content.
|
|
@@ -147,6 +164,14 @@ export default class ContentDecryptor extends EventEmitter<IContentDecryptorEven
|
|
|
147
164
|
*/
|
|
148
165
|
private _processInitializationData;
|
|
149
166
|
private _tryToUseAlreadyCreatedSession;
|
|
167
|
+
/**
|
|
168
|
+
* Remove the session corresponding to the initData provided, and close it.
|
|
169
|
+
* It does nothing if no session was found for this initData.
|
|
170
|
+
* @param {Object} initData : The initialization data corresponding to the session
|
|
171
|
+
* that need to be removed
|
|
172
|
+
* @param {Object} mediaKeysData : The media keys data
|
|
173
|
+
*/
|
|
174
|
+
private removeSessionForInitData;
|
|
150
175
|
/**
|
|
151
176
|
* Callback that should be called if an error that made the current
|
|
152
177
|
* `ContentDecryptor` instance unusable arised.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content_decryptor.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/content_decryptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"content_decryptor.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/content_decryptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAO9E,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,oBAAoB,CAAC;AAIzE,OAAO,YAAY,MAAM,2BAA2B,CAAC;AAerD,OAAO,KAAK,EACV,eAAe,EAEf,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAA8B,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAU5E,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAC;AAE/D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAChF;;;;;;;;;;;;OAYG;IACI,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC;;;OAGG;IACI,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAE3B;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU,CAA6B;IAE/C;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB,CAAuB;IAE/C;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAgB;IAElC;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc,CAAoB;IAE1C;;OAEG;IACH,OAAO,CAAC,4BAA4B,CAAoB;IAExD;;;;;OAKG;WACW,UAAU,IAAI,OAAO;IAInC;;;;;;;;;;;;;OAaG;gBACS,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,EAAE;IAqEtE;;;;OAIG;IACI,QAAQ,IAAI,qBAAqB;IAIxC;;;;;;;;OAQG;IACI,MAAM,IAAI,IAAI;IA8ErB;;;;;;OAMG;IACI,OAAO;IAYd;;;;;;;;;;OAUG;IACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAgB7E;;;;;;;;OAQG;IACI,oBAAoB,CAAC,kBAAkB,EAAE,eAAe,GAAG,IAAI;IAqBtE;;;;;;;;OAQG;YACW,0BAA0B;IAiTxC,OAAO,CAAC,8BAA8B;IAyItC;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAmChC;;;;;;;;;OASG;IACH,OAAO,CAAC,aAAa;IAuBrB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAOlB;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAUpC;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAM1B;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;CAQ7B;AAeD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,UAAU,EAAE,EAC5B,YAAY,EAAE,UAAU,EAAE,GACzB,UAAU,EAAE,CAId;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,UAAU,EAAE,GACtB,UAAU,EAAE,CAUd;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,wBAAwB,EAC5C,SAAS,EAAE,UAAU,EAAE,GACtB,UAAU,EAAE,CAcd"}
|
|
@@ -113,7 +113,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
113
113
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
114
114
|
};
|
|
115
115
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
116
|
-
exports.
|
|
116
|
+
exports.getMissingKeyIds = getMissingKeyIds;
|
|
117
|
+
exports.getMissingKnownKeyIds = getMissingKnownKeyIds;
|
|
118
|
+
exports.getMissingInitDataKeyIds = getMissingInitDataKeyIds;
|
|
117
119
|
var eme_1 = require("../../compat/eme");
|
|
118
120
|
var config_1 = require("../../config");
|
|
119
121
|
var errors_1 = require("../../errors");
|
|
@@ -136,6 +138,7 @@ var check_key_statuses_1 = require("./utils/check_key_statuses");
|
|
|
136
138
|
var clean_old_stored_persistent_info_1 = require("./utils/clean_old_stored_persistent_info");
|
|
137
139
|
var get_drm_system_id_1 = require("./utils/get_drm_system_id");
|
|
138
140
|
var init_data_values_container_1 = require("./utils/init_data_values_container");
|
|
141
|
+
var is_compatible_codec_supported_1 = require("./utils/is_compatible_codec_supported");
|
|
139
142
|
var key_id_comparison_1 = require("./utils/key_id_comparison");
|
|
140
143
|
/**
|
|
141
144
|
* Module communicating with the Content Decryption Module (or CDM) to be able
|
|
@@ -178,6 +181,7 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
178
181
|
isInitDataQueueLocked: true,
|
|
179
182
|
data: null,
|
|
180
183
|
};
|
|
184
|
+
_this._supportedCodecWhenEncrypted = [];
|
|
181
185
|
_this.error = null;
|
|
182
186
|
eme_1.default.onEncrypted(mediaElement, function (evt) {
|
|
183
187
|
log_1.default.debug("DRM: Encrypted event received from media element.");
|
|
@@ -189,6 +193,7 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
189
193
|
(0, init_media_keys_1.default)(mediaElement, ksOptions, canceller.signal)
|
|
190
194
|
.then(function (mediaKeysInfo) {
|
|
191
195
|
var options = mediaKeysInfo.options, mediaKeySystemAccess = mediaKeysInfo.mediaKeySystemAccess;
|
|
196
|
+
_this._supportedCodecWhenEncrypted = mediaKeysInfo.codecSupport;
|
|
192
197
|
/**
|
|
193
198
|
* String identifying the key system, allowing the rest of the code to
|
|
194
199
|
* only advertise the required initialization data for license requests.
|
|
@@ -339,6 +344,28 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
339
344
|
this._canceller.cancel();
|
|
340
345
|
this.trigger("stateChange", this._stateData.state);
|
|
341
346
|
};
|
|
347
|
+
/**
|
|
348
|
+
* Returns `true` if the given mimeType and codec couple should be supported
|
|
349
|
+
* by the current key system.
|
|
350
|
+
* Returns `false` if it isn't.
|
|
351
|
+
*
|
|
352
|
+
* Returns `undefined` if we cannot determine if it is supported.
|
|
353
|
+
*
|
|
354
|
+
* @param {string} mimeType
|
|
355
|
+
* @param {string} codec
|
|
356
|
+
* @returns {boolean}
|
|
357
|
+
*/
|
|
358
|
+
ContentDecryptor.prototype.isCodecSupported = function (mimeType, codec) {
|
|
359
|
+
if (this._stateData.state === types_1.ContentDecryptorState.Initializing) {
|
|
360
|
+
log_1.default.error("DRM: Asking for codec support while the ContentDecryptor is still initializing");
|
|
361
|
+
return undefined;
|
|
362
|
+
}
|
|
363
|
+
if (this._stateData.state === types_1.ContentDecryptorState.Error ||
|
|
364
|
+
this._stateData.state === types_1.ContentDecryptorState.Disposed) {
|
|
365
|
+
log_1.default.error("DRM: Asking for codec support while the ContentDecryptor is disposed");
|
|
366
|
+
}
|
|
367
|
+
return (0, is_compatible_codec_supported_1.default)(mimeType, codec, this._supportedCodecWhenEncrypted);
|
|
368
|
+
};
|
|
342
369
|
/**
|
|
343
370
|
* Method to call when new protection initialization data is encounted on the
|
|
344
371
|
* content.
|
|
@@ -373,16 +400,16 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
373
400
|
* @returns {Promise.<void>}
|
|
374
401
|
*/
|
|
375
402
|
ContentDecryptor.prototype._processInitializationData = function (initializationData, mediaKeysData) {
|
|
376
|
-
var _a, _b, _c;
|
|
377
403
|
return __awaiter(this, void 0, void 0, function () {
|
|
378
|
-
var mediaKeySystemAccess, stores, options, firstCreatedSession, keyIds, hexKids, period, createdSessions, periodKeys, createdSessions_1, createdSessions_1_1, createdSess, periodKeysArr, periodKeysArr_1, periodKeysArr_1_1, kid, _loop_1, periodKeysArr_2, periodKeysArr_2_1, innerKid, wantedSessionType,
|
|
379
|
-
var e_1,
|
|
404
|
+
var mediaKeySystemAccess, stores, options, firstCreatedSession, keyIds, hexKids, period, createdSessions, periodKeys, createdSessions_1, createdSessions_1_1, createdSess, periodKeysArr, periodKeysArr_1, periodKeysArr_1_1, kid, _loop_1, periodKeysArr_2, periodKeysArr_2_1, innerKid, wantedSessionType, _a, EME_DEFAULT_MAX_SIMULTANEOUS_MEDIA_KEY_SESSIONS, EME_MAX_STORED_PERSISTENT_SESSION_INFORMATION, maxSessionCacheSize, sessionRes, sessionInfo, _b, mediaKeySession, sessionType, isSessionPersisted, requestData, error_1, entry, indexInCurrent;
|
|
405
|
+
var e_1, _c, e_2, _d, e_3, _e;
|
|
380
406
|
var _this = this;
|
|
407
|
+
var _f, _g, _h;
|
|
381
408
|
return __generator(this, function (_j) {
|
|
382
409
|
switch (_j.label) {
|
|
383
410
|
case 0:
|
|
384
411
|
if (log_1.default.hasLevel("DEBUG")) {
|
|
385
|
-
log_1.default.debug("DRM: processing init data", (
|
|
412
|
+
log_1.default.debug("DRM: processing init data", (_f = initializationData.content) === null || _f === void 0 ? void 0 : _f.adaptation.type, (_g = initializationData.content) === null || _g === void 0 ? void 0 : _g.representation.bitrate, ((_h = initializationData.keyIds) !== null && _h !== void 0 ? _h : []).map(function (k) { return (0, string_parsing_1.bytesToHex)(k); }).join(", "));
|
|
386
413
|
}
|
|
387
414
|
mediaKeySystemAccess = mediaKeysData.mediaKeySystemAccess, stores = mediaKeysData.stores, options = mediaKeysData.options;
|
|
388
415
|
if (this._tryToUseAlreadyCreatedSession(initializationData, mediaKeysData) ||
|
|
@@ -459,7 +486,7 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
459
486
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
460
487
|
finally {
|
|
461
488
|
try {
|
|
462
|
-
if (periodKeysArr_2_1 && !periodKeysArr_2_1.done && (
|
|
489
|
+
if (periodKeysArr_2_1 && !periodKeysArr_2_1.done && (_e = periodKeysArr_2.return)) _e.call(periodKeysArr_2);
|
|
463
490
|
}
|
|
464
491
|
finally { if (e_3) throw e_3.error; }
|
|
465
492
|
}
|
|
@@ -478,7 +505,7 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
478
505
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
479
506
|
finally {
|
|
480
507
|
try {
|
|
481
|
-
if (periodKeysArr_1_1 && !periodKeysArr_1_1.done && (
|
|
508
|
+
if (periodKeysArr_1_1 && !periodKeysArr_1_1.done && (_d = periodKeysArr_1.return)) _d.call(periodKeysArr_1);
|
|
482
509
|
}
|
|
483
510
|
finally { if (e_2) throw e_2.error; }
|
|
484
511
|
}
|
|
@@ -487,7 +514,7 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
487
514
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
488
515
|
finally {
|
|
489
516
|
try {
|
|
490
|
-
if (createdSessions_1_1 && !createdSessions_1_1.done && (
|
|
517
|
+
if (createdSessions_1_1 && !createdSessions_1_1.done && (_c = createdSessions_1.return)) _c.call(createdSessions_1);
|
|
491
518
|
}
|
|
492
519
|
finally { if (e_1) throw e_1.error; }
|
|
493
520
|
}
|
|
@@ -507,7 +534,7 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
507
534
|
else {
|
|
508
535
|
wantedSessionType = "persistent-license";
|
|
509
536
|
}
|
|
510
|
-
|
|
537
|
+
_a = config_1.default.getCurrent(), EME_DEFAULT_MAX_SIMULTANEOUS_MEDIA_KEY_SESSIONS = _a.EME_DEFAULT_MAX_SIMULTANEOUS_MEDIA_KEY_SESSIONS, EME_MAX_STORED_PERSISTENT_SESSION_INFORMATION = _a.EME_MAX_STORED_PERSISTENT_SESSION_INFORMATION;
|
|
511
538
|
maxSessionCacheSize = typeof options.maxSessionCacheSize === "number"
|
|
512
539
|
? options.maxSessionCacheSize
|
|
513
540
|
: EME_DEFAULT_MAX_SIMULTANEOUS_MEDIA_KEY_SESSIONS;
|
|
@@ -524,7 +551,7 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
524
551
|
blacklistedSessionError: null,
|
|
525
552
|
};
|
|
526
553
|
this._currentSessions.push(sessionInfo);
|
|
527
|
-
|
|
554
|
+
_b = sessionRes.value, mediaKeySession = _b.mediaKeySession, sessionType = _b.sessionType;
|
|
528
555
|
isSessionPersisted = false;
|
|
529
556
|
(0, session_events_listener_1.default)(mediaKeySession, options, mediaKeySystemAccess.keySystem, {
|
|
530
557
|
onKeyUpdate: function (value) {
|
|
@@ -640,6 +667,20 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
640
667
|
if (compatibleSessionInfo === undefined) {
|
|
641
668
|
return false;
|
|
642
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* On Safari using Directfile, the old EME implementation triggers
|
|
672
|
+
* the "webkitneedkey" event instead of "encrypted". There's an issue in Safari
|
|
673
|
+
* where "webkitneedkey" fires too early before all tracks are added from an HLS playlist.
|
|
674
|
+
* Safari incorrectly assumes some keys are missing for these tracks,
|
|
675
|
+
* leading to repeated "webkitneedkey" events. Because RxPlayer recognizes
|
|
676
|
+
* it already has a session for these keys and ignores the events,
|
|
677
|
+
* the content remains frozen. To resolve this, the session is re-created.
|
|
678
|
+
*/
|
|
679
|
+
var forceSessionRecreation = initializationData.forceSessionRecreation;
|
|
680
|
+
if (forceSessionRecreation === true) {
|
|
681
|
+
this.removeSessionForInitData(initializationData, mediaKeysData);
|
|
682
|
+
return false;
|
|
683
|
+
}
|
|
643
684
|
// Check if the compatible session is blacklisted
|
|
644
685
|
var blacklistedSessionError = compatibleSessionInfo.blacklistedSessionError;
|
|
645
686
|
if (!(0, is_null_or_undefined_1.default)(blacklistedSessionError)) {
|
|
@@ -723,6 +764,41 @@ var ContentDecryptor = /** @class */ (function (_super) {
|
|
|
723
764
|
}
|
|
724
765
|
return false;
|
|
725
766
|
};
|
|
767
|
+
/**
|
|
768
|
+
* Remove the session corresponding to the initData provided, and close it.
|
|
769
|
+
* It does nothing if no session was found for this initData.
|
|
770
|
+
* @param {Object} initData : The initialization data corresponding to the session
|
|
771
|
+
* that need to be removed
|
|
772
|
+
* @param {Object} mediaKeysData : The media keys data
|
|
773
|
+
*/
|
|
774
|
+
ContentDecryptor.prototype.removeSessionForInitData = function (initData, mediaKeysData) {
|
|
775
|
+
var stores = mediaKeysData.stores;
|
|
776
|
+
/** Remove the session and close it from the loadedSessionStore */
|
|
777
|
+
var entry = stores.loadedSessionsStore.reuse(initData);
|
|
778
|
+
if (entry !== null) {
|
|
779
|
+
stores.loadedSessionsStore
|
|
780
|
+
.closeSession(entry.mediaKeySession)
|
|
781
|
+
.catch(function () {
|
|
782
|
+
return log_1.default.error("DRM: Cannot close the session from the loaded session store");
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* If set, a currently-used key session is already compatible to this
|
|
787
|
+
* initialization data.
|
|
788
|
+
*/
|
|
789
|
+
var compatibleSessionInfo = (0, array_find_1.default)(this._currentSessions, function (x) {
|
|
790
|
+
return x.record.isCompatibleWith(initData);
|
|
791
|
+
});
|
|
792
|
+
if (compatibleSessionInfo === undefined) {
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
/** Remove the session from the currentSessions */
|
|
796
|
+
var indexOf = this._currentSessions.indexOf(compatibleSessionInfo);
|
|
797
|
+
if (indexOf !== -1) {
|
|
798
|
+
log_1.default.debug("DRM: A session from a processed init is removed due to forceSessionRecreation policy.");
|
|
799
|
+
this._currentSessions.splice(indexOf, 1);
|
|
800
|
+
}
|
|
801
|
+
};
|
|
726
802
|
/**
|
|
727
803
|
* Callback that should be called if an error that made the current
|
|
728
804
|
* `ContentDecryptor` instance unusable arised.
|
|
@@ -825,7 +901,6 @@ function getMissingKeyIds(expectedKeyIds, actualKeyIds) {
|
|
|
825
901
|
return !actualKeyIds.some(function (actual) { return (0, are_arrays_of_numbers_equal_1.default)(actual, expected); });
|
|
826
902
|
});
|
|
827
903
|
}
|
|
828
|
-
exports.getMissingKeyIds = getMissingKeyIds;
|
|
829
904
|
/**
|
|
830
905
|
* Returns an array of all key IDs that are known by the `KeySessionRecord`
|
|
831
906
|
* but are missing in the provided array of key IDs `newKeyIds`.
|
|
@@ -842,7 +917,6 @@ function getMissingKnownKeyIds(keySessionRecord, newKeyIds) {
|
|
|
842
917
|
}
|
|
843
918
|
return missingKeyIds;
|
|
844
919
|
}
|
|
845
|
-
exports.getMissingKnownKeyIds = getMissingKnownKeyIds;
|
|
846
920
|
/**
|
|
847
921
|
* Returns an array of all key IDs that are present in InitData
|
|
848
922
|
* but are missing in the provided array of key IDs `newKeyIds`.
|
|
@@ -862,7 +936,6 @@ function getMissingInitDataKeyIds(initializationData, newKeyIds) {
|
|
|
862
936
|
}
|
|
863
937
|
return missingKeyIds;
|
|
864
938
|
}
|
|
865
|
-
exports.getMissingInitDataKeyIds = getMissingInitDataKeyIds;
|
|
866
939
|
/**
|
|
867
940
|
* Returns set of all usable and unusable keys - explicit or implicit - that are
|
|
868
941
|
* linked to a `MediaKeySession`.
|
|
@@ -51,6 +51,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.default = createOrLoadSession;
|
|
54
55
|
var log_1 = require("../../log");
|
|
55
56
|
var create_session_1 = require("./create_session");
|
|
56
57
|
var clean_old_loaded_sessions_1 = require("./utils/clean_old_loaded_sessions");
|
|
@@ -132,4 +133,3 @@ function createOrLoadSession(initializationData, stores, wantedSessionType, maxS
|
|
|
132
133
|
});
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
|
-
exports.default = createOrLoadSession;
|
|
@@ -51,6 +51,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.default = createSession;
|
|
54
55
|
var log_1 = require("../../log");
|
|
55
56
|
var is_session_usable_1 = require("./utils/is_session_usable");
|
|
56
57
|
/**
|
|
@@ -81,7 +82,6 @@ function createSession(stores, initData, wantedSessionType, cancelSignal) {
|
|
|
81
82
|
}
|
|
82
83
|
return createAndTryToRetrievePersistentSession(loadedSessionsStore, persistentSessionsStore, initData, cancelSignal);
|
|
83
84
|
}
|
|
84
|
-
exports.default = createSession;
|
|
85
85
|
/**
|
|
86
86
|
* Create a new temporary MediaKeySession linked to the given initData and
|
|
87
87
|
* initDataType.
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { IMediaElement } from "../../compat/browser_compatibility_types";
|
|
16
17
|
/**
|
|
17
18
|
* Free up all ressources taken by the content decryption logic.
|
|
18
19
|
* @param {HTMLMediaElement} mediaElement
|
|
19
20
|
* @returns {Promise}
|
|
20
21
|
*/
|
|
21
|
-
export default function disposeDecryptionResources(mediaElement:
|
|
22
|
+
export default function disposeDecryptionResources(mediaElement: IMediaElement): Promise<unknown>;
|
|
22
23
|
//# sourceMappingURL=dispose_decryption_resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispose_decryption_resources.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/dispose_decryption_resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"dispose_decryption_resources.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/dispose_decryption_resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAK9E;;;;GAIG;AACH,wBAA8B,0BAA0B,CACtD,YAAY,EAAE,aAAa,GAC1B,OAAO,CAAC,OAAO,CAAC,CAWlB"}
|
|
@@ -51,6 +51,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.default = disposeDecryptionResources;
|
|
54
55
|
var set_media_keys_1 = require("../../compat/eme/set_media_keys");
|
|
55
56
|
var log_1 = require("../../log");
|
|
56
57
|
var media_keys_infos_store_1 = require("./utils/media_keys_infos_store");
|
|
@@ -80,4 +81,3 @@ function disposeDecryptionResources(mediaElement) {
|
|
|
80
81
|
});
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
|
-
exports.default = disposeDecryptionResources;
|
|
@@ -13,12 +13,19 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { IMediaElement } from "../../compat/browser_compatibility_types";
|
|
16
17
|
import type { ICustomMediaKeySystemAccess } from "../../compat/eme";
|
|
17
|
-
import type { IKeySystemOption } from "../../public_types";
|
|
18
|
+
import type { IAudioCapabilitiesConfiguration, IKeySystemOption, IVideoCapabilitiesConfiguration } from "../../public_types";
|
|
18
19
|
import type { CancellationSignal } from "../../utils/task_canceller";
|
|
20
|
+
export type ICodecSupportList = Array<{
|
|
21
|
+
codec: string;
|
|
22
|
+
mimeType: string;
|
|
23
|
+
result: boolean;
|
|
24
|
+
}>;
|
|
19
25
|
export interface IMediaKeySystemAccessInfos {
|
|
20
26
|
mediaKeySystemAccess: MediaKeySystemAccess | ICustomMediaKeySystemAccess;
|
|
21
27
|
options: IKeySystemOption;
|
|
28
|
+
codecSupport: ICodecSupportList;
|
|
22
29
|
}
|
|
23
30
|
export interface IReuseMediaKeySystemAccessEvent {
|
|
24
31
|
type: "reuse-media-key-system-access";
|
|
@@ -29,6 +36,14 @@ export interface ICreateMediaKeySystemAccessEvent {
|
|
|
29
36
|
value: IMediaKeySystemAccessInfos;
|
|
30
37
|
}
|
|
31
38
|
export type IFoundMediaKeySystemAccessEvent = IReuseMediaKeySystemAccessEvent | ICreateMediaKeySystemAccessEvent;
|
|
39
|
+
/**
|
|
40
|
+
* Extract from the current mediaKeys the supported Codecs.
|
|
41
|
+
* @param {Object | undefined} audioCapabilitiesConfig - The audio capabilities provided to the KeySystem.
|
|
42
|
+
* @param {Object | undefined} videoCapabilitiesConfig - The video capabilities provided to the KeySystem.
|
|
43
|
+
* @param {Object | undefined} mksConfiguration - The result of getConfiguration() of the media keys.
|
|
44
|
+
* @return {Array} The list of supported codec by the CDM.
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractCodecSupportListFromConfiguration(audioCapabilitiesConfig: IAudioCapabilitiesConfiguration | undefined, videoCapabilitiesConfig: IVideoCapabilitiesConfiguration | undefined, mksConfiguration: MediaKeySystemConfiguration): ICodecSupportList;
|
|
32
47
|
/**
|
|
33
48
|
* Try to find a compatible key system from the keySystems array given.
|
|
34
49
|
*
|
|
@@ -45,7 +60,7 @@ export type IFoundMediaKeySystemAccessEvent = IReuseMediaKeySystemAccessEvent |
|
|
|
45
60
|
* @param {Object} cancelSignal
|
|
46
61
|
* @returns {Promise.<Object>}
|
|
47
62
|
*/
|
|
48
|
-
export default function getMediaKeySystemAccess(mediaElement:
|
|
63
|
+
export default function getMediaKeySystemAccess(mediaElement: IMediaElement, keySystemsConfigs: IKeySystemOption[], cancelSignal: CancellationSignal): Promise<IFoundMediaKeySystemAccessEvent>;
|
|
49
64
|
/**
|
|
50
65
|
* Test a key system configuration, resolves with the MediaKeySystemAccess
|
|
51
66
|
* or reject if the key system is unsupported.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find_key_system.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/find_key_system.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"find_key_system.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/find_key_system.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAE9E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAUpE,OAAO,KAAK,EACV,+BAA+B,EAC/B,gBAAgB,EAChB,+BAA+B,EAChC,MAAM,oBAAoB,CAAC;AAK5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAKrE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC,CAAC;AAEH,MAAM,WAAW,0BAA0B;IACzC,oBAAoB,EAAE,oBAAoB,GAAG,2BAA2B,CAAC;IACzE,OAAO,EAAE,gBAAgB,CAAC;IAC1B,YAAY,EAAE,iBAAiB,CAAC;CACjC;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,+BAA+B,CAAC;IACtC,KAAK,EAAE,0BAA0B,CAAC;CACnC;AAED,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,gCAAgC,CAAC;IACvC,KAAK,EAAE,0BAA0B,CAAC;CACnC;AAED,MAAM,MAAM,+BAA+B,GACvC,+BAA+B,GAC/B,gCAAgC,CAAC;AAsNrC;;;;;;GAMG;AACH,wBAAgB,wCAAwC,CACtD,uBAAuB,EAAE,+BAA+B,GAAG,SAAS,EACpE,uBAAuB,EAAE,+BAA+B,GAAG,SAAS,EACpE,gBAAgB,EAAE,2BAA2B,GAC5C,iBAAiB,CAiDnB;AACD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,YAAY,EAAE,aAAa,EAC3B,iBAAiB,EAAE,gBAAgB,EAAE,EACrC,YAAY,EAAE,kBAAkB,GAC/B,OAAO,CAAC,+BAA+B,CAAC,CA0H1C;AACD;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,uBAAuB,EAAE,2BAA2B,EAAE,+FAmBvD"}
|
|
@@ -72,8 +72,35 @@ var __values = (this && this.__values) || function(o) {
|
|
|
72
72
|
};
|
|
73
73
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
74
74
|
};
|
|
75
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
76
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
77
|
+
if (!m) return o;
|
|
78
|
+
var i = m.call(o), r, ar = [], e;
|
|
79
|
+
try {
|
|
80
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
81
|
+
}
|
|
82
|
+
catch (error) { e = { error: error }; }
|
|
83
|
+
finally {
|
|
84
|
+
try {
|
|
85
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
86
|
+
}
|
|
87
|
+
finally { if (e) throw e.error; }
|
|
88
|
+
}
|
|
89
|
+
return ar;
|
|
90
|
+
};
|
|
91
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
92
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
93
|
+
if (ar || !(i in from)) {
|
|
94
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
95
|
+
ar[i] = from[i];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
99
|
+
};
|
|
75
100
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
-
exports.
|
|
101
|
+
exports.extractCodecSupportListFromConfiguration = extractCodecSupportListFromConfiguration;
|
|
102
|
+
exports.default = getMediaKeySystemAccess;
|
|
103
|
+
exports.testKeySystem = testKeySystem;
|
|
77
104
|
var can_rely_on_request_media_key_system_access_1 = require("../../compat/can_rely_on_request_media_key_system_access");
|
|
78
105
|
var eme_1 = require("../../compat/eme");
|
|
79
106
|
var generate_init_data_1 = require("../../compat/generate_init_data");
|
|
@@ -81,6 +108,7 @@ var should_renew_media_key_system_access_1 = require("../../compat/should_renew_
|
|
|
81
108
|
var config_1 = require("../../config");
|
|
82
109
|
var errors_1 = require("../../errors");
|
|
83
110
|
var log_1 = require("../../log");
|
|
111
|
+
var are_codecs_compatible_1 = require("../../utils/are_codecs_compatible");
|
|
84
112
|
var array_includes_1 = require("../../utils/array_includes");
|
|
85
113
|
var flat_map_1 = require("../../utils/flat_map");
|
|
86
114
|
var is_null_or_undefined_1 = require("../../utils/is_null_or_undefined");
|
|
@@ -256,6 +284,48 @@ function buildKeySystemConfigurations(keySystemTypeInfo) {
|
|
|
256
284
|
__assign(__assign({}, wantedMediaKeySystemConfiguration), { audioCapabilities: undefined, videoCapabilities: undefined }),
|
|
257
285
|
];
|
|
258
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Extract from the current mediaKeys the supported Codecs.
|
|
289
|
+
* @param {Object | undefined} audioCapabilitiesConfig - The audio capabilities provided to the KeySystem.
|
|
290
|
+
* @param {Object | undefined} videoCapabilitiesConfig - The video capabilities provided to the KeySystem.
|
|
291
|
+
* @param {Object | undefined} mksConfiguration - The result of getConfiguration() of the media keys.
|
|
292
|
+
* @return {Array} The list of supported codec by the CDM.
|
|
293
|
+
*/
|
|
294
|
+
function extractCodecSupportListFromConfiguration(audioCapabilitiesConfig, videoCapabilitiesConfig, mksConfiguration) {
|
|
295
|
+
var _a, _b;
|
|
296
|
+
var _c = config_1.default.getCurrent(), EME_DEFAULT_AUDIO_CODECS = _c.EME_DEFAULT_AUDIO_CODECS, EME_DEFAULT_VIDEO_CODECS = _c.EME_DEFAULT_VIDEO_CODECS;
|
|
297
|
+
var testedAudioCodecs = (audioCapabilitiesConfig === null || audioCapabilitiesConfig === void 0 ? void 0 : audioCapabilitiesConfig.type) === "contentType"
|
|
298
|
+
? audioCapabilitiesConfig === null || audioCapabilitiesConfig === void 0 ? void 0 : audioCapabilitiesConfig.value
|
|
299
|
+
: EME_DEFAULT_AUDIO_CODECS;
|
|
300
|
+
var testedVideoCodecs = (videoCapabilitiesConfig === null || videoCapabilitiesConfig === void 0 ? void 0 : videoCapabilitiesConfig.type) === "contentType"
|
|
301
|
+
? videoCapabilitiesConfig.value
|
|
302
|
+
: EME_DEFAULT_VIDEO_CODECS;
|
|
303
|
+
var testedCodecs = testedAudioCodecs.concat(testedVideoCodecs);
|
|
304
|
+
var supportedVideoCodecs = (_a = mksConfiguration.videoCapabilities) === null || _a === void 0 ? void 0 : _a.map(function (entry) { return entry.contentType; });
|
|
305
|
+
var supportedAudioCodecs = (_b = mksConfiguration.audioCapabilities) === null || _b === void 0 ? void 0 : _b.map(function (entry) { return entry.contentType; });
|
|
306
|
+
var supportedCodecs = __spreadArray(__spreadArray([], __read((supportedVideoCodecs !== null && supportedVideoCodecs !== void 0 ? supportedVideoCodecs : [])), false), __read((supportedAudioCodecs !== null && supportedAudioCodecs !== void 0 ? supportedAudioCodecs : [])), false).filter(function (contentType) { return contentType !== undefined; });
|
|
307
|
+
if (supportedCodecs.length === 0) {
|
|
308
|
+
// Some legacy implementations have issues with `audioCapabilities` and
|
|
309
|
+
// `videoCapabilities` in requestMediaKeySystemAccess so the codecs are not provided.
|
|
310
|
+
// In this case, we can't tell which codec is supported or not.
|
|
311
|
+
// Let's instead provide an empty list.
|
|
312
|
+
// Note: on a correct EME implementation, if a list of codec is provided
|
|
313
|
+
// with `audioCapabilities` or `videoCapabilities`, but none of them is supported,
|
|
314
|
+
// requestMediaKeySystemAccess should yield an error "NotSupported" and we should
|
|
315
|
+
// never reach this code.
|
|
316
|
+
return [];
|
|
317
|
+
}
|
|
318
|
+
var codecSupportList = testedCodecs.map(function (codec) {
|
|
319
|
+
var _a = (0, are_codecs_compatible_1.parseCodec)(codec), codecs = _a.codecs, mimeType = _a.mimeType;
|
|
320
|
+
var isSupported = (0, array_includes_1.default)(supportedCodecs, codec);
|
|
321
|
+
return {
|
|
322
|
+
codec: codecs,
|
|
323
|
+
mimeType: mimeType,
|
|
324
|
+
result: isSupported,
|
|
325
|
+
};
|
|
326
|
+
});
|
|
327
|
+
return codecSupportList;
|
|
328
|
+
}
|
|
259
329
|
/**
|
|
260
330
|
* Try to find a compatible key system from the keySystems array given.
|
|
261
331
|
*
|
|
@@ -287,6 +357,7 @@ function getMediaKeySystemAccess(mediaElement, keySystemsConfigs, cancelSignal)
|
|
|
287
357
|
value: {
|
|
288
358
|
mediaKeySystemAccess: cachedKeySystemAccess.keySystemAccess,
|
|
289
359
|
options: cachedKeySystemAccess.keySystemOptions,
|
|
360
|
+
codecSupport: extractCodecSupportListFromConfiguration(cachedKeySystemAccess.keySystemOptions.audioCapabilitiesConfig, cachedKeySystemAccess.keySystemOptions.videoCapabilitiesConfig, cachedKeySystemAccess.keySystemAccess.getConfiguration()),
|
|
290
361
|
},
|
|
291
362
|
});
|
|
292
363
|
}
|
|
@@ -360,6 +431,7 @@ function getMediaKeySystemAccess(mediaElement, keySystemsConfigs, cancelSignal)
|
|
|
360
431
|
value: {
|
|
361
432
|
options: keySystemOptions,
|
|
362
433
|
mediaKeySystemAccess: keySystemAccess,
|
|
434
|
+
codecSupport: extractCodecSupportListFromConfiguration(keySystemOptions.audioCapabilitiesConfig, keySystemOptions.videoCapabilitiesConfig, keySystemAccess.getConfiguration()),
|
|
363
435
|
},
|
|
364
436
|
}];
|
|
365
437
|
case 3:
|
|
@@ -375,7 +447,6 @@ function getMediaKeySystemAccess(mediaElement, keySystemsConfigs, cancelSignal)
|
|
|
375
447
|
});
|
|
376
448
|
}
|
|
377
449
|
}
|
|
378
|
-
exports.default = getMediaKeySystemAccess;
|
|
379
450
|
/**
|
|
380
451
|
* Test a key system configuration, resolves with the MediaKeySystemAccess
|
|
381
452
|
* or reject if the key system is unsupported.
|
|
@@ -413,4 +484,3 @@ function testKeySystem(keyType, keySystemConfigurations) {
|
|
|
413
484
|
});
|
|
414
485
|
});
|
|
415
486
|
}
|
|
416
|
-
exports.testKeySystem = testKeySystem;
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { IMediaElement } from "../../compat/browser_compatibility_types";
|
|
16
17
|
/**
|
|
17
18
|
* Returns the name of the current key system used as well as its configuration,
|
|
18
19
|
* as reported by the `MediaKeySystemAccess` itself.
|
|
19
20
|
* @param {HTMLMediaElement} mediaElement
|
|
20
21
|
* @returns {Array|null}
|
|
21
22
|
*/
|
|
22
|
-
export default function getKeySystemConfiguration(mediaElement:
|
|
23
|
+
export default function getKeySystemConfiguration(mediaElement: IMediaElement): [string, MediaKeySystemConfiguration] | null;
|
|
23
24
|
//# sourceMappingURL=get_key_system_configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_key_system_configuration.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/get_key_system_configuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"get_key_system_configuration.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/get_key_system_configuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAG9E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,YAAY,EAAE,aAAa,GAC1B,CAAC,MAAM,EAAE,2BAA2B,CAAC,GAAG,IAAI,CAS9C"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.default = getKeySystemConfiguration;
|
|
18
19
|
var media_keys_infos_store_1 = require("./utils/media_keys_infos_store");
|
|
19
20
|
/**
|
|
20
21
|
* Returns the name of the current key system used as well as its configuration,
|
|
@@ -32,4 +33,3 @@ function getKeySystemConfiguration(mediaElement) {
|
|
|
32
33
|
currentState.mediaKeySystemAccess.getConfiguration(),
|
|
33
34
|
];
|
|
34
35
|
}
|
|
35
|
-
exports.default = getKeySystemConfiguration;
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { IMediaElement } from "../../compat/browser_compatibility_types";
|
|
16
17
|
import type { ICustomMediaKeys, ICustomMediaKeySystemAccess } from "../../compat/eme";
|
|
17
18
|
import type { IKeySystemOption } from "../../public_types";
|
|
18
19
|
import type { CancellationSignal } from "../../utils/task_canceller";
|
|
20
|
+
import type { ICodecSupportList } from "./find_key_system";
|
|
19
21
|
import type { IMediaKeySessionStores } from "./types";
|
|
20
22
|
/** Object returned by `getMediaKeysInfos`. */
|
|
21
23
|
export interface IMediaKeysInfos {
|
|
@@ -27,6 +29,8 @@ export interface IMediaKeysInfos {
|
|
|
27
29
|
stores: IMediaKeySessionStores;
|
|
28
30
|
/** IKeySystemOption compatible to the created MediaKeys instance. */
|
|
29
31
|
options: IKeySystemOption;
|
|
32
|
+
/** The codecs support */
|
|
33
|
+
codecSupport: ICodecSupportList;
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
36
|
* Create a MediaKeys instance and associated structures (or just return the
|
|
@@ -41,5 +45,5 @@ export interface IMediaKeysInfos {
|
|
|
41
45
|
* creation of the MediaKeys instance while the task is still pending.
|
|
42
46
|
* @returns {Promise.<Object>}
|
|
43
47
|
*/
|
|
44
|
-
export default function getMediaKeysInfos(mediaElement:
|
|
48
|
+
export default function getMediaKeysInfos(mediaElement: IMediaElement, keySystemsConfigs: IKeySystemOption[], cancelSignal: CancellationSignal): Promise<IMediaKeysInfos>;
|
|
45
49
|
//# sourceMappingURL=get_media_keys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_media_keys.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/get_media_keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"get_media_keys.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/decrypt/get_media_keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAGtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAuBtD,8CAA8C;AAC9C,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,oBAAoB,EAAE,oBAAoB,GAAG,2BAA2B,CAAC;IACzE,8BAA8B;IAC9B,SAAS,EAAE,SAAS,GAAG,gBAAgB,CAAC;IACxC,+DAA+D;IAC/D,MAAM,EAAE,sBAAsB,CAAC;IAC/B,qEAAqE;IACrE,OAAO,EAAE,gBAAgB,CAAC;IAC1B,yBAAyB;IACzB,YAAY,EAAE,iBAAiB,CAAC;CACjC;AAED;;;;;;;;;;;;GAYG;AACH,wBAA8B,iBAAiB,CAC7C,YAAY,EAAE,aAAa,EAC3B,iBAAiB,EAAE,gBAAgB,EAAE,EACrC,YAAY,EAAE,kBAAkB,GAC/B,OAAO,CAAC,eAAe,CAAC,CAiD1B"}
|