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
package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/defaultCodecFinder.test.ts
CHANGED
|
@@ -44,7 +44,7 @@ describe("MediaCapabilitiesProber probers - findDefaultVideoCodec", () => {
|
|
|
44
44
|
expect(() => {
|
|
45
45
|
findDefaultVideoCodec();
|
|
46
46
|
}).toThrowError("No default video codec found.");
|
|
47
|
-
expect(mockIsTypeSupported).toHaveBeenCalledTimes(
|
|
47
|
+
expect(mockIsTypeSupported).toHaveBeenCalledTimes(4);
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
it("should throw because no MediaSource", async () => {
|
|
@@ -27,6 +27,7 @@ export function findDefaultVideoCodec(): string {
|
|
|
27
27
|
const videoCodecs = [
|
|
28
28
|
'video/mp4;codecs="avc1.4d401e"',
|
|
29
29
|
'video/mp4;codecs="avc1.42e01e"',
|
|
30
|
+
'video/mp4;codecs="hvc1.1.6.L93.B0"',
|
|
30
31
|
'video/webm;codecs="vp8"',
|
|
31
32
|
];
|
|
32
33
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import MediaSourceContentInitializer from "../../../main_thread/init/media_source_content_initializer";
|
|
3
|
-
import mainCodecSupportProber from "../../../mse/main_codec_support_prober";
|
|
4
3
|
import nativeDashParser from "../../../parsers/manifest/dash/native-parser";
|
|
5
4
|
import DASHFeature from "../../../transports/dash";
|
|
6
5
|
import type { IFeaturesObject } from "../../types";
|
|
@@ -18,10 +17,8 @@ describe("Features list - DASH", () => {
|
|
|
18
17
|
transports: { dash: DASHFeature },
|
|
19
18
|
dashParsers: { native: nativeDashParser, fastJs: null, wasm: null },
|
|
20
19
|
mainThreadMediaSourceInit: MediaSourceContentInitializer,
|
|
21
|
-
codecSupportProber: mainCodecSupportProber,
|
|
22
20
|
});
|
|
23
21
|
expect(featureObject.transports.dash).toBe(DASHFeature);
|
|
24
22
|
expect(featureObject.mainThreadMediaSourceInit).toBe(MediaSourceContentInitializer);
|
|
25
|
-
expect(featureObject.codecSupportProber).toBe(mainCodecSupportProber);
|
|
26
23
|
});
|
|
27
24
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import MediaSourceContentInitializer from "../../../main_thread/init/media_source_content_initializer";
|
|
3
|
-
import mainCodecSupportProber from "../../../mse/main_codec_support_prober";
|
|
4
3
|
import SmoothFeature from "../../../transports/smooth";
|
|
5
4
|
import type { IFeaturesObject } from "../../types";
|
|
6
5
|
import addSmoothFeature from "../smooth";
|
|
@@ -12,10 +11,8 @@ describe("Features list - Smooth", () => {
|
|
|
12
11
|
expect(featureObject).toEqual({
|
|
13
12
|
transports: { smooth: SmoothFeature },
|
|
14
13
|
mainThreadMediaSourceInit: MediaSourceContentInitializer,
|
|
15
|
-
codecSupportProber: mainCodecSupportProber,
|
|
16
14
|
});
|
|
17
15
|
expect(featureObject.transports.smooth).toBe(SmoothFeature);
|
|
18
16
|
expect(featureObject.mainThreadMediaSourceInit).toBe(MediaSourceContentInitializer);
|
|
19
|
-
expect(featureObject.codecSupportProber).toBe(mainCodecSupportProber);
|
|
20
17
|
});
|
|
21
18
|
});
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import MediaSourceContentInitializer from "../../main_thread/init/media_source_content_initializer";
|
|
18
|
-
import mainCodecSupportProber from "../../mse/main_codec_support_prober";
|
|
19
18
|
import dashJsParser from "../../parsers/manifest/dash/native-parser";
|
|
20
19
|
import dash from "../../transports/dash";
|
|
21
20
|
import type { IFeaturesObject } from "../types";
|
|
@@ -30,7 +29,6 @@ function addDASHFeature(features: IFeaturesObject): void {
|
|
|
30
29
|
}
|
|
31
30
|
features.dashParsers.native = dashJsParser;
|
|
32
31
|
features.mainThreadMediaSourceInit = MediaSourceContentInitializer;
|
|
33
|
-
features.codecSupportProber = mainCodecSupportProber;
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
export { addDASHFeature as DASH };
|
|
@@ -16,7 +16,6 @@
|
|
|
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 type { IDashWasmParserOptions } from "../../parsers/manifest/dash/wasm-parser";
|
|
21
20
|
import DashWasmParser from "../../parsers/manifest/dash/wasm-parser";
|
|
22
21
|
import dash from "../../transports/dash";
|
|
@@ -29,7 +28,6 @@ const dashWasmFeature = {
|
|
|
29
28
|
}
|
|
30
29
|
features.dashParsers.wasm = dashWasmParser;
|
|
31
30
|
features.mainThreadMediaSourceInit = MediaSourceContentInitializer;
|
|
32
|
-
features.codecSupportProber = mainCodecSupportProber;
|
|
33
31
|
},
|
|
34
32
|
|
|
35
33
|
initialize(opts: IDashWasmParserOptions): Promise<void> {
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import MediaSourceContentInitializer from "../../main_thread/init/media_source_content_initializer";
|
|
18
|
-
import mainCodecSupportProber from "../../mse/main_codec_support_prober";
|
|
19
18
|
import smooth from "../../transports/smooth";
|
|
20
19
|
import type { IFeaturesObject } from "../types";
|
|
21
20
|
|
|
@@ -28,7 +27,6 @@ function addSmoothFeature(features: IFeaturesObject): void {
|
|
|
28
27
|
features.transports.smooth = smooth;
|
|
29
28
|
}
|
|
30
29
|
features.mainThreadMediaSourceInit = MediaSourceContentInitializer;
|
|
31
|
-
features.codecSupportProber = mainCodecSupportProber;
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
export { addSmoothFeature as SMOOTH };
|
package/src/features/types.ts
CHANGED
|
@@ -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 { SegmentSink } from "../core/segment_sinks";
|
|
18
19
|
import type ContentDecryptor from "../main_thread/decrypt";
|
|
19
20
|
import type DirectFileContentInitializer from "../main_thread/init/directfile_content_initializer";
|
|
@@ -23,7 +24,6 @@ import type HTMLTextDisplayer from "../main_thread/text_displayer/html";
|
|
|
23
24
|
import type NativeTextDisplayer from "../main_thread/text_displayer/native/native_text_displayer";
|
|
24
25
|
import type MediaElementTracksStore from "../main_thread/tracks_store/media_element_tracks_store";
|
|
25
26
|
import type { IRxPlayer } from "../main_thread/types";
|
|
26
|
-
import type { ICodecSupportProber } from "../mse";
|
|
27
27
|
import type {
|
|
28
28
|
IDashParserResponse,
|
|
29
29
|
IMPDParserArguments,
|
|
@@ -46,7 +46,7 @@ import type { CancellationSignal } from "../utils/task_canceller";
|
|
|
46
46
|
* @returns {Object} - `SegmentSink` implementation.
|
|
47
47
|
*/
|
|
48
48
|
export type IHTMLTextTracksBuffer = new (
|
|
49
|
-
mediaElement:
|
|
49
|
+
mediaElement: IMediaElement,
|
|
50
50
|
textTrackElement: HTMLElement,
|
|
51
51
|
) => SegmentSink;
|
|
52
52
|
|
|
@@ -59,7 +59,7 @@ export type IHTMLTextTracksBuffer = new (
|
|
|
59
59
|
* tracks will be displayed will also be linked to this `HTMLMediaElement`.
|
|
60
60
|
* @returns {Object} - `SegmentSink` implementation.
|
|
61
61
|
*/
|
|
62
|
-
export type INativeTextTracksBuffer = new (mediaElement:
|
|
62
|
+
export type INativeTextTracksBuffer = new (mediaElement: IMediaElement) => SegmentSink;
|
|
63
63
|
|
|
64
64
|
export type IDashNativeParser = (
|
|
65
65
|
dom: Document,
|
|
@@ -93,14 +93,6 @@ export type IDebugElementFn = (
|
|
|
93
93
|
* an application.
|
|
94
94
|
*/
|
|
95
95
|
export interface IFeaturesObject {
|
|
96
|
-
/**
|
|
97
|
-
* Interface checking for codec support in an MSE (Media Source Extensions)
|
|
98
|
-
* context.
|
|
99
|
-
*
|
|
100
|
-
* Works both for environments with and without the necessary MSE API such
|
|
101
|
-
* as WebWorkers.
|
|
102
|
-
*/
|
|
103
|
-
codecSupportProber: ICodecSupportProber | null;
|
|
104
96
|
/**
|
|
105
97
|
* Feature allowing to load so-called "directfile" contents, which are
|
|
106
98
|
* contents natively decodable by the browser.
|
package/src/index.ts
CHANGED
|
@@ -56,9 +56,9 @@ Player.addFeatures([
|
|
|
56
56
|
HTML_SRT_PARSER,
|
|
57
57
|
]);
|
|
58
58
|
if (isDebugModeEnabled()) {
|
|
59
|
-
logger.setLevel("DEBUG");
|
|
59
|
+
logger.setLevel("DEBUG", "standard");
|
|
60
60
|
} else if ((__ENVIRONMENT__.CURRENT_ENV as number) === (__ENVIRONMENT__.DEV as number)) {
|
|
61
|
-
logger.setLevel(__LOGGER_LEVEL__.CURRENT_LEVEL);
|
|
61
|
+
logger.setLevel(__LOGGER_LEVEL__.CURRENT_LEVEL, "standard");
|
|
62
62
|
}
|
|
63
63
|
export default Player;
|
|
64
64
|
|
|
@@ -31,7 +31,7 @@ Those modules are:
|
|
|
31
31
|
|
|
32
32
|
Ease up text/audio/video track switching to provide a simple-to-use API.
|
|
33
33
|
|
|
34
|
-
It
|
|
34
|
+
It has another sister block the `MediaElementTracksStore`
|
|
35
35
|
(./tracks_store/media_element_tracks_store.ts), has the same role but for "directfile"
|
|
36
36
|
contents - which are contents directly played by the browser (by setting the media file
|
|
37
37
|
as the `src` of a media element).
|
|
@@ -238,6 +238,7 @@ describe("API - parseLoadVideoOptions", () => {
|
|
|
238
238
|
__priv_manifestUpdateUrl: undefined,
|
|
239
239
|
__priv_patchLastSegmentInSidx: undefined,
|
|
240
240
|
checkMediaSegmentIntegrity: undefined,
|
|
241
|
+
checkManifestIntegrity: undefined,
|
|
241
242
|
defaultAudioTrackSwitchingMode: undefined,
|
|
242
243
|
autoPlay: false,
|
|
243
244
|
enableFastSwitching: true,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
|
+
import type { IMediaElement } from "../../../compat/browser_compatibility_types";
|
|
2
3
|
import config from "../../../config";
|
|
3
4
|
import { getLoadedContentState } from "../utils";
|
|
4
5
|
|
|
@@ -10,7 +11,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
10
11
|
currentTime: 0,
|
|
11
12
|
paused: false,
|
|
12
13
|
};
|
|
13
|
-
const mediaElement = fakeProps as
|
|
14
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
14
15
|
|
|
15
16
|
// we can just do every possibility here
|
|
16
17
|
expect(getLoadedContentState(mediaElement, null)).toBe("ENDED");
|
|
@@ -34,7 +35,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
34
35
|
currentTime: 10, // worst case -> currentTime === duration
|
|
35
36
|
paused: false,
|
|
36
37
|
};
|
|
37
|
-
const mediaElement = fakeProps as
|
|
38
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
38
39
|
expect(getLoadedContentState(mediaElement, null)).toBe("PLAYING");
|
|
39
40
|
});
|
|
40
41
|
|
|
@@ -45,7 +46,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
45
46
|
currentTime: 10, // worst case -> currentTime === duration
|
|
46
47
|
paused: true,
|
|
47
48
|
};
|
|
48
|
-
const mediaElement = fakeProps as
|
|
49
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
49
50
|
expect(getLoadedContentState(mediaElement, null)).toBe("PAUSED");
|
|
50
51
|
});
|
|
51
52
|
|
|
@@ -56,7 +57,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
56
57
|
currentTime: 5,
|
|
57
58
|
paused: false,
|
|
58
59
|
};
|
|
59
|
-
const mediaElement = fakeProps as
|
|
60
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
60
61
|
expect(getLoadedContentState(mediaElement, "buffering")).toBe("BUFFERING");
|
|
61
62
|
fakeProps.paused = true;
|
|
62
63
|
expect(getLoadedContentState(mediaElement, "buffering")).toBe("BUFFERING");
|
|
@@ -69,7 +70,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
69
70
|
currentTime: 5,
|
|
70
71
|
paused: false,
|
|
71
72
|
};
|
|
72
|
-
const mediaElement = fakeProps as
|
|
73
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
73
74
|
expect(getLoadedContentState(mediaElement, "freezing")).toBe("FREEZING");
|
|
74
75
|
fakeProps.paused = true;
|
|
75
76
|
expect(getLoadedContentState(mediaElement, "freezing")).toBe("FREEZING");
|
|
@@ -82,7 +83,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
82
83
|
currentTime: 5,
|
|
83
84
|
paused: false,
|
|
84
85
|
};
|
|
85
|
-
const mediaElement = fakeProps as
|
|
86
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
86
87
|
expect(getLoadedContentState(mediaElement, "not-ready")).toBe("BUFFERING");
|
|
87
88
|
fakeProps.paused = true;
|
|
88
89
|
expect(getLoadedContentState(mediaElement, "not-ready")).toBe("BUFFERING");
|
|
@@ -95,7 +96,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
95
96
|
currentTime: 5,
|
|
96
97
|
paused: false,
|
|
97
98
|
};
|
|
98
|
-
const mediaElement = fakeProps as
|
|
99
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
99
100
|
expect(getLoadedContentState(mediaElement, "seeking")).toBe("SEEKING");
|
|
100
101
|
fakeProps.paused = true;
|
|
101
102
|
expect(getLoadedContentState(mediaElement, "seeking")).toBe("SEEKING");
|
|
@@ -108,7 +109,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
108
109
|
currentTime: 10,
|
|
109
110
|
paused: false,
|
|
110
111
|
};
|
|
111
|
-
const mediaElement = fakeProps as
|
|
112
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
112
113
|
expect(getLoadedContentState(mediaElement, "seeking")).toBe("ENDED");
|
|
113
114
|
expect(getLoadedContentState(mediaElement, "buffering")).toBe("ENDED");
|
|
114
115
|
expect(getLoadedContentState(mediaElement, "not-ready")).toBe("ENDED");
|
|
@@ -127,7 +128,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
127
128
|
currentTime: 10 - config.getCurrent().FORCED_ENDED_THRESHOLD,
|
|
128
129
|
paused: false,
|
|
129
130
|
};
|
|
130
|
-
const mediaElement = fakeProps as
|
|
131
|
+
const mediaElement = fakeProps as IMediaElement;
|
|
131
132
|
expect(getLoadedContentState(mediaElement, "seeking")).toBe("ENDED");
|
|
132
133
|
expect(getLoadedContentState(mediaElement, "buffering")).toBe("ENDED");
|
|
133
134
|
expect(getLoadedContentState(mediaElement, "not-ready")).toBe("ENDED");
|
|
@@ -145,7 +146,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
145
146
|
currentTime: 10 - config.getCurrent().FORCED_ENDED_THRESHOLD,
|
|
146
147
|
paused: false,
|
|
147
148
|
};
|
|
148
|
-
const mediaElement1 = fakeProps1 as
|
|
149
|
+
const mediaElement1 = fakeProps1 as IMediaElement;
|
|
149
150
|
expect(getLoadedContentState(mediaElement1, "seeking")).toBe("ENDED");
|
|
150
151
|
expect(getLoadedContentState(mediaElement1, "buffering")).toBe("ENDED");
|
|
151
152
|
expect(getLoadedContentState(mediaElement1, "not-ready")).toBe("ENDED");
|
|
@@ -162,7 +163,7 @@ describe("API - getLoadedContentState", () => {
|
|
|
162
163
|
currentTime: config.getCurrent().FORCED_ENDED_THRESHOLD + 10,
|
|
163
164
|
paused: false,
|
|
164
165
|
};
|
|
165
|
-
const mediaElement2 = fakeProps2 as
|
|
166
|
+
const mediaElement2 = fakeProps2 as IMediaElement;
|
|
166
167
|
expect(getLoadedContentState(mediaElement2, "seeking")).toBe("ENDED");
|
|
167
168
|
expect(getLoadedContentState(mediaElement2, "buffering")).toBe("ENDED");
|
|
168
169
|
expect(getLoadedContentState(mediaElement2, "not-ready")).toBe("ENDED");
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* throw if something is wrong, and return a normalized option object.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
import type { IMediaElement } from "../../compat/browser_compatibility_types";
|
|
22
23
|
import config from "../../config";
|
|
23
24
|
import log from "../../log";
|
|
24
25
|
import type {
|
|
@@ -33,6 +34,7 @@ import type {
|
|
|
33
34
|
ISegmentLoader,
|
|
34
35
|
IServerSyncInfos,
|
|
35
36
|
IRxPlayerMode,
|
|
37
|
+
ICmcdOptions,
|
|
36
38
|
} from "../../public_types";
|
|
37
39
|
import arrayIncludes from "../../utils/array_includes";
|
|
38
40
|
import isNullOrUndefined from "../../utils/is_null_or_undefined";
|
|
@@ -56,7 +58,7 @@ export interface IParsedConstructorOptions {
|
|
|
56
58
|
videoResolutionLimit: "videoElement" | "screen" | "none";
|
|
57
59
|
throttleVideoBitrateWhenHidden: boolean;
|
|
58
60
|
|
|
59
|
-
videoElement:
|
|
61
|
+
videoElement: IMediaElement;
|
|
60
62
|
baseBandwidth: number;
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -78,12 +80,14 @@ interface IParsedLoadVideoOptionsBase {
|
|
|
78
80
|
defaultAudioTrackSwitchingMode: IAudioTrackSwitchingMode | undefined;
|
|
79
81
|
onCodecSwitch: "continue" | "reload";
|
|
80
82
|
checkMediaSegmentIntegrity?: boolean | undefined;
|
|
83
|
+
checkManifestIntegrity?: boolean | undefined;
|
|
81
84
|
manifestLoader?: IManifestLoader | undefined;
|
|
82
85
|
referenceDateTime?: number | undefined;
|
|
83
86
|
representationFilter?: IRepresentationFilter | string | undefined;
|
|
84
87
|
segmentLoader?: ISegmentLoader | undefined;
|
|
85
88
|
serverSyncInfos?: IServerSyncInfos | undefined;
|
|
86
89
|
mode: IRxPlayerMode;
|
|
90
|
+
cmcd: ICmcdOptions | undefined;
|
|
87
91
|
__priv_manifestUpdateUrl?: string | undefined;
|
|
88
92
|
__priv_patchLastSegmentInSidx?: boolean | undefined;
|
|
89
93
|
}
|
|
@@ -130,7 +134,7 @@ function parseConstructorOptions(
|
|
|
130
134
|
let wantedBufferAhead: number;
|
|
131
135
|
let maxVideoBufferSize: number;
|
|
132
136
|
|
|
133
|
-
let videoElement:
|
|
137
|
+
let videoElement: IMediaElement;
|
|
134
138
|
let baseBandwidth: number;
|
|
135
139
|
|
|
136
140
|
const {
|
|
@@ -191,7 +195,10 @@ function parseConstructorOptions(
|
|
|
191
195
|
|
|
192
196
|
if (isNullOrUndefined(options.videoElement)) {
|
|
193
197
|
videoElement = document.createElement("video");
|
|
194
|
-
} else if (
|
|
198
|
+
} else if (
|
|
199
|
+
options.videoElement.nodeName.toLowerCase() === "video" ||
|
|
200
|
+
options.videoElement.nodeName.toLowerCase() === "audio"
|
|
201
|
+
) {
|
|
195
202
|
videoElement = options.videoElement;
|
|
196
203
|
} else {
|
|
197
204
|
throw new Error("Invalid videoElement parameter. Should be a HTMLMediaElement.");
|
|
@@ -436,6 +443,7 @@ function parseLoadVideoOptions(options: ILoadVideoOptions): IParsedLoadVideoOpti
|
|
|
436
443
|
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
437
444
|
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
438
445
|
checkMediaSegmentIntegrity: options.checkMediaSegmentIntegrity,
|
|
446
|
+
checkManifestIntegrity: options.checkManifestIntegrity,
|
|
439
447
|
autoPlay,
|
|
440
448
|
defaultAudioTrackSwitchingMode,
|
|
441
449
|
enableFastSwitching,
|
|
@@ -456,6 +464,7 @@ function parseLoadVideoOptions(options: ILoadVideoOptions): IParsedLoadVideoOpti
|
|
|
456
464
|
transport,
|
|
457
465
|
mode,
|
|
458
466
|
url,
|
|
467
|
+
cmcd: options.cmcd,
|
|
459
468
|
};
|
|
460
469
|
}
|
|
461
470
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* It also starts the different sub-parts of the player on various API calls.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
import type { IMediaElement } from "../../compat/browser_compatibility_types";
|
|
22
23
|
import canRelyOnVideoVisibilityAndSize from "../../compat/can_rely_on_video_visibility_and_size";
|
|
23
24
|
import type { IPictureInPictureEvent } from "../../compat/event_listeners";
|
|
24
25
|
import {
|
|
@@ -167,13 +168,13 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
167
168
|
* This is used to check that a video element is not shared between multiple instances.
|
|
168
169
|
* Use of a WeakSet ensure the object is garbage collected if it's not used anymore.
|
|
169
170
|
*/
|
|
170
|
-
private static _priv_currentlyUsedVideoElements = new WeakSet<
|
|
171
|
+
private static _priv_currentlyUsedVideoElements = new WeakSet<IMediaElement>();
|
|
171
172
|
|
|
172
173
|
/**
|
|
173
174
|
* Media element attached to the RxPlayer.
|
|
174
175
|
* Set to `null` when the RxPlayer is disposed.
|
|
175
176
|
*/
|
|
176
|
-
public videoElement:
|
|
177
|
+
public videoElement: IMediaElement | null; // null on dispose
|
|
177
178
|
|
|
178
179
|
/** Logger the RxPlayer uses. */
|
|
179
180
|
public readonly log: Logger;
|
|
@@ -322,7 +323,21 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
322
323
|
return log.getLevel();
|
|
323
324
|
}
|
|
324
325
|
static set LogLevel(logLevel: string) {
|
|
325
|
-
log.setLevel(logLevel);
|
|
326
|
+
log.setLevel(logLevel, log.getFormat());
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Current log format.
|
|
331
|
+
* Should be either (by verbosity ascending):
|
|
332
|
+
* - "standard": Regular log messages.
|
|
333
|
+
* - "full": More verbose format, including a timestamp and a namespace.
|
|
334
|
+
* Any other value will be translated to "standard".
|
|
335
|
+
*/
|
|
336
|
+
static get LogFormat(): string {
|
|
337
|
+
return log.getFormat();
|
|
338
|
+
}
|
|
339
|
+
static set LogFormat(format: string) {
|
|
340
|
+
log.setLevel(log.getLevel(), format);
|
|
326
341
|
}
|
|
327
342
|
|
|
328
343
|
/**
|
|
@@ -338,7 +353,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
338
353
|
* @param videoElement the video element to register.
|
|
339
354
|
* @throws Error - Throws if the element is already used by another player instance.
|
|
340
355
|
*/
|
|
341
|
-
private static _priv_registerVideoElement(videoElement:
|
|
356
|
+
private static _priv_registerVideoElement(videoElement: IMediaElement) {
|
|
342
357
|
if (Player._priv_currentlyUsedVideoElements.has(videoElement)) {
|
|
343
358
|
const errorMessage =
|
|
344
359
|
"The video element is already attached to another RxPlayer instance." +
|
|
@@ -360,7 +375,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
360
375
|
* Deregister the video element of the set of elements currently in use.
|
|
361
376
|
* @param videoElement the video element to deregister.
|
|
362
377
|
*/
|
|
363
|
-
static _priv_deregisterVideoElement(videoElement:
|
|
378
|
+
static _priv_deregisterVideoElement(videoElement: IMediaElement) {
|
|
364
379
|
if (Player._priv_currentlyUsedVideoElements.has(videoElement)) {
|
|
365
380
|
Player._priv_currentlyUsedVideoElements.delete(videoElement);
|
|
366
381
|
}
|
|
@@ -394,7 +409,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
394
409
|
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
|
|
395
410
|
videoElement.preload = "auto";
|
|
396
411
|
|
|
397
|
-
this.version = /* PLAYER_VERSION */ "4.
|
|
412
|
+
this.version = /* PLAYER_VERSION */ "4.2.0-dev.2024080600";
|
|
398
413
|
this.log = log;
|
|
399
414
|
this.state = "STOPPED";
|
|
400
415
|
this.videoElement = videoElement;
|
|
@@ -458,6 +473,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
458
473
|
muted: videoElement.muted,
|
|
459
474
|
});
|
|
460
475
|
};
|
|
476
|
+
|
|
461
477
|
videoElement.addEventListener("volumechange", onVolumeChange);
|
|
462
478
|
destroyCanceller.signal.register(() => {
|
|
463
479
|
videoElement.removeEventListener("volumechange", onVolumeChange);
|
|
@@ -531,6 +547,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
531
547
|
value: {
|
|
532
548
|
dashWasmUrl: workerSettings.dashWasmUrl,
|
|
533
549
|
logLevel: log.getLevel(),
|
|
550
|
+
logFormat: log.getFormat(),
|
|
534
551
|
sendBackLogs: isDebugModeEnabled(),
|
|
535
552
|
date: Date.now(),
|
|
536
553
|
timestamp: getMonotonicTimeStamp(),
|
|
@@ -540,7 +557,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
540
557
|
});
|
|
541
558
|
log.addEventListener(
|
|
542
559
|
"onLogLevelChange",
|
|
543
|
-
(
|
|
560
|
+
(logInfo) => {
|
|
544
561
|
if (this._priv_worker === null) {
|
|
545
562
|
return;
|
|
546
563
|
}
|
|
@@ -548,7 +565,8 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
548
565
|
this._priv_worker.postMessage({
|
|
549
566
|
type: MainThreadMessageType.LogLevelUpdate,
|
|
550
567
|
value: {
|
|
551
|
-
logLevel,
|
|
568
|
+
logLevel: logInfo.level,
|
|
569
|
+
logFormat: logInfo.format,
|
|
552
570
|
sendBackLogs: isDebugModeEnabled(),
|
|
553
571
|
},
|
|
554
572
|
});
|
|
@@ -730,6 +748,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
730
748
|
private _priv_initializeContentPlayback(options: IParsedLoadVideoOptions): void {
|
|
731
749
|
const {
|
|
732
750
|
autoPlay,
|
|
751
|
+
cmcd,
|
|
733
752
|
defaultAudioTrackSwitchingMode,
|
|
734
753
|
enableFastSwitching,
|
|
735
754
|
initialManifest,
|
|
@@ -741,6 +760,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
741
760
|
startAt,
|
|
742
761
|
transport,
|
|
743
762
|
checkMediaSegmentIntegrity,
|
|
763
|
+
checkManifestIntegrity,
|
|
744
764
|
manifestLoader,
|
|
745
765
|
referenceDateTime,
|
|
746
766
|
segmentLoader,
|
|
@@ -884,6 +904,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
884
904
|
const transportPipelines = transportFn({
|
|
885
905
|
lowLatencyMode,
|
|
886
906
|
checkMediaSegmentIntegrity,
|
|
907
|
+
checkManifestIntegrity,
|
|
887
908
|
manifestLoader,
|
|
888
909
|
referenceDateTime,
|
|
889
910
|
representationFilter,
|
|
@@ -896,6 +917,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
896
917
|
adaptiveOptions,
|
|
897
918
|
autoPlay,
|
|
898
919
|
bufferOptions,
|
|
920
|
+
cmcd,
|
|
899
921
|
keySystems,
|
|
900
922
|
lowLatencyMode,
|
|
901
923
|
transport: transportPipelines,
|
|
@@ -924,6 +946,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
924
946
|
const transportOptions = {
|
|
925
947
|
lowLatencyMode,
|
|
926
948
|
checkMediaSegmentIntegrity,
|
|
949
|
+
checkManifestIntegrity,
|
|
927
950
|
referenceDateTime,
|
|
928
951
|
serverSyncInfos,
|
|
929
952
|
manifestLoader: undefined,
|
|
@@ -936,6 +959,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
936
959
|
adaptiveOptions,
|
|
937
960
|
autoPlay,
|
|
938
961
|
bufferOptions,
|
|
962
|
+
cmcd,
|
|
939
963
|
keySystems,
|
|
940
964
|
lowLatencyMode,
|
|
941
965
|
transportOptions,
|
|
@@ -1042,6 +1066,10 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
1042
1066
|
initializer.addEventListener("manifestUpdate", (updates) =>
|
|
1043
1067
|
this._priv_onManifestUpdate(contentInfos, updates),
|
|
1044
1068
|
);
|
|
1069
|
+
|
|
1070
|
+
initializer.addEventListener("codecSupportUpdate", () =>
|
|
1071
|
+
this._priv_onCodecSupportUpdate(contentInfos),
|
|
1072
|
+
);
|
|
1045
1073
|
initializer.addEventListener("decipherabilityUpdate", (updates) =>
|
|
1046
1074
|
this._priv_onDecipherabilityUpdate(contentInfos, updates),
|
|
1047
1075
|
);
|
|
@@ -1249,9 +1277,11 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
1249
1277
|
* @returns {HTMLMediaElement|null} - The HTMLMediaElement used (`null` when
|
|
1250
1278
|
* disposed)
|
|
1251
1279
|
*/
|
|
1280
|
+
/* eslint-disable @typescript-eslint/no-restricted-types */
|
|
1252
1281
|
getVideoElement(): HTMLMediaElement | null {
|
|
1253
|
-
return this.videoElement;
|
|
1282
|
+
return this.videoElement as HTMLMediaElement;
|
|
1254
1283
|
}
|
|
1284
|
+
/* eslint-enable @typescript-eslint/no-restricted-types */
|
|
1255
1285
|
|
|
1256
1286
|
/**
|
|
1257
1287
|
* Returns the player's current state.
|
|
@@ -1425,8 +1455,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
1425
1455
|
}
|
|
1426
1456
|
if (manifest !== null) {
|
|
1427
1457
|
const currentTime = this.videoElement.currentTime;
|
|
1428
|
-
const ast =
|
|
1429
|
-
manifest.availabilityStartTime !== undefined ? manifest.availabilityStartTime : 0;
|
|
1458
|
+
const ast = manifest.availabilityStartTime ?? 0;
|
|
1430
1459
|
return currentTime + ast;
|
|
1431
1460
|
}
|
|
1432
1461
|
return 0;
|
|
@@ -2532,6 +2561,20 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
2532
2561
|
}
|
|
2533
2562
|
}
|
|
2534
2563
|
|
|
2564
|
+
/**
|
|
2565
|
+
* Triggered each times the support for a codec has changed in the manifest.
|
|
2566
|
+
* When triggered, the track store may need to consider selecting a new track.
|
|
2567
|
+
*
|
|
2568
|
+
* @param {Object} contentInfos
|
|
2569
|
+
*/
|
|
2570
|
+
private _priv_onCodecSupportUpdate(contentInfos: IPublicApiContentInfos) {
|
|
2571
|
+
const tStore = contentInfos?.tracksStore;
|
|
2572
|
+
if (isNullOrUndefined(tStore)) {
|
|
2573
|
+
return;
|
|
2574
|
+
}
|
|
2575
|
+
tStore.onManifestCodecSupportUpdate();
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2535
2578
|
private _priv_onDecipherabilityUpdate(
|
|
2536
2579
|
contentInfos: IPublicApiContentInfos,
|
|
2537
2580
|
elts: IDecipherabilityStatusChangedElement[],
|
|
@@ -2539,7 +2582,6 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
2539
2582
|
if (contentInfos === null || contentInfos.manifest === null) {
|
|
2540
2583
|
return;
|
|
2541
2584
|
}
|
|
2542
|
-
|
|
2543
2585
|
if (!isNullOrUndefined(contentInfos?.tracksStore)) {
|
|
2544
2586
|
contentInfos.tracksStore.onDecipherabilityUpdates();
|
|
2545
2587
|
}
|
|
@@ -3193,7 +3235,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
3193
3235
|
}
|
|
3194
3236
|
}
|
|
3195
3237
|
}
|
|
3196
|
-
Player.version = /* PLAYER_VERSION */ "4.
|
|
3238
|
+
Player.version = /* PLAYER_VERSION */ "4.2.0-dev.2024080600";
|
|
3197
3239
|
|
|
3198
3240
|
/** Every events sent by the RxPlayer's public API. */
|
|
3199
3241
|
interface IPublicAPIEvent {
|
|
@@ -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 config from "../../config";
|
|
18
19
|
import type {
|
|
19
20
|
IPlaybackObservation,
|
|
@@ -40,7 +41,7 @@ import type { ContentInitializer, IStallingSituation } from "../init";
|
|
|
40
41
|
* remove all listeners this function has registered.
|
|
41
42
|
*/
|
|
42
43
|
export function emitSeekEvents(
|
|
43
|
-
mediaElement:
|
|
44
|
+
mediaElement: IMediaElement | null,
|
|
44
45
|
playbackObserver: IReadOnlyPlaybackObserver<IPlaybackObservation>,
|
|
45
46
|
onSeeking: () => void,
|
|
46
47
|
onSeeked: () => void,
|
|
@@ -82,7 +83,7 @@ export function emitSeekEvents(
|
|
|
82
83
|
* remove all listeners this function has registered.
|
|
83
84
|
*/
|
|
84
85
|
export function emitPlayPauseEvents(
|
|
85
|
-
mediaElement:
|
|
86
|
+
mediaElement: IMediaElement | null,
|
|
86
87
|
onPlay: () => void,
|
|
87
88
|
onPause: () => void,
|
|
88
89
|
cancelSignal: CancellationSignal,
|
|
@@ -114,7 +115,7 @@ export const enum PLAYER_STATES {
|
|
|
114
115
|
|
|
115
116
|
export function constructPlayerStateReference(
|
|
116
117
|
initializer: ContentInitializer,
|
|
117
|
-
mediaElement:
|
|
118
|
+
mediaElement: IMediaElement,
|
|
118
119
|
playbackObserver: IReadOnlyPlaybackObserver<IPlaybackObservation>,
|
|
119
120
|
cancelSignal: CancellationSignal,
|
|
120
121
|
): IReadOnlySharedReference<IPlayerState> {
|
|
@@ -212,7 +213,7 @@ export function constructPlayerStateReference(
|
|
|
212
213
|
* @returns {string}
|
|
213
214
|
*/
|
|
214
215
|
export function getLoadedContentState(
|
|
215
|
-
mediaElement:
|
|
216
|
+
mediaElement: IMediaElement,
|
|
216
217
|
stalledStatus: IStallingSituation | null,
|
|
217
218
|
): IPlayerState {
|
|
218
219
|
const { FORCED_ENDED_THRESHOLD } = config.getCurrent();
|