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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { describe, beforeEach, it, expect, vi } from "vitest";
|
|
2
2
|
import type Adaptation from "../adaptation";
|
|
3
|
+
import CodecSupportCache from "../codec_support_cache";
|
|
3
4
|
|
|
4
5
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
5
6
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
@@ -13,7 +14,14 @@ describe("Manifest - Period", () => {
|
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
it("should throw if no adaptation is given", async () => {
|
|
16
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
17
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
18
|
+
...arg,
|
|
19
|
+
supportStatus: {
|
|
20
|
+
hasSupportedCodec: undefined,
|
|
21
|
+
hasCodecWithUndefinedSupport: true,
|
|
22
|
+
isDecipherable: undefined,
|
|
23
|
+
},
|
|
24
|
+
}));
|
|
17
25
|
vi.doMock("../adaptation", () => ({
|
|
18
26
|
default: mockAdaptation,
|
|
19
27
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -25,7 +33,8 @@ describe("Manifest - Period", () => {
|
|
|
25
33
|
let errorReceived: unknown = null;
|
|
26
34
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
27
35
|
try {
|
|
28
|
-
|
|
36
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
37
|
+
period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
29
38
|
} catch (e) {
|
|
30
39
|
errorReceived = e;
|
|
31
40
|
}
|
|
@@ -46,7 +55,14 @@ describe("Manifest - Period", () => {
|
|
|
46
55
|
});
|
|
47
56
|
|
|
48
57
|
it("should throw if no audio nor video adaptation is given", async () => {
|
|
49
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
58
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
59
|
+
...arg,
|
|
60
|
+
supportStatus: {
|
|
61
|
+
hasSupportedCodec: undefined,
|
|
62
|
+
hasCodecWithUndefinedSupport: true,
|
|
63
|
+
isDecipherable: undefined,
|
|
64
|
+
},
|
|
65
|
+
}));
|
|
50
66
|
vi.doMock("../adaptation", () => ({
|
|
51
67
|
default: mockAdaptation,
|
|
52
68
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text", "foo"],
|
|
@@ -56,13 +72,11 @@ describe("Manifest - Period", () => {
|
|
|
56
72
|
const fooAda1 = {
|
|
57
73
|
type: "foo",
|
|
58
74
|
id: "54",
|
|
59
|
-
isSupported: true,
|
|
60
75
|
representations: [{}],
|
|
61
76
|
};
|
|
62
77
|
const fooAda2 = {
|
|
63
78
|
type: "foo",
|
|
64
79
|
id: "55",
|
|
65
|
-
isSupported: true,
|
|
66
80
|
representations: [{}],
|
|
67
81
|
};
|
|
68
82
|
const foo = [fooAda1, fooAda2];
|
|
@@ -70,8 +84,9 @@ describe("Manifest - Period", () => {
|
|
|
70
84
|
let period = null;
|
|
71
85
|
let errorReceived: unknown = null;
|
|
72
86
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
87
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
73
88
|
try {
|
|
74
|
-
period = new Period(args, unsupportedAdaptations);
|
|
89
|
+
period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
75
90
|
} catch (e) {
|
|
76
91
|
errorReceived = e;
|
|
77
92
|
}
|
|
@@ -91,12 +106,19 @@ describe("Manifest - Period", () => {
|
|
|
91
106
|
expect(errorReceived.message).toContain("No supported audio and video tracks.");
|
|
92
107
|
|
|
93
108
|
expect(mockAdaptation).toHaveBeenCalledTimes(2);
|
|
94
|
-
expect(mockAdaptation).toHaveBeenNthCalledWith(1, fooAda1, {});
|
|
95
|
-
expect(mockAdaptation).toHaveBeenNthCalledWith(2, fooAda2, {});
|
|
109
|
+
expect(mockAdaptation).toHaveBeenNthCalledWith(1, fooAda1, codecSupportCache, {});
|
|
110
|
+
expect(mockAdaptation).toHaveBeenNthCalledWith(2, fooAda2, codecSupportCache, {});
|
|
96
111
|
});
|
|
97
112
|
|
|
98
113
|
it("should throw if only empty audio and/or video adaptations is given", async () => {
|
|
99
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
114
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
115
|
+
...arg,
|
|
116
|
+
supportStatus: {
|
|
117
|
+
hasSupportedCodec: undefined,
|
|
118
|
+
hasCodecWithUndefinedSupport: true,
|
|
119
|
+
isDecipherable: undefined,
|
|
120
|
+
},
|
|
121
|
+
}));
|
|
100
122
|
vi.doMock("../adaptation", () => ({
|
|
101
123
|
default: mockAdaptation,
|
|
102
124
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text", "foo"],
|
|
@@ -108,7 +130,8 @@ describe("Manifest - Period", () => {
|
|
|
108
130
|
let errorReceived: unknown = null;
|
|
109
131
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
110
132
|
try {
|
|
111
|
-
|
|
133
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
134
|
+
period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
112
135
|
} catch (e) {
|
|
113
136
|
errorReceived = e;
|
|
114
137
|
}
|
|
@@ -131,7 +154,14 @@ describe("Manifest - Period", () => {
|
|
|
131
154
|
});
|
|
132
155
|
|
|
133
156
|
it("should throw if we are left with no audio representation", async () => {
|
|
134
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
157
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
158
|
+
...arg,
|
|
159
|
+
supportStatus: {
|
|
160
|
+
hasSupportedCodec: undefined,
|
|
161
|
+
hasCodecWithUndefinedSupport: true,
|
|
162
|
+
isDecipherable: undefined,
|
|
163
|
+
},
|
|
164
|
+
}));
|
|
135
165
|
vi.doMock("../adaptation", () => ({
|
|
136
166
|
default: mockAdaptation,
|
|
137
167
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text", "foo"],
|
|
@@ -141,7 +171,6 @@ describe("Manifest - Period", () => {
|
|
|
141
171
|
const videoAda1 = {
|
|
142
172
|
type: "video",
|
|
143
173
|
id: "54",
|
|
144
|
-
isSupported: true,
|
|
145
174
|
representations: [{}],
|
|
146
175
|
toVideoTrack() {
|
|
147
176
|
return videoAda1;
|
|
@@ -150,7 +179,6 @@ describe("Manifest - Period", () => {
|
|
|
150
179
|
const videoAda2 = {
|
|
151
180
|
type: "video",
|
|
152
181
|
id: "56",
|
|
153
|
-
isSupported: true,
|
|
154
182
|
representations: [{}],
|
|
155
183
|
toVideoTrack() {
|
|
156
184
|
return videoAda2;
|
|
@@ -159,7 +187,6 @@ describe("Manifest - Period", () => {
|
|
|
159
187
|
const videoAda3 = {
|
|
160
188
|
type: "video",
|
|
161
189
|
id: "57",
|
|
162
|
-
isSupported: true,
|
|
163
190
|
representations: [{}],
|
|
164
191
|
toVideoTrack() {
|
|
165
192
|
return videoAda3;
|
|
@@ -170,7 +197,6 @@ describe("Manifest - Period", () => {
|
|
|
170
197
|
const audioAda1 = {
|
|
171
198
|
type: "audio",
|
|
172
199
|
id: "58",
|
|
173
|
-
isSupported: true,
|
|
174
200
|
representations: [],
|
|
175
201
|
toAudioTrack() {
|
|
176
202
|
return audioAda1;
|
|
@@ -179,7 +205,6 @@ describe("Manifest - Period", () => {
|
|
|
179
205
|
const audioAda2 = {
|
|
180
206
|
type: "audio",
|
|
181
207
|
id: "59",
|
|
182
|
-
isSupported: true,
|
|
183
208
|
representations: [],
|
|
184
209
|
toAudioTrack() {
|
|
185
210
|
return audioAda2;
|
|
@@ -191,7 +216,8 @@ describe("Manifest - Period", () => {
|
|
|
191
216
|
let errorReceived: unknown = null;
|
|
192
217
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
193
218
|
try {
|
|
194
|
-
|
|
219
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
220
|
+
period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
195
221
|
} catch (e) {
|
|
196
222
|
errorReceived = e;
|
|
197
223
|
}
|
|
@@ -214,7 +240,14 @@ describe("Manifest - Period", () => {
|
|
|
214
240
|
});
|
|
215
241
|
|
|
216
242
|
it("should throw if no audio Adaptation is supported", async () => {
|
|
217
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
243
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
244
|
+
...arg,
|
|
245
|
+
supportStatus: {
|
|
246
|
+
hasSupportedCodec: arg.type !== "audio",
|
|
247
|
+
hasCodecWithUndefinedSupport: true,
|
|
248
|
+
isDecipherable: undefined,
|
|
249
|
+
},
|
|
250
|
+
}));
|
|
218
251
|
vi.doMock("../adaptation", () => ({
|
|
219
252
|
default: mockAdaptation,
|
|
220
253
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text", "foo"],
|
|
@@ -224,7 +257,6 @@ describe("Manifest - Period", () => {
|
|
|
224
257
|
const videoAda1 = {
|
|
225
258
|
type: "video",
|
|
226
259
|
id: "54",
|
|
227
|
-
isSupported: true,
|
|
228
260
|
representations: [{}],
|
|
229
261
|
toVideoTrack() {
|
|
230
262
|
return videoAda1;
|
|
@@ -233,7 +265,6 @@ describe("Manifest - Period", () => {
|
|
|
233
265
|
const videoAda2 = {
|
|
234
266
|
type: "video",
|
|
235
267
|
id: "55",
|
|
236
|
-
isSupported: true,
|
|
237
268
|
representations: [{}],
|
|
238
269
|
toVideoTrack() {
|
|
239
270
|
return videoAda2;
|
|
@@ -242,7 +273,6 @@ describe("Manifest - Period", () => {
|
|
|
242
273
|
const videoAda3 = {
|
|
243
274
|
type: "video",
|
|
244
275
|
id: "56",
|
|
245
|
-
isSupported: true,
|
|
246
276
|
representations: [{}],
|
|
247
277
|
toVideoTrack() {
|
|
248
278
|
return videoAda3;
|
|
@@ -253,7 +283,6 @@ describe("Manifest - Period", () => {
|
|
|
253
283
|
const audioAda1 = {
|
|
254
284
|
type: "audio",
|
|
255
285
|
id: "57",
|
|
256
|
-
isSupported: false,
|
|
257
286
|
representations: [{}],
|
|
258
287
|
toAudioTrack() {
|
|
259
288
|
return audioAda1;
|
|
@@ -262,7 +291,6 @@ describe("Manifest - Period", () => {
|
|
|
262
291
|
const audioAda2 = {
|
|
263
292
|
type: "audio",
|
|
264
293
|
id: "58",
|
|
265
|
-
isSupported: false,
|
|
266
294
|
representations: [{}],
|
|
267
295
|
toAudioTrack() {
|
|
268
296
|
return audioAda1;
|
|
@@ -274,7 +302,8 @@ describe("Manifest - Period", () => {
|
|
|
274
302
|
let errorReceived: unknown = null;
|
|
275
303
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
276
304
|
try {
|
|
277
|
-
|
|
305
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
306
|
+
period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
278
307
|
} catch (e) {
|
|
279
308
|
errorReceived = e;
|
|
280
309
|
}
|
|
@@ -299,7 +328,14 @@ describe("Manifest - Period", () => {
|
|
|
299
328
|
});
|
|
300
329
|
|
|
301
330
|
it("should throw if we are left with no video representation", async () => {
|
|
302
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
331
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
332
|
+
...arg,
|
|
333
|
+
supportStatus: {
|
|
334
|
+
hasSupportedCodec: undefined,
|
|
335
|
+
hasCodecWithUndefinedSupport: true,
|
|
336
|
+
isDecipherable: undefined,
|
|
337
|
+
},
|
|
338
|
+
}));
|
|
303
339
|
vi.doMock("../adaptation", () => ({
|
|
304
340
|
default: mockAdaptation,
|
|
305
341
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text", "foo"],
|
|
@@ -309,7 +345,6 @@ describe("Manifest - Period", () => {
|
|
|
309
345
|
const videoAda1 = {
|
|
310
346
|
type: "video",
|
|
311
347
|
id: "54",
|
|
312
|
-
isSupported: true,
|
|
313
348
|
representations: [],
|
|
314
349
|
toVideoTrack() {
|
|
315
350
|
return videoAda1;
|
|
@@ -318,7 +353,6 @@ describe("Manifest - Period", () => {
|
|
|
318
353
|
const videoAda2 = {
|
|
319
354
|
type: "video",
|
|
320
355
|
id: "55",
|
|
321
|
-
isSupported: true,
|
|
322
356
|
representations: [],
|
|
323
357
|
toVideoTrack() {
|
|
324
358
|
return videoAda2;
|
|
@@ -327,7 +361,6 @@ describe("Manifest - Period", () => {
|
|
|
327
361
|
const videoAda3 = {
|
|
328
362
|
type: "video",
|
|
329
363
|
id: "56",
|
|
330
|
-
isSupported: true,
|
|
331
364
|
representations: [],
|
|
332
365
|
toVideoTrack() {
|
|
333
366
|
return videoAda3;
|
|
@@ -338,7 +371,6 @@ describe("Manifest - Period", () => {
|
|
|
338
371
|
const audioAda1 = {
|
|
339
372
|
type: "audio",
|
|
340
373
|
id: "58",
|
|
341
|
-
isSupported: true,
|
|
342
374
|
representations: [{}],
|
|
343
375
|
toAudioTrack() {
|
|
344
376
|
return audioAda1;
|
|
@@ -347,7 +379,6 @@ describe("Manifest - Period", () => {
|
|
|
347
379
|
const audioAda2 = {
|
|
348
380
|
type: "audio",
|
|
349
381
|
id: "59",
|
|
350
|
-
isSupported: true,
|
|
351
382
|
representations: [{}],
|
|
352
383
|
toAudioTrack() {
|
|
353
384
|
return audioAda2;
|
|
@@ -359,7 +390,8 @@ describe("Manifest - Period", () => {
|
|
|
359
390
|
let errorReceived: unknown = null;
|
|
360
391
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
361
392
|
try {
|
|
362
|
-
|
|
393
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
394
|
+
period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
363
395
|
} catch (e) {
|
|
364
396
|
errorReceived = e;
|
|
365
397
|
}
|
|
@@ -382,7 +414,14 @@ describe("Manifest - Period", () => {
|
|
|
382
414
|
});
|
|
383
415
|
|
|
384
416
|
it("should throw if no video adaptation is supported", async () => {
|
|
385
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
417
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
418
|
+
...arg,
|
|
419
|
+
supportStatus: {
|
|
420
|
+
hasSupportedCodec: arg.type !== "video",
|
|
421
|
+
hasCodecWithUndefinedSupport: true,
|
|
422
|
+
isDecipherable: undefined,
|
|
423
|
+
},
|
|
424
|
+
}));
|
|
386
425
|
vi.doMock("../adaptation", () => ({
|
|
387
426
|
default: mockAdaptation,
|
|
388
427
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text", "foo"],
|
|
@@ -392,7 +431,6 @@ describe("Manifest - Period", () => {
|
|
|
392
431
|
const videoAda1 = {
|
|
393
432
|
type: "video",
|
|
394
433
|
id: "54",
|
|
395
|
-
isSupported: false,
|
|
396
434
|
representations: [{}],
|
|
397
435
|
toVideoTrack() {
|
|
398
436
|
return videoAda1;
|
|
@@ -401,7 +439,6 @@ describe("Manifest - Period", () => {
|
|
|
401
439
|
const videoAda2 = {
|
|
402
440
|
type: "video",
|
|
403
441
|
id: "55",
|
|
404
|
-
isSupported: false,
|
|
405
442
|
representations: [{}],
|
|
406
443
|
toVideoTrack() {
|
|
407
444
|
return videoAda2;
|
|
@@ -410,7 +447,6 @@ describe("Manifest - Period", () => {
|
|
|
410
447
|
const videoAda3 = {
|
|
411
448
|
type: "video",
|
|
412
449
|
id: "56",
|
|
413
|
-
isSupported: false,
|
|
414
450
|
representations: [{}],
|
|
415
451
|
toVideoTrack() {
|
|
416
452
|
return videoAda3;
|
|
@@ -421,7 +457,6 @@ describe("Manifest - Period", () => {
|
|
|
421
457
|
const audioAda1 = {
|
|
422
458
|
type: "audio",
|
|
423
459
|
id: "58",
|
|
424
|
-
isSupported: true,
|
|
425
460
|
representations: [{}],
|
|
426
461
|
toAudioTrack() {
|
|
427
462
|
return audioAda1;
|
|
@@ -430,7 +465,6 @@ describe("Manifest - Period", () => {
|
|
|
430
465
|
const audioAda2 = {
|
|
431
466
|
type: "audio",
|
|
432
467
|
id: "59",
|
|
433
|
-
isSupported: true,
|
|
434
468
|
representations: [{}],
|
|
435
469
|
toAudioTrack() {
|
|
436
470
|
return audioAda2;
|
|
@@ -442,7 +476,8 @@ describe("Manifest - Period", () => {
|
|
|
442
476
|
let errorReceived: unknown = null;
|
|
443
477
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
444
478
|
try {
|
|
445
|
-
|
|
479
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
480
|
+
period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
446
481
|
} catch (e) {
|
|
447
482
|
errorReceived = e;
|
|
448
483
|
}
|
|
@@ -465,9 +500,14 @@ describe("Manifest - Period", () => {
|
|
|
465
500
|
});
|
|
466
501
|
|
|
467
502
|
it("should set a parsing error if an unsupported adaptation is given", async () => {
|
|
468
|
-
const mockAdaptation = vi.fn((arg) => {
|
|
469
|
-
|
|
470
|
-
|
|
503
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
504
|
+
...arg,
|
|
505
|
+
supportStatus: {
|
|
506
|
+
hasSupportedCodec: arg.id !== "56",
|
|
507
|
+
hasCodecWithUndefinedSupport: true,
|
|
508
|
+
isDecipherable: undefined,
|
|
509
|
+
},
|
|
510
|
+
}));
|
|
471
511
|
vi.doMock("../adaptation", () => ({
|
|
472
512
|
default: mockAdaptation,
|
|
473
513
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text", "foo"],
|
|
@@ -478,7 +518,6 @@ describe("Manifest - Period", () => {
|
|
|
478
518
|
const videoAda1 = {
|
|
479
519
|
type: "video",
|
|
480
520
|
id: "55",
|
|
481
|
-
isSupported: true,
|
|
482
521
|
representations: [{}],
|
|
483
522
|
toVideoTrack() {
|
|
484
523
|
return videoAda1;
|
|
@@ -487,8 +526,7 @@ describe("Manifest - Period", () => {
|
|
|
487
526
|
const video = [videoAda1];
|
|
488
527
|
const videoAda2 = {
|
|
489
528
|
type: "video",
|
|
490
|
-
id: "
|
|
491
|
-
isSupported: false,
|
|
529
|
+
id: "56",
|
|
492
530
|
representations: [{}],
|
|
493
531
|
toVideoTrack() {
|
|
494
532
|
return videoAda2;
|
|
@@ -497,22 +535,30 @@ describe("Manifest - Period", () => {
|
|
|
497
535
|
const video2 = [videoAda2];
|
|
498
536
|
const args = { id: "12", adaptations: { video, video2 }, start: 0 };
|
|
499
537
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
500
|
-
const
|
|
538
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
539
|
+
const period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
501
540
|
expect(unsupportedAdaptations).toHaveLength(1);
|
|
502
541
|
|
|
503
542
|
expect(mockAdaptation).toHaveBeenCalledTimes(2);
|
|
504
543
|
expect(mockAdaptation).toHaveReturnedTimes(2);
|
|
505
|
-
expect(mockAdaptation).toHaveBeenCalledWith(videoAda1, {});
|
|
506
|
-
expect(mockAdaptation).toHaveBeenCalledWith(videoAda2, {});
|
|
544
|
+
expect(mockAdaptation).toHaveBeenCalledWith(videoAda1, codecSupportCache, {});
|
|
545
|
+
expect(mockAdaptation).toHaveBeenCalledWith(videoAda2, codecSupportCache, {});
|
|
507
546
|
expect(mockAdaptation).toHaveReturnedWith(period.adaptations.video[0]);
|
|
508
547
|
|
|
509
548
|
const [adap] = unsupportedAdaptations;
|
|
510
|
-
expect(
|
|
511
|
-
expect(
|
|
549
|
+
expect(adap.id).toBe("56");
|
|
550
|
+
expect(adap.supportStatus.hasSupportedCodec).toBe(false);
|
|
512
551
|
});
|
|
513
552
|
|
|
514
553
|
it("should not set a parsing error if an empty unsupported adaptation is given", async () => {
|
|
515
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
554
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
555
|
+
...arg,
|
|
556
|
+
supportStatus: {
|
|
557
|
+
hasSupportedCodec: undefined,
|
|
558
|
+
hasCodecWithUndefinedSupport: true,
|
|
559
|
+
isDecipherable: undefined,
|
|
560
|
+
},
|
|
561
|
+
}));
|
|
516
562
|
vi.doMock("../adaptation", () => ({
|
|
517
563
|
default: mockAdaptation,
|
|
518
564
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text", "foo"],
|
|
@@ -523,7 +569,6 @@ describe("Manifest - Period", () => {
|
|
|
523
569
|
const videoAda1 = {
|
|
524
570
|
type: "video",
|
|
525
571
|
id: "55",
|
|
526
|
-
isSupported: true,
|
|
527
572
|
representations: [{}],
|
|
528
573
|
toVideoTrack() {
|
|
529
574
|
return videoAda1;
|
|
@@ -533,18 +578,33 @@ describe("Manifest - Period", () => {
|
|
|
533
578
|
const bar = undefined;
|
|
534
579
|
const args = { id: "12", adaptations: { bar, video }, start: 0 };
|
|
535
580
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
536
|
-
const
|
|
581
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
582
|
+
const period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
537
583
|
expect(period.adaptations).toEqual({
|
|
538
|
-
video: video.map((v) => ({
|
|
584
|
+
video: video.map((v) => ({
|
|
585
|
+
...v,
|
|
586
|
+
supportStatus: {
|
|
587
|
+
hasSupportedCodec: undefined,
|
|
588
|
+
hasCodecWithUndefinedSupport: true,
|
|
589
|
+
isDecipherable: undefined,
|
|
590
|
+
},
|
|
591
|
+
})),
|
|
539
592
|
});
|
|
540
593
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
541
594
|
|
|
542
595
|
expect(mockAdaptation).toHaveBeenCalledTimes(1);
|
|
543
|
-
expect(mockAdaptation).toHaveBeenCalledWith(videoAda1, {});
|
|
596
|
+
expect(mockAdaptation).toHaveBeenCalledWith(videoAda1, codecSupportCache, {});
|
|
544
597
|
});
|
|
545
598
|
|
|
546
599
|
it("should give a representationFilter to the adaptation", async () => {
|
|
547
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
600
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
601
|
+
...arg,
|
|
602
|
+
supportStatus: {
|
|
603
|
+
hasSupportedCodec: undefined,
|
|
604
|
+
hasCodecWithUndefinedSupport: true,
|
|
605
|
+
isDecipherable: undefined,
|
|
606
|
+
},
|
|
607
|
+
}));
|
|
548
608
|
const representationFilter = vi.fn();
|
|
549
609
|
vi.doMock("../adaptation", () => ({
|
|
550
610
|
default: mockAdaptation,
|
|
@@ -555,7 +615,6 @@ describe("Manifest - Period", () => {
|
|
|
555
615
|
const videoAda1 = {
|
|
556
616
|
type: "video",
|
|
557
617
|
id: "54",
|
|
558
|
-
isSupported: true,
|
|
559
618
|
representations: [{}],
|
|
560
619
|
toVideoTrack() {
|
|
561
620
|
return videoAda1;
|
|
@@ -564,7 +623,6 @@ describe("Manifest - Period", () => {
|
|
|
564
623
|
const videoAda2 = {
|
|
565
624
|
type: "video",
|
|
566
625
|
id: "55",
|
|
567
|
-
isSupported: true,
|
|
568
626
|
representations: [{}],
|
|
569
627
|
toVideoTrack() {
|
|
570
628
|
return videoAda2;
|
|
@@ -573,23 +631,36 @@ describe("Manifest - Period", () => {
|
|
|
573
631
|
const video = [videoAda1, videoAda2];
|
|
574
632
|
const args = { id: "12", adaptations: { video }, start: 0 };
|
|
575
633
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
576
|
-
const
|
|
634
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
635
|
+
const period = new Period(
|
|
636
|
+
args,
|
|
637
|
+
unsupportedAdaptations,
|
|
638
|
+
codecSupportCache,
|
|
639
|
+
representationFilter,
|
|
640
|
+
);
|
|
577
641
|
|
|
578
642
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
579
643
|
expect(period.adaptations.video).toHaveLength(2);
|
|
580
644
|
|
|
581
645
|
expect(mockAdaptation).toHaveBeenCalledTimes(2);
|
|
582
|
-
expect(mockAdaptation).toHaveBeenNthCalledWith(1, videoAda1, {
|
|
646
|
+
expect(mockAdaptation).toHaveBeenNthCalledWith(1, videoAda1, codecSupportCache, {
|
|
583
647
|
representationFilter,
|
|
584
648
|
});
|
|
585
|
-
expect(mockAdaptation).toHaveBeenNthCalledWith(2, videoAda2, {
|
|
649
|
+
expect(mockAdaptation).toHaveBeenNthCalledWith(2, videoAda2, codecSupportCache, {
|
|
586
650
|
representationFilter,
|
|
587
651
|
});
|
|
588
652
|
expect(representationFilter).not.toHaveBeenCalled();
|
|
589
653
|
});
|
|
590
654
|
|
|
591
655
|
it("should report if Adaptations are not supported", async () => {
|
|
592
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
656
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
657
|
+
...arg,
|
|
658
|
+
supportStatus: {
|
|
659
|
+
hasSupportedCodec: arg.id === "55",
|
|
660
|
+
hasCodecWithUndefinedSupport: true,
|
|
661
|
+
isDecipherable: undefined,
|
|
662
|
+
},
|
|
663
|
+
}));
|
|
593
664
|
vi.doMock("../adaptation", () => ({
|
|
594
665
|
default: mockAdaptation,
|
|
595
666
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -599,7 +670,6 @@ describe("Manifest - Period", () => {
|
|
|
599
670
|
const videoAda1 = {
|
|
600
671
|
type: "video",
|
|
601
672
|
id: "54",
|
|
602
|
-
isSupported: false,
|
|
603
673
|
representations: [{}],
|
|
604
674
|
toVideoTrack() {
|
|
605
675
|
return videoAda1;
|
|
@@ -608,7 +678,6 @@ describe("Manifest - Period", () => {
|
|
|
608
678
|
const videoAda2 = {
|
|
609
679
|
type: "video",
|
|
610
680
|
id: "55",
|
|
611
|
-
isSupported: true,
|
|
612
681
|
representations: [{}],
|
|
613
682
|
toVideoTrack() {
|
|
614
683
|
return videoAda2;
|
|
@@ -617,14 +686,14 @@ describe("Manifest - Period", () => {
|
|
|
617
686
|
const fooAda1 = {
|
|
618
687
|
type: "foo",
|
|
619
688
|
id: "12",
|
|
620
|
-
isSupported: false,
|
|
621
689
|
representations: [{}],
|
|
622
690
|
};
|
|
623
691
|
const video = [videoAda1, videoAda2];
|
|
624
692
|
const foo = [fooAda1];
|
|
625
693
|
const args = { id: "12", adaptations: { video, foo }, start: 0 };
|
|
626
694
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
627
|
-
new
|
|
695
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
696
|
+
new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
628
697
|
|
|
629
698
|
expect(unsupportedAdaptations).toHaveLength(2);
|
|
630
699
|
const [adap1, adap2] = unsupportedAdaptations;
|
|
@@ -633,7 +702,14 @@ describe("Manifest - Period", () => {
|
|
|
633
702
|
});
|
|
634
703
|
|
|
635
704
|
it("should not report if an Adaptation has no Representation", async () => {
|
|
636
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
705
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
706
|
+
...arg,
|
|
707
|
+
supportStatus: {
|
|
708
|
+
hasSupportedCodec: undefined,
|
|
709
|
+
hasCodecWithUndefinedSupport: true,
|
|
710
|
+
isDecipherable: undefined,
|
|
711
|
+
},
|
|
712
|
+
}));
|
|
637
713
|
vi.doMock("../adaptation", () => ({
|
|
638
714
|
default: mockAdaptation,
|
|
639
715
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -643,7 +719,6 @@ describe("Manifest - Period", () => {
|
|
|
643
719
|
const videoAda1 = {
|
|
644
720
|
type: "video",
|
|
645
721
|
id: "54",
|
|
646
|
-
isSupported: false,
|
|
647
722
|
representations: [],
|
|
648
723
|
toVideoTrack() {
|
|
649
724
|
return videoAda1;
|
|
@@ -652,7 +727,6 @@ describe("Manifest - Period", () => {
|
|
|
652
727
|
const videoAda2 = {
|
|
653
728
|
type: "video",
|
|
654
729
|
id: "55",
|
|
655
|
-
isSupported: true,
|
|
656
730
|
representations: [{}],
|
|
657
731
|
toVideoTrack() {
|
|
658
732
|
return videoAda2;
|
|
@@ -661,19 +735,26 @@ describe("Manifest - Period", () => {
|
|
|
661
735
|
const fooAda1 = {
|
|
662
736
|
type: "foo",
|
|
663
737
|
id: "12",
|
|
664
|
-
isSupported: false,
|
|
665
738
|
representations: [],
|
|
666
739
|
};
|
|
667
740
|
const video = [videoAda1, videoAda2];
|
|
668
741
|
const foo = [fooAda1];
|
|
669
742
|
const args = { id: "12", adaptations: { video, foo }, start: 0 };
|
|
670
743
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
671
|
-
new
|
|
744
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
745
|
+
new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
672
746
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
673
747
|
});
|
|
674
748
|
|
|
675
749
|
it("should set the given start", async () => {
|
|
676
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
750
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
751
|
+
...arg,
|
|
752
|
+
supportStatus: {
|
|
753
|
+
hasSupportedCodec: undefined,
|
|
754
|
+
hasCodecWithUndefinedSupport: true,
|
|
755
|
+
isDecipherable: undefined,
|
|
756
|
+
},
|
|
757
|
+
}));
|
|
677
758
|
vi.doMock("../adaptation", () => ({
|
|
678
759
|
default: mockAdaptation,
|
|
679
760
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -683,7 +764,6 @@ describe("Manifest - Period", () => {
|
|
|
683
764
|
const videoAda1 = {
|
|
684
765
|
type: "video",
|
|
685
766
|
id: "54",
|
|
686
|
-
isSupported: true,
|
|
687
767
|
representations: [{}],
|
|
688
768
|
toVideoTrack() {
|
|
689
769
|
return videoAda1;
|
|
@@ -692,7 +772,6 @@ describe("Manifest - Period", () => {
|
|
|
692
772
|
const videoAda2 = {
|
|
693
773
|
type: "video",
|
|
694
774
|
id: "55",
|
|
695
|
-
isSupported: true,
|
|
696
775
|
representations: [{}],
|
|
697
776
|
toVideoTrack() {
|
|
698
777
|
return videoAda2;
|
|
@@ -701,7 +780,8 @@ describe("Manifest - Period", () => {
|
|
|
701
780
|
const video = [videoAda1, videoAda2];
|
|
702
781
|
const args = { id: "12", adaptations: { video }, start: 72 };
|
|
703
782
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
704
|
-
const
|
|
783
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
784
|
+
const period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
705
785
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
706
786
|
expect(period.start).toEqual(72);
|
|
707
787
|
expect(period.duration).toEqual(undefined);
|
|
@@ -709,7 +789,14 @@ describe("Manifest - Period", () => {
|
|
|
709
789
|
});
|
|
710
790
|
|
|
711
791
|
it("should set a given duration", async () => {
|
|
712
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
792
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
793
|
+
...arg,
|
|
794
|
+
supportStatus: {
|
|
795
|
+
hasSupportedCodec: undefined,
|
|
796
|
+
hasCodecWithUndefinedSupport: true,
|
|
797
|
+
isDecipherable: undefined,
|
|
798
|
+
},
|
|
799
|
+
}));
|
|
713
800
|
vi.doMock("../adaptation", () => ({
|
|
714
801
|
default: mockAdaptation,
|
|
715
802
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -719,7 +806,6 @@ describe("Manifest - Period", () => {
|
|
|
719
806
|
const videoAda1 = {
|
|
720
807
|
type: "video",
|
|
721
808
|
id: "54",
|
|
722
|
-
isSupported: true,
|
|
723
809
|
representations: [{}],
|
|
724
810
|
toVideoTrack() {
|
|
725
811
|
return videoAda1;
|
|
@@ -728,7 +814,6 @@ describe("Manifest - Period", () => {
|
|
|
728
814
|
const videoAda2 = {
|
|
729
815
|
type: "video",
|
|
730
816
|
id: "55",
|
|
731
|
-
isSupported: true,
|
|
732
817
|
representations: [{}],
|
|
733
818
|
toVideoTrack() {
|
|
734
819
|
return videoAda2;
|
|
@@ -737,7 +822,8 @@ describe("Manifest - Period", () => {
|
|
|
737
822
|
const video = [videoAda1, videoAda2];
|
|
738
823
|
const args = { id: "12", adaptations: { video }, start: 0, duration: 12 };
|
|
739
824
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
740
|
-
const
|
|
825
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
826
|
+
const period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
741
827
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
742
828
|
expect(period.start).toEqual(0);
|
|
743
829
|
expect(period.duration).toEqual(12);
|
|
@@ -745,7 +831,14 @@ describe("Manifest - Period", () => {
|
|
|
745
831
|
});
|
|
746
832
|
|
|
747
833
|
it("should infer the end from the start and the duration", async () => {
|
|
748
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
834
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
835
|
+
...arg,
|
|
836
|
+
supportStatus: {
|
|
837
|
+
hasSupportedCodec: undefined,
|
|
838
|
+
hasCodecWithUndefinedSupport: true,
|
|
839
|
+
isDecipherable: undefined,
|
|
840
|
+
},
|
|
841
|
+
}));
|
|
749
842
|
vi.doMock("../adaptation", () => ({
|
|
750
843
|
default: mockAdaptation,
|
|
751
844
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -755,7 +848,6 @@ describe("Manifest - Period", () => {
|
|
|
755
848
|
const videoAda1 = {
|
|
756
849
|
type: "video",
|
|
757
850
|
id: "54",
|
|
758
|
-
isSupported: true,
|
|
759
851
|
representations: [{}],
|
|
760
852
|
toVideoTrack() {
|
|
761
853
|
return videoAda1;
|
|
@@ -764,7 +856,6 @@ describe("Manifest - Period", () => {
|
|
|
764
856
|
const videoAda2 = {
|
|
765
857
|
type: "video",
|
|
766
858
|
id: "55",
|
|
767
|
-
isSupported: true,
|
|
768
859
|
representations: [{}],
|
|
769
860
|
toVideoTrack() {
|
|
770
861
|
return videoAda2;
|
|
@@ -773,7 +864,8 @@ describe("Manifest - Period", () => {
|
|
|
773
864
|
const video = [videoAda1, videoAda2];
|
|
774
865
|
const args = { id: "12", adaptations: { video }, start: 50, duration: 12 };
|
|
775
866
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
776
|
-
const
|
|
867
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
868
|
+
const period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
777
869
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
778
870
|
expect(period.start).toEqual(50);
|
|
779
871
|
expect(period.duration).toEqual(12);
|
|
@@ -781,7 +873,14 @@ describe("Manifest - Period", () => {
|
|
|
781
873
|
});
|
|
782
874
|
|
|
783
875
|
it("should return every Adaptations combined with `getAdaptations`", async () => {
|
|
784
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
876
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
877
|
+
...arg,
|
|
878
|
+
supportStatus: {
|
|
879
|
+
hasSupportedCodec: undefined,
|
|
880
|
+
hasCodecWithUndefinedSupport: true,
|
|
881
|
+
isDecipherable: undefined,
|
|
882
|
+
},
|
|
883
|
+
}));
|
|
785
884
|
vi.doMock("../adaptation", () => ({
|
|
786
885
|
default: mockAdaptation,
|
|
787
886
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -791,7 +890,6 @@ describe("Manifest - Period", () => {
|
|
|
791
890
|
const videoAda1 = {
|
|
792
891
|
type: "video",
|
|
793
892
|
id: "54",
|
|
794
|
-
isSupported: true,
|
|
795
893
|
representations: [{}],
|
|
796
894
|
toVideoTrack() {
|
|
797
895
|
return videoAda1;
|
|
@@ -800,7 +898,6 @@ describe("Manifest - Period", () => {
|
|
|
800
898
|
const videoAda2 = {
|
|
801
899
|
type: "video",
|
|
802
900
|
id: "55",
|
|
803
|
-
isSupported: true,
|
|
804
901
|
representations: [{}],
|
|
805
902
|
toVideoTrack() {
|
|
806
903
|
return videoAda2;
|
|
@@ -811,7 +908,6 @@ describe("Manifest - Period", () => {
|
|
|
811
908
|
const audioAda1 = {
|
|
812
909
|
type: "audio",
|
|
813
910
|
id: "56",
|
|
814
|
-
isSupported: true,
|
|
815
911
|
representations: [{}],
|
|
816
912
|
toAudioTrack() {
|
|
817
913
|
return audioAda1;
|
|
@@ -826,7 +922,8 @@ describe("Manifest - Period", () => {
|
|
|
826
922
|
duration: 12,
|
|
827
923
|
};
|
|
828
924
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
829
|
-
const
|
|
925
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
926
|
+
const period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
830
927
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
831
928
|
expect(period.getAdaptations()).toHaveLength(3);
|
|
832
929
|
expect(period.getAdaptations()).toContain(period.adaptations.video[0]);
|
|
@@ -835,7 +932,14 @@ describe("Manifest - Period", () => {
|
|
|
835
932
|
});
|
|
836
933
|
|
|
837
934
|
it("should return every Adaptations from a given type with `getAdaptationsForType`", async () => {
|
|
838
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
935
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
936
|
+
...arg,
|
|
937
|
+
supportStatus: {
|
|
938
|
+
hasSupportedCodec: undefined,
|
|
939
|
+
hasCodecWithUndefinedSupport: true,
|
|
940
|
+
isDecipherable: undefined,
|
|
941
|
+
},
|
|
942
|
+
}));
|
|
839
943
|
vi.doMock("../adaptation", () => ({
|
|
840
944
|
default: mockAdaptation,
|
|
841
945
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -845,7 +949,6 @@ describe("Manifest - Period", () => {
|
|
|
845
949
|
const videoAda1 = {
|
|
846
950
|
type: "video",
|
|
847
951
|
id: "54",
|
|
848
|
-
isSupported: true,
|
|
849
952
|
representations: [{}],
|
|
850
953
|
toVideoTrack() {
|
|
851
954
|
return videoAda1;
|
|
@@ -854,7 +957,6 @@ describe("Manifest - Period", () => {
|
|
|
854
957
|
const videoAda2 = {
|
|
855
958
|
type: "video",
|
|
856
959
|
id: "55",
|
|
857
|
-
isSupported: true,
|
|
858
960
|
representations: [{}],
|
|
859
961
|
toVideoTrack() {
|
|
860
962
|
return videoAda2;
|
|
@@ -865,7 +967,6 @@ describe("Manifest - Period", () => {
|
|
|
865
967
|
const audioAda1 = {
|
|
866
968
|
type: "audio",
|
|
867
969
|
id: "56",
|
|
868
|
-
isSupported: true,
|
|
869
970
|
representations: [{}],
|
|
870
971
|
toAudioTrack() {
|
|
871
972
|
return audioAda1;
|
|
@@ -880,7 +981,8 @@ describe("Manifest - Period", () => {
|
|
|
880
981
|
duration: 12,
|
|
881
982
|
};
|
|
882
983
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
883
|
-
const
|
|
984
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
985
|
+
const period = new Period(args, unsupportedAdaptations, codecSupportCache);
|
|
884
986
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
885
987
|
|
|
886
988
|
expect(period.getAdaptationsForType("video")).toHaveLength(2);
|
|
@@ -896,7 +998,14 @@ describe("Manifest - Period", () => {
|
|
|
896
998
|
});
|
|
897
999
|
|
|
898
1000
|
it("should return the first Adaptations with a given Id when calling `getAdaptation`", async () => {
|
|
899
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
1001
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
1002
|
+
...arg,
|
|
1003
|
+
supportStatus: {
|
|
1004
|
+
hasSupportedCodec: undefined,
|
|
1005
|
+
hasCodecWithUndefinedSupport: true,
|
|
1006
|
+
isDecipherable: undefined,
|
|
1007
|
+
},
|
|
1008
|
+
}));
|
|
900
1009
|
vi.doMock("../adaptation", () => ({
|
|
901
1010
|
default: mockAdaptation,
|
|
902
1011
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|
|
@@ -906,7 +1015,6 @@ describe("Manifest - Period", () => {
|
|
|
906
1015
|
const videoAda1 = {
|
|
907
1016
|
type: "video",
|
|
908
1017
|
id: "54",
|
|
909
|
-
isSupported: true,
|
|
910
1018
|
representations: [{}],
|
|
911
1019
|
toVideoTrack() {
|
|
912
1020
|
return videoAda1;
|
|
@@ -915,7 +1023,6 @@ describe("Manifest - Period", () => {
|
|
|
915
1023
|
const videoAda2 = {
|
|
916
1024
|
type: "video",
|
|
917
1025
|
id: "55",
|
|
918
|
-
isSupported: true,
|
|
919
1026
|
representations: [{}],
|
|
920
1027
|
toVideoTrack() {
|
|
921
1028
|
return videoAda2;
|
|
@@ -924,7 +1031,6 @@ describe("Manifest - Period", () => {
|
|
|
924
1031
|
const videoAda3 = {
|
|
925
1032
|
type: "video",
|
|
926
1033
|
id: "55",
|
|
927
|
-
isSupported: true,
|
|
928
1034
|
representations: [{}],
|
|
929
1035
|
toVideoTrack() {
|
|
930
1036
|
return videoAda3;
|
|
@@ -935,7 +1041,6 @@ describe("Manifest - Period", () => {
|
|
|
935
1041
|
const audioAda1 = {
|
|
936
1042
|
type: "audio",
|
|
937
1043
|
id: "56",
|
|
938
|
-
isSupported: true,
|
|
939
1044
|
representations: [{}],
|
|
940
1045
|
toAudioTrack() {
|
|
941
1046
|
return audioAda1;
|
|
@@ -950,7 +1055,8 @@ describe("Manifest - Period", () => {
|
|
|
950
1055
|
duration: 12,
|
|
951
1056
|
};
|
|
952
1057
|
const unsupportedAdaptations: Adaptation[] = [];
|
|
953
|
-
const
|
|
1058
|
+
const codecSupportCache = new CodecSupportCache([]);
|
|
1059
|
+
const period = new Period(args, [], codecSupportCache);
|
|
954
1060
|
expect(unsupportedAdaptations).toHaveLength(0);
|
|
955
1061
|
expect(period.getAdaptation("54")).toEqual(period.adaptations.video[0]);
|
|
956
1062
|
expect(period.getAdaptation("55")).toEqual(period.adaptations.video[1]);
|
|
@@ -958,7 +1064,14 @@ describe("Manifest - Period", () => {
|
|
|
958
1064
|
});
|
|
959
1065
|
|
|
960
1066
|
it("should return undefind if no adaptation has the given Id when calling `getAdaptation`", () => {
|
|
961
|
-
const mockAdaptation = vi.fn((arg) => ({
|
|
1067
|
+
const mockAdaptation = vi.fn((arg) => ({
|
|
1068
|
+
...arg,
|
|
1069
|
+
supportStatus: {
|
|
1070
|
+
hasSupportedCodec: undefined,
|
|
1071
|
+
hasCodecWithUndefinedSupport: true,
|
|
1072
|
+
isDecipherable: undefined,
|
|
1073
|
+
},
|
|
1074
|
+
}));
|
|
962
1075
|
vi.doMock("../adaptation", () => ({
|
|
963
1076
|
default: mockAdaptation,
|
|
964
1077
|
SUPPORTED_ADAPTATIONS_TYPE: ["audio", "video", "text"],
|