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
|
@@ -49,6 +49,7 @@ import type {
|
|
|
49
49
|
IVideoTrack,
|
|
50
50
|
IVideoTrackSwitchingMode,
|
|
51
51
|
IPlayerError,
|
|
52
|
+
ITrackType,
|
|
52
53
|
} from "../../public_types";
|
|
53
54
|
import arrayFind from "../../utils/array_find";
|
|
54
55
|
import assert from "../../utils/assert";
|
|
@@ -128,6 +129,14 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
128
129
|
}, []);
|
|
129
130
|
}
|
|
130
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Callack that needs to be called as codec support is either first known or
|
|
134
|
+
* updated on the Manifest.
|
|
135
|
+
*/
|
|
136
|
+
public onManifestCodecSupportUpdate(): void {
|
|
137
|
+
this._selectInitialTrackIfNeeded();
|
|
138
|
+
}
|
|
139
|
+
|
|
131
140
|
/**
|
|
132
141
|
* Update the list of Periods handled by the TracksStore and make a
|
|
133
142
|
* track choice decision for each of them.
|
|
@@ -164,7 +173,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
164
173
|
newPListIdx++;
|
|
165
174
|
|
|
166
175
|
const curWantedTextTrack = this._storedPeriodInfo[i].text.storedSettings;
|
|
167
|
-
if (curWantedTextTrack
|
|
176
|
+
if (!isNullOrUndefined(curWantedTextTrack)) {
|
|
168
177
|
const textAdaptations = getSupportedAdaptations(newPeriod, "text");
|
|
169
178
|
const stillHere = textAdaptations.some(
|
|
170
179
|
(a) => a.id === curWantedTextTrack.adaptation.id,
|
|
@@ -188,14 +197,18 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
188
197
|
this._storedPeriodInfo,
|
|
189
198
|
periodInfo.period.id,
|
|
190
199
|
);
|
|
191
|
-
if (
|
|
200
|
+
if (
|
|
201
|
+
periodItem !== undefined &&
|
|
202
|
+
periodItem.isPeriodAdvertised &&
|
|
203
|
+
periodItem.text.storedSettings === null
|
|
204
|
+
) {
|
|
192
205
|
periodItem.text.dispatcher?.updateTrack(null);
|
|
193
206
|
}
|
|
194
207
|
}
|
|
195
208
|
}
|
|
196
209
|
|
|
197
210
|
const curWantedVideoTrack = this._storedPeriodInfo[i].video.storedSettings;
|
|
198
|
-
if (curWantedVideoTrack
|
|
211
|
+
if (!isNullOrUndefined(curWantedVideoTrack)) {
|
|
199
212
|
const videoAdaptations = getSupportedAdaptations(newPeriod, "video");
|
|
200
213
|
const stillHere = videoAdaptations.some(
|
|
201
214
|
(a) => a.id === curWantedVideoTrack.adaptation.id,
|
|
@@ -239,6 +252,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
239
252
|
);
|
|
240
253
|
if (
|
|
241
254
|
newPeriodItem !== undefined &&
|
|
255
|
+
newPeriodItem.isPeriodAdvertised &&
|
|
242
256
|
newPeriodItem.video.storedSettings === storedSettings
|
|
243
257
|
) {
|
|
244
258
|
newPeriodItem.video.dispatcher?.updateTrack(storedSettings);
|
|
@@ -247,7 +261,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
247
261
|
}
|
|
248
262
|
|
|
249
263
|
const curWantedAudioTrack = this._storedPeriodInfo[i].audio.storedSettings;
|
|
250
|
-
if (curWantedAudioTrack
|
|
264
|
+
if (!isNullOrUndefined(curWantedAudioTrack)) {
|
|
251
265
|
const audioAdaptations = getSupportedAdaptations(newPeriod, "audio");
|
|
252
266
|
const stillHere = audioAdaptations.some(
|
|
253
267
|
(a) => a.id === curWantedAudioTrack.adaptation.id,
|
|
@@ -282,6 +296,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
282
296
|
);
|
|
283
297
|
if (
|
|
284
298
|
newPeriodItem !== undefined &&
|
|
299
|
+
newPeriodItem.isPeriodAdvertised &&
|
|
285
300
|
newPeriodItem.audio.storedSettings === storedSettings
|
|
286
301
|
) {
|
|
287
302
|
newPeriodItem.audio.dispatcher?.updateTrack(storedSettings);
|
|
@@ -297,12 +312,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
297
312
|
i--;
|
|
298
313
|
}
|
|
299
314
|
} else {
|
|
300
|
-
const newPeriodInfo = generatePeriodInfo(
|
|
301
|
-
newPeriod,
|
|
302
|
-
true,
|
|
303
|
-
this._isTrickModeTrackEnabled,
|
|
304
|
-
this._defaultAudioTrackSwitchingMode,
|
|
305
|
-
);
|
|
315
|
+
const newPeriodInfo = generatePeriodInfo(newPeriod, true);
|
|
306
316
|
// oldPeriod.start > newPeriod.start: insert newPeriod before
|
|
307
317
|
this._storedPeriodInfo.splice(i, 0, newPeriodInfo);
|
|
308
318
|
addedPeriods.push(newPeriodInfo);
|
|
@@ -316,14 +326,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
316
326
|
// Add further new Period
|
|
317
327
|
const periodsToAdd = periods
|
|
318
328
|
.slice(newPListIdx)
|
|
319
|
-
.map((p) =>
|
|
320
|
-
generatePeriodInfo(
|
|
321
|
-
p,
|
|
322
|
-
true,
|
|
323
|
-
this._isTrickModeTrackEnabled,
|
|
324
|
-
this._defaultAudioTrackSwitchingMode,
|
|
325
|
-
),
|
|
326
|
-
);
|
|
329
|
+
.map((p) => generatePeriodInfo(p, true));
|
|
327
330
|
this._storedPeriodInfo.push(...periodsToAdd);
|
|
328
331
|
addedPeriods.push(...periodsToAdd);
|
|
329
332
|
}
|
|
@@ -362,12 +365,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
362
365
|
let periodObj = getPeriodItem(this._storedPeriodInfo, period.id);
|
|
363
366
|
if (periodObj === undefined) {
|
|
364
367
|
// The Period has not yet been added.
|
|
365
|
-
periodObj = generatePeriodInfo(
|
|
366
|
-
period,
|
|
367
|
-
false,
|
|
368
|
-
this._isTrickModeTrackEnabled,
|
|
369
|
-
this._defaultAudioTrackSwitchingMode,
|
|
370
|
-
);
|
|
368
|
+
periodObj = generatePeriodInfo(period, false);
|
|
371
369
|
let found = false;
|
|
372
370
|
for (let i = 0; i < this._storedPeriodInfo.length; i++) {
|
|
373
371
|
if (this._storedPeriodInfo[i].period.start > period.start) {
|
|
@@ -380,35 +378,32 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
380
378
|
}
|
|
381
379
|
}
|
|
382
380
|
|
|
383
|
-
if (!periodObj.isPeriodAdvertised) {
|
|
384
|
-
periodObj.isPeriodAdvertised = true;
|
|
385
|
-
this.trigger("newAvailablePeriods", [
|
|
386
|
-
{ id: period.id, start: period.start, end: period.end },
|
|
387
|
-
]);
|
|
388
|
-
if (this._isDisposed) {
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
381
|
if (periodObj[bufferType].dispatcher !== null) {
|
|
394
382
|
log.error(
|
|
395
383
|
`TS: Subject already added for ${bufferType} ` + `and Period ${period.start}`,
|
|
396
384
|
);
|
|
397
385
|
return;
|
|
398
386
|
}
|
|
399
|
-
|
|
387
|
+
|
|
400
388
|
const dispatcher = new TrackDispatcher(adaptationRef);
|
|
401
389
|
periodObj[bufferType].dispatcher = dispatcher;
|
|
390
|
+
|
|
402
391
|
dispatcher.addEventListener("noPlayableRepresentation", () => {
|
|
403
|
-
const nextAdaptation = arrayFind(
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
392
|
+
const nextAdaptation = arrayFind(
|
|
393
|
+
period.adaptations[bufferType] ?? [],
|
|
394
|
+
(adaptation) => {
|
|
395
|
+
if (
|
|
396
|
+
adaptation.supportStatus.hasSupportedCodec === false ||
|
|
397
|
+
adaptation.supportStatus.isDecipherable === false
|
|
398
|
+
) {
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
const playableRepresentations = adaptation.representations.filter(
|
|
402
|
+
(r) => r.isSupported === true && r.decipherable !== false,
|
|
403
|
+
);
|
|
404
|
+
return playableRepresentations.length > 0;
|
|
405
|
+
},
|
|
406
|
+
);
|
|
412
407
|
if (nextAdaptation === undefined) {
|
|
413
408
|
const noRepErr = new MediaError(
|
|
414
409
|
"NO_PLAYABLE_REPRESENTATION",
|
|
@@ -451,13 +446,49 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
451
446
|
dispatcher.addEventListener("noPlayableLockedRepresentation", () => {
|
|
452
447
|
// TODO check that it doesn't already lead to segment loading or MediaSource
|
|
453
448
|
// reloading
|
|
454
|
-
|
|
449
|
+
if (periodObj === undefined) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
this.unlockVideoRepresentations(periodObj);
|
|
455
453
|
this.trigger("brokenRepresentationsLock", {
|
|
456
454
|
period: { id: period.id, start: period.start, end: period.end },
|
|
457
455
|
trackType: bufferType,
|
|
458
456
|
});
|
|
459
457
|
});
|
|
460
|
-
|
|
458
|
+
|
|
459
|
+
this._selectInitialTrackIfNeeded();
|
|
460
|
+
|
|
461
|
+
// Ensure `newAvailablePeriods` is sent
|
|
462
|
+
if (this._shouldAdvertisePeriod(periodObj)) {
|
|
463
|
+
periodObj.isPeriodAdvertised = true;
|
|
464
|
+
this.trigger("newAvailablePeriods", [
|
|
465
|
+
{
|
|
466
|
+
id: period.id,
|
|
467
|
+
start: period.start,
|
|
468
|
+
end: period.end,
|
|
469
|
+
},
|
|
470
|
+
]);
|
|
471
|
+
if (this._isDisposed) {
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// Ensure the initial track is set for each type now)
|
|
477
|
+
const trackTypes: ITrackType[] = ["audio", "video", "text"];
|
|
478
|
+
for (const ttype of trackTypes) {
|
|
479
|
+
const trackObj = periodObj[ttype];
|
|
480
|
+
if (
|
|
481
|
+
periodObj.isPeriodAdvertised &&
|
|
482
|
+
trackObj.dispatcher !== null &&
|
|
483
|
+
!trackObj.dispatcher.hasSetTrack() &&
|
|
484
|
+
trackObj.storedSettings !== undefined
|
|
485
|
+
) {
|
|
486
|
+
trackObj.dispatcher.updateTrack(trackObj.storedSettings);
|
|
487
|
+
}
|
|
488
|
+
if (this._isDisposed) {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
461
492
|
}
|
|
462
493
|
|
|
463
494
|
/**
|
|
@@ -662,10 +693,16 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
662
693
|
lockedRepresentations: string[] | null;
|
|
663
694
|
relativeResumingPosition: number | undefined;
|
|
664
695
|
}): void {
|
|
696
|
+
if (!periodRef.isPeriodAdvertised) {
|
|
697
|
+
throw new Error("Wanted Period not yet advertised.");
|
|
698
|
+
}
|
|
665
699
|
const period = periodRef.period;
|
|
666
700
|
const wantedAdaptation = arrayFind(
|
|
667
701
|
period.adaptations[bufferType] ?? [],
|
|
668
|
-
({ id,
|
|
702
|
+
({ id, supportStatus }) =>
|
|
703
|
+
supportStatus.hasSupportedCodec !== false &&
|
|
704
|
+
supportStatus.isDecipherable !== false &&
|
|
705
|
+
id === trackId,
|
|
669
706
|
);
|
|
670
707
|
|
|
671
708
|
if (wantedAdaptation === undefined) {
|
|
@@ -744,10 +781,16 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
744
781
|
lockedRepresentations,
|
|
745
782
|
relativeResumingPosition,
|
|
746
783
|
} = payload;
|
|
784
|
+
if (!periodRef.isPeriodAdvertised) {
|
|
785
|
+
throw new Error("Wanted Period not yet advertised.");
|
|
786
|
+
}
|
|
747
787
|
const period = periodRef.period;
|
|
748
788
|
const wantedAdaptation = arrayFind(
|
|
749
789
|
period.adaptations.video ?? [],
|
|
750
|
-
({ id,
|
|
790
|
+
({ id, supportStatus }) =>
|
|
791
|
+
supportStatus.isDecipherable !== false &&
|
|
792
|
+
supportStatus.hasSupportedCodec !== false &&
|
|
793
|
+
id === trackId,
|
|
751
794
|
);
|
|
752
795
|
|
|
753
796
|
if (wantedAdaptation === undefined) {
|
|
@@ -815,6 +858,9 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
815
858
|
periodObj: ITSPeriodObject,
|
|
816
859
|
bufferType: "audio" | "video" | "text",
|
|
817
860
|
): void {
|
|
861
|
+
if (!periodObj.isPeriodAdvertised) {
|
|
862
|
+
throw new Error("Wanted Period not yet advertised.");
|
|
863
|
+
}
|
|
818
864
|
const trackInfo = periodObj[bufferType];
|
|
819
865
|
if (trackInfo.storedSettings === null) {
|
|
820
866
|
return;
|
|
@@ -865,7 +911,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
865
911
|
* known.
|
|
866
912
|
*/
|
|
867
913
|
public getChosenAudioTrack(periodObj: ITSPeriodObject): IAudioTrack | null {
|
|
868
|
-
return periodObj.audio.storedSettings
|
|
914
|
+
return isNullOrUndefined(periodObj.audio.storedSettings)
|
|
869
915
|
? null
|
|
870
916
|
: toAudioTrack(periodObj.audio.storedSettings.adaptation, true);
|
|
871
917
|
}
|
|
@@ -881,7 +927,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
881
927
|
* @returns {Object|null} - The text track chosen for this Period
|
|
882
928
|
*/
|
|
883
929
|
public getChosenTextTrack(periodObj: ITSPeriodObject): ITextTrack | null {
|
|
884
|
-
return periodObj.text.storedSettings
|
|
930
|
+
return isNullOrUndefined(periodObj.text.storedSettings)
|
|
885
931
|
? null
|
|
886
932
|
: toTextTrack(periodObj.text.storedSettings.adaptation);
|
|
887
933
|
}
|
|
@@ -897,7 +943,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
897
943
|
* @returns {Object|null} - The video track chosen for this Period
|
|
898
944
|
*/
|
|
899
945
|
public getChosenVideoTrack(periodObj: ITSPeriodObject): IVideoTrack | null {
|
|
900
|
-
if (periodObj.video.storedSettings
|
|
946
|
+
if (isNullOrUndefined(periodObj.video.storedSettings)) {
|
|
901
947
|
return null;
|
|
902
948
|
}
|
|
903
949
|
|
|
@@ -917,7 +963,9 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
917
963
|
periodObj: ITSPeriodObject,
|
|
918
964
|
): IAvailableAudioTrack[] | undefined {
|
|
919
965
|
const storedSettings = periodObj.audio.storedSettings;
|
|
920
|
-
const currentId = storedSettings
|
|
966
|
+
const currentId = !isNullOrUndefined(storedSettings)
|
|
967
|
+
? storedSettings.adaptation.id
|
|
968
|
+
: null;
|
|
921
969
|
const adaptations = getSupportedAdaptations(periodObj.period, "audio");
|
|
922
970
|
return adaptations.map((adaptation: IAdaptationMetadata) => {
|
|
923
971
|
const active = currentId === null ? false : currentId === adaptation.id;
|
|
@@ -938,7 +986,9 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
938
986
|
periodObj: ITSPeriodObject,
|
|
939
987
|
): IAvailableTextTrack[] | undefined {
|
|
940
988
|
const storedSettings = periodObj.text.storedSettings;
|
|
941
|
-
const currentId = storedSettings
|
|
989
|
+
const currentId = !isNullOrUndefined(storedSettings)
|
|
990
|
+
? storedSettings.adaptation.id
|
|
991
|
+
: null;
|
|
942
992
|
|
|
943
993
|
const adaptations = getSupportedAdaptations(periodObj.period, "text");
|
|
944
994
|
return adaptations.map((adaptation) => {
|
|
@@ -960,7 +1010,9 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
960
1010
|
periodObj: ITSPeriodObject,
|
|
961
1011
|
): IAvailableVideoTrack[] | undefined {
|
|
962
1012
|
const storedSettings = periodObj.video.storedSettings;
|
|
963
|
-
const currentId = storedSettings
|
|
1013
|
+
const currentId = isNullOrUndefined(storedSettings)
|
|
1014
|
+
? undefined
|
|
1015
|
+
: storedSettings.adaptation.id;
|
|
964
1016
|
|
|
965
1017
|
const adaptations = getSupportedAdaptations(periodObj.period, "video");
|
|
966
1018
|
return adaptations.map((adaptation) => {
|
|
@@ -984,7 +1036,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
984
1036
|
|
|
985
1037
|
public getLockedAudioRepresentations(periodObj: ITSPeriodObject): string[] | null {
|
|
986
1038
|
const { storedSettings } = periodObj.audio;
|
|
987
|
-
if (storedSettings
|
|
1039
|
+
if (isNullOrUndefined(storedSettings)) {
|
|
988
1040
|
return null;
|
|
989
1041
|
}
|
|
990
1042
|
const lastLockedSettings = storedSettings.lockedRepresentations.getValue();
|
|
@@ -993,7 +1045,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
993
1045
|
|
|
994
1046
|
public getLockedVideoRepresentations(periodObj: ITSPeriodObject): string[] | null {
|
|
995
1047
|
const { storedSettings } = periodObj.video;
|
|
996
|
-
if (storedSettings
|
|
1048
|
+
if (isNullOrUndefined(storedSettings)) {
|
|
997
1049
|
return null;
|
|
998
1050
|
}
|
|
999
1051
|
const lastLockedSettings = storedSettings.lockedRepresentations.getValue();
|
|
@@ -1005,7 +1057,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
1005
1057
|
lockSettings: IAudioRepresentationsLockSettings,
|
|
1006
1058
|
): void {
|
|
1007
1059
|
const { storedSettings } = periodObj.audio;
|
|
1008
|
-
if (storedSettings
|
|
1060
|
+
if (isNullOrUndefined(storedSettings)) {
|
|
1009
1061
|
return;
|
|
1010
1062
|
}
|
|
1011
1063
|
const { DEFAULT_AUDIO_REPRESENTATIONS_SWITCHING_MODE } = config.getCurrent();
|
|
@@ -1027,7 +1079,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
1027
1079
|
lockSettings: IVideoRepresentationsLockSettings,
|
|
1028
1080
|
): void {
|
|
1029
1081
|
const { storedSettings } = periodObj.video;
|
|
1030
|
-
if (storedSettings
|
|
1082
|
+
if (isNullOrUndefined(storedSettings)) {
|
|
1031
1083
|
return;
|
|
1032
1084
|
}
|
|
1033
1085
|
|
|
@@ -1047,7 +1099,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
1047
1099
|
public unlockAudioRepresentations(periodObj: ITSPeriodObject): void {
|
|
1048
1100
|
const { storedSettings } = periodObj.audio;
|
|
1049
1101
|
if (
|
|
1050
|
-
storedSettings
|
|
1102
|
+
isNullOrUndefined(storedSettings) ||
|
|
1051
1103
|
storedSettings.lockedRepresentations.getValue() === null
|
|
1052
1104
|
) {
|
|
1053
1105
|
return;
|
|
@@ -1058,7 +1110,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
1058
1110
|
public unlockVideoRepresentations(periodObj: ITSPeriodObject): void {
|
|
1059
1111
|
const { storedSettings } = periodObj.video;
|
|
1060
1112
|
if (
|
|
1061
|
-
storedSettings
|
|
1113
|
+
isNullOrUndefined(storedSettings) ||
|
|
1062
1114
|
storedSettings.lockedRepresentations.getValue() === null
|
|
1063
1115
|
) {
|
|
1064
1116
|
return;
|
|
@@ -1080,7 +1132,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
1080
1132
|
private _resetVideoTrackChoices(reason: "trickmode-enabled" | "trickmode-disabled") {
|
|
1081
1133
|
for (let i = 0; i < this._storedPeriodInfo.length; i++) {
|
|
1082
1134
|
const periodObj = this._storedPeriodInfo[i];
|
|
1083
|
-
if (periodObj.video.storedSettings
|
|
1135
|
+
if (!isNullOrUndefined(periodObj.video.storedSettings)) {
|
|
1084
1136
|
const chosenBaseTrack = periodObj.video.storedSettings.adaptationBase;
|
|
1085
1137
|
if (chosenBaseTrack !== null) {
|
|
1086
1138
|
const chosenTrack = getRightVideoTrack(
|
|
@@ -1100,23 +1152,26 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
1100
1152
|
const period = sliced[i].period;
|
|
1101
1153
|
const videoItem = sliced[i].video;
|
|
1102
1154
|
const storedSettings = videoItem.storedSettings;
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1155
|
+
if (storedSettings !== undefined) {
|
|
1156
|
+
this.trigger("trackUpdate", {
|
|
1157
|
+
period: toExposedPeriod(period),
|
|
1158
|
+
trackType: "video",
|
|
1159
|
+
reason,
|
|
1160
|
+
});
|
|
1161
|
+
|
|
1162
|
+
// The previous event trigger could have had side-effects, so we
|
|
1163
|
+
// re-check if we're still mostly in the same state
|
|
1164
|
+
if (this._isDisposed) {
|
|
1165
|
+
return; // Someone disposed the `TracksStore` on the previous side-effect
|
|
1166
|
+
}
|
|
1167
|
+
const newPeriodItem = getPeriodItem(this._storedPeriodInfo, period.id);
|
|
1168
|
+
if (
|
|
1169
|
+
newPeriodItem !== undefined &&
|
|
1170
|
+
newPeriodItem.isPeriodAdvertised &&
|
|
1171
|
+
newPeriodItem.video.storedSettings === storedSettings
|
|
1172
|
+
) {
|
|
1173
|
+
newPeriodItem.video.dispatcher?.updateTrack(storedSettings);
|
|
1174
|
+
}
|
|
1120
1175
|
}
|
|
1121
1176
|
}
|
|
1122
1177
|
}
|
|
@@ -1155,6 +1210,147 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
|
|
|
1155
1210
|
|
|
1156
1211
|
return filtered;
|
|
1157
1212
|
}
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Check or re-check all Periods for which both an initial track can be chosen
|
|
1216
|
+
* and for which the `newAvailablePeriods` event can be triggered.
|
|
1217
|
+
*/
|
|
1218
|
+
private _selectInitialTrackIfNeeded(): void {
|
|
1219
|
+
const { DEFAULT_VIDEO_TRACK_SWITCHING_MODE } = config.getCurrent();
|
|
1220
|
+
|
|
1221
|
+
const periodsToAdvertise: IPeriod[] = [];
|
|
1222
|
+
const toDispatchTrack: ITSPeriodObject[] = [];
|
|
1223
|
+
for (const trackStorePeriod of this._storedPeriodInfo) {
|
|
1224
|
+
const { period } = trackStorePeriod;
|
|
1225
|
+
if (
|
|
1226
|
+
trackStorePeriod.audio.storedSettings !== undefined &&
|
|
1227
|
+
trackStorePeriod.video.storedSettings !== undefined &&
|
|
1228
|
+
trackStorePeriod.text.storedSettings !== undefined
|
|
1229
|
+
) {
|
|
1230
|
+
// already processed, continue
|
|
1231
|
+
continue;
|
|
1232
|
+
}
|
|
1233
|
+
const adaptations: IAdaptationMetadata[] = [
|
|
1234
|
+
...(period.adaptations.audio ?? []),
|
|
1235
|
+
...(period.adaptations.video ?? []),
|
|
1236
|
+
];
|
|
1237
|
+
const hasCodecWithUndefinedSupport = adaptations.every(
|
|
1238
|
+
(a) => a.supportStatus.hasCodecWithUndefinedSupport,
|
|
1239
|
+
);
|
|
1240
|
+
if (adaptations.length > 0 && hasCodecWithUndefinedSupport) {
|
|
1241
|
+
// Not all codecs for that Period are known yet.
|
|
1242
|
+
// Await until this is the case.
|
|
1243
|
+
continue;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
const audioAdaptation = getSupportedAdaptations(period, "audio")[0];
|
|
1247
|
+
trackStorePeriod.audio.storedSettings =
|
|
1248
|
+
audioAdaptation === undefined
|
|
1249
|
+
? null
|
|
1250
|
+
: {
|
|
1251
|
+
adaptation: audioAdaptation,
|
|
1252
|
+
switchingMode: this._defaultAudioTrackSwitchingMode,
|
|
1253
|
+
lockedRepresentations: new SharedReference<IRepresentationsChoice | null>(
|
|
1254
|
+
null,
|
|
1255
|
+
),
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
const baseVideoAdaptation = getSupportedAdaptations(period, "video")[0];
|
|
1259
|
+
const videoAdaptation = getRightVideoTrack(
|
|
1260
|
+
baseVideoAdaptation,
|
|
1261
|
+
this._isTrickModeTrackEnabled,
|
|
1262
|
+
);
|
|
1263
|
+
trackStorePeriod.video.storedSettings =
|
|
1264
|
+
videoAdaptation === undefined
|
|
1265
|
+
? null
|
|
1266
|
+
: {
|
|
1267
|
+
adaptation: videoAdaptation,
|
|
1268
|
+
adaptationBase: baseVideoAdaptation,
|
|
1269
|
+
switchingMode: DEFAULT_VIDEO_TRACK_SWITCHING_MODE,
|
|
1270
|
+
lockedRepresentations: new SharedReference<IRepresentationsChoice | null>(
|
|
1271
|
+
null,
|
|
1272
|
+
),
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1275
|
+
let textAdaptation: IAdaptationMetadata | null = null;
|
|
1276
|
+
const forcedSubtitles = (period.adaptations.text ?? []).filter(
|
|
1277
|
+
(ad) => ad.isForcedSubtitles === true,
|
|
1278
|
+
);
|
|
1279
|
+
if (forcedSubtitles.length > 0) {
|
|
1280
|
+
if (audioAdaptation !== null && audioAdaptation !== undefined) {
|
|
1281
|
+
const sameLanguage = arrayFind(
|
|
1282
|
+
forcedSubtitles,
|
|
1283
|
+
(f) => f.normalizedLanguage === audioAdaptation.normalizedLanguage,
|
|
1284
|
+
);
|
|
1285
|
+
if (sameLanguage !== undefined) {
|
|
1286
|
+
textAdaptation = sameLanguage;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
if (textAdaptation === null) {
|
|
1290
|
+
textAdaptation =
|
|
1291
|
+
arrayFind(forcedSubtitles, (f) => f.normalizedLanguage === undefined) ?? null;
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
trackStorePeriod.text.storedSettings =
|
|
1295
|
+
textAdaptation === null
|
|
1296
|
+
? null
|
|
1297
|
+
: {
|
|
1298
|
+
adaptation: textAdaptation,
|
|
1299
|
+
switchingMode: "direct" as const,
|
|
1300
|
+
lockedRepresentations: new SharedReference<IRepresentationsChoice | null>(
|
|
1301
|
+
null,
|
|
1302
|
+
),
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
toDispatchTrack.push(trackStorePeriod);
|
|
1306
|
+
if (this._shouldAdvertisePeriod(trackStorePeriod)) {
|
|
1307
|
+
trackStorePeriod.isPeriodAdvertised = true;
|
|
1308
|
+
periodsToAdvertise.push({ id: period.id, start: period.start, end: period.end });
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
if (periodsToAdvertise.length > 0) {
|
|
1313
|
+
this.trigger("newAvailablePeriods", periodsToAdvertise);
|
|
1314
|
+
if (this._isDisposed) {
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
for (const trackStorePeriod of toDispatchTrack) {
|
|
1320
|
+
if (!trackStorePeriod.isPeriodAdvertised) {
|
|
1321
|
+
continue;
|
|
1322
|
+
}
|
|
1323
|
+
const bufferTypes: ITrackType[] = ["audio", "video", "text"];
|
|
1324
|
+
for (const bufferType of bufferTypes) {
|
|
1325
|
+
const trackInfo = trackStorePeriod[bufferType];
|
|
1326
|
+
if (
|
|
1327
|
+
trackInfo.dispatcher !== null &&
|
|
1328
|
+
trackInfo.storedSettings !== undefined &&
|
|
1329
|
+
!trackInfo.dispatcher.hasSetTrack()
|
|
1330
|
+
) {
|
|
1331
|
+
trackInfo.dispatcher.updateTrack(trackInfo.storedSettings);
|
|
1332
|
+
if (this._isDisposed) {
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Returns `true` once a Period can be advertised through a `newAvailablePeriods`
|
|
1342
|
+
* event, after which track can begin to be set and updated.
|
|
1343
|
+
* @param {Object} periodObj
|
|
1344
|
+
* @returns {boolean}
|
|
1345
|
+
*/
|
|
1346
|
+
private _shouldAdvertisePeriod(periodObj: ITSPeriodObject): boolean {
|
|
1347
|
+
return (
|
|
1348
|
+
!periodObj.isPeriodAdvertised &&
|
|
1349
|
+
periodObj.text.dispatcher !== null &&
|
|
1350
|
+
periodObj.video.dispatcher !== null &&
|
|
1351
|
+
periodObj.audio.dispatcher !== null
|
|
1352
|
+
);
|
|
1353
|
+
}
|
|
1158
1354
|
}
|
|
1159
1355
|
|
|
1160
1356
|
/**
|
|
@@ -1227,76 +1423,20 @@ function getRightVideoTrack(
|
|
|
1227
1423
|
* default track for each type.
|
|
1228
1424
|
* @param {Object} period
|
|
1229
1425
|
* @param {boolean} inManifest
|
|
1230
|
-
* @param {boolean} isTrickModeTrackEnabled
|
|
1231
1426
|
* @returns {object}
|
|
1232
1427
|
*/
|
|
1233
1428
|
function generatePeriodInfo(
|
|
1234
1429
|
period: IPeriodMetadata,
|
|
1235
1430
|
inManifest: boolean,
|
|
1236
|
-
isTrickModeTrackEnabled: boolean,
|
|
1237
|
-
defaultAudioTrackSwitchingMode: IAudioTrackSwitchingMode,
|
|
1238
1431
|
): ITSPeriodObject {
|
|
1239
|
-
const audioAdaptation = getSupportedAdaptations(period, "audio")[0];
|
|
1240
|
-
const baseVideoAdaptation = getSupportedAdaptations(period, "video")[0];
|
|
1241
|
-
const videoAdaptation = getRightVideoTrack(
|
|
1242
|
-
baseVideoAdaptation,
|
|
1243
|
-
isTrickModeTrackEnabled,
|
|
1244
|
-
);
|
|
1245
|
-
const { DEFAULT_VIDEO_TRACK_SWITCHING_MODE } = config.getCurrent();
|
|
1246
|
-
const audioSettings =
|
|
1247
|
-
audioAdaptation !== undefined
|
|
1248
|
-
? {
|
|
1249
|
-
adaptation: audioAdaptation,
|
|
1250
|
-
switchingMode: defaultAudioTrackSwitchingMode,
|
|
1251
|
-
lockedRepresentations: new SharedReference<IRepresentationsChoice | null>(null),
|
|
1252
|
-
}
|
|
1253
|
-
: null;
|
|
1254
|
-
const videoSettings =
|
|
1255
|
-
videoAdaptation !== undefined
|
|
1256
|
-
? {
|
|
1257
|
-
adaptation: videoAdaptation,
|
|
1258
|
-
adaptationBase: baseVideoAdaptation,
|
|
1259
|
-
switchingMode: DEFAULT_VIDEO_TRACK_SWITCHING_MODE,
|
|
1260
|
-
lockedRepresentations: new SharedReference<IRepresentationsChoice | null>(null),
|
|
1261
|
-
}
|
|
1262
|
-
: null;
|
|
1263
|
-
|
|
1264
|
-
let textAdaptation: IAdaptationMetadata | null = null;
|
|
1265
|
-
const forcedSubtitles = (period.adaptations.text ?? []).filter(
|
|
1266
|
-
(ad) => ad.isForcedSubtitles === true,
|
|
1267
|
-
);
|
|
1268
|
-
if (forcedSubtitles.length > 0) {
|
|
1269
|
-
if (audioAdaptation !== null && audioAdaptation !== undefined) {
|
|
1270
|
-
const sameLanguage = arrayFind(
|
|
1271
|
-
forcedSubtitles,
|
|
1272
|
-
(f) => f.normalizedLanguage === audioAdaptation.normalizedLanguage,
|
|
1273
|
-
);
|
|
1274
|
-
if (sameLanguage !== undefined) {
|
|
1275
|
-
textAdaptation = sameLanguage;
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
if (textAdaptation === null) {
|
|
1279
|
-
textAdaptation =
|
|
1280
|
-
arrayFind(forcedSubtitles, (f) => f.normalizedLanguage === undefined) ?? null;
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
let textSettings = null;
|
|
1285
|
-
if (textAdaptation !== null) {
|
|
1286
|
-
textSettings = {
|
|
1287
|
-
adaptation: textAdaptation,
|
|
1288
|
-
switchingMode: "direct" as const,
|
|
1289
|
-
lockedRepresentations: new SharedReference<IRepresentationsChoice | null>(null),
|
|
1290
|
-
};
|
|
1291
|
-
}
|
|
1292
1432
|
return {
|
|
1293
1433
|
period,
|
|
1294
1434
|
inManifest,
|
|
1295
1435
|
isPeriodAdvertised: false,
|
|
1296
1436
|
isRemoved: false,
|
|
1297
|
-
audio: { storedSettings:
|
|
1298
|
-
video: { storedSettings:
|
|
1299
|
-
text: { storedSettings:
|
|
1437
|
+
audio: { storedSettings: undefined, dispatcher: null },
|
|
1438
|
+
video: { storedSettings: undefined, dispatcher: null },
|
|
1439
|
+
text: { storedSettings: undefined, dispatcher: null },
|
|
1300
1440
|
};
|
|
1301
1441
|
}
|
|
1302
1442
|
|
|
@@ -1319,6 +1459,9 @@ export interface ITSPeriodObject {
|
|
|
1319
1459
|
/**
|
|
1320
1460
|
* Set to `true` once a `newAvailablePeriods` event has been sent for this
|
|
1321
1461
|
* particular Period.
|
|
1462
|
+
*
|
|
1463
|
+
* Once this event has been sent, we can begin to select a audio, video and
|
|
1464
|
+
* text track for that Period (but **NOT** before).
|
|
1322
1465
|
*/
|
|
1323
1466
|
isPeriodAdvertised: boolean;
|
|
1324
1467
|
/**
|
|
@@ -1347,19 +1490,23 @@ interface IAudioPeriodInfo {
|
|
|
1347
1490
|
/**
|
|
1348
1491
|
* Information on the last audio track settings wanted by the user.
|
|
1349
1492
|
* `null` if no audio track is wanted.
|
|
1493
|
+
* `undefined` if not set yet.
|
|
1350
1494
|
*/
|
|
1351
|
-
storedSettings:
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1495
|
+
storedSettings:
|
|
1496
|
+
| {
|
|
1497
|
+
/** Contains the last `Adaptation` wanted by the user. */
|
|
1498
|
+
adaptation: IAdaptationMetadata;
|
|
1499
|
+
/** "Switching mode" in which the track switch should happen. */
|
|
1500
|
+
switchingMode: IAudioTrackSwitchingMode;
|
|
1501
|
+
/**
|
|
1502
|
+
* Contains the last locked `Representation`s for this `Adaptation` wanted
|
|
1503
|
+
* by the user.
|
|
1504
|
+
* `null` if no Representation is locked.
|
|
1505
|
+
*/
|
|
1506
|
+
lockedRepresentations: SharedReference<IRepresentationsChoice | null>;
|
|
1507
|
+
}
|
|
1508
|
+
| null
|
|
1509
|
+
| undefined;
|
|
1363
1510
|
/**
|
|
1364
1511
|
* Tracks are internally emitted through RxJS's `Subject`s.
|
|
1365
1512
|
* A `TrackDispatcher` allows to facilitate and centralize the management of
|
|
@@ -1380,19 +1527,23 @@ export interface ITextPeriodInfo {
|
|
|
1380
1527
|
/**
|
|
1381
1528
|
* Information on the last text track settings wanted.
|
|
1382
1529
|
* `null` if no text track is wanted.
|
|
1530
|
+
* `undefined` if not set yet.
|
|
1383
1531
|
*/
|
|
1384
|
-
storedSettings:
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1532
|
+
storedSettings:
|
|
1533
|
+
| {
|
|
1534
|
+
/** Contains the last `Adaptation` wanted by the user. */
|
|
1535
|
+
adaptation: IAdaptationMetadata;
|
|
1536
|
+
/** "Switching mode" in which the track switch should happen. */
|
|
1537
|
+
switchingMode: "direct";
|
|
1538
|
+
/**
|
|
1539
|
+
* Contains the last locked `Representation`s for this `Adaptation` wanted
|
|
1540
|
+
* by the user.
|
|
1541
|
+
* `null` if no Representation is locked.
|
|
1542
|
+
*/
|
|
1543
|
+
lockedRepresentations: SharedReference<IRepresentationsChoice | null>;
|
|
1544
|
+
}
|
|
1545
|
+
| null
|
|
1546
|
+
| undefined;
|
|
1396
1547
|
/**
|
|
1397
1548
|
* Tracks are internally emitted through RxJS's `Subject`s.
|
|
1398
1549
|
* A `TrackDispatcher` allows to facilitate and centralize the management of
|
|
@@ -1413,30 +1564,9 @@ export interface IVideoPeriodInfo {
|
|
|
1413
1564
|
/**
|
|
1414
1565
|
* Information on the `id` of the last video track settings wanted.
|
|
1415
1566
|
* `null` if no video track is wanted.
|
|
1567
|
+
* `undefined` if not set yet.
|
|
1416
1568
|
*/
|
|
1417
|
-
storedSettings:
|
|
1418
|
-
/**
|
|
1419
|
-
* The wanted Adaptation itself (may be different from `adaptationBase`
|
|
1420
|
-
* when a trickmode track is chosen, in which case `adaptationBase` is
|
|
1421
|
-
* the Adaptation the trickmode track is linked to and `adaptation` is
|
|
1422
|
-
* the trickmode track).
|
|
1423
|
-
*/
|
|
1424
|
-
adaptation: IAdaptationMetadata;
|
|
1425
|
-
/** "Switching mode" in which the track switch should happen. */
|
|
1426
|
-
switchingMode: IVideoTrackSwitchingMode;
|
|
1427
|
-
/**
|
|
1428
|
-
* The "base" Adaptation for `storedSettings` (if a trickmode track was
|
|
1429
|
-
* chosen, this is the Adaptation the trickmode track is linked to, and not
|
|
1430
|
-
* the trickmode track itself).
|
|
1431
|
-
*/
|
|
1432
|
-
adaptationBase: IAdaptationMetadata;
|
|
1433
|
-
/**
|
|
1434
|
-
* Contains the last locked `Representation`s for this `Adaptation` wanted
|
|
1435
|
-
* by the user.
|
|
1436
|
-
* `null` if no Representation is locked.
|
|
1437
|
-
*/
|
|
1438
|
-
lockedRepresentations: SharedReference<IRepresentationsChoice | null>;
|
|
1439
|
-
} | null;
|
|
1569
|
+
storedSettings: IVideoStoredSettings | null | undefined;
|
|
1440
1570
|
/**
|
|
1441
1571
|
* Tracks are internally emitted through RxJS's `Subject`s.
|
|
1442
1572
|
* A `TrackDispatcher` allows to facilitate and centralize the management of
|