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
|
@@ -116,6 +116,13 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
116
116
|
return acc;
|
|
117
117
|
}, []);
|
|
118
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* Callack that needs to be called as codec support is either first known or
|
|
121
|
+
* updated on the Manifest.
|
|
122
|
+
*/
|
|
123
|
+
TracksStore.prototype.onManifestCodecSupportUpdate = function () {
|
|
124
|
+
this._selectInitialTrackIfNeeded();
|
|
125
|
+
};
|
|
119
126
|
/**
|
|
120
127
|
* Update the list of Periods handled by the TracksStore and make a
|
|
121
128
|
* track choice decision for each of them.
|
|
@@ -123,7 +130,6 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
123
130
|
*/
|
|
124
131
|
TracksStore.prototype.onManifestUpdate = function (manifest) {
|
|
125
132
|
var _a, e_1, _b;
|
|
126
|
-
var _this = this;
|
|
127
133
|
var _c, _d, _e, _f, _g, _h;
|
|
128
134
|
var DEFAULT_VIDEO_TRACK_SWITCHING_MODE = config_1.default.getCurrent().DEFAULT_VIDEO_TRACK_SWITCHING_MODE;
|
|
129
135
|
var periods = manifest.periods;
|
|
@@ -152,7 +158,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
152
158
|
else if (oldPeriod === newPeriod) {
|
|
153
159
|
newPListIdx++;
|
|
154
160
|
var curWantedTextTrack_1 = this_1._storedPeriodInfo[i].text.storedSettings;
|
|
155
|
-
if (
|
|
161
|
+
if (!(0, is_null_or_undefined_1.default)(curWantedTextTrack_1)) {
|
|
156
162
|
var textAdaptations = (0, manifest_1.getSupportedAdaptations)(newPeriod, "text");
|
|
157
163
|
var stillHere = textAdaptations.some(function (a) { return a.id === curWantedTextTrack_1.adaptation.id; });
|
|
158
164
|
if (!stillHere) {
|
|
@@ -170,13 +176,15 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
170
176
|
return { value: void 0 };
|
|
171
177
|
}
|
|
172
178
|
var periodItem = getPeriodItem(this_1._storedPeriodInfo, periodInfo.period.id);
|
|
173
|
-
if (periodItem !== undefined &&
|
|
179
|
+
if (periodItem !== undefined &&
|
|
180
|
+
periodItem.isPeriodAdvertised &&
|
|
181
|
+
periodItem.text.storedSettings === null) {
|
|
174
182
|
(_c = periodItem.text.dispatcher) === null || _c === void 0 ? void 0 : _c.updateTrack(null);
|
|
175
183
|
}
|
|
176
184
|
}
|
|
177
185
|
}
|
|
178
186
|
var curWantedVideoTrack_1 = this_1._storedPeriodInfo[i].video.storedSettings;
|
|
179
|
-
if (
|
|
187
|
+
if (!(0, is_null_or_undefined_1.default)(curWantedVideoTrack_1)) {
|
|
180
188
|
var videoAdaptations = (0, manifest_1.getSupportedAdaptations)(newPeriod, "video");
|
|
181
189
|
var stillHere = videoAdaptations.some(function (a) { return a.id === curWantedVideoTrack_1.adaptation.id; });
|
|
182
190
|
if (!stillHere) {
|
|
@@ -210,13 +218,14 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
210
218
|
}
|
|
211
219
|
var newPeriodItem = getPeriodItem(this_1._storedPeriodInfo, periodItem.period.id);
|
|
212
220
|
if (newPeriodItem !== undefined &&
|
|
221
|
+
newPeriodItem.isPeriodAdvertised &&
|
|
213
222
|
newPeriodItem.video.storedSettings === storedSettings) {
|
|
214
223
|
(_d = newPeriodItem.video.dispatcher) === null || _d === void 0 ? void 0 : _d.updateTrack(storedSettings);
|
|
215
224
|
}
|
|
216
225
|
}
|
|
217
226
|
}
|
|
218
227
|
var curWantedAudioTrack_1 = this_1._storedPeriodInfo[i].audio.storedSettings;
|
|
219
|
-
if (
|
|
228
|
+
if (!(0, is_null_or_undefined_1.default)(curWantedAudioTrack_1)) {
|
|
220
229
|
var audioAdaptations = (0, manifest_1.getSupportedAdaptations)(newPeriod, "audio");
|
|
221
230
|
var stillHere = audioAdaptations.some(function (a) { return a.id === curWantedAudioTrack_1.adaptation.id; });
|
|
222
231
|
if (!stillHere) {
|
|
@@ -242,6 +251,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
242
251
|
}
|
|
243
252
|
var newPeriodItem = getPeriodItem(this_1._storedPeriodInfo, periodItem.period.id);
|
|
244
253
|
if (newPeriodItem !== undefined &&
|
|
254
|
+
newPeriodItem.isPeriodAdvertised &&
|
|
245
255
|
newPeriodItem.audio.storedSettings === storedSettings) {
|
|
246
256
|
(_e = newPeriodItem.audio.dispatcher) === null || _e === void 0 ? void 0 : _e.updateTrack(storedSettings);
|
|
247
257
|
}
|
|
@@ -258,7 +268,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
258
268
|
}
|
|
259
269
|
}
|
|
260
270
|
else {
|
|
261
|
-
var newPeriodInfo = generatePeriodInfo(newPeriod, true
|
|
271
|
+
var newPeriodInfo = generatePeriodInfo(newPeriod, true);
|
|
262
272
|
// oldPeriod.start > newPeriod.start: insert newPeriod before
|
|
263
273
|
this_1._storedPeriodInfo.splice(i, 0, newPeriodInfo);
|
|
264
274
|
addedPeriods.push(newPeriodInfo);
|
|
@@ -279,9 +289,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
279
289
|
// Add further new Period
|
|
280
290
|
var periodsToAdd = periods
|
|
281
291
|
.slice(newPListIdx)
|
|
282
|
-
.map(function (p) {
|
|
283
|
-
return generatePeriodInfo(p, true, _this._isTrickModeTrackEnabled, _this._defaultAudioTrackSwitchingMode);
|
|
284
|
-
});
|
|
292
|
+
.map(function (p) { return generatePeriodInfo(p, true); });
|
|
285
293
|
(_a = this._storedPeriodInfo).push.apply(_a, __spreadArray([], __read(periodsToAdd), false));
|
|
286
294
|
addedPeriods.push.apply(addedPeriods, __spreadArray([], __read(periodsToAdd), false));
|
|
287
295
|
}
|
|
@@ -332,11 +340,12 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
332
340
|
* the choice will be given.
|
|
333
341
|
*/
|
|
334
342
|
TracksStore.prototype.addTrackReference = function (bufferType, period, adaptationRef) {
|
|
343
|
+
var e_3, _a;
|
|
335
344
|
var _this = this;
|
|
336
345
|
var periodObj = getPeriodItem(this._storedPeriodInfo, period.id);
|
|
337
346
|
if (periodObj === undefined) {
|
|
338
347
|
// The Period has not yet been added.
|
|
339
|
-
periodObj = generatePeriodInfo(period, false
|
|
348
|
+
periodObj = generatePeriodInfo(period, false);
|
|
340
349
|
var found = false;
|
|
341
350
|
for (var i = 0; i < this._storedPeriodInfo.length; i++) {
|
|
342
351
|
if (this._storedPeriodInfo[i].period.start > period.start) {
|
|
@@ -348,29 +357,20 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
348
357
|
this._storedPeriodInfo.push(periodObj);
|
|
349
358
|
}
|
|
350
359
|
}
|
|
351
|
-
if (!periodObj.isPeriodAdvertised) {
|
|
352
|
-
periodObj.isPeriodAdvertised = true;
|
|
353
|
-
this.trigger("newAvailablePeriods", [
|
|
354
|
-
{ id: period.id, start: period.start, end: period.end },
|
|
355
|
-
]);
|
|
356
|
-
if (this._isDisposed) {
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
360
|
if (periodObj[bufferType].dispatcher !== null) {
|
|
361
361
|
log_1.default.error("TS: Subject already added for ".concat(bufferType, " ") + "and Period ".concat(period.start));
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
|
-
var trackSetting = periodObj[bufferType].storedSettings;
|
|
365
364
|
var dispatcher = new track_dispatcher_1.default(adaptationRef);
|
|
366
365
|
periodObj[bufferType].dispatcher = dispatcher;
|
|
367
366
|
dispatcher.addEventListener("noPlayableRepresentation", function () {
|
|
368
367
|
var _a, _b, _c, _d;
|
|
369
|
-
var nextAdaptation = (0, array_find_1.default)((_a = period.adaptations[bufferType]) !== null && _a !== void 0 ? _a : [], function (
|
|
370
|
-
if (
|
|
368
|
+
var nextAdaptation = (0, array_find_1.default)((_a = period.adaptations[bufferType]) !== null && _a !== void 0 ? _a : [], function (adaptation) {
|
|
369
|
+
if (adaptation.supportStatus.hasSupportedCodec === false ||
|
|
370
|
+
adaptation.supportStatus.isDecipherable === false) {
|
|
371
371
|
return false;
|
|
372
372
|
}
|
|
373
|
-
var playableRepresentations =
|
|
373
|
+
var playableRepresentations = adaptation.representations.filter(function (r) { return r.isSupported === true && r.decipherable !== false; });
|
|
374
374
|
return playableRepresentations.length > 0;
|
|
375
375
|
});
|
|
376
376
|
if (nextAdaptation === undefined) {
|
|
@@ -409,13 +409,54 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
409
409
|
dispatcher.addEventListener("noPlayableLockedRepresentation", function () {
|
|
410
410
|
// TODO check that it doesn't already lead to segment loading or MediaSource
|
|
411
411
|
// reloading
|
|
412
|
-
|
|
412
|
+
if (periodObj === undefined) {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
_this.unlockVideoRepresentations(periodObj);
|
|
413
416
|
_this.trigger("brokenRepresentationsLock", {
|
|
414
417
|
period: { id: period.id, start: period.start, end: period.end },
|
|
415
418
|
trackType: bufferType,
|
|
416
419
|
});
|
|
417
420
|
});
|
|
418
|
-
|
|
421
|
+
this._selectInitialTrackIfNeeded();
|
|
422
|
+
// Ensure `newAvailablePeriods` is sent
|
|
423
|
+
if (this._shouldAdvertisePeriod(periodObj)) {
|
|
424
|
+
periodObj.isPeriodAdvertised = true;
|
|
425
|
+
this.trigger("newAvailablePeriods", [
|
|
426
|
+
{
|
|
427
|
+
id: period.id,
|
|
428
|
+
start: period.start,
|
|
429
|
+
end: period.end,
|
|
430
|
+
},
|
|
431
|
+
]);
|
|
432
|
+
if (this._isDisposed) {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
// Ensure the initial track is set for each type now)
|
|
437
|
+
var trackTypes = ["audio", "video", "text"];
|
|
438
|
+
try {
|
|
439
|
+
for (var trackTypes_1 = __values(trackTypes), trackTypes_1_1 = trackTypes_1.next(); !trackTypes_1_1.done; trackTypes_1_1 = trackTypes_1.next()) {
|
|
440
|
+
var ttype = trackTypes_1_1.value;
|
|
441
|
+
var trackObj = periodObj[ttype];
|
|
442
|
+
if (periodObj.isPeriodAdvertised &&
|
|
443
|
+
trackObj.dispatcher !== null &&
|
|
444
|
+
!trackObj.dispatcher.hasSetTrack() &&
|
|
445
|
+
trackObj.storedSettings !== undefined) {
|
|
446
|
+
trackObj.dispatcher.updateTrack(trackObj.storedSettings);
|
|
447
|
+
}
|
|
448
|
+
if (this._isDisposed) {
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
454
|
+
finally {
|
|
455
|
+
try {
|
|
456
|
+
if (trackTypes_1_1 && !trackTypes_1_1.done && (_a = trackTypes_1.return)) _a.call(trackTypes_1);
|
|
457
|
+
}
|
|
458
|
+
finally { if (e_3) throw e_3.error; }
|
|
459
|
+
}
|
|
419
460
|
};
|
|
420
461
|
/**
|
|
421
462
|
* Remove shared reference to choose an "audio", "video" or "text" Adaptation
|
|
@@ -580,10 +621,15 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
580
621
|
TracksStore.prototype._setAudioOrTextTrack = function (_a) {
|
|
581
622
|
var _b, _c;
|
|
582
623
|
var bufferType = _a.bufferType, periodRef = _a.periodRef, trackId = _a.trackId, switchingMode = _a.switchingMode, lockedRepresentations = _a.lockedRepresentations, relativeResumingPosition = _a.relativeResumingPosition;
|
|
624
|
+
if (!periodRef.isPeriodAdvertised) {
|
|
625
|
+
throw new Error("Wanted Period not yet advertised.");
|
|
626
|
+
}
|
|
583
627
|
var period = periodRef.period;
|
|
584
628
|
var wantedAdaptation = (0, array_find_1.default)((_b = period.adaptations[bufferType]) !== null && _b !== void 0 ? _b : [], function (_a) {
|
|
585
|
-
var id = _a.id,
|
|
586
|
-
return
|
|
629
|
+
var id = _a.id, supportStatus = _a.supportStatus;
|
|
630
|
+
return supportStatus.hasSupportedCodec !== false &&
|
|
631
|
+
supportStatus.isDecipherable !== false &&
|
|
632
|
+
id === trackId;
|
|
587
633
|
});
|
|
588
634
|
if (wantedAdaptation === undefined) {
|
|
589
635
|
throw new Error("Wanted ".concat(bufferType, " track not found."));
|
|
@@ -641,10 +687,15 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
641
687
|
TracksStore.prototype.setVideoTrack = function (payload) {
|
|
642
688
|
var _a, _b;
|
|
643
689
|
var periodRef = payload.periodRef, trackId = payload.trackId, switchingMode = payload.switchingMode, lockedRepresentations = payload.lockedRepresentations, relativeResumingPosition = payload.relativeResumingPosition;
|
|
690
|
+
if (!periodRef.isPeriodAdvertised) {
|
|
691
|
+
throw new Error("Wanted Period not yet advertised.");
|
|
692
|
+
}
|
|
644
693
|
var period = periodRef.period;
|
|
645
694
|
var wantedAdaptation = (0, array_find_1.default)((_a = period.adaptations.video) !== null && _a !== void 0 ? _a : [], function (_a) {
|
|
646
|
-
var id = _a.id,
|
|
647
|
-
return
|
|
695
|
+
var id = _a.id, supportStatus = _a.supportStatus;
|
|
696
|
+
return supportStatus.isDecipherable !== false &&
|
|
697
|
+
supportStatus.hasSupportedCodec !== false &&
|
|
698
|
+
id === trackId;
|
|
648
699
|
});
|
|
649
700
|
if (wantedAdaptation === undefined) {
|
|
650
701
|
throw new Error("Wanted video track not found.");
|
|
@@ -697,6 +748,9 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
697
748
|
*/
|
|
698
749
|
TracksStore.prototype.disableTrack = function (periodObj, bufferType) {
|
|
699
750
|
var _a, _b;
|
|
751
|
+
if (!periodObj.isPeriodAdvertised) {
|
|
752
|
+
throw new Error("Wanted Period not yet advertised.");
|
|
753
|
+
}
|
|
700
754
|
var trackInfo = periodObj[bufferType];
|
|
701
755
|
if (trackInfo.storedSettings === null) {
|
|
702
756
|
return;
|
|
@@ -741,7 +795,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
741
795
|
* known.
|
|
742
796
|
*/
|
|
743
797
|
TracksStore.prototype.getChosenAudioTrack = function (periodObj) {
|
|
744
|
-
return periodObj.audio.storedSettings
|
|
798
|
+
return (0, is_null_or_undefined_1.default)(periodObj.audio.storedSettings)
|
|
745
799
|
? null
|
|
746
800
|
: (0, manifest_1.toAudioTrack)(periodObj.audio.storedSettings.adaptation, true);
|
|
747
801
|
};
|
|
@@ -756,7 +810,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
756
810
|
* @returns {Object|null} - The text track chosen for this Period
|
|
757
811
|
*/
|
|
758
812
|
TracksStore.prototype.getChosenTextTrack = function (periodObj) {
|
|
759
|
-
return periodObj.text.storedSettings
|
|
813
|
+
return (0, is_null_or_undefined_1.default)(periodObj.text.storedSettings)
|
|
760
814
|
? null
|
|
761
815
|
: (0, manifest_1.toTextTrack)(periodObj.text.storedSettings.adaptation);
|
|
762
816
|
};
|
|
@@ -771,7 +825,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
771
825
|
* @returns {Object|null} - The video track chosen for this Period
|
|
772
826
|
*/
|
|
773
827
|
TracksStore.prototype.getChosenVideoTrack = function (periodObj) {
|
|
774
|
-
if (periodObj.video.storedSettings
|
|
828
|
+
if ((0, is_null_or_undefined_1.default)(periodObj.video.storedSettings)) {
|
|
775
829
|
return null;
|
|
776
830
|
}
|
|
777
831
|
return (0, manifest_1.toVideoTrack)(periodObj.video.storedSettings.adaptation, true);
|
|
@@ -787,7 +841,9 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
787
841
|
*/
|
|
788
842
|
TracksStore.prototype.getAvailableAudioTracks = function (periodObj) {
|
|
789
843
|
var storedSettings = periodObj.audio.storedSettings;
|
|
790
|
-
var currentId =
|
|
844
|
+
var currentId = !(0, is_null_or_undefined_1.default)(storedSettings)
|
|
845
|
+
? storedSettings.adaptation.id
|
|
846
|
+
: null;
|
|
791
847
|
var adaptations = (0, manifest_1.getSupportedAdaptations)(periodObj.period, "audio");
|
|
792
848
|
return adaptations.map(function (adaptation) {
|
|
793
849
|
var active = currentId === null ? false : currentId === adaptation.id;
|
|
@@ -805,7 +861,9 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
805
861
|
*/
|
|
806
862
|
TracksStore.prototype.getAvailableTextTracks = function (periodObj) {
|
|
807
863
|
var storedSettings = periodObj.text.storedSettings;
|
|
808
|
-
var currentId =
|
|
864
|
+
var currentId = !(0, is_null_or_undefined_1.default)(storedSettings)
|
|
865
|
+
? storedSettings.adaptation.id
|
|
866
|
+
: null;
|
|
809
867
|
var adaptations = (0, manifest_1.getSupportedAdaptations)(periodObj.period, "text");
|
|
810
868
|
return adaptations.map(function (adaptation) {
|
|
811
869
|
var active = currentId === null ? false : currentId === adaptation.id;
|
|
@@ -823,7 +881,9 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
823
881
|
*/
|
|
824
882
|
TracksStore.prototype.getAvailableVideoTracks = function (periodObj) {
|
|
825
883
|
var storedSettings = periodObj.video.storedSettings;
|
|
826
|
-
var currentId =
|
|
884
|
+
var currentId = (0, is_null_or_undefined_1.default)(storedSettings)
|
|
885
|
+
? undefined
|
|
886
|
+
: storedSettings.adaptation.id;
|
|
827
887
|
var adaptations = (0, manifest_1.getSupportedAdaptations)(periodObj.period, "video");
|
|
828
888
|
return adaptations.map(function (adaptation) {
|
|
829
889
|
var active = currentId === null ? false : currentId === adaptation.id;
|
|
@@ -843,7 +903,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
843
903
|
};
|
|
844
904
|
TracksStore.prototype.getLockedAudioRepresentations = function (periodObj) {
|
|
845
905
|
var storedSettings = periodObj.audio.storedSettings;
|
|
846
|
-
if (
|
|
906
|
+
if ((0, is_null_or_undefined_1.default)(storedSettings)) {
|
|
847
907
|
return null;
|
|
848
908
|
}
|
|
849
909
|
var lastLockedSettings = storedSettings.lockedRepresentations.getValue();
|
|
@@ -851,7 +911,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
851
911
|
};
|
|
852
912
|
TracksStore.prototype.getLockedVideoRepresentations = function (periodObj) {
|
|
853
913
|
var storedSettings = periodObj.video.storedSettings;
|
|
854
|
-
if (
|
|
914
|
+
if ((0, is_null_or_undefined_1.default)(storedSettings)) {
|
|
855
915
|
return null;
|
|
856
916
|
}
|
|
857
917
|
var lastLockedSettings = storedSettings.lockedRepresentations.getValue();
|
|
@@ -860,7 +920,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
860
920
|
TracksStore.prototype.lockAudioRepresentations = function (periodObj, lockSettings) {
|
|
861
921
|
var _a;
|
|
862
922
|
var storedSettings = periodObj.audio.storedSettings;
|
|
863
|
-
if (
|
|
923
|
+
if ((0, is_null_or_undefined_1.default)(storedSettings)) {
|
|
864
924
|
return;
|
|
865
925
|
}
|
|
866
926
|
var DEFAULT_AUDIO_REPRESENTATIONS_SWITCHING_MODE = config_1.default.getCurrent().DEFAULT_AUDIO_REPRESENTATIONS_SWITCHING_MODE;
|
|
@@ -874,7 +934,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
874
934
|
TracksStore.prototype.lockVideoRepresentations = function (periodObj, lockSettings) {
|
|
875
935
|
var _a;
|
|
876
936
|
var storedSettings = periodObj.video.storedSettings;
|
|
877
|
-
if (
|
|
937
|
+
if ((0, is_null_or_undefined_1.default)(storedSettings)) {
|
|
878
938
|
return;
|
|
879
939
|
}
|
|
880
940
|
var DEFAULT_VIDEO_REPRESENTATIONS_SWITCHING_MODE = config_1.default.getCurrent().DEFAULT_VIDEO_REPRESENTATIONS_SWITCHING_MODE;
|
|
@@ -887,7 +947,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
887
947
|
};
|
|
888
948
|
TracksStore.prototype.unlockAudioRepresentations = function (periodObj) {
|
|
889
949
|
var storedSettings = periodObj.audio.storedSettings;
|
|
890
|
-
if (storedSettings
|
|
950
|
+
if ((0, is_null_or_undefined_1.default)(storedSettings) ||
|
|
891
951
|
storedSettings.lockedRepresentations.getValue() === null) {
|
|
892
952
|
return;
|
|
893
953
|
}
|
|
@@ -895,7 +955,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
895
955
|
};
|
|
896
956
|
TracksStore.prototype.unlockVideoRepresentations = function (periodObj) {
|
|
897
957
|
var storedSettings = periodObj.video.storedSettings;
|
|
898
|
-
if (storedSettings
|
|
958
|
+
if ((0, is_null_or_undefined_1.default)(storedSettings) ||
|
|
899
959
|
storedSettings.lockedRepresentations.getValue() === null) {
|
|
900
960
|
return;
|
|
901
961
|
}
|
|
@@ -915,7 +975,7 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
915
975
|
var _a;
|
|
916
976
|
for (var i = 0; i < this._storedPeriodInfo.length; i++) {
|
|
917
977
|
var periodObj = this._storedPeriodInfo[i];
|
|
918
|
-
if (periodObj.video.storedSettings
|
|
978
|
+
if (!(0, is_null_or_undefined_1.default)(periodObj.video.storedSettings)) {
|
|
919
979
|
var chosenBaseTrack = periodObj.video.storedSettings.adaptationBase;
|
|
920
980
|
if (chosenBaseTrack !== null) {
|
|
921
981
|
var chosenTrack = getRightVideoTrack(chosenBaseTrack, this._isTrickModeTrackEnabled);
|
|
@@ -931,20 +991,23 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
931
991
|
var period = sliced[i].period;
|
|
932
992
|
var videoItem = sliced[i].video;
|
|
933
993
|
var storedSettings = videoItem.storedSettings;
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
newPeriodItem
|
|
947
|
-
|
|
994
|
+
if (storedSettings !== undefined) {
|
|
995
|
+
this.trigger("trackUpdate", {
|
|
996
|
+
period: toExposedPeriod(period),
|
|
997
|
+
trackType: "video",
|
|
998
|
+
reason: reason,
|
|
999
|
+
});
|
|
1000
|
+
// The previous event trigger could have had side-effects, so we
|
|
1001
|
+
// re-check if we're still mostly in the same state
|
|
1002
|
+
if (this._isDisposed) {
|
|
1003
|
+
return; // Someone disposed the `TracksStore` on the previous side-effect
|
|
1004
|
+
}
|
|
1005
|
+
var newPeriodItem = getPeriodItem(this._storedPeriodInfo, period.id);
|
|
1006
|
+
if (newPeriodItem !== undefined &&
|
|
1007
|
+
newPeriodItem.isPeriodAdvertised &&
|
|
1008
|
+
newPeriodItem.video.storedSettings === storedSettings) {
|
|
1009
|
+
(_a = newPeriodItem.video.dispatcher) === null || _a === void 0 ? void 0 : _a.updateTrack(storedSettings);
|
|
1010
|
+
}
|
|
948
1011
|
}
|
|
949
1012
|
}
|
|
950
1013
|
};
|
|
@@ -975,6 +1038,146 @@ var TracksStore = /** @class */ (function (_super) {
|
|
|
975
1038
|
}
|
|
976
1039
|
return filtered;
|
|
977
1040
|
};
|
|
1041
|
+
/**
|
|
1042
|
+
* Check or re-check all Periods for which both an initial track can be chosen
|
|
1043
|
+
* and for which the `newAvailablePeriods` event can be triggered.
|
|
1044
|
+
*/
|
|
1045
|
+
TracksStore.prototype._selectInitialTrackIfNeeded = function () {
|
|
1046
|
+
var e_4, _a, e_5, _b, e_6, _c;
|
|
1047
|
+
var _d, _e, _f, _g;
|
|
1048
|
+
var DEFAULT_VIDEO_TRACK_SWITCHING_MODE = config_1.default.getCurrent().DEFAULT_VIDEO_TRACK_SWITCHING_MODE;
|
|
1049
|
+
var periodsToAdvertise = [];
|
|
1050
|
+
var toDispatchTrack = [];
|
|
1051
|
+
var _loop_2 = function (trackStorePeriod) {
|
|
1052
|
+
var period = trackStorePeriod.period;
|
|
1053
|
+
if (trackStorePeriod.audio.storedSettings !== undefined &&
|
|
1054
|
+
trackStorePeriod.video.storedSettings !== undefined &&
|
|
1055
|
+
trackStorePeriod.text.storedSettings !== undefined) {
|
|
1056
|
+
return "continue";
|
|
1057
|
+
}
|
|
1058
|
+
var adaptations = __spreadArray(__spreadArray([], __read(((_d = period.adaptations.audio) !== null && _d !== void 0 ? _d : [])), false), __read(((_e = period.adaptations.video) !== null && _e !== void 0 ? _e : [])), false);
|
|
1059
|
+
var hasCodecWithUndefinedSupport = adaptations.every(function (a) { return a.supportStatus.hasCodecWithUndefinedSupport; });
|
|
1060
|
+
if (adaptations.length > 0 && hasCodecWithUndefinedSupport) {
|
|
1061
|
+
return "continue";
|
|
1062
|
+
}
|
|
1063
|
+
var audioAdaptation = (0, manifest_1.getSupportedAdaptations)(period, "audio")[0];
|
|
1064
|
+
trackStorePeriod.audio.storedSettings =
|
|
1065
|
+
audioAdaptation === undefined
|
|
1066
|
+
? null
|
|
1067
|
+
: {
|
|
1068
|
+
adaptation: audioAdaptation,
|
|
1069
|
+
switchingMode: this_2._defaultAudioTrackSwitchingMode,
|
|
1070
|
+
lockedRepresentations: new reference_1.default(null),
|
|
1071
|
+
};
|
|
1072
|
+
var baseVideoAdaptation = (0, manifest_1.getSupportedAdaptations)(period, "video")[0];
|
|
1073
|
+
var videoAdaptation = getRightVideoTrack(baseVideoAdaptation, this_2._isTrickModeTrackEnabled);
|
|
1074
|
+
trackStorePeriod.video.storedSettings =
|
|
1075
|
+
videoAdaptation === undefined
|
|
1076
|
+
? null
|
|
1077
|
+
: {
|
|
1078
|
+
adaptation: videoAdaptation,
|
|
1079
|
+
adaptationBase: baseVideoAdaptation,
|
|
1080
|
+
switchingMode: DEFAULT_VIDEO_TRACK_SWITCHING_MODE,
|
|
1081
|
+
lockedRepresentations: new reference_1.default(null),
|
|
1082
|
+
};
|
|
1083
|
+
var textAdaptation = null;
|
|
1084
|
+
var forcedSubtitles = ((_f = period.adaptations.text) !== null && _f !== void 0 ? _f : []).filter(function (ad) { return ad.isForcedSubtitles === true; });
|
|
1085
|
+
if (forcedSubtitles.length > 0) {
|
|
1086
|
+
if (audioAdaptation !== null && audioAdaptation !== undefined) {
|
|
1087
|
+
var sameLanguage = (0, array_find_1.default)(forcedSubtitles, function (f) { return f.normalizedLanguage === audioAdaptation.normalizedLanguage; });
|
|
1088
|
+
if (sameLanguage !== undefined) {
|
|
1089
|
+
textAdaptation = sameLanguage;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
if (textAdaptation === null) {
|
|
1093
|
+
textAdaptation =
|
|
1094
|
+
(_g = (0, array_find_1.default)(forcedSubtitles, function (f) { return f.normalizedLanguage === undefined; })) !== null && _g !== void 0 ? _g : null;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
trackStorePeriod.text.storedSettings =
|
|
1098
|
+
textAdaptation === null
|
|
1099
|
+
? null
|
|
1100
|
+
: {
|
|
1101
|
+
adaptation: textAdaptation,
|
|
1102
|
+
switchingMode: "direct",
|
|
1103
|
+
lockedRepresentations: new reference_1.default(null),
|
|
1104
|
+
};
|
|
1105
|
+
toDispatchTrack.push(trackStorePeriod);
|
|
1106
|
+
if (this_2._shouldAdvertisePeriod(trackStorePeriod)) {
|
|
1107
|
+
trackStorePeriod.isPeriodAdvertised = true;
|
|
1108
|
+
periodsToAdvertise.push({ id: period.id, start: period.start, end: period.end });
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
var this_2 = this;
|
|
1112
|
+
try {
|
|
1113
|
+
for (var _h = __values(this._storedPeriodInfo), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
1114
|
+
var trackStorePeriod = _j.value;
|
|
1115
|
+
_loop_2(trackStorePeriod);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
1119
|
+
finally {
|
|
1120
|
+
try {
|
|
1121
|
+
if (_j && !_j.done && (_a = _h.return)) _a.call(_h);
|
|
1122
|
+
}
|
|
1123
|
+
finally { if (e_4) throw e_4.error; }
|
|
1124
|
+
}
|
|
1125
|
+
if (periodsToAdvertise.length > 0) {
|
|
1126
|
+
this.trigger("newAvailablePeriods", periodsToAdvertise);
|
|
1127
|
+
if (this._isDisposed) {
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
try {
|
|
1132
|
+
for (var toDispatchTrack_1 = __values(toDispatchTrack), toDispatchTrack_1_1 = toDispatchTrack_1.next(); !toDispatchTrack_1_1.done; toDispatchTrack_1_1 = toDispatchTrack_1.next()) {
|
|
1133
|
+
var trackStorePeriod = toDispatchTrack_1_1.value;
|
|
1134
|
+
if (!trackStorePeriod.isPeriodAdvertised) {
|
|
1135
|
+
continue;
|
|
1136
|
+
}
|
|
1137
|
+
var bufferTypes = ["audio", "video", "text"];
|
|
1138
|
+
try {
|
|
1139
|
+
for (var bufferTypes_1 = (e_6 = void 0, __values(bufferTypes)), bufferTypes_1_1 = bufferTypes_1.next(); !bufferTypes_1_1.done; bufferTypes_1_1 = bufferTypes_1.next()) {
|
|
1140
|
+
var bufferType = bufferTypes_1_1.value;
|
|
1141
|
+
var trackInfo = trackStorePeriod[bufferType];
|
|
1142
|
+
if (trackInfo.dispatcher !== null &&
|
|
1143
|
+
trackInfo.storedSettings !== undefined &&
|
|
1144
|
+
!trackInfo.dispatcher.hasSetTrack()) {
|
|
1145
|
+
trackInfo.dispatcher.updateTrack(trackInfo.storedSettings);
|
|
1146
|
+
if (this._isDisposed) {
|
|
1147
|
+
return;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
1153
|
+
finally {
|
|
1154
|
+
try {
|
|
1155
|
+
if (bufferTypes_1_1 && !bufferTypes_1_1.done && (_c = bufferTypes_1.return)) _c.call(bufferTypes_1);
|
|
1156
|
+
}
|
|
1157
|
+
finally { if (e_6) throw e_6.error; }
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
1162
|
+
finally {
|
|
1163
|
+
try {
|
|
1164
|
+
if (toDispatchTrack_1_1 && !toDispatchTrack_1_1.done && (_b = toDispatchTrack_1.return)) _b.call(toDispatchTrack_1);
|
|
1165
|
+
}
|
|
1166
|
+
finally { if (e_5) throw e_5.error; }
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
/**
|
|
1170
|
+
* Returns `true` once a Period can be advertised through a `newAvailablePeriods`
|
|
1171
|
+
* event, after which track can begin to be set and updated.
|
|
1172
|
+
* @param {Object} periodObj
|
|
1173
|
+
* @returns {boolean}
|
|
1174
|
+
*/
|
|
1175
|
+
TracksStore.prototype._shouldAdvertisePeriod = function (periodObj) {
|
|
1176
|
+
return (!periodObj.isPeriodAdvertised &&
|
|
1177
|
+
periodObj.text.dispatcher !== null &&
|
|
1178
|
+
periodObj.video.dispatcher !== null &&
|
|
1179
|
+
periodObj.audio.dispatcher !== null);
|
|
1180
|
+
};
|
|
978
1181
|
return TracksStore;
|
|
979
1182
|
}(event_emitter_1.default));
|
|
980
1183
|
exports.default = TracksStore;
|
|
@@ -1035,60 +1238,17 @@ function getRightVideoTrack(adaptation, isTrickModeEnabled) {
|
|
|
1035
1238
|
* default track for each type.
|
|
1036
1239
|
* @param {Object} period
|
|
1037
1240
|
* @param {boolean} inManifest
|
|
1038
|
-
* @param {boolean} isTrickModeTrackEnabled
|
|
1039
1241
|
* @returns {object}
|
|
1040
1242
|
*/
|
|
1041
|
-
function generatePeriodInfo(period, inManifest
|
|
1042
|
-
var _a, _b;
|
|
1043
|
-
var audioAdaptation = (0, manifest_1.getSupportedAdaptations)(period, "audio")[0];
|
|
1044
|
-
var baseVideoAdaptation = (0, manifest_1.getSupportedAdaptations)(period, "video")[0];
|
|
1045
|
-
var videoAdaptation = getRightVideoTrack(baseVideoAdaptation, isTrickModeTrackEnabled);
|
|
1046
|
-
var DEFAULT_VIDEO_TRACK_SWITCHING_MODE = config_1.default.getCurrent().DEFAULT_VIDEO_TRACK_SWITCHING_MODE;
|
|
1047
|
-
var audioSettings = audioAdaptation !== undefined
|
|
1048
|
-
? {
|
|
1049
|
-
adaptation: audioAdaptation,
|
|
1050
|
-
switchingMode: defaultAudioTrackSwitchingMode,
|
|
1051
|
-
lockedRepresentations: new reference_1.default(null),
|
|
1052
|
-
}
|
|
1053
|
-
: null;
|
|
1054
|
-
var videoSettings = videoAdaptation !== undefined
|
|
1055
|
-
? {
|
|
1056
|
-
adaptation: videoAdaptation,
|
|
1057
|
-
adaptationBase: baseVideoAdaptation,
|
|
1058
|
-
switchingMode: DEFAULT_VIDEO_TRACK_SWITCHING_MODE,
|
|
1059
|
-
lockedRepresentations: new reference_1.default(null),
|
|
1060
|
-
}
|
|
1061
|
-
: null;
|
|
1062
|
-
var textAdaptation = null;
|
|
1063
|
-
var forcedSubtitles = ((_a = period.adaptations.text) !== null && _a !== void 0 ? _a : []).filter(function (ad) { return ad.isForcedSubtitles === true; });
|
|
1064
|
-
if (forcedSubtitles.length > 0) {
|
|
1065
|
-
if (audioAdaptation !== null && audioAdaptation !== undefined) {
|
|
1066
|
-
var sameLanguage = (0, array_find_1.default)(forcedSubtitles, function (f) { return f.normalizedLanguage === audioAdaptation.normalizedLanguage; });
|
|
1067
|
-
if (sameLanguage !== undefined) {
|
|
1068
|
-
textAdaptation = sameLanguage;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
if (textAdaptation === null) {
|
|
1072
|
-
textAdaptation =
|
|
1073
|
-
(_b = (0, array_find_1.default)(forcedSubtitles, function (f) { return f.normalizedLanguage === undefined; })) !== null && _b !== void 0 ? _b : null;
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
var textSettings = null;
|
|
1077
|
-
if (textAdaptation !== null) {
|
|
1078
|
-
textSettings = {
|
|
1079
|
-
adaptation: textAdaptation,
|
|
1080
|
-
switchingMode: "direct",
|
|
1081
|
-
lockedRepresentations: new reference_1.default(null),
|
|
1082
|
-
};
|
|
1083
|
-
}
|
|
1243
|
+
function generatePeriodInfo(period, inManifest) {
|
|
1084
1244
|
return {
|
|
1085
1245
|
period: period,
|
|
1086
1246
|
inManifest: inManifest,
|
|
1087
1247
|
isPeriodAdvertised: false,
|
|
1088
1248
|
isRemoved: false,
|
|
1089
|
-
audio: { storedSettings:
|
|
1090
|
-
video: { storedSettings:
|
|
1091
|
-
text: { storedSettings:
|
|
1249
|
+
audio: { storedSettings: undefined, dispatcher: null },
|
|
1250
|
+
video: { storedSettings: undefined, dispatcher: null },
|
|
1251
|
+
text: { storedSettings: undefined, dispatcher: null },
|
|
1092
1252
|
};
|
|
1093
1253
|
}
|
|
1094
1254
|
function toExposedPeriod(p) {
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IAdaptationMetadata } from "../../manifest";
|
|
17
16
|
import type { IParsedAdaptation } from "../../parsers/manifest";
|
|
18
17
|
import type { ITrackType, IRepresentationFilter } from "../../public_types";
|
|
19
|
-
import type {
|
|
18
|
+
import type { IAdaptationMetadata, IAdaptationSupportStatus } from "../types";
|
|
19
|
+
import type CodecSupportCache from "./codec_support_cache";
|
|
20
20
|
import Representation from "./representation";
|
|
21
21
|
/**
|
|
22
22
|
* Normalized Adaptation structure.
|
|
@@ -73,7 +73,7 @@ export default class Adaptation implements IAdaptationMetadata {
|
|
|
73
73
|
/**
|
|
74
74
|
* @see IRepresentationMetadata
|
|
75
75
|
*/
|
|
76
|
-
|
|
76
|
+
supportStatus: IAdaptationSupportStatus;
|
|
77
77
|
/**
|
|
78
78
|
* @see IRepresentationMetadata
|
|
79
79
|
*/
|
|
@@ -91,7 +91,7 @@ export default class Adaptation implements IAdaptationMetadata {
|
|
|
91
91
|
* @param {Object} parsedAdaptation
|
|
92
92
|
* @param {Object|undefined} [options]
|
|
93
93
|
*/
|
|
94
|
-
constructor(parsedAdaptation: IParsedAdaptation, options?: {
|
|
94
|
+
constructor(parsedAdaptation: IParsedAdaptation, cachedCodecSupport: CodecSupportCache, options?: {
|
|
95
95
|
representationFilter?: IRepresentationFilter | undefined;
|
|
96
96
|
isManuallyAdded?: boolean | undefined;
|
|
97
97
|
});
|
|
@@ -99,17 +99,17 @@ export default class Adaptation implements IAdaptationMetadata {
|
|
|
99
99
|
* Some environments (e.g. in a WebWorker) may not have the capability to know
|
|
100
100
|
* if a mimetype+codec combination is supported on the current platform.
|
|
101
101
|
*
|
|
102
|
-
* Calling `refreshCodecSupport` manually
|
|
103
|
-
*
|
|
104
|
-
*
|
|
102
|
+
* Calling `refreshCodecSupport` manually once the codecs supported are known
|
|
103
|
+
* by the current environnement allows to work-around this issue.
|
|
104
|
+
*
|
|
105
105
|
*
|
|
106
106
|
* If the right mimetype+codec combination is found in the provided object,
|
|
107
107
|
* this `Adaptation`'s `isSupported` property will be updated accordingly as
|
|
108
108
|
* well as all of its inner `Representation`'s `isSupported` attributes.
|
|
109
109
|
*
|
|
110
|
-
* @param {Array.<Object>}
|
|
110
|
+
* @param {Array.<Object>} cachedCodecSupport
|
|
111
111
|
*/
|
|
112
|
-
refreshCodecSupport(
|
|
112
|
+
refreshCodecSupport(cachedCodecSupport: CodecSupportCache): void;
|
|
113
113
|
/**
|
|
114
114
|
* Returns the Representation linked to the given ID.
|
|
115
115
|
* @param {number|string} wantedId
|