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,10 +13,10 @@
|
|
|
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 { IAdaptiveRepresentationSelectorArguments } from "../../core/adaptive";
|
|
17
|
-
import type { IManifestFetcherSettings } from "../../core/fetchers";
|
|
18
18
|
import type { IMediaElementPlaybackObserver } from "../../playback_observer";
|
|
19
|
-
import type { IKeySystemOption } from "../../public_types";
|
|
19
|
+
import type { ICmcdOptions, IInitialManifest, IKeySystemOption } from "../../public_types";
|
|
20
20
|
import type { ITransportPipelines } from "../../transports";
|
|
21
21
|
import type { IReadOnlySharedReference } from "../../utils/reference";
|
|
22
22
|
import type { ITextDisplayerOptions } from "./types";
|
|
@@ -50,6 +50,22 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
50
50
|
* - `null` if the load task has not started yet.
|
|
51
51
|
*/
|
|
52
52
|
private _manifest;
|
|
53
|
+
private _cmcdDataBuilder;
|
|
54
|
+
/**
|
|
55
|
+
* Describes the decryption capabilities on the current content, discriminated
|
|
56
|
+
* by a `status` property:
|
|
57
|
+
*
|
|
58
|
+
* - If set to `"uninitialized"`, decryption capabilities have not been
|
|
59
|
+
* set up yet.
|
|
60
|
+
*
|
|
61
|
+
* - If set to `"disabled"`, decryption capabilities are explicitely
|
|
62
|
+
* disabled. If encrypted content needs to be decrypted, the accompanying
|
|
63
|
+
* error `value` describes the reason why decryption is not enabled.
|
|
64
|
+
*
|
|
65
|
+
* - If set to `"enabled"`, decryption capabilities are available, and
|
|
66
|
+
* `value` points to the corresponding `ContentDecryptor`.
|
|
67
|
+
*/
|
|
68
|
+
private _decryptionCapabilities;
|
|
53
69
|
/**
|
|
54
70
|
* Create a new `MediaSourceContentInitializer`, associated to the given
|
|
55
71
|
* settings.
|
|
@@ -65,7 +81,7 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
65
81
|
* @param {HTMLMediaElement} mediaElement
|
|
66
82
|
* @param {Object} playbackObserver
|
|
67
83
|
*/
|
|
68
|
-
start(mediaElement:
|
|
84
|
+
start(mediaElement: IMediaElement, playbackObserver: IMediaElementPlaybackObserver): void;
|
|
69
85
|
/**
|
|
70
86
|
* Update URL of the Manifest.
|
|
71
87
|
* @param {Array.<string>|undefined} urls - URLs to reach that Manifest from
|
|
@@ -104,6 +120,21 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
104
120
|
* @returns {Object}
|
|
105
121
|
*/
|
|
106
122
|
private _createRebufferingController;
|
|
123
|
+
/**
|
|
124
|
+
* Evaluates a list of codecs to determine their support status.
|
|
125
|
+
*
|
|
126
|
+
* @param {Array} codecsToCheck - The list of codecs to check.
|
|
127
|
+
* @returns {Array} - The list of evaluated codecs with their support status updated.
|
|
128
|
+
*/
|
|
129
|
+
private getCodecsSupportInfo;
|
|
130
|
+
/**
|
|
131
|
+
* Update the support status of all Representations in the Manifest.
|
|
132
|
+
*
|
|
133
|
+
* To call anytime either the Manifest is linked to new codecs or new means
|
|
134
|
+
* to test for codec support are available.
|
|
135
|
+
* @param {Object} manifest
|
|
136
|
+
*/
|
|
137
|
+
private _refreshManifestCodecSupport;
|
|
107
138
|
}
|
|
108
139
|
/** Arguments to give to the `InitializeOnMediaSource` function. */
|
|
109
140
|
export interface IInitializeArguments {
|
|
@@ -129,12 +160,39 @@ export interface IInitializeArguments {
|
|
|
129
160
|
/** Behavior when a new video and/or audio codec is encountered. */
|
|
130
161
|
onCodecSwitch: "continue" | "reload";
|
|
131
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* When set to an object, enable "Common Media Client Data", or "CMCD".
|
|
165
|
+
*/
|
|
166
|
+
cmcd?: ICmcdOptions | undefined;
|
|
132
167
|
/** Every encryption configuration set. */
|
|
133
168
|
keySystems: IKeySystemOption[];
|
|
134
169
|
/** `true` to play low-latency contents optimally. */
|
|
135
170
|
lowLatencyMode: boolean;
|
|
136
171
|
/** Settings linked to Manifest requests. */
|
|
137
|
-
manifestRequestSettings:
|
|
172
|
+
manifestRequestSettings: {
|
|
173
|
+
/** Maximum number of time a request on error will be retried. */
|
|
174
|
+
maxRetry: number | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Timeout after which request are aborted and, depending on other options,
|
|
177
|
+
* retried.
|
|
178
|
+
* To set to `-1` for no timeout.
|
|
179
|
+
* `undefined` will lead to a default, large, timeout being used.
|
|
180
|
+
*/
|
|
181
|
+
requestTimeout: number | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Connection timeout, in milliseconds, after which the request is canceled
|
|
184
|
+
* if the responses headers has not being received.
|
|
185
|
+
* Do not set or set to "undefined" to disable it.
|
|
186
|
+
*/
|
|
187
|
+
connectionTimeout: number | undefined;
|
|
188
|
+
/** Limit the frequency of Manifest updates. */
|
|
189
|
+
minimumManifestUpdateInterval: number;
|
|
190
|
+
/**
|
|
191
|
+
* Potential first Manifest to rely on, allowing to skip the initial Manifest
|
|
192
|
+
* request.
|
|
193
|
+
*/
|
|
194
|
+
initialManifest: IInitialManifest | undefined;
|
|
195
|
+
};
|
|
138
196
|
/** Logic linked Manifest and segment loading and parsing. */
|
|
139
197
|
transport: ITransportPipelines;
|
|
140
198
|
/** Configuration for the segment requesting logic. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media_source_content_initializer.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/init/media_source_content_initializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"media_source_content_initializer.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/init/media_source_content_initializer.ts"],"names":[],"mappings":"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"}
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import isCodecSupported from "../../compat/is_codec_supported";
|
|
16
17
|
import mayMediaElementFailOnUndecipherableData from "../../compat/may_media_element_fail_on_undecipherable_data";
|
|
17
18
|
import shouldReloadMediaSourceOnDecipherabilityUpdate from "../../compat/should_reload_media_source_on_decipherability_update";
|
|
18
19
|
import config from "../../config";
|
|
19
20
|
import AdaptiveRepresentationSelector from "../../core/adaptive";
|
|
21
|
+
import CmcdDataBuilder from "../../core/cmcd";
|
|
20
22
|
import { ManifestFetcher, SegmentFetcherCreator } from "../../core/fetchers";
|
|
21
23
|
import createContentTimeBoundariesObserver from "../../core/main/common/create_content_time_boundaries_observer";
|
|
22
24
|
import DecipherabilityFreezeDetector from "../../core/main/common/DecipherabilityFreezeDetector";
|
|
@@ -28,12 +30,12 @@ import log from "../../log";
|
|
|
28
30
|
import areArraysOfNumbersEqual from "../../utils/are_arrays_of_numbers_equal";
|
|
29
31
|
import assert from "../../utils/assert";
|
|
30
32
|
import createCancellablePromise from "../../utils/create_cancellable_promise";
|
|
33
|
+
import isNullOrUndefined from "../../utils/is_null_or_undefined";
|
|
31
34
|
import noop from "../../utils/noop";
|
|
32
35
|
import objectAssign from "../../utils/object_assign";
|
|
33
|
-
import SharedReference from "../../utils/reference";
|
|
34
36
|
import SyncOrAsync from "../../utils/sync_or_async";
|
|
35
37
|
import TaskCanceller from "../../utils/task_canceller";
|
|
36
|
-
import { getKeySystemConfiguration } from "../decrypt";
|
|
38
|
+
import { ContentDecryptorState, getKeySystemConfiguration } from "../decrypt";
|
|
37
39
|
import { ContentInitializer } from "./types";
|
|
38
40
|
import createCorePlaybackObserver from "./utils/create_core_playback_observer";
|
|
39
41
|
import createMediaSource from "./utils/create_media_source";
|
|
@@ -67,8 +69,11 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
67
69
|
this._settings = settings;
|
|
68
70
|
this._initCanceller = new TaskCanceller();
|
|
69
71
|
this._manifest = null;
|
|
72
|
+
this._decryptionCapabilities = { status: "uninitialized", value: null };
|
|
70
73
|
const urls = settings.url === undefined ? undefined : [settings.url];
|
|
71
|
-
this.
|
|
74
|
+
this._cmcdDataBuilder =
|
|
75
|
+
settings.cmcd === undefined ? null : new CmcdDataBuilder(settings.cmcd);
|
|
76
|
+
this._manifestFetcher = new ManifestFetcher(urls, settings.transport, Object.assign(Object.assign({}, settings.manifestRequestSettings), { lowLatencyMode: settings.lowLatencyMode, cmcdDataBuilder: this._cmcdDataBuilder }));
|
|
72
77
|
}
|
|
73
78
|
/**
|
|
74
79
|
* Perform non-destructive preparation steps, to prepare a future content.
|
|
@@ -101,10 +106,8 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
101
106
|
this.prepare(); // Load Manifest if not already done
|
|
102
107
|
/** Translate errors coming from the media element into RxPlayer errors. */
|
|
103
108
|
listenToMediaError(mediaElement, (error) => this._onFatalError(error), this._initCanceller.signal);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
this._initializeMediaSourceAndDecryption(mediaElement, protectionRef)
|
|
107
|
-
.then((initResult) => this._onInitialMediaSourceReady(mediaElement, initResult.mediaSource, playbackObserver, initResult.drmSystemId, protectionRef, initResult.unlinkMediaSource))
|
|
109
|
+
this._initializeMediaSourceAndDecryption(mediaElement)
|
|
110
|
+
.then((initResult) => this._onInitialMediaSourceReady(mediaElement, initResult.mediaSource, playbackObserver, initResult.drmSystemId, initResult.unlinkMediaSource))
|
|
108
111
|
.catch((err) => {
|
|
109
112
|
this._onFatalError(err);
|
|
110
113
|
});
|
|
@@ -129,12 +132,12 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
129
132
|
this._initCanceller.cancel();
|
|
130
133
|
this.trigger("error", err);
|
|
131
134
|
}
|
|
132
|
-
_initializeMediaSourceAndDecryption(mediaElement
|
|
135
|
+
_initializeMediaSourceAndDecryption(mediaElement) {
|
|
133
136
|
const initCanceller = this._initCanceller;
|
|
134
137
|
return createCancellablePromise(initCanceller.signal, (resolve) => {
|
|
135
138
|
const { keySystems } = this._settings;
|
|
136
139
|
/** Initialize decryption capabilities. */
|
|
137
|
-
const drmInitRef = initializeContentDecryption(mediaElement, keySystems,
|
|
140
|
+
const { statusRef: drmInitRef, contentDecryptor } = initializeContentDecryption(mediaElement, keySystems, {
|
|
138
141
|
onWarning: (err) => this.trigger("warning", err),
|
|
139
142
|
onError: (err) => this._onFatalError(err),
|
|
140
143
|
onBlackListProtectionData: (val) => {
|
|
@@ -159,7 +162,36 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
159
162
|
updateKeyIdsDecipherabilityOnManifest(manifest, updates.whitelistedKeyIds, updates.blacklistedKeyIds, updates.delistedKeyIds);
|
|
160
163
|
})().catch(noop);
|
|
161
164
|
},
|
|
165
|
+
onCodecSupportUpdate: () => {
|
|
166
|
+
var _a, _b;
|
|
167
|
+
const syncManifest = (_a = this._manifest) === null || _a === void 0 ? void 0 : _a.syncValue;
|
|
168
|
+
if (isNullOrUndefined(syncManifest)) {
|
|
169
|
+
// The Manifest is not yet fetched, but we will be able to check
|
|
170
|
+
// the codecs once it is the case
|
|
171
|
+
(_b = this._manifest) === null || _b === void 0 ? void 0 : _b.getValueAsAsync().then((loadedManifest) => {
|
|
172
|
+
if (this._initCanceller.isUsed()) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this._refreshManifestCodecSupport(loadedManifest);
|
|
176
|
+
}, noop);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
this._refreshManifestCodecSupport(syncManifest);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
162
182
|
}, initCanceller.signal);
|
|
183
|
+
if (contentDecryptor.enabled) {
|
|
184
|
+
this._decryptionCapabilities = {
|
|
185
|
+
status: "enabled",
|
|
186
|
+
value: contentDecryptor.value,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
this._decryptionCapabilities = {
|
|
191
|
+
status: "disabled",
|
|
192
|
+
value: contentDecryptor.value,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
163
195
|
drmInitRef.onUpdate((drmStatus, stopListeningToDrmUpdates) => {
|
|
164
196
|
if (drmStatus.initializationState.type === "uninitialized") {
|
|
165
197
|
return;
|
|
@@ -202,7 +234,7 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
202
234
|
}, { emitCurrentValue: true, clearSignal: initCanceller.signal });
|
|
203
235
|
});
|
|
204
236
|
}
|
|
205
|
-
async _onInitialMediaSourceReady(mediaElement, initialMediaSource, playbackObserver, drmSystemId,
|
|
237
|
+
async _onInitialMediaSourceReady(mediaElement, initialMediaSource, playbackObserver, drmSystemId, initialMediaSourceCanceller) {
|
|
206
238
|
var _a;
|
|
207
239
|
const { adaptiveOptions, autoPlay, bufferOptions, lowLatencyMode, segmentRequestOptions, speed, startAt, textTrackOptions, transport, } = this._settings;
|
|
208
240
|
const initCanceller = this._initCanceller;
|
|
@@ -216,17 +248,22 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
216
248
|
}
|
|
217
249
|
manifest.addEventListener("manifestUpdate", (updates) => {
|
|
218
250
|
this.trigger("manifestUpdate", updates);
|
|
251
|
+
this._refreshManifestCodecSupport(manifest);
|
|
219
252
|
}, initCanceller.signal);
|
|
220
253
|
manifest.addEventListener("decipherabilityUpdate", (elts) => {
|
|
221
254
|
this.trigger("decipherabilityUpdate", elts);
|
|
222
255
|
}, initCanceller.signal);
|
|
256
|
+
manifest.addEventListener("supportUpdate", () => {
|
|
257
|
+
this.trigger("codecSupportUpdate", null);
|
|
258
|
+
}, initCanceller.signal);
|
|
223
259
|
log.debug("Init: Calculating initial time");
|
|
224
260
|
const initialTime = getInitialTime(manifest, lowLatencyMode, startAt);
|
|
225
261
|
log.debug("Init: Initial time calculated:", initialTime);
|
|
226
262
|
/** Choose the right "Representation" for a given "Adaptation". */
|
|
227
263
|
const representationEstimator = AdaptiveRepresentationSelector(adaptiveOptions);
|
|
228
264
|
const subBufferOptions = objectAssign({ textTrackOptions, drmSystemId }, bufferOptions);
|
|
229
|
-
const segmentFetcherCreator = new SegmentFetcherCreator(transport, segmentRequestOptions, initCanceller.signal);
|
|
265
|
+
const segmentFetcherCreator = new SegmentFetcherCreator(transport, this._cmcdDataBuilder, segmentRequestOptions, initCanceller.signal);
|
|
266
|
+
this._refreshManifestCodecSupport(manifest);
|
|
230
267
|
this.trigger("manifestReady", manifest);
|
|
231
268
|
if (initCanceller.isUsed()) {
|
|
232
269
|
return;
|
|
@@ -257,7 +294,6 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
257
294
|
representationEstimator,
|
|
258
295
|
segmentFetcherCreator,
|
|
259
296
|
speed,
|
|
260
|
-
protectionRef,
|
|
261
297
|
bufferOptions: subBufferOptions,
|
|
262
298
|
};
|
|
263
299
|
bufferOnMediaSource(opts, onReloadMediaSource, currentCanceller.signal);
|
|
@@ -292,8 +328,8 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
292
328
|
* @param {Object} cancelSignal
|
|
293
329
|
*/
|
|
294
330
|
_startBufferingOnMediaSource(args, onReloadOrder, cancelSignal) {
|
|
295
|
-
var _a;
|
|
296
|
-
const { autoPlay, bufferOptions, initialTime, manifest, mediaElement, mediaSource, playbackObserver,
|
|
331
|
+
var _a, _b;
|
|
332
|
+
const { autoPlay, bufferOptions, initialTime, manifest, mediaElement, mediaSource, playbackObserver, representationEstimator, segmentFetcherCreator, speed, } = args;
|
|
297
333
|
const initialPeriod = (_a = manifest.getPeriodForTime(initialTime)) !== null && _a !== void 0 ? _a : manifest.getNextPeriod(initialTime);
|
|
298
334
|
if (initialPeriod === undefined) {
|
|
299
335
|
const error = new MediaError("MEDIA_STARTING_TIME_NOT_FOUND", "Wanted starting time not found in the Manifest.");
|
|
@@ -361,6 +397,11 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
361
397
|
initialPlayPerformed,
|
|
362
398
|
speed,
|
|
363
399
|
}, cancelSignal);
|
|
400
|
+
(_b = this._cmcdDataBuilder) === null || _b === void 0 ? void 0 : _b.startMonitoringPlayback(coreObserver);
|
|
401
|
+
cancelSignal.register(() => {
|
|
402
|
+
var _a;
|
|
403
|
+
(_a = this._cmcdDataBuilder) === null || _a === void 0 ? void 0 : _a.stopMonitoringPlayback();
|
|
404
|
+
});
|
|
364
405
|
const rebufferingController = this._createRebufferingController(playbackObserver, manifest, speed, cancelSignal);
|
|
365
406
|
const decipherabilityFreezeDetector = new DecipherabilityFreezeDetector(segmentSinksStore);
|
|
366
407
|
if (mayMediaElementFailOnUndecipherableData) {
|
|
@@ -538,7 +579,11 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
538
579
|
}
|
|
539
580
|
self.trigger("periodStreamCleared", value);
|
|
540
581
|
},
|
|
541
|
-
bitrateEstimateChange: (value) =>
|
|
582
|
+
bitrateEstimateChange: (value) => {
|
|
583
|
+
var _a;
|
|
584
|
+
(_a = self._cmcdDataBuilder) === null || _a === void 0 ? void 0 : _a.updateThroughput(value.type, value.bitrate);
|
|
585
|
+
self.trigger("bitrateEstimateChange", value);
|
|
586
|
+
},
|
|
542
587
|
needsMediaSourceReload: (payload) => {
|
|
543
588
|
reloadMediaSource(payload.timeOffset, payload.minimumPosition, payload.maximumPosition);
|
|
544
589
|
},
|
|
@@ -549,7 +594,7 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
549
594
|
const lastObservation = coreObserver.getReference().getValue();
|
|
550
595
|
const position = lastObservation.position.isAwaitingFuturePosition()
|
|
551
596
|
? lastObservation.position.getWanted()
|
|
552
|
-
: (_a = coreObserver.getCurrentTime()) !== null && _a !== void 0 ? _a : lastObservation.position.getPolled();
|
|
597
|
+
: ((_a = coreObserver.getCurrentTime()) !== null && _a !== void 0 ? _a : lastObservation.position.getPolled());
|
|
553
598
|
const isPaused = (_c = (_b = lastObservation.paused.pending) !== null && _b !== void 0 ? _b : coreObserver.getIsPaused()) !== null && _c !== void 0 ? _c : lastObservation.paused.last;
|
|
554
599
|
onReloadOrder({ position, autoPlay: !isPaused });
|
|
555
600
|
}
|
|
@@ -557,7 +602,7 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
557
602
|
const lastObservation = coreObserver.getReference().getValue();
|
|
558
603
|
const position = lastObservation.position.isAwaitingFuturePosition()
|
|
559
604
|
? lastObservation.position.getWanted()
|
|
560
|
-
: (_d = coreObserver.getCurrentTime()) !== null && _d !== void 0 ? _d : lastObservation.position.getPolled();
|
|
605
|
+
: ((_d = coreObserver.getCurrentTime()) !== null && _d !== void 0 ? _d : lastObservation.position.getPolled());
|
|
561
606
|
// simple seek close to the current position
|
|
562
607
|
// to flush the buffers
|
|
563
608
|
if (position + 0.001 < lastObservation.duration) {
|
|
@@ -569,8 +614,17 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
569
614
|
}
|
|
570
615
|
},
|
|
571
616
|
encryptionDataEncountered: (value) => {
|
|
617
|
+
if (self._decryptionCapabilities.status === "disabled") {
|
|
618
|
+
self._onFatalError(self._decryptionCapabilities.value);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
else if (self._decryptionCapabilities.status === "uninitialized") {
|
|
622
|
+
// Should never happen
|
|
623
|
+
log.error("Init: received encryption data without known decryption capabilities");
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
572
626
|
for (const protectionData of value) {
|
|
573
|
-
|
|
627
|
+
self._decryptionCapabilities.value.onInitializationData(protectionData);
|
|
574
628
|
if (cancelSignal.isCancelled()) {
|
|
575
629
|
return; // Previous call has stopped streams due to a side-effect
|
|
576
630
|
}
|
|
@@ -593,7 +647,7 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
593
647
|
const lastObservation = coreObserver.getReference().getValue();
|
|
594
648
|
const currentPosition = lastObservation.position.isAwaitingFuturePosition()
|
|
595
649
|
? lastObservation.position.getWanted()
|
|
596
|
-
: (_a = coreObserver.getCurrentTime()) !== null && _a !== void 0 ? _a : lastObservation.position.getPolled();
|
|
650
|
+
: ((_a = coreObserver.getCurrentTime()) !== null && _a !== void 0 ? _a : lastObservation.position.getPolled());
|
|
597
651
|
const isPaused = (_c = (_b = lastObservation.paused.pending) !== null && _b !== void 0 ? _b : coreObserver.getIsPaused()) !== null && _c !== void 0 ? _c : lastObservation.paused.last;
|
|
598
652
|
let position = currentPosition + deltaPosition;
|
|
599
653
|
if (minimumPosition !== undefined) {
|
|
@@ -633,6 +687,75 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
|
|
|
633
687
|
rebufferingController.start();
|
|
634
688
|
return rebufferingController;
|
|
635
689
|
}
|
|
690
|
+
/**
|
|
691
|
+
* Evaluates a list of codecs to determine their support status.
|
|
692
|
+
*
|
|
693
|
+
* @param {Array} codecsToCheck - The list of codecs to check.
|
|
694
|
+
* @returns {Array} - The list of evaluated codecs with their support status updated.
|
|
695
|
+
*/
|
|
696
|
+
getCodecsSupportInfo(codecsToCheck) {
|
|
697
|
+
const codecsSupportInfo = codecsToCheck.map((codecToCheck) => {
|
|
698
|
+
var _a;
|
|
699
|
+
const inputCodec = `${codecToCheck.mimeType};codecs="${codecToCheck.codec}"`;
|
|
700
|
+
const isSupported = isCodecSupported(inputCodec);
|
|
701
|
+
if (!isSupported) {
|
|
702
|
+
return {
|
|
703
|
+
mimeType: codecToCheck.mimeType,
|
|
704
|
+
codec: codecToCheck.codec,
|
|
705
|
+
supported: false,
|
|
706
|
+
supportedIfEncrypted: false,
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* `true` if the codec is supported when encrypted, `false` if it is not
|
|
711
|
+
* supported, or `undefined` if we cannot obtain that information.
|
|
712
|
+
*/
|
|
713
|
+
let supportedIfEncrypted;
|
|
714
|
+
if (this._decryptionCapabilities.status === "uninitialized") {
|
|
715
|
+
supportedIfEncrypted = undefined;
|
|
716
|
+
}
|
|
717
|
+
else if (this._decryptionCapabilities.status === "disabled") {
|
|
718
|
+
// It's ambiguous here, but let's say that no ContentDecryptor means that
|
|
719
|
+
// the codec is supported by it.
|
|
720
|
+
supportedIfEncrypted = true;
|
|
721
|
+
}
|
|
722
|
+
else {
|
|
723
|
+
const contentDecryptor = this._decryptionCapabilities.value;
|
|
724
|
+
if (contentDecryptor.getState() !== ContentDecryptorState.Initializing) {
|
|
725
|
+
// No information is available regarding the support status.
|
|
726
|
+
// Defaulting to assume the codec is supported.
|
|
727
|
+
supportedIfEncrypted =
|
|
728
|
+
(_a = contentDecryptor.isCodecSupported(codecToCheck.mimeType, codecToCheck.codec)) !== null && _a !== void 0 ? _a : true;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
return {
|
|
732
|
+
mimeType: codecToCheck.mimeType,
|
|
733
|
+
codec: codecToCheck.codec,
|
|
734
|
+
supported: isSupported,
|
|
735
|
+
supportedIfEncrypted,
|
|
736
|
+
};
|
|
737
|
+
});
|
|
738
|
+
return codecsSupportInfo;
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* Update the support status of all Representations in the Manifest.
|
|
742
|
+
*
|
|
743
|
+
* To call anytime either the Manifest is linked to new codecs or new means
|
|
744
|
+
* to test for codec support are available.
|
|
745
|
+
* @param {Object} manifest
|
|
746
|
+
*/
|
|
747
|
+
_refreshManifestCodecSupport(manifest) {
|
|
748
|
+
const codecsToTest = manifest.getCodecsWithUnknownSupport();
|
|
749
|
+
const codecsSupportInfo = this.getCodecsSupportInfo(codecsToTest);
|
|
750
|
+
if (codecsSupportInfo.length > 0) {
|
|
751
|
+
try {
|
|
752
|
+
manifest.updateCodecSupport(codecsSupportInfo);
|
|
753
|
+
}
|
|
754
|
+
catch (err) {
|
|
755
|
+
this._onFatalError(err);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
636
759
|
}
|
|
637
760
|
/**
|
|
638
761
|
* Change the decipherability of Representations which have their key id in one
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMediaElement } from "../../compat/browser_compatibility_types";
|
|
2
|
+
import type { IAdaptiveRepresentationSelectorArguments } from "../../core/types";
|
|
2
3
|
import type { IManifestMetadata } from "../../manifest";
|
|
3
4
|
import MainMediaSourceInterface from "../../mse/main_media_source_interface";
|
|
4
5
|
import type { IMediaElementPlaybackObserver } from "../../playback_observer";
|
|
5
|
-
import type { IKeySystemOption } from "../../public_types";
|
|
6
|
+
import type { ICmcdOptions, IInitialManifest, IKeySystemOption } from "../../public_types";
|
|
6
7
|
import type { ITransportOptions } from "../../transports";
|
|
7
8
|
import type { IReadOnlySharedReference } from "../../utils/reference";
|
|
9
|
+
import type IContentDecryptor from "../decrypt";
|
|
8
10
|
import type { ITextDisplayerOptions } from "./types";
|
|
9
11
|
import { ContentInitializer } from "./types";
|
|
10
12
|
import type { IInitialTimeOptions } from "./utils/get_initial_time";
|
|
@@ -62,10 +64,17 @@ export default class MultiThreadContentInitializer extends ContentInitializer {
|
|
|
62
64
|
* @param {HTMLMediaElement} mediaElement
|
|
63
65
|
* @param {Object} playbackObserver
|
|
64
66
|
*/
|
|
65
|
-
start(mediaElement:
|
|
67
|
+
start(mediaElement: IMediaElement, playbackObserver: IMediaElementPlaybackObserver): void;
|
|
66
68
|
dispose(): void;
|
|
67
69
|
private _onFatalError;
|
|
68
70
|
private _initializeContentDecryption;
|
|
71
|
+
/**
|
|
72
|
+
* Retrieves all unknown codecs from the current manifest, checks these unknown codecs
|
|
73
|
+
* to determine if they are supported, updates the manifest with the support
|
|
74
|
+
* status of these codecs, and forwards the list of supported codecs to the web worker.
|
|
75
|
+
* @param manifest
|
|
76
|
+
*/
|
|
77
|
+
private _updateCodecSupport;
|
|
69
78
|
private _hasTextBufferFeature;
|
|
70
79
|
private _reload;
|
|
71
80
|
/**
|
|
@@ -160,6 +169,12 @@ export interface IMultiThreadContentInitializerContentInfos {
|
|
|
160
169
|
* Set to `null` when those considerations are not taken yet.
|
|
161
170
|
*/
|
|
162
171
|
initialPlayPerformed: IReadOnlySharedReference<boolean> | null;
|
|
172
|
+
/**
|
|
173
|
+
* Set to the initialized `ContentDecryptor` instance linked to that content.
|
|
174
|
+
*
|
|
175
|
+
* Set to `null` when those considerations are not taken.
|
|
176
|
+
*/
|
|
177
|
+
contentDecryptor: IContentDecryptor | null;
|
|
163
178
|
}
|
|
164
179
|
/** Arguments to give to the `InitializeOnMediaSource` function. */
|
|
165
180
|
export interface IInitializeArguments {
|
|
@@ -186,6 +201,10 @@ export interface IInitializeArguments {
|
|
|
186
201
|
/** Behavior when a new video and/or audio codec is encountered. */
|
|
187
202
|
onCodecSwitch: "continue" | "reload";
|
|
188
203
|
};
|
|
204
|
+
/**
|
|
205
|
+
* When set to an object, enable "Common Media Client Data", or "CMCD".
|
|
206
|
+
*/
|
|
207
|
+
cmcd?: ICmcdOptions | undefined;
|
|
189
208
|
/** Every encryption configuration set. */
|
|
190
209
|
keySystems: IKeySystemOption[];
|
|
191
210
|
/** `true` to play low-latency contents optimally. */
|
|
@@ -197,7 +216,30 @@ export interface IInitializeArguments {
|
|
|
197
216
|
representationFilter: string | undefined;
|
|
198
217
|
};
|
|
199
218
|
/** Settings linked to Manifest requests. */
|
|
200
|
-
manifestRequestSettings:
|
|
219
|
+
manifestRequestSettings: {
|
|
220
|
+
/** Maximum number of time a request on error will be retried. */
|
|
221
|
+
maxRetry: number | undefined;
|
|
222
|
+
/**
|
|
223
|
+
* Timeout after which request are aborted and, depending on other options,
|
|
224
|
+
* retried.
|
|
225
|
+
* To set to `-1` for no timeout.
|
|
226
|
+
* `undefined` will lead to a default, large, timeout being used.
|
|
227
|
+
*/
|
|
228
|
+
requestTimeout: number | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* Connection timeout, in milliseconds, after which the request is canceled
|
|
231
|
+
* if the responses headers has not being received.
|
|
232
|
+
* Do not set or set to "undefined" to disable it.
|
|
233
|
+
*/
|
|
234
|
+
connectionTimeout: number | undefined;
|
|
235
|
+
/** Limit the frequency of Manifest updates. */
|
|
236
|
+
minimumManifestUpdateInterval: number;
|
|
237
|
+
/**
|
|
238
|
+
* Potential first Manifest to rely on, allowing to skip the initial Manifest
|
|
239
|
+
* request.
|
|
240
|
+
*/
|
|
241
|
+
initialManifest: IInitialManifest | undefined;
|
|
242
|
+
};
|
|
201
243
|
/** Configuration for the segment requesting logic. */
|
|
202
244
|
segmentRequestOptions: {
|
|
203
245
|
lowLatencyMode: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi_thread_content_initializer.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/init/multi_thread_content_initializer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multi_thread_content_initializer.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/init/multi_thread_content_initializer.ts"],"names":[],"mappings":"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"}
|