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
|
@@ -29,7 +29,9 @@ import type { ICdnMetadata } from "../../../parsers/manifest";
|
|
|
29
29
|
import type { IPlayerError } from "../../../public_types";
|
|
30
30
|
import type {
|
|
31
31
|
IChunkCompleteInformation,
|
|
32
|
+
ISegmentContext,
|
|
32
33
|
ISegmentLoader,
|
|
34
|
+
ISegmentLoaderOptions,
|
|
33
35
|
ISegmentLoadingProgressInformation,
|
|
34
36
|
ISegmentParserParsedInitChunk,
|
|
35
37
|
ISegmentParserParsedMediaChunk,
|
|
@@ -48,6 +50,7 @@ import type {
|
|
|
48
50
|
IRequestEndCallbackPayload,
|
|
49
51
|
IRequestProgressCallbackPayload,
|
|
50
52
|
} from "../../adaptive";
|
|
53
|
+
import type CmcdDataBuilder from "../../cmcd";
|
|
51
54
|
import type { IBufferType } from "../../segment_sinks";
|
|
52
55
|
import type CdnPrioritizer from "../cdn_prioritizer";
|
|
53
56
|
import errorSelector from "../utils/error_selector";
|
|
@@ -61,42 +64,36 @@ const generateRequestID = idGenerator();
|
|
|
61
64
|
* Create an `ISegmentFetcher` object which will allow to easily fetch and parse
|
|
62
65
|
* segments.
|
|
63
66
|
* An `ISegmentFetcher` also implements a retry mechanism, based on the given
|
|
64
|
-
* `
|
|
67
|
+
* `requestOptions` argument, which may retry a segment request when it fails.
|
|
65
68
|
*
|
|
66
|
-
* @param {
|
|
67
|
-
* `"video"`, `"text" etc.)
|
|
68
|
-
* @param {Object} pipeline - The transport-specific logic allowing to load
|
|
69
|
-
* segments of the given buffer type and transport protocol (e.g. DASH).
|
|
70
|
-
* @param {Object|null} cdnPrioritizer - Abstraction allowing to synchronize,
|
|
71
|
-
* update and keep track of the priorization of the CDN to use to load any given
|
|
72
|
-
* segment, in cases where multiple ones are available.
|
|
73
|
-
*
|
|
74
|
-
* Can be set to `null` in which case a minimal priorization logic will be used
|
|
75
|
-
* instead.
|
|
76
|
-
* @param {Object} lifecycleCallbacks - Callbacks that can be registered to be
|
|
77
|
-
* informed when new requests are made, ended, new metrics are available etc.
|
|
78
|
-
* This should be mainly useful to implement an adaptive logic relying on those
|
|
79
|
-
* metrics and events.
|
|
80
|
-
* @param {Object} options - Various tweaking options allowing to configure the
|
|
81
|
-
* behavior of the returned `ISegmentFetcher`.
|
|
69
|
+
* @param {Object} args
|
|
82
70
|
* @returns {Function}
|
|
83
71
|
*/
|
|
84
|
-
export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
85
|
-
bufferType
|
|
86
|
-
pipeline
|
|
87
|
-
cdnPrioritizer
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
72
|
+
export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>({
|
|
73
|
+
bufferType,
|
|
74
|
+
pipeline,
|
|
75
|
+
cdnPrioritizer,
|
|
76
|
+
cmcdDataBuilder,
|
|
77
|
+
eventListeners,
|
|
78
|
+
requestOptions,
|
|
79
|
+
}: ISegmentFetcherArguments<
|
|
80
|
+
TLoadedFormat,
|
|
81
|
+
TSegmentDataType
|
|
82
|
+
>): ISegmentFetcher<TSegmentDataType> {
|
|
91
83
|
let connectionTimeout;
|
|
92
|
-
if (
|
|
84
|
+
if (
|
|
85
|
+
requestOptions.connectionTimeout === undefined ||
|
|
86
|
+
requestOptions.connectionTimeout < 0
|
|
87
|
+
) {
|
|
93
88
|
connectionTimeout = undefined;
|
|
94
89
|
} else {
|
|
95
|
-
connectionTimeout =
|
|
90
|
+
connectionTimeout = requestOptions.connectionTimeout;
|
|
96
91
|
}
|
|
97
|
-
const
|
|
98
|
-
timeout:
|
|
92
|
+
const pipelineRequestOptions: ISegmentLoaderOptions = {
|
|
93
|
+
timeout:
|
|
94
|
+
requestOptions.requestTimeout < 0 ? undefined : requestOptions.requestTimeout,
|
|
99
95
|
connectionTimeout,
|
|
96
|
+
cmcdPayload: undefined,
|
|
100
97
|
};
|
|
101
98
|
|
|
102
99
|
/**
|
|
@@ -160,7 +157,7 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
160
157
|
let metricsSent = false;
|
|
161
158
|
|
|
162
159
|
/** Segment context given to the transport pipelines. */
|
|
163
|
-
const context = {
|
|
160
|
+
const context: ISegmentContext = {
|
|
164
161
|
segment,
|
|
165
162
|
type: adaptation.type,
|
|
166
163
|
language: adaptation.language,
|
|
@@ -183,7 +180,7 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
183
180
|
return; // request already termminated
|
|
184
181
|
}
|
|
185
182
|
if (info.totalSize !== undefined && info.size < info.totalSize) {
|
|
186
|
-
|
|
183
|
+
eventListeners.onProgress?.({
|
|
187
184
|
duration: info.duration,
|
|
188
185
|
size: info.size,
|
|
189
186
|
totalSize: info.totalSize,
|
|
@@ -213,7 +210,7 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
213
210
|
}
|
|
214
211
|
|
|
215
212
|
log.debug("SF: Beginning request", segmentIdString);
|
|
216
|
-
|
|
213
|
+
eventListeners.onRequestBegin?.({
|
|
217
214
|
requestTimestamp: getTimestamp(),
|
|
218
215
|
id: requestId,
|
|
219
216
|
content,
|
|
@@ -226,7 +223,7 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
226
223
|
content.representation.cdnMetadata,
|
|
227
224
|
cdnPrioritizer,
|
|
228
225
|
callLoaderWithUrl,
|
|
229
|
-
objectAssign({ onRetry },
|
|
226
|
+
objectAssign({ onRetry }, requestOptions),
|
|
230
227
|
cancellationSignal,
|
|
231
228
|
);
|
|
232
229
|
|
|
@@ -254,7 +251,7 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
254
251
|
// The current task could have been canceled as a result of one
|
|
255
252
|
// of the previous callbacks call. In that case, we don't want to send
|
|
256
253
|
// a "requestEnd" again as it has already been sent on cancellation.
|
|
257
|
-
|
|
254
|
+
eventListeners.onRequestEnd?.({ id: requestId });
|
|
258
255
|
}
|
|
259
256
|
cancellationSignal.deregister(onCancellation);
|
|
260
257
|
} catch (err) {
|
|
@@ -265,7 +262,7 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
265
262
|
throw err;
|
|
266
263
|
}
|
|
267
264
|
log.debug("SF: Segment request failed", segmentIdString);
|
|
268
|
-
|
|
265
|
+
eventListeners.onRequestEnd?.({ id: requestId });
|
|
269
266
|
throw errorSelector(err);
|
|
270
267
|
}
|
|
271
268
|
|
|
@@ -275,7 +272,7 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
275
272
|
}
|
|
276
273
|
log.debug("SF: Segment request cancelled", segmentIdString);
|
|
277
274
|
requestInfo = null;
|
|
278
|
-
|
|
275
|
+
eventListeners.onRequestEnd?.({ id: requestId });
|
|
279
276
|
}
|
|
280
277
|
|
|
281
278
|
/**
|
|
@@ -286,10 +283,12 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
286
283
|
function callLoaderWithUrl(
|
|
287
284
|
cdnMetadata: ICdnMetadata | null,
|
|
288
285
|
): ReturnType<ISegmentLoader<TLoadedFormat>> {
|
|
286
|
+
pipelineRequestOptions.cmcdPayload =
|
|
287
|
+
cmcdDataBuilder?.getCmcdDataForSegmentRequest(content);
|
|
289
288
|
return loadSegment(
|
|
290
289
|
cdnMetadata,
|
|
291
290
|
context,
|
|
292
|
-
|
|
291
|
+
pipelineRequestOptions,
|
|
293
292
|
cancellationSignal,
|
|
294
293
|
loaderCallbacks,
|
|
295
294
|
);
|
|
@@ -367,7 +366,7 @@ export default function createSegmentFetcher<TLoadedFormat, TSegmentDataType>(
|
|
|
367
366
|
parsedChunks.every((isParsed) => isParsed)
|
|
368
367
|
) {
|
|
369
368
|
metricsSent = true;
|
|
370
|
-
|
|
369
|
+
eventListeners.onMetrics?.({
|
|
371
370
|
size: requestInfo.size,
|
|
372
371
|
requestDuration: requestInfo.requestDuration,
|
|
373
372
|
content,
|
|
@@ -458,7 +457,7 @@ export interface ISegmentFetcherLifecycleCallbacks {
|
|
|
458
457
|
onMetrics?: (arg: IMetricsCallbackPayload) => void;
|
|
459
458
|
}
|
|
460
459
|
|
|
461
|
-
/**
|
|
460
|
+
/** requestOptions allowing to configure an `ISegmentFetcher`'s behavior. */
|
|
462
461
|
export interface ISegmentFetcherOptions {
|
|
463
462
|
/**
|
|
464
463
|
* Initial delay to wait if a request fails before making a new request, in
|
|
@@ -476,7 +475,7 @@ export interface ISegmentFetcherOptions {
|
|
|
476
475
|
*/
|
|
477
476
|
maxRetry: number;
|
|
478
477
|
/**
|
|
479
|
-
* Timeout after which request are aborted and, depending on other
|
|
478
|
+
* Timeout after which request are aborted and, depending on other requestOptions,
|
|
480
479
|
* retried.
|
|
481
480
|
* To set to `-1` for no timeout.
|
|
482
481
|
*/
|
|
@@ -490,11 +489,10 @@ export interface ISegmentFetcherOptions {
|
|
|
490
489
|
}
|
|
491
490
|
|
|
492
491
|
/**
|
|
493
|
-
* @param {
|
|
494
|
-
* @param {Object}
|
|
492
|
+
* @param {Object} baseOptions
|
|
495
493
|
* @returns {Object}
|
|
496
494
|
*/
|
|
497
|
-
export function
|
|
495
|
+
export function getSegmentFetcherRequestOptions({
|
|
498
496
|
maxRetry,
|
|
499
497
|
lowLatencyMode,
|
|
500
498
|
requestTimeout,
|
|
@@ -526,3 +524,39 @@ export function getSegmentFetcherOptions({
|
|
|
526
524
|
connectionTimeout === undefined ? DEFAULT_CONNECTION_TIMEOUT : connectionTimeout,
|
|
527
525
|
};
|
|
528
526
|
}
|
|
527
|
+
|
|
528
|
+
export interface ISegmentFetcherArguments<TLoadedFormat, TSegmentDataType> {
|
|
529
|
+
/** Type of buffer concerned (e.g. `"audio"`, `"video"`, `"text" etc.) */
|
|
530
|
+
bufferType: IBufferType;
|
|
531
|
+
/**
|
|
532
|
+
* The transport-specific logic allowing to load segments of the given buffer
|
|
533
|
+
* type and transport protocol (e.g. DASH).
|
|
534
|
+
*/
|
|
535
|
+
pipeline: ISegmentPipeline<TLoadedFormat, TSegmentDataType>;
|
|
536
|
+
/**
|
|
537
|
+
* Abstraction allowing to synchronize, update and keep track of the
|
|
538
|
+
* priorization of the CDN to use to load any given segment, in cases where
|
|
539
|
+
* multiple ones are available.
|
|
540
|
+
*
|
|
541
|
+
* Can be set to `null` in which case a minimal priorization logic will be used
|
|
542
|
+
* instead.
|
|
543
|
+
*/
|
|
544
|
+
cdnPrioritizer: CdnPrioritizer | null;
|
|
545
|
+
/**
|
|
546
|
+
* Optional module allowing to collect "Common Media Client Data" (a.k.a. CMCD)
|
|
547
|
+
* for the CDN.
|
|
548
|
+
*/
|
|
549
|
+
cmcdDataBuilder: CmcdDataBuilder | null;
|
|
550
|
+
/**
|
|
551
|
+
* Callbacks that can be registered to be informed when new requests are made,
|
|
552
|
+
* ended, new metrics are available etc.
|
|
553
|
+
* This should be mainly useful to implement an adaptive logic relying on those
|
|
554
|
+
* metrics and events.
|
|
555
|
+
*/
|
|
556
|
+
eventListeners: ISegmentFetcherLifecycleCallbacks;
|
|
557
|
+
/**
|
|
558
|
+
* Various tweaking requestOptions allowing to configure the behavior of the returned
|
|
559
|
+
* `ISegmentFetcher` regarding segment requests.
|
|
560
|
+
*/
|
|
561
|
+
requestOptions: ISegmentFetcherOptions;
|
|
562
|
+
}
|
|
@@ -17,12 +17,13 @@
|
|
|
17
17
|
import config from "../../../config";
|
|
18
18
|
import type { ISegmentPipeline, ITransportPipelines } from "../../../transports";
|
|
19
19
|
import type { CancellationSignal } from "../../../utils/task_canceller";
|
|
20
|
+
import type CmcdDataBuilder from "../../cmcd";
|
|
20
21
|
import type { IBufferType } from "../../segment_sinks";
|
|
21
22
|
import CdnPrioritizer from "../cdn_prioritizer";
|
|
22
23
|
import type { IPrioritizedSegmentFetcher } from "./prioritized_segment_fetcher";
|
|
23
24
|
import applyPrioritizerToSegmentFetcher from "./prioritized_segment_fetcher";
|
|
24
25
|
import type { ISegmentFetcherLifecycleCallbacks } from "./segment_fetcher";
|
|
25
|
-
import createSegmentFetcher, {
|
|
26
|
+
import createSegmentFetcher, { getSegmentFetcherRequestOptions } from "./segment_fetcher";
|
|
26
27
|
import TaskPrioritizer from "./task_prioritizer";
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -54,11 +55,14 @@ export default class SegmentFetcherCreator {
|
|
|
54
55
|
|
|
55
56
|
private readonly _cdnPrioritizer: CdnPrioritizer;
|
|
56
57
|
|
|
58
|
+
private _cmcdDataBuilder: CmcdDataBuilder | null;
|
|
59
|
+
|
|
57
60
|
/**
|
|
58
61
|
* @param {Object} transport
|
|
59
62
|
*/
|
|
60
63
|
constructor(
|
|
61
64
|
transport: ITransportPipelines,
|
|
65
|
+
cmcdDataBuilder: CmcdDataBuilder | null,
|
|
62
66
|
options: ISegmentFetcherCreatorBackoffOptions,
|
|
63
67
|
cancelSignal: CancellationSignal,
|
|
64
68
|
) {
|
|
@@ -74,30 +78,32 @@ export default class SegmentFetcherCreator {
|
|
|
74
78
|
});
|
|
75
79
|
this._cdnPrioritizer = cdnPrioritizer;
|
|
76
80
|
this._backoffOptions = options;
|
|
81
|
+
this._cmcdDataBuilder = cmcdDataBuilder;
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
/**
|
|
80
85
|
* Create a segment fetcher, allowing to easily perform segment requests.
|
|
81
86
|
* @param {string} bufferType - The type of buffer concerned (e.g. "audio",
|
|
82
87
|
* "video", etc.)
|
|
83
|
-
* @param {Object}
|
|
88
|
+
* @param {Object} eventListeners
|
|
84
89
|
* @returns {Object}
|
|
85
90
|
*/
|
|
86
91
|
createSegmentFetcher(
|
|
87
92
|
bufferType: IBufferType,
|
|
88
|
-
|
|
93
|
+
eventListeners: ISegmentFetcherLifecycleCallbacks,
|
|
89
94
|
): IPrioritizedSegmentFetcher<unknown> {
|
|
90
|
-
const
|
|
95
|
+
const requestOptions = getSegmentFetcherRequestOptions(this._backoffOptions);
|
|
91
96
|
const pipelines = this._transport[bufferType];
|
|
92
97
|
|
|
93
98
|
// Types are very complicated here as they are per-type of buffer.
|
|
94
|
-
const segmentFetcher = createSegmentFetcher<unknown, unknown>(
|
|
99
|
+
const segmentFetcher = createSegmentFetcher<unknown, unknown>({
|
|
95
100
|
bufferType,
|
|
96
|
-
pipelines as ISegmentPipeline<unknown, unknown>,
|
|
97
|
-
this._cdnPrioritizer,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
pipeline: pipelines as ISegmentPipeline<unknown, unknown>,
|
|
102
|
+
cdnPrioritizer: this._cdnPrioritizer,
|
|
103
|
+
cmcdDataBuilder: this._cmcdDataBuilder,
|
|
104
|
+
eventListeners,
|
|
105
|
+
requestOptions,
|
|
106
|
+
});
|
|
101
107
|
return applyPrioritizerToSegmentFetcher(this._prioritizer, segmentFetcher);
|
|
102
108
|
}
|
|
103
109
|
}
|
package/src/core/main/README.md
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
[1] In a Multithreading mode, no file from that directory should ever be imported by
|
|
9
9
|
external code but the `WorkerMain` to generate the worker bundle. In a monothreading mode,
|
|
10
|
-
any
|
|
10
|
+
any file may be directly imported.
|
|
11
11
|
|
|
12
12
|
## Overview
|
|
13
13
|
|
|
14
|
-
The Core Main serves as the entry point of the `core` code, which may optionally
|
|
14
|
+
The Core Main serves as the entry point of the `core` code, which may optionally run in a
|
|
15
15
|
WebWorker.
|
|
16
16
|
|
|
17
17
|
When in monothreading mode, files declared here may be imported directly to make the link
|
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
import TaskCanceller from "../../../utils/task_canceller";
|
|
22
22
|
import type { IRepresentationEstimator } from "../../adaptive";
|
|
23
23
|
import createAdaptiveRepresentationSelector from "../../adaptive";
|
|
24
|
+
import CmcdDataBuilder from "../../cmcd";
|
|
24
25
|
import type { IManifestRefreshSettings } from "../../fetchers";
|
|
25
26
|
import { ManifestFetcher, SegmentFetcherCreator } from "../../fetchers";
|
|
26
27
|
import SegmentSinksStore from "../../segment_sinks";
|
|
@@ -99,10 +100,16 @@ export default class ContentPreparer {
|
|
|
99
100
|
...transportOptions,
|
|
100
101
|
representationFilter,
|
|
101
102
|
});
|
|
103
|
+
|
|
104
|
+
const cmcdDataBuilder =
|
|
105
|
+
context.cmcd === undefined ? null : new CmcdDataBuilder(context.cmcd);
|
|
102
106
|
const manifestFetcher = new ManifestFetcher(
|
|
103
107
|
url === undefined ? undefined : [url],
|
|
104
108
|
dashPipelines,
|
|
105
|
-
|
|
109
|
+
{
|
|
110
|
+
cmcdDataBuilder,
|
|
111
|
+
...context.manifestRetryOptions,
|
|
112
|
+
},
|
|
106
113
|
);
|
|
107
114
|
const representationEstimator = createAdaptiveRepresentationSelector({
|
|
108
115
|
initialBitrates: {
|
|
@@ -124,6 +131,7 @@ export default class ContentPreparer {
|
|
|
124
131
|
|
|
125
132
|
const segmentFetcherCreator = new SegmentFetcherCreator(
|
|
126
133
|
dashPipelines,
|
|
134
|
+
cmcdDataBuilder,
|
|
127
135
|
context.segmentRetryOptions,
|
|
128
136
|
contentCanceller.signal,
|
|
129
137
|
);
|
|
@@ -144,6 +152,7 @@ export default class ContentPreparer {
|
|
|
144
152
|
segmentSinksStore,
|
|
145
153
|
);
|
|
146
154
|
this._currentContent = {
|
|
155
|
+
cmcdDataBuilder,
|
|
147
156
|
contentId,
|
|
148
157
|
decipherabilityFreezeDetector,
|
|
149
158
|
mediaSource,
|
|
@@ -313,6 +322,12 @@ export interface IPreparedContentData {
|
|
|
313
322
|
* Protects against all kind of race conditions or asynchronous issues.
|
|
314
323
|
*/
|
|
315
324
|
contentId: string;
|
|
325
|
+
/**
|
|
326
|
+
* Perform data collection and retrieval for the "Common Media Client Data"
|
|
327
|
+
* scheme, which is a specification allowing to communicate about playback
|
|
328
|
+
* conditions with a CDN.
|
|
329
|
+
*/
|
|
330
|
+
cmcdDataBuilder: CmcdDataBuilder | null;
|
|
316
331
|
/**
|
|
317
332
|
* Interface to the MediaSource implementation, allowing to buffer audio
|
|
318
333
|
* and video media segments.
|
|
@@ -3,8 +3,6 @@ import { MediaError, OtherError } from "../../../errors";
|
|
|
3
3
|
import features from "../../../features";
|
|
4
4
|
import log from "../../../log";
|
|
5
5
|
import Manifest, { Adaptation, Period, Representation } from "../../../manifest/classes";
|
|
6
|
-
import MainCodecSupportProber from "../../../mse/main_codec_support_prober";
|
|
7
|
-
import WorkerCodecSupportProber from "../../../mse/worker_codec_support_prober";
|
|
8
6
|
import type {
|
|
9
7
|
IContentInitializationData,
|
|
10
8
|
IDiscontinuityUpdateWorkerMessagePayload,
|
|
@@ -21,7 +19,7 @@ import type { IPlayerError, ITrackType } from "../../../public_types";
|
|
|
21
19
|
import createDashPipelines from "../../../transports/dash";
|
|
22
20
|
import arrayFind from "../../../utils/array_find";
|
|
23
21
|
import assert, { assertUnreachable } from "../../../utils/assert";
|
|
24
|
-
import type { ILoggerLevel } from "../../../utils/logger";
|
|
22
|
+
import type { ILogFormat, ILoggerLevel } from "../../../utils/logger";
|
|
25
23
|
import { scaleTimestamp } from "../../../utils/monotonic_timestamp";
|
|
26
24
|
import objectAssign from "../../../utils/object_assign";
|
|
27
25
|
import type { IReadOnlySharedReference } from "../../../utils/reference";
|
|
@@ -91,7 +89,11 @@ export default function initializeWorkerMain() {
|
|
|
91
89
|
assert(!isInitialized);
|
|
92
90
|
isInitialized = true;
|
|
93
91
|
scaleTimestamp(msg.value);
|
|
94
|
-
updateLoggerLevel(
|
|
92
|
+
updateLoggerLevel(
|
|
93
|
+
msg.value.logLevel,
|
|
94
|
+
msg.value.logFormat,
|
|
95
|
+
msg.value.sendBackLogs,
|
|
96
|
+
);
|
|
95
97
|
if (msg.value.dashWasmUrl !== undefined && dashWasmParser.isCompatible()) {
|
|
96
98
|
dashWasmParser.initialize({ wasmUrl: msg.value.dashWasmUrl }).catch((err) => {
|
|
97
99
|
const error = err instanceof Error ? err.toString() : "Unknown Error";
|
|
@@ -107,15 +109,15 @@ export default function initializeWorkerMain() {
|
|
|
107
109
|
});
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
features.codecSupportProber = msg.value.hasMseInWorker
|
|
111
|
-
? MainCodecSupportProber
|
|
112
|
-
: WorkerCodecSupportProber;
|
|
113
|
-
|
|
114
112
|
sendMessage({ type: WorkerMessageType.InitSuccess, value: null });
|
|
115
113
|
break;
|
|
116
114
|
|
|
117
115
|
case MainThreadMessageType.LogLevelUpdate:
|
|
118
|
-
updateLoggerLevel(
|
|
116
|
+
updateLoggerLevel(
|
|
117
|
+
msg.value.logLevel,
|
|
118
|
+
msg.value.logFormat,
|
|
119
|
+
msg.value.sendBackLogs,
|
|
120
|
+
);
|
|
119
121
|
break;
|
|
120
122
|
|
|
121
123
|
case MainThreadMessageType.PrepareContent:
|
|
@@ -283,13 +285,9 @@ export default function initializeWorkerMain() {
|
|
|
283
285
|
if (preparedContent === null || preparedContent.manifest === null) {
|
|
284
286
|
return;
|
|
285
287
|
}
|
|
286
|
-
|
|
287
|
-
for (const { mimeType, codec, result } of msg.value) {
|
|
288
|
-
features.codecSupportProber.updateCache(mimeType, codec, result);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
288
|
+
const newEvaluatedCodecs = msg.value;
|
|
291
289
|
try {
|
|
292
|
-
const warning = preparedContent.manifest.
|
|
290
|
+
const warning = preparedContent.manifest.updateCodecSupport(newEvaluatedCodecs);
|
|
293
291
|
if (warning !== null) {
|
|
294
292
|
sendMessage({
|
|
295
293
|
type: WorkerMessageType.Warning,
|
|
@@ -508,6 +506,7 @@ function loadOrReloadPreparedContent(
|
|
|
508
506
|
}
|
|
509
507
|
const {
|
|
510
508
|
contentId,
|
|
509
|
+
cmcdDataBuilder,
|
|
511
510
|
manifest,
|
|
512
511
|
mediaSource,
|
|
513
512
|
representationEstimator,
|
|
@@ -554,6 +553,10 @@ function loadOrReloadPreparedContent(
|
|
|
554
553
|
sendMessage,
|
|
555
554
|
currentLoadCanceller.signal,
|
|
556
555
|
);
|
|
556
|
+
cmcdDataBuilder?.startMonitoringPlayback(playbackObserver);
|
|
557
|
+
currentLoadCanceller.signal.register(() => {
|
|
558
|
+
cmcdDataBuilder?.stopMonitoringPlayback();
|
|
559
|
+
});
|
|
557
560
|
|
|
558
561
|
const contentTimeBoundariesObserver = createContentTimeBoundariesObserver(
|
|
559
562
|
manifest,
|
|
@@ -750,6 +753,13 @@ function loadOrReloadPreparedContent(
|
|
|
750
753
|
},
|
|
751
754
|
|
|
752
755
|
bitrateEstimateChange(payload) {
|
|
756
|
+
if (preparedContent !== null) {
|
|
757
|
+
preparedContent.cmcdDataBuilder?.updateThroughput(
|
|
758
|
+
payload.type,
|
|
759
|
+
payload.bitrate,
|
|
760
|
+
);
|
|
761
|
+
}
|
|
762
|
+
|
|
753
763
|
// TODO for low-latency contents it is __VERY__ frequent.
|
|
754
764
|
// Considering this is only for an unimportant undocumented API, we may
|
|
755
765
|
// throttle such messages. (e.g. max one per 2 seconds for each type?).
|
|
@@ -883,11 +893,17 @@ function loadOrReloadPreparedContent(
|
|
|
883
893
|
}
|
|
884
894
|
}
|
|
885
895
|
|
|
886
|
-
function updateLoggerLevel(
|
|
896
|
+
function updateLoggerLevel(
|
|
897
|
+
logLevel: ILoggerLevel,
|
|
898
|
+
logFormat: ILogFormat,
|
|
899
|
+
sendBackLogs: boolean,
|
|
900
|
+
): void {
|
|
887
901
|
if (!sendBackLogs) {
|
|
888
|
-
log.setLevel(logLevel);
|
|
902
|
+
log.setLevel(logLevel, logFormat);
|
|
889
903
|
} else {
|
|
890
|
-
log
|
|
904
|
+
// Here we force the log format to "standard" as the full formatting will be
|
|
905
|
+
// performed on main thread.
|
|
906
|
+
log.setLevel(logLevel, "standard", (levelStr, logs) => {
|
|
891
907
|
const sentLogs = logs.map((e) => {
|
|
892
908
|
if (e instanceof Error) {
|
|
893
909
|
return formatErrorForSender(e);
|
|
@@ -33,7 +33,7 @@ Here's a simplified architecture schema of the code in that directory:
|
|
|
33
33
|
+--------------------------------------------------------------------------+
|
|
34
34
|
| ^
|
|
35
35
|
Ask to get / create / remove | | Returns created SegmentSink or
|
|
36
|
-
SegmentSink for a given type
|
|
36
|
+
SegmentSink for a given type | | wanted information
|
|
37
37
|
or get information about the | |
|
|
38
38
|
available types | |
|
|
39
39
|
| |
|
|
@@ -1353,7 +1353,7 @@ function prettyPrintInventory(inventory: IBufferedChunk[]): string {
|
|
|
1353
1353
|
currentLetter = generateNewLetter(chunk.infos);
|
|
1354
1354
|
encounteredPeriod[representationId] = currentLetter;
|
|
1355
1355
|
} else {
|
|
1356
|
-
currentLetter = encounteredPeriod[representationId]
|
|
1356
|
+
currentLetter = encounteredPeriod[representationId];
|
|
1357
1357
|
}
|
|
1358
1358
|
|
|
1359
1359
|
if (lastChunk === null) {
|
package/src/default_config.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import type { IFeaturesObject } from "../../../features/types";
|
|
3
3
|
import MediaSourceContentInitializer from "../../../main_thread/init/media_source_content_initializer";
|
|
4
|
-
import mainCodecSupportProber from "../../../mse/main_codec_support_prober";
|
|
5
4
|
import local from "../../../transports/local";
|
|
6
5
|
import addLocalManifestFeature from "../local";
|
|
7
6
|
|
|
@@ -12,10 +11,8 @@ describe("Features list - LOCAL_MANIFEST", () => {
|
|
|
12
11
|
expect(featureObject).toEqual({
|
|
13
12
|
transports: { local },
|
|
14
13
|
mainThreadMediaSourceInit: MediaSourceContentInitializer,
|
|
15
|
-
codecSupportProber: mainCodecSupportProber,
|
|
16
14
|
});
|
|
17
15
|
expect(featureObject.transports.local).toBe(local);
|
|
18
16
|
expect(featureObject.mainThreadMediaSourceInit).toBe(MediaSourceContentInitializer);
|
|
19
|
-
expect(featureObject.codecSupportProber).toBe(mainCodecSupportProber);
|
|
20
17
|
});
|
|
21
18
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import type { IFeaturesObject } from "../../../features/types";
|
|
3
3
|
import MediaSourceContentInitializer from "../../../main_thread/init/media_source_content_initializer";
|
|
4
|
-
import mainCodecSupportProber from "../../../mse/main_codec_support_prober";
|
|
5
4
|
import metaplaylist from "../../../transports/metaplaylist";
|
|
6
5
|
import addLocalManifestFeature from "../metaplaylist";
|
|
7
6
|
|
|
@@ -12,10 +11,8 @@ describe("Features list - METAPLAYLIST", () => {
|
|
|
12
11
|
expect(featureObject).toEqual({
|
|
13
12
|
transports: { metaplaylist },
|
|
14
13
|
mainThreadMediaSourceInit: MediaSourceContentInitializer,
|
|
15
|
-
codecSupportProber: mainCodecSupportProber,
|
|
16
14
|
});
|
|
17
15
|
expect(featureObject.transports.metaplaylist).toBe(metaplaylist);
|
|
18
16
|
expect(featureObject.mainThreadMediaSourceInit).toBe(MediaSourceContentInitializer);
|
|
19
|
-
expect(featureObject.codecSupportProber).toBe(mainCodecSupportProber);
|
|
20
17
|
});
|
|
21
18
|
});
|
|
@@ -16,13 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
import type { IFeaturesObject } from "../../features/types";
|
|
18
18
|
import MediaSourceContentInitializer from "../../main_thread/init/media_source_content_initializer";
|
|
19
|
-
import mainCodecSupportProber from "../../mse/main_codec_support_prober";
|
|
20
19
|
import local from "../../transports/local";
|
|
21
20
|
|
|
22
21
|
function addLocalManifestFeature(features: IFeaturesObject): void {
|
|
23
22
|
features.transports.local = local;
|
|
24
23
|
features.mainThreadMediaSourceInit = MediaSourceContentInitializer;
|
|
25
|
-
features.codecSupportProber = mainCodecSupportProber;
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
export { addLocalManifestFeature as LOCAL_MANIFEST };
|
|
@@ -16,13 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
import type { IFeaturesObject } from "../../features/types";
|
|
18
18
|
import MediaSourceContentInitializer from "../../main_thread/init/media_source_content_initializer";
|
|
19
|
-
import mainCodecSupportProber from "../../mse/main_codec_support_prober";
|
|
20
19
|
import metaplaylist from "../../transports/metaplaylist";
|
|
21
20
|
|
|
22
21
|
function addMetaPlaylistFeature(features: IFeaturesObject): void {
|
|
23
22
|
features.transports.metaplaylist = metaplaylist;
|
|
24
23
|
features.mainThreadMediaSourceInit = MediaSourceContentInitializer;
|
|
25
|
-
features.codecSupportProber = mainCodecSupportProber;
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
export { addMetaPlaylistFeature as METAPLAYLIST };
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { MediaSource_ } from "../../../compat/browser_compatibility_types";
|
|
18
|
+
import type { IMediaElement } from "../../../compat/browser_compatibility_types";
|
|
18
19
|
import log from "../../../log";
|
|
19
20
|
import { resetMediaElement } from "../../../main_thread/init/utils/create_media_source";
|
|
20
21
|
import { SourceBufferType } from "../../../mse";
|
|
@@ -36,7 +37,7 @@ const generateMediaSourceId = idGenerator();
|
|
|
36
37
|
* @returns {Promise.<Object>}
|
|
37
38
|
*/
|
|
38
39
|
export default function prepareSourceBuffer(
|
|
39
|
-
videoElement:
|
|
40
|
+
videoElement: IMediaElement,
|
|
40
41
|
codec: string,
|
|
41
42
|
cleanUpSignal: CancellationSignal,
|
|
42
43
|
): Promise<MainSourceBufferInterface> {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import type { IMediaElement } from "../../../compat/browser_compatibility_types";
|
|
17
18
|
import type { MainSourceBufferInterface } from "../../../mse/main_media_source_interface";
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -28,7 +29,7 @@ import type { MainSourceBufferInterface } from "../../../mse/main_media_source_i
|
|
|
28
29
|
* @returns {Promise}
|
|
29
30
|
*/
|
|
30
31
|
export default function removeBufferAroundTime(
|
|
31
|
-
videoElement:
|
|
32
|
+
videoElement: IMediaElement,
|
|
32
33
|
sourceBufferInterface: MainSourceBufferInterface,
|
|
33
34
|
time: number,
|
|
34
35
|
margin: number | undefined,
|
|
@@ -180,20 +180,21 @@ export default class VideoThumbnailLoader {
|
|
|
180
180
|
let lastRepInfo: IVideoThumbnailLoaderRepresentationInfo;
|
|
181
181
|
if (this._lastRepresentationInfo === null) {
|
|
182
182
|
const lastRepInfoCleaner = new TaskCanceller();
|
|
183
|
-
const segmentFetcher = createSegmentFetcher(
|
|
184
|
-
"video",
|
|
185
|
-
loader.video,
|
|
186
|
-
null,
|
|
187
|
-
|
|
188
|
-
{
|
|
189
|
-
{
|
|
183
|
+
const segmentFetcher = createSegmentFetcher({
|
|
184
|
+
bufferType: "video",
|
|
185
|
+
pipeline: loader.video,
|
|
186
|
+
cdnPrioritizer: null,
|
|
187
|
+
cmcdDataBuilder: null,
|
|
188
|
+
requestOptions: {
|
|
190
189
|
baseDelay: 0,
|
|
191
190
|
maxDelay: 0,
|
|
192
191
|
maxRetry: 0,
|
|
193
192
|
requestTimeout: config.getCurrent().DEFAULT_REQUEST_TIMEOUT,
|
|
194
193
|
connectionTimeout: config.getCurrent().DEFAULT_CONNECTION_TIMEOUT,
|
|
195
194
|
},
|
|
196
|
-
|
|
195
|
+
// We don't care about the SegmentFetcher's lifecycle events
|
|
196
|
+
eventListeners: {},
|
|
197
|
+
}) as ISegmentFetcher<ArrayBuffer | Uint8Array>;
|
|
197
198
|
const initSegment = content.representation.index.getInitSegment();
|
|
198
199
|
const initSegmentUniqueId =
|
|
199
200
|
initSegment !== null ? content.representation.uniqueId : null;
|