rx-player 4.0.0 → 4.1.0-dev.2024031100
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/.prettierrc +4 -0
- package/CHANGELOG.md +1500 -996
- package/MAINTAINERS.md +9 -12
- package/README.md +107 -122
- package/VERSION +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker_es5.d.ts +3 -0
- package/dist/commonjs/__GENERATED_CODE/embedded_worker_es5.js +6 -0
- package/dist/commonjs/__GENERATED_CODE/index.d.ts +1 -0
- package/dist/commonjs/__GENERATED_CODE/index.js +3 -1
- package/dist/commonjs/compat/add_class_name.js +4 -3
- package/dist/commonjs/compat/add_text_track.d.ts +1 -1
- package/dist/commonjs/compat/add_text_track.js +3 -2
- package/dist/commonjs/compat/browser_compatibility_types.js +13 -7
- package/dist/commonjs/compat/browser_detection.d.ts +3 -1
- package/dist/commonjs/compat/browser_detection.js +16 -12
- package/dist/commonjs/compat/can_seek_directly_after_loaded_metadata.d.ts +7 -0
- package/dist/commonjs/compat/can_seek_directly_after_loaded_metadata.js +10 -0
- package/dist/commonjs/compat/change_source_buffer_type.d.ts +1 -1
- package/dist/commonjs/compat/eme/close_session.d.ts +1 -1
- package/dist/commonjs/compat/eme/close_session.js +16 -12
- package/dist/commonjs/compat/eme/custom_key_system_access.d.ts +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.d.ts +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/ie11_media_keys.js +14 -9
- package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.js +13 -11
- package/dist/commonjs/compat/eme/custom_media_keys/types.d.ts +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.js +5 -11
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +2 -2
- package/dist/commonjs/compat/eme/eme-api-implementation.d.ts +3 -3
- package/dist/commonjs/compat/eme/eme-api-implementation.js +13 -9
- package/dist/commonjs/compat/eme/generate_key_request.d.ts +1 -1
- package/dist/commonjs/compat/eme/generate_key_request.js +16 -19
- package/dist/commonjs/compat/eme/get_init_data.js +5 -7
- package/dist/commonjs/compat/eme/get_uuid_kid_from_keystatus_kid.js +1 -2
- package/dist/commonjs/compat/eme/get_webkit_fairplay_initdata.js +10 -11
- package/dist/commonjs/compat/eme/load_session.d.ts +1 -1
- package/dist/commonjs/compat/eme/set_media_keys.d.ts +9 -0
- package/dist/commonjs/compat/eme/set_media_keys.js +37 -0
- package/dist/commonjs/compat/enable_audio_track.d.ts +1 -1
- package/dist/commonjs/compat/event_listeners.d.ts +4 -4
- package/dist/commonjs/compat/event_listeners.js +42 -33
- package/dist/commonjs/compat/has_webassembly.js +1 -2
- package/dist/commonjs/compat/has_worker_api.d.ts +9 -0
- package/dist/commonjs/compat/has_worker_api.js +17 -0
- package/dist/commonjs/compat/is_codec_supported.js +2 -1
- package/dist/commonjs/compat/is_vtt_cue.d.ts +1 -1
- package/dist/commonjs/compat/make_vtt_cue.d.ts +1 -1
- package/dist/commonjs/compat/may_media_element_fail_on_undecipherable_data.d.ts +16 -0
- package/dist/commonjs/compat/may_media_element_fail_on_undecipherable_data.js +19 -0
- package/dist/commonjs/compat/on_height_width_change.d.ts +2 -2
- package/dist/commonjs/compat/patch_webkit_source_buffer.js +29 -29
- package/dist/commonjs/compat/should_await_set_media_keys.d.ts +16 -0
- package/dist/commonjs/compat/should_await_set_media_keys.js +22 -0
- package/dist/commonjs/compat/should_reload_media_source_on_decipherability_update.js +1 -2
- package/dist/commonjs/config.d.ts +1 -1
- package/dist/commonjs/core/adaptive/adaptive_representation_selector.d.ts +25 -22
- package/dist/commonjs/core/adaptive/adaptive_representation_selector.js +47 -25
- package/dist/commonjs/core/adaptive/buffer_based_chooser.d.ts +1 -1
- package/dist/commonjs/core/adaptive/buffer_based_chooser.js +13 -11
- package/dist/commonjs/core/adaptive/guess_based_chooser.d.ts +6 -6
- package/dist/commonjs/core/adaptive/guess_based_chooser.js +7 -6
- package/dist/commonjs/core/adaptive/index.d.ts +2 -2
- package/dist/commonjs/core/adaptive/network_analyzer.d.ts +6 -6
- package/dist/commonjs/core/adaptive/network_analyzer.js +44 -40
- package/dist/commonjs/core/adaptive/utils/bandwidth_estimator.js +1 -1
- package/dist/commonjs/core/adaptive/utils/ewma.js +1 -2
- package/dist/commonjs/core/adaptive/utils/filter_by_bitrate.d.ts +2 -2
- package/dist/commonjs/core/adaptive/utils/filter_by_resolution.d.ts +2 -2
- package/dist/commonjs/core/adaptive/utils/filter_by_resolution.js +2 -4
- package/dist/commonjs/core/adaptive/utils/get_buffer_levels.js +7 -4
- package/dist/commonjs/core/adaptive/utils/last_estimate_storage.d.ts +3 -3
- package/dist/commonjs/core/adaptive/utils/pending_requests_store.d.ts +5 -5
- package/dist/commonjs/core/adaptive/utils/pending_requests_store.js +4 -3
- package/dist/commonjs/core/adaptive/utils/representation_score_calculator.d.ts +7 -7
- package/dist/commonjs/core/adaptive/utils/representation_score_calculator.js +11 -8
- package/dist/commonjs/core/adaptive/utils/select_optimal_representation.d.ts +4 -4
- package/dist/commonjs/core/adaptive/utils/select_optimal_representation.js +2 -2
- package/dist/commonjs/core/fetchers/cdn_prioritizer.d.ts +2 -2
- package/dist/commonjs/core/fetchers/cdn_prioritizer.js +5 -6
- package/dist/commonjs/core/fetchers/manifest/index.d.ts +1 -1
- package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.d.ts +3 -3
- package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.js +80 -65
- package/dist/commonjs/core/fetchers/segment/index.d.ts +1 -1
- package/dist/commonjs/core/fetchers/segment/initialization_segment_cache.d.ts +4 -4
- package/dist/commonjs/core/fetchers/segment/prioritized_segment_fetcher.d.ts +4 -3
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts +12 -12
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.js +49 -32
- package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.d.ts +5 -5
- package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.js +4 -2
- package/dist/commonjs/core/fetchers/segment/task_prioritizer.d.ts +1 -1
- package/dist/commonjs/core/fetchers/segment/task_prioritizer.js +18 -17
- package/dist/commonjs/core/fetchers/utils/error_selector.d.ts +1 -2
- package/dist/commonjs/core/fetchers/utils/error_selector.js +0 -1
- package/dist/commonjs/core/fetchers/utils/schedule_request.d.ts +3 -3
- package/dist/commonjs/core/fetchers/utils/schedule_request.js +20 -21
- package/dist/commonjs/core/main/common/DecipherabilityFreezeDetector.d.ts +79 -0
- package/dist/commonjs/core/main/common/DecipherabilityFreezeDetector.js +127 -0
- package/dist/commonjs/core/main/common/content_time_boundaries_observer.d.ts +191 -0
- package/dist/commonjs/core/main/common/content_time_boundaries_observer.js +519 -0
- package/dist/commonjs/core/main/common/create_content_time_boundaries_observer.d.ts +27 -0
- package/dist/commonjs/core/main/common/create_content_time_boundaries_observer.js +48 -0
- package/dist/commonjs/core/main/common/get_buffered_data_per_media_buffer.d.ts +14 -0
- package/dist/commonjs/core/main/common/get_buffered_data_per_media_buffer.js +37 -0
- package/dist/commonjs/core/main/worker/content_preparer.d.ts +93 -0
- package/dist/commonjs/core/main/worker/content_preparer.js +273 -0
- package/dist/commonjs/core/main/worker/globals.d.ts +13 -0
- package/dist/commonjs/core/main/worker/globals.js +26 -0
- package/dist/commonjs/core/main/worker/index.d.ts +2 -0
- package/dist/commonjs/core/main/worker/index.js +4 -0
- package/dist/commonjs/core/main/worker/send_message.d.ts +3 -0
- package/dist/commonjs/core/main/worker/send_message.js +25 -0
- package/dist/commonjs/core/main/worker/track_choice_setter.d.ts +19 -0
- package/dist/commonjs/core/main/worker/track_choice_setter.js +140 -0
- package/dist/commonjs/core/main/worker/worker_main.d.ts +1 -0
- package/dist/commonjs/core/main/worker/worker_main.js +784 -0
- package/dist/commonjs/core/main/worker/worker_text_displayer_interface.d.ts +64 -0
- package/dist/commonjs/core/main/worker/worker_text_displayer_interface.js +126 -0
- package/dist/commonjs/core/segment_sinks/garbage_collector.d.ts +43 -0
- package/dist/commonjs/core/segment_sinks/garbage_collector.js +226 -0
- package/dist/commonjs/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.d.ts +135 -0
- package/dist/commonjs/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.js +358 -0
- package/dist/commonjs/core/segment_sinks/implementations/audio_video/index.d.ts +17 -0
- package/dist/commonjs/core/segment_sinks/implementations/index.d.ts +19 -0
- package/dist/commonjs/core/segment_sinks/implementations/index.js +35 -0
- package/dist/commonjs/core/segment_sinks/implementations/text/index.d.ts +3 -0
- package/dist/commonjs/core/segment_sinks/implementations/text/text_segment_buffer.d.ts +90 -0
- package/dist/commonjs/core/segment_sinks/implementations/text/text_segment_buffer.js +257 -0
- package/dist/commonjs/core/segment_sinks/implementations/types.d.ts +307 -0
- package/dist/commonjs/core/segment_sinks/implementations/types.js +117 -0
- package/dist/commonjs/core/segment_sinks/index.d.ts +21 -0
- package/dist/commonjs/core/segment_sinks/index.js +28 -0
- package/dist/commonjs/core/segment_sinks/inventory/buffered_history.d.ts +89 -0
- package/dist/commonjs/core/segment_sinks/inventory/index.d.ts +21 -0
- package/dist/commonjs/core/segment_sinks/inventory/segment_inventory.d.ts +238 -0
- package/dist/commonjs/core/segment_sinks/inventory/segment_inventory.js +917 -0
- package/dist/commonjs/core/segment_sinks/inventory/types.d.ts +27 -0
- package/dist/commonjs/core/segment_sinks/inventory/utils.d.ts +33 -0
- package/dist/commonjs/core/segment_sinks/inventory/utils.js +53 -0
- package/dist/commonjs/core/segment_sinks/segment_buffers_store.d.ts +171 -0
- package/dist/commonjs/core/segment_sinks/segment_buffers_store.js +288 -0
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.d.ts +4 -4
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +52 -24
- package/dist/commonjs/core/stream/adaptation/get_representations_switch_strategy.d.ts +11 -11
- package/dist/commonjs/core/stream/adaptation/get_representations_switch_strategy.js +32 -33
- package/dist/commonjs/core/stream/adaptation/types.d.ts +18 -18
- package/dist/commonjs/core/stream/index.d.ts +1 -1
- package/dist/commonjs/core/stream/orchestrator/get_time_ranges_for_content.d.ts +5 -5
- package/dist/commonjs/core/stream/orchestrator/get_time_ranges_for_content.js +5 -5
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.d.ts +20 -19
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.js +76 -52
- package/dist/commonjs/core/stream/period/period_stream.d.ts +5 -5
- package/dist/commonjs/core/stream/period/period_stream.js +85 -47
- package/dist/commonjs/core/stream/period/types.d.ts +23 -21
- package/dist/commonjs/core/stream/period/utils/get_adaptation_switch_strategy.d.ts +13 -13
- package/dist/commonjs/core/stream/period/utils/get_adaptation_switch_strategy.js +34 -38
- package/dist/commonjs/core/stream/representation/representation_stream.d.ts +5 -5
- package/dist/commonjs/core/stream/representation/representation_stream.js +58 -32
- package/dist/commonjs/core/stream/representation/types.d.ts +24 -24
- package/dist/commonjs/core/stream/representation/utils/append_segment_to_buffer.d.ts +9 -9
- package/dist/commonjs/core/stream/representation/utils/append_segment_to_buffer.js +12 -13
- package/dist/commonjs/core/stream/representation/utils/check_for_discontinuity.d.ts +7 -7
- package/dist/commonjs/core/stream/representation/utils/check_for_discontinuity.js +16 -18
- package/dist/commonjs/core/stream/representation/utils/downloading_queue.d.ts +10 -10
- package/dist/commonjs/core/stream/representation/utils/downloading_queue.js +11 -11
- package/dist/commonjs/core/stream/representation/utils/get_buffer_status.d.ts +11 -11
- package/dist/commonjs/core/stream/representation/utils/get_buffer_status.js +50 -29
- package/dist/commonjs/core/stream/representation/utils/get_needed_segments.d.ts +6 -7
- package/dist/commonjs/core/stream/representation/utils/get_needed_segments.js +29 -30
- package/dist/commonjs/core/stream/representation/utils/push_init_segment.d.ts +13 -13
- package/dist/commonjs/core/stream/representation/utils/push_init_segment.js +10 -8
- package/dist/commonjs/core/stream/representation/utils/push_media_segment.d.ts +14 -14
- package/dist/commonjs/core/stream/representation/utils/push_media_segment.js +16 -13
- package/dist/commonjs/core/types.d.ts +8 -0
- package/dist/commonjs/default_config.js +21 -18
- package/dist/commonjs/errors/encrypted_media_error.d.ts +2 -2
- package/dist/commonjs/errors/encrypted_media_error.js +4 -2
- package/dist/commonjs/errors/error_codes.d.ts +3 -3
- package/dist/commonjs/errors/error_codes.js +1 -0
- package/dist/commonjs/errors/format_error.d.ts +2 -2
- package/dist/commonjs/errors/format_error.js +1 -2
- package/dist/commonjs/errors/is_known_error.d.ts +1 -1
- package/dist/commonjs/errors/is_known_error.js +2 -2
- package/dist/commonjs/errors/media_error.d.ts +2 -2
- package/dist/commonjs/errors/media_error.js +4 -2
- package/dist/commonjs/errors/network_error.d.ts +2 -2
- package/dist/commonjs/errors/network_error.js +6 -4
- package/dist/commonjs/errors/other_error.d.ts +1 -1
- package/dist/commonjs/errors/other_error.js +1 -3
- package/dist/commonjs/errors/source_buffer_error.js +4 -2
- package/dist/commonjs/experimental/features/local.d.ts +1 -1
- package/dist/commonjs/experimental/features/local.js +1 -2
- package/dist/commonjs/experimental/features/metaplaylist.d.ts +1 -1
- package/dist/commonjs/experimental/features/metaplaylist.js +1 -2
- package/dist/commonjs/experimental/features/multi_thread.d.ts +1 -1
- package/dist/commonjs/experimental/features/multi_thread.js +1 -2
- package/dist/commonjs/experimental/index.d.ts +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/features/dash.d.ts +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/features/metaplaylist.d.ts +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/index.d.ts +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/load_and_push_segment.d.ts +3 -3
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +2 -2
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +5 -5
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +2 -2
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/types.d.ts +6 -6
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts +3 -3
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +11 -18
- package/dist/commonjs/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +13 -23
- package/dist/commonjs/experimental/tools/createMetaplaylist/index.d.ts +1 -1
- package/dist/commonjs/experimental/tools/createMetaplaylist/index.js +8 -7
- package/dist/commonjs/experimental/tools/index.d.ts +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/index.d.ts +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/index.js +9 -15
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.d.ts +4 -3
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.js +6 -3
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/capabilities.d.ts +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/capabilities.js +9 -46
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.d.ts +2 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +8 -5
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.d.ts +2 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +21 -13
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.d.ts +2 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +21 -17
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +12 -12
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/index.d.ts +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts +2 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +7 -8
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.d.ts +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.js +6 -11
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.d.ts +2 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +1 -2
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts +2 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +3 -3
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/types.d.ts +2 -2
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/utils.d.ts +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/utils.js +8 -7
- package/dist/commonjs/features/add_features.d.ts +1 -1
- package/dist/commonjs/features/features_object.d.ts +1 -1
- package/dist/commonjs/features/features_object.js +4 -3
- package/dist/commonjs/features/index.d.ts +1 -1
- package/dist/commonjs/features/list/dash.d.ts +1 -1
- package/dist/commonjs/features/list/dash.js +3 -4
- package/dist/commonjs/features/list/dash_wasm.d.ts +2 -2
- package/dist/commonjs/features/list/dash_wasm.js +1 -2
- package/dist/commonjs/features/list/debug_element.d.ts +1 -1
- package/dist/commonjs/features/list/debug_element.js +1 -1
- package/dist/commonjs/features/list/directfile.d.ts +1 -1
- package/dist/commonjs/features/list/directfile.js +2 -3
- package/dist/commonjs/features/list/eme.d.ts +1 -1
- package/dist/commonjs/features/list/eme.js +1 -1
- package/dist/commonjs/features/list/html_sami_parser.d.ts +1 -1
- package/dist/commonjs/features/list/html_sami_parser.js +4 -4
- package/dist/commonjs/features/list/html_srt_parser.d.ts +1 -1
- package/dist/commonjs/features/list/html_srt_parser.js +4 -4
- package/dist/commonjs/features/list/html_text_buffer.d.ts +1 -1
- package/dist/commonjs/features/list/html_text_buffer.js +1 -1
- package/dist/commonjs/features/list/html_ttml_parser.d.ts +1 -1
- package/dist/commonjs/features/list/html_ttml_parser.js +4 -4
- package/dist/commonjs/features/list/html_vtt_parser.d.ts +1 -1
- package/dist/commonjs/features/list/html_vtt_parser.js +4 -4
- package/dist/commonjs/features/list/media_source_main.d.ts +1 -1
- package/dist/commonjs/features/list/media_source_main.js +1 -2
- package/dist/commonjs/features/list/native_sami_parser.d.ts +1 -1
- package/dist/commonjs/features/list/native_sami_parser.js +4 -4
- package/dist/commonjs/features/list/native_srt_parser.d.ts +1 -1
- package/dist/commonjs/features/list/native_srt_parser.js +4 -4
- package/dist/commonjs/features/list/native_text_buffer.d.ts +1 -1
- package/dist/commonjs/features/list/native_text_buffer.js +1 -1
- package/dist/commonjs/features/list/native_ttml_parser.d.ts +1 -1
- package/dist/commonjs/features/list/native_ttml_parser.js +4 -4
- package/dist/commonjs/features/list/native_vtt_parser.d.ts +1 -1
- package/dist/commonjs/features/list/native_vtt_parser.js +4 -4
- package/dist/commonjs/features/list/smooth.d.ts +1 -1
- package/dist/commonjs/features/list/smooth.js +1 -2
- package/dist/commonjs/features/types.d.ts +28 -23
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +3 -1
- package/dist/commonjs/main_thread/api/debug/buffer_graph.d.ts +28 -0
- package/dist/commonjs/main_thread/api/debug/buffer_graph.js +168 -0
- package/dist/commonjs/main_thread/api/debug/buffer_size_graph.js +131 -0
- package/dist/commonjs/main_thread/api/debug/modules/general_info.d.ts +3 -0
- package/dist/commonjs/main_thread/api/debug/modules/general_info.js +236 -0
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_content.d.ts +4 -0
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_content.js +127 -0
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_size.d.ts +3 -0
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_size.js +38 -0
- package/dist/commonjs/main_thread/api/debug/render.d.ts +3 -0
- package/dist/commonjs/main_thread/api/index.d.ts +17 -0
- package/dist/commonjs/main_thread/api/index.js +19 -0
- package/dist/commonjs/main_thread/api/option_utils.d.ts +124 -0
- package/dist/commonjs/main_thread/api/option_utils.js +335 -0
- package/dist/commonjs/main_thread/api/public_api.d.ts +768 -0
- package/dist/commonjs/main_thread/api/public_api.js +2557 -0
- package/dist/commonjs/main_thread/api/utils.d.ts +66 -0
- package/dist/commonjs/main_thread/api/utils.js +178 -0
- package/dist/commonjs/main_thread/decrypt/__tests__/__global__/utils.d.ts +184 -0
- package/dist/commonjs/main_thread/decrypt/__tests__/__global__/utils.js +439 -0
- package/dist/commonjs/main_thread/decrypt/attach_media_keys.d.ts +53 -0
- package/dist/commonjs/main_thread/decrypt/attach_media_keys.js +124 -0
- package/dist/commonjs/main_thread/decrypt/clear_on_stop.js +43 -0
- package/dist/commonjs/main_thread/decrypt/content_decryptor.d.ts +185 -0
- package/dist/commonjs/main_thread/decrypt/content_decryptor.js +1053 -0
- package/dist/commonjs/main_thread/decrypt/create_or_load_session.d.ts +64 -0
- package/dist/commonjs/main_thread/decrypt/create_or_load_session.js +135 -0
- package/dist/commonjs/main_thread/decrypt/create_session.d.ts +54 -0
- package/dist/commonjs/main_thread/decrypt/create_session.js +215 -0
- package/dist/commonjs/main_thread/decrypt/dispose_decryption_resources.js +83 -0
- package/dist/commonjs/main_thread/decrypt/find_key_system.d.ts +48 -0
- package/dist/commonjs/main_thread/decrypt/find_key_system.js +375 -0
- package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts +44 -0
- package/dist/commonjs/main_thread/decrypt/get_media_keys.js +165 -0
- package/dist/commonjs/main_thread/decrypt/index.d.ts +26 -0
- package/dist/commonjs/main_thread/decrypt/init_media_keys.d.ts +26 -0
- package/dist/commonjs/main_thread/decrypt/init_media_keys.js +87 -0
- package/dist/commonjs/main_thread/decrypt/session_events_listener.d.ts +75 -0
- package/dist/commonjs/main_thread/decrypt/session_events_listener.js +325 -0
- package/dist/commonjs/main_thread/decrypt/set_server_certificate.d.ts +51 -0
- package/dist/commonjs/main_thread/decrypt/set_server_certificate.js +145 -0
- package/dist/commonjs/main_thread/decrypt/types.d.ts +374 -0
- package/dist/commonjs/main_thread/decrypt/utils/are_init_values_compatible.js +144 -0
- package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.d.ts +52 -0
- package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.js +211 -0
- package/dist/commonjs/main_thread/decrypt/utils/clean_old_loaded_sessions.d.ts +26 -0
- package/dist/commonjs/main_thread/decrypt/utils/clean_old_stored_persistent_info.d.ts +32 -0
- package/dist/commonjs/main_thread/decrypt/utils/init_data_values_container.d.ts +69 -0
- package/dist/commonjs/main_thread/decrypt/utils/init_data_values_container.js +137 -0
- package/dist/commonjs/main_thread/decrypt/utils/is_session_usable.d.ts +24 -0
- package/dist/commonjs/main_thread/decrypt/utils/is_session_usable.js +51 -0
- package/dist/commonjs/main_thread/decrypt/utils/key_session_record.d.ts +104 -0
- package/dist/commonjs/main_thread/decrypt/utils/key_session_record.js +189 -0
- package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.d.ts +213 -0
- package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.js +518 -0
- package/dist/commonjs/main_thread/decrypt/utils/media_keys_infos_store.d.ts +56 -0
- package/dist/commonjs/main_thread/decrypt/utils/media_keys_infos_store.js +45 -0
- package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.d.ts +94 -0
- package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.js +356 -0
- package/dist/commonjs/main_thread/decrypt/utils/serializable_bytes.d.ts +44 -0
- package/dist/commonjs/main_thread/decrypt/utils/serializable_bytes.js +50 -0
- package/dist/commonjs/main_thread/decrypt/utils/server_certificate_store.d.ts +64 -0
- package/dist/commonjs/main_thread/decrypt/utils/server_certificate_store.js +123 -0
- package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts +97 -0
- package/dist/commonjs/main_thread/init/directfile_content_initializer.js +264 -0
- package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts +166 -0
- package/dist/commonjs/main_thread/init/media_source_content_initializer.js +918 -0
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts +222 -0
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +1477 -0
- package/dist/commonjs/main_thread/init/send_message.d.ts +2 -0
- package/dist/commonjs/main_thread/init/send_message.js +13 -0
- package/dist/commonjs/main_thread/init/types.d.ts +221 -0
- package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.d.ts +83 -0
- package/dist/commonjs/main_thread/init/utils/create_core_playback_observer.js +105 -0
- package/dist/commonjs/main_thread/init/utils/create_media_source.d.ts +37 -0
- package/dist/commonjs/main_thread/init/utils/create_media_source.js +106 -0
- package/dist/commonjs/main_thread/init/utils/get_initial_time.d.ts +76 -0
- package/dist/commonjs/main_thread/init/utils/get_initial_time.js +109 -0
- package/dist/commonjs/main_thread/init/utils/get_loaded_reference.d.ts +28 -0
- package/dist/commonjs/main_thread/init/utils/get_loaded_reference.js +67 -0
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts +61 -0
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.js +204 -0
- package/dist/commonjs/main_thread/init/utils/initialize_content_decryption.d.ts +87 -0
- package/dist/commonjs/main_thread/init/utils/initialize_content_decryption.js +119 -0
- package/dist/commonjs/main_thread/init/utils/main_thread_text_displayer_interface.d.ts +35 -0
- package/dist/commonjs/main_thread/init/utils/rebuffering_controller.d.ts +114 -0
- package/dist/commonjs/main_thread/init/utils/rebuffering_controller.js +450 -0
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/are_same_stream_events.js +35 -0
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/index.d.ts +18 -0
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts +25 -0
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +98 -0
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +53 -0
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/stream_events_emitter.js +230 -0
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/types.d.ts +41 -0
- package/dist/commonjs/main_thread/init/utils/throw_on_media_error.d.ts +23 -0
- package/dist/commonjs/main_thread/init/utils/throw_on_media_error.js +66 -0
- package/dist/commonjs/main_thread/text_displayer/html/html_parsers.js +25 -0
- package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.d.ts +100 -0
- package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.js +318 -0
- package/dist/commonjs/main_thread/text_displayer/html/text_track_cues_store.d.ts +65 -0
- package/dist/commonjs/main_thread/text_displayer/html/text_track_cues_store.js +378 -0
- package/dist/commonjs/main_thread/text_displayer/html/update_proportional_elements.js +64 -0
- package/dist/commonjs/main_thread/text_displayer/html/utils.js +119 -0
- package/dist/commonjs/main_thread/text_displayer/index.d.ts +2 -0
- package/dist/commonjs/main_thread/text_displayer/manual_time_ranges.js +52 -0
- package/dist/commonjs/main_thread/text_displayer/native/native_parsers.d.ts +11 -0
- package/dist/commonjs/main_thread/text_displayer/native/native_parsers.js +25 -0
- package/dist/commonjs/main_thread/text_displayer/native/native_text_displayer.d.ts +56 -0
- package/dist/commonjs/main_thread/text_displayer/native/native_text_displayer.js +207 -0
- package/dist/commonjs/main_thread/text_displayer/types.d.ts +71 -0
- package/dist/commonjs/main_thread/text_displayer/types.js +2 -0
- package/dist/commonjs/main_thread/tracks_store/index.d.ts +20 -0
- package/dist/commonjs/main_thread/tracks_store/media_element_tracks_store.d.ts +197 -0
- package/dist/commonjs/main_thread/tracks_store/media_element_tracks_store.js +691 -0
- package/dist/commonjs/main_thread/tracks_store/track_dispatcher.d.ts +101 -0
- package/dist/commonjs/main_thread/tracks_store/track_dispatcher.js +198 -0
- package/dist/commonjs/main_thread/tracks_store/tracks_store.d.ts +448 -0
- package/dist/commonjs/main_thread/tracks_store/tracks_store.js +1096 -0
- package/dist/commonjs/main_thread/types.d.ts +5 -0
- package/dist/commonjs/main_thread/types.js +2 -0
- package/dist/commonjs/manifest/classes/adaptation.d.ts +134 -0
- package/dist/commonjs/manifest/classes/adaptation.js +237 -0
- package/dist/commonjs/manifest/classes/index.d.ts +25 -0
- package/dist/commonjs/manifest/classes/index.js +46 -0
- package/dist/commonjs/manifest/classes/manifest.d.ts +391 -0
- package/dist/commonjs/manifest/classes/manifest.js +494 -0
- package/dist/commonjs/manifest/classes/period.d.ts +106 -0
- package/dist/commonjs/manifest/classes/period.js +235 -0
- package/dist/commonjs/manifest/classes/representation.d.ts +238 -0
- package/dist/commonjs/manifest/classes/representation.js +382 -0
- package/dist/commonjs/manifest/classes/representation_index/index.d.ts +18 -0
- package/dist/commonjs/manifest/classes/representation_index/static.d.ts +101 -0
- package/dist/commonjs/manifest/classes/representation_index/static.js +147 -0
- package/dist/commonjs/manifest/classes/representation_index/types.d.ts +420 -0
- package/dist/commonjs/manifest/classes/types.d.ts +29 -0
- package/dist/commonjs/manifest/classes/types.js +33 -0
- package/dist/commonjs/manifest/classes/update_period_in_place.d.ts +53 -0
- package/dist/commonjs/manifest/classes/update_period_in_place.js +172 -0
- package/dist/commonjs/manifest/classes/update_periods.d.ts +50 -0
- package/dist/commonjs/manifest/classes/update_periods.js +229 -0
- package/dist/commonjs/manifest/classes/utils.d.ts +39 -0
- package/dist/commonjs/manifest/classes/utils.js +54 -0
- package/dist/commonjs/manifest/index.d.ts +15 -25
- package/dist/commonjs/manifest/index.js +5 -46
- package/dist/commonjs/manifest/types.d.ts +2 -31
- package/dist/commonjs/manifest/types.js +0 -16
- package/dist/commonjs/manifest/utils.d.ts +11 -49
- package/dist/commonjs/manifest/utils.js +55 -79
- package/dist/commonjs/minimal.d.ts +1 -1
- package/dist/commonjs/minimal.js +6 -1
- package/dist/commonjs/mse/main_codec_support_prober.d.ts +1 -1
- package/dist/commonjs/mse/main_media_source_interface.d.ts +2 -2
- package/dist/commonjs/mse/main_media_source_interface.js +59 -34
- package/dist/commonjs/mse/types.d.ts +3 -3
- package/dist/commonjs/mse/utils/end_of_stream.d.ts +33 -0
- package/dist/commonjs/mse/utils/end_of_stream.js +114 -0
- package/dist/commonjs/mse/utils/media_source_duration_updater.js +272 -0
- package/dist/commonjs/mse/worker_codec_support_prober.d.ts +1 -1
- package/dist/commonjs/mse/worker_media_source_interface.d.ts +4 -4
- package/dist/commonjs/mse/worker_media_source_interface.js +19 -17
- package/dist/commonjs/multithread_types.d.ts +15 -18
- package/dist/commonjs/parsers/containers/isobmff/create_box.d.ts +1 -1
- package/dist/commonjs/parsers/containers/isobmff/create_box.js +4 -3
- package/dist/commonjs/parsers/containers/isobmff/drm/playready.js +1 -2
- package/dist/commonjs/parsers/containers/isobmff/extract_complete_chunks.js +95 -0
- package/dist/commonjs/parsers/containers/isobmff/find_complete_box.js +57 -0
- package/dist/commonjs/parsers/containers/isobmff/get_box.js +2 -4
- package/dist/commonjs/parsers/containers/isobmff/index.d.ts +5 -3
- package/dist/commonjs/parsers/containers/isobmff/index.js +5 -1
- package/dist/commonjs/parsers/containers/isobmff/read.d.ts +1 -1
- package/dist/commonjs/parsers/containers/isobmff/read.js +7 -7
- package/dist/commonjs/parsers/containers/isobmff/take_pssh_out.js +3 -4
- package/dist/commonjs/parsers/containers/isobmff/utils.js +64 -40
- package/dist/commonjs/parsers/containers/matroska/index.d.ts +1 -1
- package/dist/commonjs/parsers/containers/matroska/utils.js +42 -29
- package/dist/commonjs/parsers/images/bif.js +17 -4
- package/dist/commonjs/parsers/manifest/dash/common/attach_trickmode_track.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -3
- package/dist/commonjs/parsers/manifest/dash/common/flatten_overlapping_periods.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/flatten_overlapping_periods.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_hdr_information.js +4 -12
- package/dist/commonjs/parsers/manifest/dash/common/get_http_utc-timing_url.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_http_utc-timing_url.js +4 -5
- package/dist/commonjs/parsers/manifest/dash/common/get_minimum_and_maximum_positions.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_minimum_and_maximum_positions.js +5 -2
- package/dist/commonjs/parsers/manifest/dash/common/get_periods_time_infos.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_periods_time_infos.js +14 -10
- package/dist/commonjs/parsers/manifest/dash/common/index.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/base.d.ts +5 -5
- package/dist/commonjs/parsers/manifest/dash/common/indexes/base.js +39 -29
- package/dist/commonjs/parsers/manifest/dash/common/indexes/get_init_segment.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/dash/common/indexes/get_init_segment.js +8 -4
- package/dist/commonjs/parsers/manifest/dash/common/indexes/get_segments_from_timeline.d.ts +4 -4
- package/dist/commonjs/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +14 -10
- package/dist/commonjs/parsers/manifest/dash/common/indexes/list.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/dash/common/indexes/list.js +33 -20
- package/dist/commonjs/parsers/manifest/dash/common/indexes/template.d.ts +3 -3
- package/dist/commonjs/parsers/manifest/dash/common/indexes/template.js +58 -57
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.d.ts +5 -4
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +13 -10
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +23 -18
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.js +16 -9
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.d.ts +4 -3
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +47 -26
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.d.ts +11 -2
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +74 -3
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +9 -8
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +85 -66
- package/dist/commonjs/parsers/manifest/dash/common/indexes/tokens.js +2 -4
- package/dist/commonjs/parsers/manifest/dash/common/infer_adaptation_type.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/infer_adaptation_type.js +2 -2
- package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.js +9 -10
- package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.d.ts +5 -5
- package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.js +63 -56
- package/dist/commonjs/parsers/manifest/dash/common/parse_availability_start_time.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/common/parse_availability_start_time.js +5 -3
- package/dist/commonjs/parsers/manifest/dash/common/parse_mpd.d.ts +6 -6
- package/dist/commonjs/parsers/manifest/dash/common/parse_mpd.js +67 -41
- package/dist/commonjs/parsers/manifest/dash/common/parse_periods.d.ts +5 -5
- package/dist/commonjs/parsers/manifest/dash/common/parse_periods.js +46 -29
- package/dist/commonjs/parsers/manifest/dash/common/parse_representation_index.d.ts +5 -5
- package/dist/commonjs/parsers/manifest/dash/common/parse_representation_index.js +4 -6
- package/dist/commonjs/parsers/manifest/dash/common/parse_representations.d.ts +5 -5
- package/dist/commonjs/parsers/manifest/dash/common/parse_representations.js +66 -64
- package/dist/commonjs/parsers/manifest/dash/common/resolve_base_urls.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/resolve_base_urls.js +4 -2
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/index.d.ts +17 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/index.js +19 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.d.ts +24 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +400 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.d.ts +24 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.js +33 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.js +70 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.d.ts +22 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.js +118 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.js +154 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.d.ts +22 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.js +70 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +221 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +179 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts +22 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +256 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.js +152 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.d.ts +22 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.js +60 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.d.ts +24 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.js +125 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.d.ts +22 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.js +36 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.d.ts +24 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.js +82 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts +176 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +382 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.d.ts +24 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.js +142 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.js +374 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/BaseURL.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/BaseURL.js +32 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/ContentComponent.d.ts +22 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/ContentProtection.d.ts +21 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/EventStream.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/EventStream.js +119 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Initialization.d.ts +21 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Initialization.js +44 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/MPD.d.ts +21 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/MPD.js +181 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Period.d.ts +21 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Period.js +138 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Representation.d.ts +21 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Representation.js +230 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentBase.d.ts +22 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentBase.js +126 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentList.d.ts +21 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentTemplate.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentTemplate.js +102 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentTimeline.d.ts +21 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentURL.d.ts +23 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/SegmentURL.js +56 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts +169 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.js +346 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/parse_from_document.d.ts +24 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/parse_from_document.js +136 -0
- package/dist/commonjs/parsers/manifest/dash/node_parser_types.d.ts +5 -3
- package/dist/commonjs/parsers/manifest/dash/parsers_types.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +31 -17
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +21 -25
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/BaseURL.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.d.ts +3 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.d.ts +3 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +4 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +2 -4
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/MPD.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +4 -4
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Period.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +9 -6
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Representation.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +13 -15
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.d.ts +3 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.js +5 -10
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentList.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.js +11 -18
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.js +2 -4
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/XLink.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/XLink.js +4 -4
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/root.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/root.js +7 -3
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/parsers_stack.js +5 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/utils.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/utils.js +7 -3
- package/dist/commonjs/parsers/manifest/local/parse_local_manifest.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/local/parse_local_manifest.js +25 -16
- package/dist/commonjs/parsers/manifest/local/representation_index.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/local/representation_index.js +8 -10
- package/dist/commonjs/parsers/manifest/metaplaylist/index.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.d.ts +4 -4
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.js +48 -43
- package/dist/commonjs/parsers/manifest/metaplaylist/representation_index.d.ts +3 -3
- package/dist/commonjs/parsers/manifest/metaplaylist/representation_index.js +10 -7
- package/dist/commonjs/parsers/manifest/smooth/create_parser.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/smooth/create_parser.js +130 -108
- package/dist/commonjs/parsers/manifest/smooth/get_codecs.js +3 -3
- package/dist/commonjs/parsers/manifest/smooth/index.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/smooth/parse_C_nodes.js +9 -9
- package/dist/commonjs/parsers/manifest/smooth/parse_protection_node.js +12 -8
- package/dist/commonjs/parsers/manifest/smooth/representation_index.d.ts +3 -3
- package/dist/commonjs/parsers/manifest/smooth/representation_index.js +37 -37
- package/dist/commonjs/parsers/manifest/smooth/shared_smooth_segment_timeline.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/smooth/shared_smooth_segment_timeline.js +8 -9
- package/dist/commonjs/parsers/manifest/smooth/utils/add_segment_infos.js +10 -7
- package/dist/commonjs/parsers/manifest/smooth/utils/parseBoolean.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/smooth/utils/parseBoolean.js +1 -1
- package/dist/commonjs/parsers/manifest/smooth/utils/tokens.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/smooth/utils/tokens.js +1 -2
- package/dist/commonjs/parsers/manifest/types.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/utils/check_manifest_ids.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/utils/clear_timeline_from_position.d.ts +3 -2
- package/dist/commonjs/parsers/manifest/utils/clear_timeline_from_position.js +11 -7
- package/dist/commonjs/parsers/manifest/utils/get_first_time_from_adaptation.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/utils/get_first_time_from_adaptation.js +5 -4
- package/dist/commonjs/parsers/manifest/utils/get_last_time_from_adaptation.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/utils/get_last_time_from_adaptation.js +5 -4
- package/dist/commonjs/parsers/manifest/utils/get_maximum_positions.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/utils/get_maximum_positions.js +11 -17
- package/dist/commonjs/parsers/manifest/utils/get_minimum_position.d.ts +2 -2
- package/dist/commonjs/parsers/manifest/utils/get_minimum_position.js +5 -11
- package/dist/commonjs/parsers/manifest/utils/index_helpers.js +4 -5
- package/dist/commonjs/parsers/manifest/utils/update_segment_timeline.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/utils/update_segment_timeline.js +17 -17
- package/dist/commonjs/parsers/texttracks/index.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/sami/html.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/sami/html.js +17 -16
- package/dist/commonjs/parsers/texttracks/sami/native.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/sami/native.js +12 -18
- package/dist/commonjs/parsers/texttracks/srt/html.js +12 -10
- package/dist/commonjs/parsers/texttracks/srt/native.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/srt/native.js +2 -8
- package/dist/commonjs/parsers/texttracks/srt/parse_cue.js +4 -8
- package/dist/commonjs/parsers/texttracks/ttml/get_parameters.js +7 -8
- package/dist/commonjs/parsers/texttracks/ttml/get_time_delimiters.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/get_time_delimiters.js +9 -10
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_default_ttml_paragraph_style.js +2 -2
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_extent.js +5 -9
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_font_size.js +6 -7
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_line_height.js +2 -2
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_origin.js +5 -9
- package/dist/commonjs/parsers/texttracks/ttml/html/apply_padding.js +7 -11
- package/dist/commonjs/parsers/texttracks/ttml/html/create_element.d.ts +2 -2
- package/dist/commonjs/parsers/texttracks/ttml/html/create_element.js +29 -22
- package/dist/commonjs/parsers/texttracks/ttml/html/generate_css_test_outline.js +2 -2
- package/dist/commonjs/parsers/texttracks/ttml/html/parse_cue.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/parse_cue.js +5 -3
- package/dist/commonjs/parsers/texttracks/ttml/html/parse_ttml_to_div.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/ttml_color_to_css_color.js +39 -23
- package/dist/commonjs/parsers/texttracks/ttml/native/parse_cue.d.ts +2 -2
- package/dist/commonjs/parsers/texttracks/ttml/native/parse_cue.js +14 -13
- package/dist/commonjs/parsers/texttracks/ttml/native/parse_ttml_to_vtt.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/parse_ttml.d.ts +3 -3
- package/dist/commonjs/parsers/texttracks/ttml/parse_ttml.js +27 -15
- package/dist/commonjs/parsers/texttracks/ttml/resolve_styles_inheritance.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/time_parsing.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/time_parsing.js +2 -2
- package/dist/commonjs/parsers/texttracks/ttml/xml_utils.js +2 -1
- package/dist/commonjs/parsers/texttracks/types.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/get_style_blocks.js +2 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/convert_payload_to_html.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/create_default_style_elements.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/create_style_attribute.js +6 -12
- package/dist/commonjs/parsers/texttracks/webvtt/html/create_styled_element.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/create_styled_element.js +7 -8
- package/dist/commonjs/parsers/texttracks/webvtt/html/parse_style_block.js +4 -4
- package/dist/commonjs/parsers/texttracks/webvtt/html/parse_webvtt_to_div.d.ts +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.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/to_html.js +4 -10
- package/dist/commonjs/parsers/texttracks/webvtt/native/parse_vtt_to_cues.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +5 -9
- package/dist/commonjs/parsers/texttracks/webvtt/native/set_settings_on_cue.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/native/to_native_cue.d.ts +2 -2
- package/dist/commonjs/parsers/texttracks/webvtt/native/to_native_cue.js +3 -3
- package/dist/commonjs/parsers/texttracks/webvtt/parse_cue_block.js +9 -5
- package/dist/commonjs/parsers/texttracks/webvtt/parse_timestamp.js +1 -2
- package/dist/commonjs/parsers/texttracks/webvtt/utils.js +6 -6
- package/dist/commonjs/playback_observer/index.d.ts +6 -0
- package/dist/commonjs/playback_observer/index.js +5 -0
- package/dist/commonjs/playback_observer/media_element_playback_observer.d.ts +203 -0
- package/dist/commonjs/playback_observer/media_element_playback_observer.js +685 -0
- package/dist/commonjs/playback_observer/types.d.ts +223 -0
- package/dist/commonjs/playback_observer/types.js +2 -0
- package/dist/commonjs/playback_observer/utils/generate_read_only_observer.d.ts +11 -0
- package/dist/commonjs/playback_observer/utils/generate_read_only_observer.js +44 -0
- package/dist/commonjs/playback_observer/utils/observation_position.d.ts +87 -0
- package/dist/commonjs/playback_observer/utils/observation_position.js +88 -0
- package/dist/commonjs/playback_observer/worker_playback_observer.d.ts +72 -0
- package/dist/commonjs/playback_observer/worker_playback_observer.js +49 -0
- package/dist/commonjs/public_types.d.ts +13 -16
- package/dist/commonjs/public_types.js +0 -1
- package/dist/commonjs/tools/TextTrackRenderer/text_track_renderer.d.ts +2 -2
- package/dist/commonjs/tools/TextTrackRenderer/text_track_renderer.js +10 -7
- package/dist/commonjs/tools/index.d.ts +1 -1
- package/dist/commonjs/tools/parseBIFThumbnails/index.js +5 -4
- package/dist/commonjs/transports/dash/add_segment_integrity_checks_to_loader.d.ts +1 -1
- package/dist/commonjs/transports/dash/add_segment_integrity_checks_to_loader.js +2 -3
- package/dist/commonjs/transports/dash/construct_segment_url.d.ts +2 -2
- package/dist/commonjs/transports/dash/construct_segment_url.js +7 -3
- package/dist/commonjs/transports/dash/get_events_out_of_emsgs.d.ts +2 -2
- package/dist/commonjs/transports/dash/get_events_out_of_emsgs.js +12 -10
- package/dist/commonjs/transports/dash/init_segment_loader.d.ts +3 -3
- package/dist/commonjs/transports/dash/init_segment_loader.js +46 -22
- package/dist/commonjs/transports/dash/low_latency_segment_loader.d.ts +2 -2
- package/dist/commonjs/transports/dash/low_latency_segment_loader.js +18 -11
- package/dist/commonjs/transports/dash/manifest_parser.d.ts +2 -2
- package/dist/commonjs/transports/dash/manifest_parser.js +69 -28
- package/dist/commonjs/transports/dash/pipelines.d.ts +1 -1
- package/dist/commonjs/transports/dash/pipelines.js +15 -12
- package/dist/commonjs/transports/dash/segment_loader.d.ts +4 -4
- package/dist/commonjs/transports/dash/segment_loader.js +35 -21
- package/dist/commonjs/transports/dash/segment_parser.d.ts +2 -2
- package/dist/commonjs/transports/dash/segment_parser.js +54 -22
- package/dist/commonjs/transports/dash/text_loader.d.ts +2 -2
- package/dist/commonjs/transports/dash/text_loader.js +21 -18
- package/dist/commonjs/transports/dash/text_parser.d.ts +2 -2
- package/dist/commonjs/transports/dash/text_parser.js +49 -23
- package/dist/commonjs/transports/index.d.ts +1 -1
- package/dist/commonjs/transports/index.js +0 -15
- package/dist/commonjs/transports/local/pipelines.d.ts +1 -1
- package/dist/commonjs/transports/local/pipelines.js +15 -10
- package/dist/commonjs/transports/local/segment_loader.d.ts +3 -3
- package/dist/commonjs/transports/local/segment_loader.js +14 -6
- package/dist/commonjs/transports/local/segment_parser.d.ts +1 -1
- package/dist/commonjs/transports/local/segment_parser.js +30 -12
- package/dist/commonjs/transports/local/text_parser.d.ts +1 -1
- package/dist/commonjs/transports/local/text_parser.js +48 -18
- package/dist/commonjs/transports/metaplaylist/manifest_loader.d.ts +4 -4
- package/dist/commonjs/transports/metaplaylist/manifest_loader.js +9 -5
- package/dist/commonjs/transports/metaplaylist/pipelines.d.ts +1 -1
- package/dist/commonjs/transports/metaplaylist/pipelines.js +38 -22
- package/dist/commonjs/transports/smooth/extract_timings_infos.d.ts +2 -2
- package/dist/commonjs/transports/smooth/extract_timings_infos.js +14 -13
- package/dist/commonjs/transports/smooth/is_mp4_embedded_track.d.ts +1 -1
- package/dist/commonjs/transports/smooth/is_mp4_embedded_track.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/create_audio_init_segment.d.ts +0 -1
- package/dist/commonjs/transports/smooth/isobmff/create_audio_init_segment.js +3 -4
- package/dist/commonjs/transports/smooth/isobmff/create_boxes.js +22 -31
- package/dist/commonjs/transports/smooth/isobmff/create_init_segment.js +1 -1
- package/dist/commonjs/transports/smooth/isobmff/get_aaces_header.js +4 -16
- 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 +12 -11
- package/dist/commonjs/transports/smooth/pipelines.d.ts +1 -1
- package/dist/commonjs/transports/smooth/pipelines.js +101 -60
- package/dist/commonjs/transports/smooth/segment_loader.d.ts +3 -3
- package/dist/commonjs/transports/smooth/segment_loader.js +50 -27
- package/dist/commonjs/transports/smooth/utils.d.ts +4 -4
- package/dist/commonjs/transports/smooth/utils.js +9 -5
- package/dist/commonjs/transports/types.d.ts +22 -27
- package/dist/commonjs/transports/utils/byte_range.js +1 -2
- package/dist/commonjs/transports/utils/call_custom_manifest_loader.d.ts +3 -3
- package/dist/commonjs/transports/utils/call_custom_manifest_loader.js +10 -6
- package/dist/commonjs/transports/utils/check_isobmff_integrity.js +5 -5
- package/dist/commonjs/transports/utils/generate_manifest_loader.d.ts +3 -3
- package/dist/commonjs/transports/utils/generate_manifest_loader.js +18 -6
- package/dist/commonjs/transports/utils/get_isobmff_timing_infos.d.ts +2 -2
- package/dist/commonjs/transports/utils/get_isobmff_timing_infos.js +12 -11
- package/dist/commonjs/transports/utils/infer_segment_container.d.ts +1 -1
- package/dist/commonjs/transports/utils/infer_segment_container.js +1 -3
- package/dist/commonjs/transports/utils/parse_text_track.d.ts +4 -4
- package/dist/commonjs/transports/utils/parse_text_track.js +4 -7
- package/dist/commonjs/utils/array_includes.js +2 -6
- package/dist/commonjs/utils/assert.js +3 -6
- package/dist/commonjs/utils/base64.js +87 -29
- package/dist/commonjs/utils/byte_parsing.js +64 -56
- package/dist/commonjs/utils/cancellable_sleep.d.ts +1 -1
- package/dist/commonjs/utils/create_cancellable_promise.d.ts +1 -1
- package/dist/commonjs/utils/deep_merge.js +4 -4
- package/dist/commonjs/utils/event_emitter.d.ts +1 -1
- package/dist/commonjs/utils/event_emitter.js +1 -2
- package/dist/commonjs/utils/get_fuzzed_delay.js +1 -1
- package/dist/commonjs/utils/global_scope.d.ts +1 -1
- package/dist/commonjs/utils/global_scope.js +10 -3
- package/dist/commonjs/utils/hash_buffer.js +1 -1
- package/dist/commonjs/utils/languages/normalize.js +4 -2
- package/dist/commonjs/utils/logger.js +21 -31
- package/dist/commonjs/utils/monotonic_timestamp.d.ts +6 -9
- package/dist/commonjs/utils/monotonic_timestamp.js +15 -6
- package/dist/commonjs/utils/object_assign.d.ts +6 -3
- package/dist/commonjs/utils/object_assign.js +5 -7
- package/dist/commonjs/utils/object_values.d.ts +1 -1
- package/dist/commonjs/utils/object_values.js +2 -3
- package/dist/commonjs/utils/queue_microtask.js +3 -3
- package/dist/commonjs/utils/ranges.js +22 -29
- package/dist/commonjs/utils/reference.d.ts +1 -1
- package/dist/commonjs/utils/reference.js +1 -3
- package/dist/commonjs/utils/request/fetch.d.ts +1 -1
- package/dist/commonjs/utils/request/fetch.js +33 -22
- package/dist/commonjs/utils/request/request_error.js +2 -2
- package/dist/commonjs/utils/request/xhr.d.ts +1 -1
- package/dist/commonjs/utils/request/xhr.js +28 -17
- package/dist/commonjs/utils/retry_promise_with_backoff.d.ts +10 -1
- package/dist/commonjs/utils/retry_promise_with_backoff.js +18 -4
- package/dist/commonjs/utils/slice_uint8array.js +3 -3
- package/dist/commonjs/utils/starts_with.js +3 -3
- package/dist/commonjs/utils/string_parsing.js +16 -18
- package/dist/commonjs/utils/sync_or_async.js +6 -2
- package/dist/commonjs/utils/task_canceller.js +1 -2
- package/dist/commonjs/utils/wrapInPromise.d.ts +1 -1
- package/dist/commonjs/utils/xml-parser.d.ts +70 -0
- package/dist/commonjs/utils/xml-parser.js +357 -0
- package/dist/commonjs/worker_entry_point.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker_es5.d.ts +3 -0
- package/dist/es2017/__GENERATED_CODE/embedded_worker_es5.js +3 -0
- package/dist/es2017/__GENERATED_CODE/index.d.ts +1 -0
- package/dist/es2017/__GENERATED_CODE/index.js +1 -0
- package/dist/es2017/compat/add_class_name.js +4 -3
- package/dist/es2017/compat/add_text_track.d.ts +1 -1
- package/dist/es2017/compat/add_text_track.js +3 -2
- package/dist/es2017/compat/browser_compatibility_types.js +13 -7
- package/dist/es2017/compat/browser_detection.d.ts +3 -1
- package/dist/es2017/compat/browser_detection.js +15 -12
- package/dist/es2017/compat/can_reuse_media_keys.js +1 -1
- package/dist/es2017/compat/can_seek_directly_after_loaded_metadata.d.ts +7 -0
- package/dist/es2017/compat/can_seek_directly_after_loaded_metadata.js +8 -0
- package/dist/es2017/compat/change_source_buffer_type.d.ts +1 -1
- package/dist/es2017/compat/eme/close_session.d.ts +1 -1
- package/dist/es2017/compat/eme/close_session.js +17 -13
- package/dist/es2017/compat/eme/custom_key_system_access.d.ts +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.d.ts +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/ie11_media_keys.js +14 -7
- package/dist/es2017/compat/eme/custom_media_keys/index.js +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.js +10 -10
- package/dist/es2017/compat/eme/custom_media_keys/types.d.ts +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.js +5 -9
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +3 -3
- package/dist/es2017/compat/eme/eme-api-implementation.d.ts +3 -3
- package/dist/es2017/compat/eme/eme-api-implementation.js +13 -12
- package/dist/es2017/compat/eme/generate_key_request.d.ts +1 -1
- package/dist/es2017/compat/eme/generate_key_request.js +17 -20
- package/dist/es2017/compat/eme/get_init_data.js +5 -7
- package/dist/es2017/compat/eme/get_uuid_kid_from_keystatus_kid.js +2 -3
- package/dist/es2017/compat/eme/get_webkit_fairplay_initdata.js +12 -13
- package/dist/es2017/compat/eme/load_session.d.ts +1 -1
- package/dist/es2017/compat/eme/set_media_keys.d.ts +9 -0
- package/dist/es2017/compat/eme/set_media_keys.js +33 -0
- package/dist/es2017/compat/enable_audio_track.d.ts +1 -1
- package/dist/es2017/compat/event_listeners.d.ts +4 -4
- package/dist/es2017/compat/event_listeners.js +39 -36
- package/dist/es2017/compat/has_webassembly.js +1 -2
- package/dist/es2017/compat/has_worker_api.d.ts +9 -0
- package/dist/es2017/compat/has_worker_api.js +14 -0
- package/dist/es2017/compat/is_codec_supported.js +2 -1
- package/dist/es2017/compat/is_vtt_cue.d.ts +1 -1
- package/dist/es2017/compat/make_vtt_cue.d.ts +1 -1
- package/dist/es2017/compat/may_media_element_fail_on_undecipherable_data.d.ts +16 -0
- package/dist/es2017/compat/may_media_element_fail_on_undecipherable_data.js +17 -0
- package/dist/es2017/compat/on_height_width_change.d.ts +2 -2
- package/dist/es2017/compat/on_height_width_change.js +1 -1
- package/dist/es2017/compat/patch_webkit_source_buffer.js +28 -28
- package/dist/es2017/compat/should_await_set_media_keys.d.ts +16 -0
- package/dist/es2017/compat/should_await_set_media_keys.js +19 -0
- package/dist/es2017/compat/should_favour_custom_safari_EME.js +2 -2
- package/dist/es2017/compat/should_reload_media_source_on_decipherability_update.js +1 -2
- package/dist/es2017/config.d.ts +1 -1
- package/dist/es2017/core/adaptive/adaptive_representation_selector.d.ts +25 -22
- package/dist/es2017/core/adaptive/adaptive_representation_selector.js +40 -28
- package/dist/es2017/core/adaptive/buffer_based_chooser.d.ts +1 -1
- package/dist/es2017/core/adaptive/buffer_based_chooser.js +14 -12
- package/dist/es2017/core/adaptive/guess_based_chooser.d.ts +6 -6
- package/dist/es2017/core/adaptive/guess_based_chooser.js +8 -7
- package/dist/es2017/core/adaptive/index.d.ts +2 -2
- package/dist/es2017/core/adaptive/network_analyzer.d.ts +6 -6
- package/dist/es2017/core/adaptive/network_analyzer.js +45 -41
- package/dist/es2017/core/adaptive/utils/bandwidth_estimator.js +1 -1
- package/dist/es2017/core/adaptive/utils/ewma.js +1 -2
- package/dist/es2017/core/adaptive/utils/filter_by_bitrate.d.ts +2 -2
- package/dist/es2017/core/adaptive/utils/filter_by_resolution.d.ts +2 -2
- package/dist/es2017/core/adaptive/utils/filter_by_resolution.js +2 -4
- package/dist/es2017/core/adaptive/utils/get_buffer_levels.js +8 -5
- package/dist/es2017/core/adaptive/utils/last_estimate_storage.d.ts +3 -3
- package/dist/es2017/core/adaptive/utils/pending_requests_store.d.ts +5 -5
- package/dist/es2017/core/adaptive/utils/pending_requests_store.js +5 -6
- package/dist/es2017/core/adaptive/utils/representation_score_calculator.d.ts +7 -7
- package/dist/es2017/core/adaptive/utils/representation_score_calculator.js +10 -8
- package/dist/es2017/core/adaptive/utils/select_optimal_representation.d.ts +4 -4
- package/dist/es2017/core/adaptive/utils/select_optimal_representation.js +2 -2
- package/dist/es2017/core/fetchers/cdn_prioritizer.d.ts +2 -2
- package/dist/es2017/core/fetchers/cdn_prioritizer.js +5 -6
- package/dist/es2017/core/fetchers/manifest/index.d.ts +1 -1
- package/dist/es2017/core/fetchers/manifest/manifest_fetcher.d.ts +3 -3
- package/dist/es2017/core/fetchers/manifest/manifest_fetcher.js +76 -76
- package/dist/es2017/core/fetchers/segment/index.d.ts +1 -1
- package/dist/es2017/core/fetchers/segment/initialization_segment_cache.d.ts +4 -4
- package/dist/es2017/core/fetchers/segment/initialization_segment_cache.js +1 -1
- package/dist/es2017/core/fetchers/segment/prioritized_segment_fetcher.d.ts +4 -3
- package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts +12 -12
- package/dist/es2017/core/fetchers/segment/segment_fetcher.js +52 -37
- package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.d.ts +5 -5
- package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.js +5 -3
- package/dist/es2017/core/fetchers/segment/task_prioritizer.d.ts +1 -1
- package/dist/es2017/core/fetchers/segment/task_prioritizer.js +22 -21
- package/dist/es2017/core/fetchers/utils/error_selector.d.ts +1 -2
- package/dist/es2017/core/fetchers/utils/error_selector.js +1 -2
- package/dist/es2017/core/fetchers/utils/schedule_request.d.ts +3 -3
- package/dist/es2017/core/fetchers/utils/schedule_request.js +22 -23
- package/dist/es2017/core/main/common/DecipherabilityFreezeDetector.d.ts +79 -0
- package/dist/es2017/core/main/common/DecipherabilityFreezeDetector.js +91 -0
- package/dist/es2017/core/main/common/content_time_boundaries_observer.d.ts +191 -0
- package/dist/es2017/core/main/common/content_time_boundaries_observer.js +467 -0
- package/dist/es2017/core/main/common/create_content_time_boundaries_observer.d.ts +27 -0
- package/dist/es2017/core/main/common/create_content_time_boundaries_observer.js +41 -0
- package/dist/es2017/core/main/common/get_buffered_data_per_media_buffer.d.ts +14 -0
- package/dist/es2017/core/main/common/get_buffered_data_per_media_buffer.js +34 -0
- package/dist/es2017/core/main/worker/content_preparer.d.ts +93 -0
- package/dist/es2017/core/main/worker/content_preparer.js +239 -0
- package/dist/es2017/core/main/worker/globals.d.ts +13 -0
- package/dist/es2017/core/main/worker/globals.js +18 -0
- package/dist/es2017/core/main/worker/index.d.ts +2 -0
- package/dist/es2017/core/main/worker/index.js +2 -0
- package/dist/es2017/core/main/worker/send_message.d.ts +3 -0
- package/dist/es2017/core/main/worker/send_message.js +20 -0
- package/dist/es2017/core/main/worker/track_choice_setter.d.ts +19 -0
- package/dist/es2017/core/main/worker/track_choice_setter.js +114 -0
- package/dist/es2017/core/main/worker/worker_main.d.ts +1 -0
- package/dist/es2017/core/main/worker/worker_main.js +699 -0
- package/dist/es2017/core/main/worker/worker_text_displayer_interface.d.ts +64 -0
- package/dist/es2017/core/main/worker/worker_text_displayer_interface.js +120 -0
- package/dist/es2017/core/segment_sinks/garbage_collector.d.ts +43 -0
- package/dist/es2017/core/segment_sinks/garbage_collector.js +143 -0
- package/dist/es2017/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.d.ts +135 -0
- package/dist/es2017/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.js +265 -0
- package/dist/es2017/core/segment_sinks/implementations/audio_video/index.d.ts +17 -0
- package/dist/es2017/core/segment_sinks/implementations/audio_video/index.js +17 -0
- package/dist/es2017/core/segment_sinks/implementations/index.d.ts +19 -0
- package/dist/es2017/core/segment_sinks/implementations/index.js +18 -0
- package/dist/es2017/core/segment_sinks/implementations/text/index.d.ts +3 -0
- package/dist/es2017/core/segment_sinks/implementations/text/index.js +2 -0
- package/dist/es2017/core/segment_sinks/implementations/text/text_segment_buffer.d.ts +90 -0
- package/dist/es2017/core/segment_sinks/implementations/text/text_segment_buffer.js +156 -0
- package/dist/es2017/core/segment_sinks/implementations/types.d.ts +307 -0
- package/dist/es2017/core/segment_sinks/implementations/types.js +112 -0
- package/dist/es2017/core/segment_sinks/implementations/utils/manual_time_ranges.js +63 -0
- package/dist/es2017/core/segment_sinks/index.d.ts +21 -0
- package/dist/es2017/core/segment_sinks/index.js +21 -0
- package/dist/es2017/core/segment_sinks/inventory/buffered_history.d.ts +89 -0
- package/dist/es2017/core/segment_sinks/inventory/buffered_history.js +88 -0
- package/dist/es2017/core/segment_sinks/inventory/index.d.ts +21 -0
- package/dist/es2017/core/segment_sinks/inventory/index.js +18 -0
- package/dist/es2017/core/segment_sinks/inventory/segment_inventory.d.ts +238 -0
- package/dist/es2017/core/segment_sinks/inventory/segment_inventory.js +868 -0
- package/dist/es2017/core/segment_sinks/inventory/types.d.ts +27 -0
- package/dist/es2017/core/segment_sinks/inventory/utils.d.ts +33 -0
- package/dist/es2017/core/segment_sinks/inventory/utils.js +48 -0
- package/dist/es2017/core/segment_sinks/segment_buffers_store.d.ts +171 -0
- package/dist/es2017/core/segment_sinks/segment_buffers_store.js +281 -0
- package/dist/es2017/core/stream/adaptation/adaptation_stream.d.ts +4 -4
- package/dist/es2017/core/stream/adaptation/adaptation_stream.js +43 -32
- package/dist/es2017/core/stream/adaptation/get_representations_switch_strategy.d.ts +11 -11
- package/dist/es2017/core/stream/adaptation/get_representations_switch_strategy.js +31 -32
- package/dist/es2017/core/stream/adaptation/types.d.ts +18 -18
- package/dist/es2017/core/stream/index.d.ts +1 -1
- package/dist/es2017/core/stream/orchestrator/get_time_ranges_for_content.d.ts +5 -5
- package/dist/es2017/core/stream/orchestrator/get_time_ranges_for_content.js +6 -6
- package/dist/es2017/core/stream/orchestrator/stream_orchestrator.d.ts +20 -19
- package/dist/es2017/core/stream/orchestrator/stream_orchestrator.js +68 -57
- package/dist/es2017/core/stream/period/period_stream.d.ts +5 -5
- package/dist/es2017/core/stream/period/period_stream.js +78 -58
- package/dist/es2017/core/stream/period/types.d.ts +23 -21
- package/dist/es2017/core/stream/period/utils/get_adaptation_switch_strategy.d.ts +13 -13
- package/dist/es2017/core/stream/period/utils/get_adaptation_switch_strategy.js +34 -38
- package/dist/es2017/core/stream/representation/representation_stream.d.ts +5 -5
- package/dist/es2017/core/stream/representation/representation_stream.js +48 -35
- package/dist/es2017/core/stream/representation/types.d.ts +24 -24
- package/dist/es2017/core/stream/representation/utils/append_segment_to_buffer.d.ts +9 -9
- package/dist/es2017/core/stream/representation/utils/append_segment_to_buffer.js +13 -14
- package/dist/es2017/core/stream/representation/utils/check_for_discontinuity.d.ts +7 -7
- package/dist/es2017/core/stream/representation/utils/check_for_discontinuity.js +16 -18
- package/dist/es2017/core/stream/representation/utils/downloading_queue.d.ts +10 -10
- package/dist/es2017/core/stream/representation/utils/downloading_queue.js +11 -11
- package/dist/es2017/core/stream/representation/utils/get_buffer_status.d.ts +11 -11
- package/dist/es2017/core/stream/representation/utils/get_buffer_status.js +40 -31
- package/dist/es2017/core/stream/representation/utils/get_needed_segments.d.ts +6 -7
- package/dist/es2017/core/stream/representation/utils/get_needed_segments.js +26 -31
- package/dist/es2017/core/stream/representation/utils/push_init_segment.d.ts +13 -13
- package/dist/es2017/core/stream/representation/utils/push_init_segment.js +8 -9
- package/dist/es2017/core/stream/representation/utils/push_media_segment.d.ts +14 -14
- package/dist/es2017/core/stream/representation/utils/push_media_segment.js +14 -15
- package/dist/es2017/core/types.d.ts +8 -0
- package/dist/es2017/default_config.js +21 -18
- package/dist/es2017/errors/encrypted_media_error.d.ts +2 -2
- package/dist/es2017/errors/encrypted_media_error.js +5 -3
- package/dist/es2017/errors/error_codes.d.ts +3 -3
- package/dist/es2017/errors/error_codes.js +2 -1
- package/dist/es2017/errors/format_error.d.ts +2 -2
- package/dist/es2017/errors/format_error.js +2 -3
- package/dist/es2017/errors/is_known_error.d.ts +1 -1
- package/dist/es2017/errors/is_known_error.js +2 -2
- package/dist/es2017/errors/media_error.d.ts +2 -2
- package/dist/es2017/errors/media_error.js +5 -3
- package/dist/es2017/errors/network_error.d.ts +2 -2
- package/dist/es2017/errors/network_error.js +7 -5
- package/dist/es2017/errors/other_error.d.ts +1 -1
- package/dist/es2017/errors/other_error.js +2 -4
- package/dist/es2017/errors/source_buffer_error.js +4 -2
- package/dist/es2017/experimental/features/local.d.ts +1 -1
- package/dist/es2017/experimental/features/local.js +1 -2
- package/dist/es2017/experimental/features/metaplaylist.d.ts +1 -1
- package/dist/es2017/experimental/features/metaplaylist.js +1 -2
- package/dist/es2017/experimental/features/multi_thread.d.ts +1 -1
- package/dist/es2017/experimental/features/multi_thread.js +1 -2
- package/dist/es2017/experimental/index.d.ts +1 -1
- package/dist/es2017/experimental/index.js +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/features/dash.d.ts +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/features/metaplaylist.d.ts +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/index.d.ts +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/index.js +2 -2
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/load_and_push_segment.d.ts +3 -3
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +2 -2
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +5 -5
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +2 -2
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/types.d.ts +6 -6
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts +3 -3
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +14 -22
- package/dist/es2017/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +13 -23
- package/dist/es2017/experimental/tools/createMetaplaylist/index.d.ts +1 -1
- package/dist/es2017/experimental/tools/createMetaplaylist/index.js +8 -14
- package/dist/es2017/experimental/tools/index.d.ts +1 -1
- package/dist/es2017/experimental/tools/index.js +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/index.d.ts +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/index.js +9 -13
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.d.ts +4 -3
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.js +7 -4
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/capabilities.d.ts +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/capabilities.js +10 -47
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.d.ts +2 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +9 -6
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.d.ts +2 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +22 -14
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.d.ts +2 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +22 -18
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +10 -10
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/index.d.ts +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts +2 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +6 -7
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.d.ts +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.js +6 -11
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.d.ts +2 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +2 -3
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts +2 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +4 -4
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/types.d.ts +2 -2
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/utils.d.ts +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/utils.js +8 -7
- package/dist/es2017/features/add_features.d.ts +1 -1
- package/dist/es2017/features/features_object.d.ts +1 -1
- package/dist/es2017/features/features_object.js +4 -3
- package/dist/es2017/features/index.d.ts +1 -1
- package/dist/es2017/features/index.js +1 -1
- package/dist/es2017/features/list/dash.d.ts +1 -1
- package/dist/es2017/features/list/dash.js +3 -4
- package/dist/es2017/features/list/dash_wasm.d.ts +2 -2
- package/dist/es2017/features/list/dash_wasm.js +1 -2
- package/dist/es2017/features/list/debug_element.d.ts +1 -1
- package/dist/es2017/features/list/debug_element.js +1 -1
- package/dist/es2017/features/list/directfile.d.ts +1 -1
- package/dist/es2017/features/list/directfile.js +3 -5
- package/dist/es2017/features/list/eme.d.ts +1 -1
- package/dist/es2017/features/list/eme.js +1 -1
- package/dist/es2017/features/list/html_sami_parser.d.ts +1 -1
- package/dist/es2017/features/list/html_sami_parser.js +1 -1
- package/dist/es2017/features/list/html_srt_parser.d.ts +1 -1
- package/dist/es2017/features/list/html_srt_parser.js +1 -1
- package/dist/es2017/features/list/html_text_buffer.d.ts +1 -1
- package/dist/es2017/features/list/html_text_buffer.js +1 -1
- package/dist/es2017/features/list/html_ttml_parser.d.ts +1 -1
- package/dist/es2017/features/list/html_ttml_parser.js +1 -1
- package/dist/es2017/features/list/html_vtt_parser.d.ts +1 -1
- package/dist/es2017/features/list/html_vtt_parser.js +1 -1
- package/dist/es2017/features/list/media_source_main.d.ts +1 -1
- package/dist/es2017/features/list/media_source_main.js +1 -2
- package/dist/es2017/features/list/native_sami_parser.d.ts +1 -1
- package/dist/es2017/features/list/native_sami_parser.js +1 -1
- package/dist/es2017/features/list/native_srt_parser.d.ts +1 -1
- package/dist/es2017/features/list/native_srt_parser.js +1 -1
- package/dist/es2017/features/list/native_text_buffer.d.ts +1 -1
- package/dist/es2017/features/list/native_text_buffer.js +1 -1
- package/dist/es2017/features/list/native_ttml_parser.d.ts +1 -1
- package/dist/es2017/features/list/native_ttml_parser.js +1 -1
- package/dist/es2017/features/list/native_vtt_parser.d.ts +1 -1
- package/dist/es2017/features/list/native_vtt_parser.js +1 -1
- package/dist/es2017/features/list/smooth.d.ts +1 -1
- package/dist/es2017/features/list/smooth.js +1 -2
- package/dist/es2017/features/types.d.ts +28 -23
- package/dist/es2017/index.d.ts +1 -1
- package/dist/es2017/index.js +3 -1
- package/dist/es2017/main_thread/api/debug/buffer_graph.d.ts +28 -0
- package/dist/es2017/main_thread/api/debug/buffer_graph.js +164 -0
- package/dist/es2017/main_thread/api/debug/buffer_size_graph.js +102 -0
- package/dist/es2017/main_thread/api/debug/modules/general_info.d.ts +3 -0
- package/dist/es2017/main_thread/api/debug/modules/general_info.js +192 -0
- package/dist/es2017/main_thread/api/debug/modules/segment_buffer_content.d.ts +4 -0
- package/dist/es2017/main_thread/api/debug/modules/segment_buffer_content.js +124 -0
- package/dist/es2017/main_thread/api/debug/modules/segment_buffer_size.d.ts +3 -0
- package/dist/es2017/main_thread/api/debug/modules/segment_buffer_size.js +35 -0
- package/dist/es2017/main_thread/api/debug/render.d.ts +3 -0
- package/dist/es2017/main_thread/api/debug/render.js +32 -0
- package/dist/es2017/main_thread/api/debug/utils.js +54 -0
- package/dist/es2017/main_thread/api/index.d.ts +17 -0
- package/dist/es2017/main_thread/api/index.js +17 -0
- package/dist/es2017/main_thread/api/option_utils.d.ts +124 -0
- package/dist/es2017/main_thread/api/option_utils.js +308 -0
- package/dist/es2017/main_thread/api/public_api.d.ts +768 -0
- package/dist/es2017/main_thread/api/public_api.js +2386 -0
- package/dist/es2017/main_thread/api/utils.d.ts +66 -0
- package/dist/es2017/main_thread/api/utils.js +170 -0
- package/dist/es2017/main_thread/decrypt/__tests__/__global__/utils.d.ts +184 -0
- package/dist/es2017/main_thread/decrypt/__tests__/__global__/utils.js +378 -0
- package/dist/es2017/main_thread/decrypt/attach_media_keys.d.ts +53 -0
- package/dist/es2017/main_thread/decrypt/attach_media_keys.js +72 -0
- package/dist/es2017/main_thread/decrypt/clear_on_stop.js +40 -0
- package/dist/es2017/main_thread/decrypt/content_decryptor.d.ts +185 -0
- package/dist/es2017/main_thread/decrypt/content_decryptor.js +799 -0
- package/dist/es2017/main_thread/decrypt/create_or_load_session.d.ts +64 -0
- package/dist/es2017/main_thread/decrypt/create_or_load_session.js +83 -0
- package/dist/es2017/main_thread/decrypt/create_session.d.ts +54 -0
- package/dist/es2017/main_thread/decrypt/create_session.js +150 -0
- package/dist/es2017/main_thread/decrypt/dispose_decryption_resources.js +34 -0
- package/dist/es2017/main_thread/decrypt/find_key_system.d.ts +48 -0
- package/dist/es2017/main_thread/decrypt/find_key_system.js +287 -0
- package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts +44 -0
- package/dist/es2017/main_thread/decrypt/get_media_keys.js +103 -0
- package/dist/es2017/main_thread/decrypt/index.d.ts +26 -0
- package/dist/es2017/main_thread/decrypt/index.js +26 -0
- package/dist/es2017/main_thread/decrypt/init_media_keys.d.ts +26 -0
- package/dist/es2017/main_thread/decrypt/init_media_keys.js +37 -0
- package/dist/es2017/main_thread/decrypt/session_events_listener.d.ts +75 -0
- package/dist/es2017/main_thread/decrypt/session_events_listener.js +246 -0
- package/dist/es2017/main_thread/decrypt/set_server_certificate.d.ts +51 -0
- package/dist/es2017/main_thread/decrypt/set_server_certificate.js +82 -0
- package/dist/es2017/main_thread/decrypt/types.d.ts +374 -0
- package/dist/es2017/main_thread/decrypt/utils/are_init_values_compatible.js +141 -0
- package/dist/es2017/main_thread/decrypt/utils/check_key_statuses.d.ts +52 -0
- package/dist/es2017/main_thread/decrypt/utils/check_key_statuses.js +163 -0
- package/dist/es2017/main_thread/decrypt/utils/clean_old_loaded_sessions.d.ts +26 -0
- package/dist/es2017/main_thread/decrypt/utils/clean_old_stored_persistent_info.d.ts +32 -0
- package/dist/es2017/main_thread/decrypt/utils/init_data_values_container.d.ts +69 -0
- package/dist/es2017/main_thread/decrypt/utils/init_data_values_container.js +105 -0
- package/dist/es2017/main_thread/decrypt/utils/is_session_usable.d.ts +24 -0
- package/dist/es2017/main_thread/decrypt/utils/is_session_usable.js +48 -0
- package/dist/es2017/main_thread/decrypt/utils/key_id_comparison.js +48 -0
- package/dist/es2017/main_thread/decrypt/utils/key_session_record.d.ts +104 -0
- package/dist/es2017/main_thread/decrypt/utils/key_session_record.js +152 -0
- package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.d.ts +213 -0
- package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.js +365 -0
- package/dist/es2017/main_thread/decrypt/utils/media_keys_infos_store.d.ts +56 -0
- package/dist/es2017/main_thread/decrypt/utils/media_keys_infos_store.js +43 -0
- package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.d.ts +94 -0
- package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.js +325 -0
- package/dist/es2017/main_thread/decrypt/utils/serializable_bytes.d.ts +44 -0
- package/dist/es2017/main_thread/decrypt/utils/serializable_bytes.js +46 -0
- package/dist/es2017/main_thread/decrypt/utils/server_certificate_store.d.ts +64 -0
- package/dist/es2017/main_thread/decrypt/utils/server_certificate_store.js +121 -0
- package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts +97 -0
- package/dist/es2017/main_thread/init/directfile_content_initializer.js +233 -0
- package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts +166 -0
- package/dist/es2017/main_thread/init/media_source_content_initializer.js +712 -0
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts +222 -0
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +1394 -0
- package/dist/es2017/main_thread/init/send_message.d.ts +2 -0
- package/dist/es2017/main_thread/init/send_message.js +10 -0
- package/dist/es2017/main_thread/init/types.d.ts +221 -0
- package/dist/es2017/main_thread/init/utils/create_core_playback_observer.d.ts +83 -0
- package/dist/es2017/main_thread/init/utils/create_core_playback_observer.js +98 -0
- package/dist/es2017/main_thread/init/utils/create_media_source.d.ts +37 -0
- package/dist/es2017/main_thread/init/utils/create_media_source.js +101 -0
- package/dist/es2017/main_thread/init/utils/get_initial_time.d.ts +76 -0
- package/dist/es2017/main_thread/init/utils/get_initial_time.js +106 -0
- package/dist/es2017/main_thread/init/utils/get_loaded_reference.d.ts +28 -0
- package/dist/es2017/main_thread/init/utils/get_loaded_reference.js +64 -0
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts +61 -0
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.js +200 -0
- package/dist/es2017/main_thread/init/utils/initialize_content_decryption.d.ts +87 -0
- package/dist/es2017/main_thread/init/utils/initialize_content_decryption.js +116 -0
- package/dist/es2017/main_thread/init/utils/main_thread_text_displayer_interface.d.ts +35 -0
- package/dist/es2017/main_thread/init/utils/rebuffering_controller.d.ts +114 -0
- package/dist/es2017/main_thread/init/utils/rebuffering_controller.js +426 -0
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/are_same_stream_events.js +33 -0
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/index.d.ts +18 -0
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts +25 -0
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +84 -0
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.d.ts +53 -0
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/stream_events_emitter.js +175 -0
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/types.d.ts +41 -0
- package/dist/es2017/main_thread/init/utils/throw_on_media_error.d.ts +23 -0
- package/dist/es2017/main_thread/init/utils/throw_on_media_error.js +63 -0
- package/dist/es2017/main_thread/text_displayer/html/html_parsers.js +22 -0
- package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.d.ts +100 -0
- package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.js +312 -0
- package/dist/es2017/main_thread/text_displayer/html/text_track_cues_store.d.ts +65 -0
- package/dist/es2017/main_thread/text_displayer/html/text_track_cues_store.js +358 -0
- package/dist/es2017/main_thread/text_displayer/html/update_proportional_elements.js +61 -0
- package/dist/es2017/main_thread/text_displayer/html/utils.js +111 -0
- package/dist/es2017/main_thread/text_displayer/index.d.ts +2 -0
- package/dist/es2017/main_thread/text_displayer/manual_time_ranges.js +48 -0
- package/dist/es2017/main_thread/text_displayer/native/native_parsers.d.ts +11 -0
- package/dist/es2017/main_thread/text_displayer/native/native_parsers.js +22 -0
- package/dist/es2017/main_thread/text_displayer/native/native_text_displayer.d.ts +56 -0
- package/dist/es2017/main_thread/text_displayer/native/native_text_displayer.js +203 -0
- package/dist/es2017/main_thread/text_displayer/types.d.ts +71 -0
- package/dist/es2017/main_thread/text_displayer/types.js +1 -0
- package/dist/es2017/main_thread/tracks_store/index.d.ts +20 -0
- package/dist/es2017/main_thread/tracks_store/media_element_tracks_store.d.ts +197 -0
- package/dist/es2017/main_thread/tracks_store/media_element_tracks_store.js +663 -0
- package/dist/es2017/main_thread/tracks_store/track_dispatcher.d.ts +101 -0
- package/dist/es2017/main_thread/tracks_store/track_dispatcher.js +175 -0
- package/dist/es2017/main_thread/tracks_store/tracks_store.d.ts +448 -0
- package/dist/es2017/main_thread/tracks_store/tracks_store.js +998 -0
- package/dist/es2017/main_thread/types.d.ts +5 -0
- package/dist/es2017/main_thread/types.js +1 -0
- package/dist/es2017/manifest/classes/adaptation.d.ts +134 -0
- package/dist/es2017/manifest/classes/adaptation.js +193 -0
- package/dist/es2017/manifest/classes/index.d.ts +25 -0
- package/dist/es2017/manifest/classes/index.js +28 -0
- package/dist/es2017/manifest/classes/manifest.d.ts +391 -0
- package/dist/es2017/manifest/classes/manifest.js +381 -0
- package/dist/es2017/manifest/classes/period.d.ts +106 -0
- package/dist/es2017/manifest/classes/period.js +194 -0
- package/dist/es2017/manifest/classes/representation.d.ts +238 -0
- package/dist/es2017/manifest/classes/representation.js +346 -0
- package/dist/es2017/manifest/classes/representation_index/index.d.ts +18 -0
- package/dist/es2017/manifest/classes/representation_index/static.d.ts +101 -0
- package/dist/es2017/manifest/classes/representation_index/static.js +143 -0
- package/dist/es2017/manifest/classes/representation_index/types.d.ts +420 -0
- package/dist/es2017/manifest/classes/types.d.ts +29 -0
- package/dist/es2017/manifest/classes/types.js +30 -0
- package/dist/es2017/manifest/classes/update_period_in_place.d.ts +53 -0
- package/dist/es2017/manifest/classes/update_period_in_place.js +109 -0
- package/dist/es2017/manifest/classes/update_periods.d.ts +50 -0
- package/dist/es2017/manifest/classes/update_periods.js +193 -0
- package/dist/es2017/manifest/classes/utils.d.ts +39 -0
- package/dist/es2017/manifest/classes/utils.js +49 -0
- package/dist/es2017/manifest/index.d.ts +15 -25
- package/dist/es2017/manifest/index.js +3 -28
- package/dist/es2017/manifest/types.d.ts +2 -31
- package/dist/es2017/manifest/types.js +1 -15
- package/dist/es2017/manifest/utils.d.ts +11 -49
- package/dist/es2017/manifest/utils.js +46 -88
- package/dist/es2017/minimal.d.ts +1 -1
- package/dist/es2017/minimal.js +6 -1
- package/dist/es2017/mse/main_codec_support_prober.d.ts +1 -1
- package/dist/es2017/mse/main_media_source_interface.d.ts +2 -2
- package/dist/es2017/mse/main_media_source_interface.js +61 -36
- package/dist/es2017/mse/types.d.ts +3 -3
- package/dist/es2017/mse/utils/end_of_stream.d.ts +33 -0
- package/dist/es2017/mse/utils/end_of_stream.js +87 -0
- package/dist/es2017/mse/utils/media_source_duration_updater.js +265 -0
- package/dist/es2017/mse/worker_codec_support_prober.d.ts +1 -1
- package/dist/es2017/mse/worker_media_source_interface.d.ts +4 -4
- package/dist/es2017/mse/worker_media_source_interface.js +21 -19
- package/dist/es2017/multithread_types.d.ts +15 -18
- package/dist/es2017/parsers/containers/isobmff/create_box.d.ts +1 -1
- package/dist/es2017/parsers/containers/isobmff/create_box.js +6 -5
- package/dist/es2017/parsers/containers/isobmff/drm/playready.js +2 -3
- package/dist/es2017/parsers/containers/isobmff/extract_complete_chunks.js +67 -0
- package/dist/es2017/parsers/containers/isobmff/find_complete_box.js +54 -0
- package/dist/es2017/parsers/containers/isobmff/get_box.js +3 -5
- package/dist/es2017/parsers/containers/isobmff/index.d.ts +5 -3
- package/dist/es2017/parsers/containers/isobmff/index.js +6 -4
- package/dist/es2017/parsers/containers/isobmff/read.d.ts +1 -1
- package/dist/es2017/parsers/containers/isobmff/read.js +9 -9
- package/dist/es2017/parsers/containers/isobmff/take_pssh_out.js +4 -5
- package/dist/es2017/parsers/containers/isobmff/utils.js +60 -45
- package/dist/es2017/parsers/containers/matroska/index.d.ts +1 -1
- package/dist/es2017/parsers/containers/matroska/index.js +1 -1
- package/dist/es2017/parsers/containers/matroska/utils.js +42 -29
- package/dist/es2017/parsers/images/bif.js +10 -6
- package/dist/es2017/parsers/manifest/dash/common/attach_trickmode_track.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -3
- package/dist/es2017/parsers/manifest/dash/common/flatten_overlapping_periods.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/flatten_overlapping_periods.js +1 -1
- package/dist/es2017/parsers/manifest/dash/common/get_hdr_information.js +4 -12
- package/dist/es2017/parsers/manifest/dash/common/get_http_utc-timing_url.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/get_http_utc-timing_url.js +4 -5
- package/dist/es2017/parsers/manifest/dash/common/get_minimum_and_maximum_positions.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/get_minimum_and_maximum_positions.js +4 -2
- package/dist/es2017/parsers/manifest/dash/common/get_periods_time_infos.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/get_periods_time_infos.js +15 -13
- package/dist/es2017/parsers/manifest/dash/common/index.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/base.d.ts +5 -5
- package/dist/es2017/parsers/manifest/dash/common/indexes/base.js +36 -31
- package/dist/es2017/parsers/manifest/dash/common/indexes/get_init_segment.d.ts +2 -2
- package/dist/es2017/parsers/manifest/dash/common/indexes/get_init_segment.js +6 -4
- package/dist/es2017/parsers/manifest/dash/common/indexes/get_segments_from_timeline.d.ts +4 -4
- package/dist/es2017/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +10 -10
- package/dist/es2017/parsers/manifest/dash/common/indexes/list.d.ts +2 -2
- package/dist/es2017/parsers/manifest/dash/common/indexes/list.js +23 -20
- package/dist/es2017/parsers/manifest/dash/common/indexes/template.d.ts +3 -3
- package/dist/es2017/parsers/manifest/dash/common/indexes/template.js +54 -59
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.d.ts +5 -4
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +14 -11
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +25 -20
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.js +15 -10
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.d.ts +4 -3
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +43 -27
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/parse_s_element.d.ts +11 -2
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +49 -2
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +9 -8
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +77 -69
- package/dist/es2017/parsers/manifest/dash/common/indexes/tokens.js +2 -4
- package/dist/es2017/parsers/manifest/dash/common/infer_adaptation_type.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/infer_adaptation_type.js +2 -2
- package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.js +9 -10
- package/dist/es2017/parsers/manifest/dash/common/parse_adaptation_sets.d.ts +5 -5
- package/dist/es2017/parsers/manifest/dash/common/parse_adaptation_sets.js +61 -66
- package/dist/es2017/parsers/manifest/dash/common/parse_availability_start_time.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/common/parse_availability_start_time.js +5 -3
- package/dist/es2017/parsers/manifest/dash/common/parse_mpd.d.ts +6 -6
- package/dist/es2017/parsers/manifest/dash/common/parse_mpd.js +54 -42
- package/dist/es2017/parsers/manifest/dash/common/parse_periods.d.ts +5 -5
- package/dist/es2017/parsers/manifest/dash/common/parse_periods.js +33 -34
- package/dist/es2017/parsers/manifest/dash/common/parse_representation_index.d.ts +5 -5
- package/dist/es2017/parsers/manifest/dash/common/parse_representation_index.js +5 -7
- package/dist/es2017/parsers/manifest/dash/common/parse_representations.d.ts +5 -5
- package/dist/es2017/parsers/manifest/dash/common/parse_representations.js +63 -68
- package/dist/es2017/parsers/manifest/dash/common/resolve_base_urls.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/resolve_base_urls.js +5 -3
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/index.d.ts +17 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/index.js +17 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.d.ts +24 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +358 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.d.ts +24 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.js +30 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.js +45 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.d.ts +22 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.js +77 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.js +101 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.d.ts +22 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.js +45 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +179 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Period.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +137 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts +22 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +214 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.js +111 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.d.ts +22 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.js +41 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.d.ts +24 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.js +84 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.d.ts +22 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.js +33 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.d.ts +24 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.js +57 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts +176 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +310 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.d.ts +24 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.js +114 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.js +354 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/BaseURL.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/BaseURL.js +29 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/ContentComponent.d.ts +22 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/ContentProtection.d.ts +21 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/EventStream.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/EventStream.js +100 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Initialization.d.ts +21 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Initialization.js +41 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/MPD.d.ts +21 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/MPD.js +161 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Period.d.ts +21 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Period.js +118 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Representation.d.ts +21 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Representation.js +210 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/SegmentBase.d.ts +22 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/SegmentBase.js +107 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/SegmentList.d.ts +21 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/SegmentTemplate.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/SegmentTemplate.js +83 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/SegmentTimeline.d.ts +21 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/SegmentURL.d.ts +23 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/SegmentURL.js +53 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts +169 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.js +297 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/parse_from_document.d.ts +24 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/parse_from_document.js +108 -0
- package/dist/es2017/parsers/manifest/dash/node_parser_types.d.ts +5 -3
- package/dist/es2017/parsers/manifest/dash/parsers_types.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +29 -18
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +22 -26
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/BaseURL.d.ts +2 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.d.ts +3 -3
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.js +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.d.ts +3 -3
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +4 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +2 -4
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/MPD.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +5 -5
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Period.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +9 -6
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Representation.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +13 -15
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.d.ts +3 -3
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.js +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.d.ts +2 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.js +5 -10
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/SegmentList.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.d.ts +2 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.js +11 -18
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.d.ts +2 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.js +2 -4
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/XLink.d.ts +3 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/XLink.js +5 -5
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/root.d.ts +2 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/root.js +8 -4
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/parsers_stack.js +4 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/utils.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/utils.js +8 -4
- package/dist/es2017/parsers/manifest/local/parse_local_manifest.d.ts +2 -2
- package/dist/es2017/parsers/manifest/local/parse_local_manifest.js +21 -16
- package/dist/es2017/parsers/manifest/local/representation_index.d.ts +2 -2
- package/dist/es2017/parsers/manifest/local/representation_index.js +7 -7
- package/dist/es2017/parsers/manifest/metaplaylist/index.d.ts +1 -1
- package/dist/es2017/parsers/manifest/metaplaylist/metaplaylist_parser.d.ts +4 -4
- package/dist/es2017/parsers/manifest/metaplaylist/metaplaylist_parser.js +41 -43
- package/dist/es2017/parsers/manifest/metaplaylist/representation_index.d.ts +3 -3
- package/dist/es2017/parsers/manifest/metaplaylist/representation_index.js +10 -7
- package/dist/es2017/parsers/manifest/smooth/create_parser.d.ts +2 -2
- package/dist/es2017/parsers/manifest/smooth/create_parser.js +120 -121
- package/dist/es2017/parsers/manifest/smooth/get_codecs.js +3 -3
- package/dist/es2017/parsers/manifest/smooth/index.d.ts +1 -1
- package/dist/es2017/parsers/manifest/smooth/index.js +1 -1
- package/dist/es2017/parsers/manifest/smooth/parse_C_nodes.js +9 -9
- package/dist/es2017/parsers/manifest/smooth/parse_protection_node.js +12 -8
- package/dist/es2017/parsers/manifest/smooth/representation_index.d.ts +3 -3
- package/dist/es2017/parsers/manifest/smooth/representation_index.js +35 -38
- package/dist/es2017/parsers/manifest/smooth/shared_smooth_segment_timeline.d.ts +1 -1
- package/dist/es2017/parsers/manifest/smooth/shared_smooth_segment_timeline.js +8 -9
- package/dist/es2017/parsers/manifest/smooth/utils/add_segment_infos.js +10 -7
- package/dist/es2017/parsers/manifest/smooth/utils/parseBoolean.d.ts +1 -1
- package/dist/es2017/parsers/manifest/smooth/utils/parseBoolean.js +1 -1
- package/dist/es2017/parsers/manifest/smooth/utils/tokens.d.ts +1 -1
- package/dist/es2017/parsers/manifest/smooth/utils/tokens.js +2 -3
- package/dist/es2017/parsers/manifest/types.d.ts +2 -2
- package/dist/es2017/parsers/manifest/utils/check_manifest_ids.d.ts +1 -1
- package/dist/es2017/parsers/manifest/utils/check_manifest_ids.js +2 -2
- package/dist/es2017/parsers/manifest/utils/clear_timeline_from_position.d.ts +3 -2
- package/dist/es2017/parsers/manifest/utils/clear_timeline_from_position.js +11 -7
- package/dist/es2017/parsers/manifest/utils/get_first_time_from_adaptation.d.ts +1 -1
- package/dist/es2017/parsers/manifest/utils/get_first_time_from_adaptation.js +5 -4
- package/dist/es2017/parsers/manifest/utils/get_last_time_from_adaptation.d.ts +1 -1
- package/dist/es2017/parsers/manifest/utils/get_last_time_from_adaptation.js +5 -4
- package/dist/es2017/parsers/manifest/utils/get_maximum_positions.d.ts +2 -2
- package/dist/es2017/parsers/manifest/utils/get_maximum_positions.js +11 -17
- package/dist/es2017/parsers/manifest/utils/get_minimum_position.d.ts +2 -2
- package/dist/es2017/parsers/manifest/utils/get_minimum_position.js +5 -11
- package/dist/es2017/parsers/manifest/utils/index_helpers.js +4 -5
- package/dist/es2017/parsers/manifest/utils/update_segment_timeline.d.ts +1 -1
- package/dist/es2017/parsers/manifest/utils/update_segment_timeline.js +17 -16
- package/dist/es2017/parsers/texttracks/index.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/sami/html.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/sami/html.js +17 -16
- package/dist/es2017/parsers/texttracks/sami/native.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/sami/native.js +11 -17
- package/dist/es2017/parsers/texttracks/srt/html.js +12 -10
- package/dist/es2017/parsers/texttracks/srt/native.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/srt/native.js +1 -7
- package/dist/es2017/parsers/texttracks/srt/parse_cue.js +4 -9
- package/dist/es2017/parsers/texttracks/ttml/get_parameters.js +8 -13
- package/dist/es2017/parsers/texttracks/ttml/get_time_delimiters.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/ttml/get_time_delimiters.js +9 -10
- package/dist/es2017/parsers/texttracks/ttml/html/apply_default_ttml_paragraph_style.js +2 -2
- package/dist/es2017/parsers/texttracks/ttml/html/apply_extent.js +3 -7
- package/dist/es2017/parsers/texttracks/ttml/html/apply_font_size.js +4 -5
- package/dist/es2017/parsers/texttracks/ttml/html/apply_line_height.js +1 -1
- package/dist/es2017/parsers/texttracks/ttml/html/apply_origin.js +3 -7
- package/dist/es2017/parsers/texttracks/ttml/html/apply_padding.js +3 -7
- package/dist/es2017/parsers/texttracks/ttml/html/create_element.d.ts +2 -2
- package/dist/es2017/parsers/texttracks/ttml/html/create_element.js +30 -23
- package/dist/es2017/parsers/texttracks/ttml/html/generate_css_test_outline.js +2 -2
- package/dist/es2017/parsers/texttracks/ttml/html/parse_cue.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/ttml/html/parse_cue.js +5 -4
- package/dist/es2017/parsers/texttracks/ttml/html/parse_ttml_to_div.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/ttml/html/ttml_color_to_css_color.js +39 -23
- package/dist/es2017/parsers/texttracks/ttml/native/parse_cue.d.ts +2 -2
- package/dist/es2017/parsers/texttracks/ttml/native/parse_cue.js +14 -13
- package/dist/es2017/parsers/texttracks/ttml/native/parse_ttml_to_vtt.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/ttml/parse_ttml.d.ts +3 -3
- package/dist/es2017/parsers/texttracks/ttml/parse_ttml.js +22 -19
- package/dist/es2017/parsers/texttracks/ttml/resolve_styles_inheritance.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/ttml/time_parsing.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/ttml/time_parsing.js +2 -2
- package/dist/es2017/parsers/texttracks/ttml/xml_utils.js +2 -1
- package/dist/es2017/parsers/texttracks/types.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/get_cue_blocks.js +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/get_style_blocks.js +2 -1
- package/dist/es2017/parsers/texttracks/webvtt/html/convert_payload_to_html.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/html/create_default_style_elements.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/html/create_style_attribute.js +6 -12
- package/dist/es2017/parsers/texttracks/webvtt/html/create_styled_element.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/html/create_styled_element.js +8 -9
- package/dist/es2017/parsers/texttracks/webvtt/html/parse_style_block.js +4 -4
- package/dist/es2017/parsers/texttracks/webvtt/html/parse_webvtt_to_div.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/html/parse_webvtt_to_div.js +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/html/to_html.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/html/to_html.js +5 -13
- package/dist/es2017/parsers/texttracks/webvtt/native/parse_vtt_to_cues.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +4 -8
- package/dist/es2017/parsers/texttracks/webvtt/native/set_settings_on_cue.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/native/to_native_cue.d.ts +2 -2
- package/dist/es2017/parsers/texttracks/webvtt/native/to_native_cue.js +2 -2
- package/dist/es2017/parsers/texttracks/webvtt/parse_cue_block.js +7 -8
- package/dist/es2017/parsers/texttracks/webvtt/parse_timestamp.js +1 -2
- package/dist/es2017/parsers/texttracks/webvtt/utils.js +6 -6
- package/dist/es2017/playback_observer/index.d.ts +6 -0
- package/dist/es2017/playback_observer/index.js +2 -0
- package/dist/es2017/playback_observer/media_element_playback_observer.d.ts +203 -0
- package/dist/es2017/playback_observer/media_element_playback_observer.js +678 -0
- package/dist/es2017/playback_observer/types.d.ts +223 -0
- package/dist/es2017/playback_observer/types.js +1 -0
- package/dist/es2017/playback_observer/utils/generate_read_only_observer.d.ts +11 -0
- package/dist/es2017/playback_observer/utils/generate_read_only_observer.js +41 -0
- package/dist/es2017/playback_observer/utils/observation_position.d.ts +87 -0
- package/dist/es2017/playback_observer/utils/observation_position.js +84 -0
- package/dist/es2017/playback_observer/worker_playback_observer.d.ts +72 -0
- package/dist/es2017/playback_observer/worker_playback_observer.js +45 -0
- package/dist/es2017/public_types.d.ts +13 -16
- package/dist/es2017/public_types.js +0 -1
- package/dist/es2017/tools/TextTrackRenderer/text_track_renderer.d.ts +2 -2
- package/dist/es2017/tools/TextTrackRenderer/text_track_renderer.js +11 -9
- package/dist/es2017/tools/index.d.ts +1 -1
- package/dist/es2017/tools/index.js +1 -1
- package/dist/es2017/tools/parseBIFThumbnails/index.js +6 -5
- package/dist/es2017/transports/dash/add_segment_integrity_checks_to_loader.d.ts +1 -1
- package/dist/es2017/transports/dash/add_segment_integrity_checks_to_loader.js +2 -3
- package/dist/es2017/transports/dash/construct_segment_url.d.ts +2 -2
- package/dist/es2017/transports/dash/construct_segment_url.js +7 -3
- package/dist/es2017/transports/dash/get_events_out_of_emsgs.d.ts +2 -2
- package/dist/es2017/transports/dash/get_events_out_of_emsgs.js +12 -10
- package/dist/es2017/transports/dash/init_segment_loader.d.ts +3 -3
- package/dist/es2017/transports/dash/init_segment_loader.js +29 -23
- package/dist/es2017/transports/dash/low_latency_segment_loader.d.ts +2 -2
- package/dist/es2017/transports/dash/low_latency_segment_loader.js +14 -11
- package/dist/es2017/transports/dash/manifest_parser.d.ts +2 -2
- package/dist/es2017/transports/dash/manifest_parser.js +68 -32
- package/dist/es2017/transports/dash/pipelines.d.ts +1 -1
- package/dist/es2017/transports/dash/pipelines.js +15 -12
- package/dist/es2017/transports/dash/segment_loader.d.ts +4 -4
- package/dist/es2017/transports/dash/segment_loader.js +31 -23
- package/dist/es2017/transports/dash/segment_parser.d.ts +2 -2
- package/dist/es2017/transports/dash/segment_parser.js +40 -25
- package/dist/es2017/transports/dash/text_loader.d.ts +2 -2
- package/dist/es2017/transports/dash/text_loader.js +19 -20
- package/dist/es2017/transports/dash/text_parser.d.ts +2 -2
- package/dist/es2017/transports/dash/text_parser.js +44 -26
- package/dist/es2017/transports/index.d.ts +1 -1
- package/dist/es2017/transports/index.js +1 -1
- package/dist/es2017/transports/local/pipelines.d.ts +1 -1
- package/dist/es2017/transports/local/pipelines.js +14 -9
- package/dist/es2017/transports/local/segment_loader.d.ts +3 -3
- package/dist/es2017/transports/local/segment_loader.js +14 -6
- package/dist/es2017/transports/local/segment_parser.d.ts +1 -1
- package/dist/es2017/transports/local/segment_parser.js +24 -14
- package/dist/es2017/transports/local/text_parser.d.ts +1 -1
- package/dist/es2017/transports/local/text_parser.js +36 -18
- package/dist/es2017/transports/metaplaylist/manifest_loader.d.ts +4 -4
- package/dist/es2017/transports/metaplaylist/manifest_loader.js +8 -6
- package/dist/es2017/transports/metaplaylist/pipelines.d.ts +1 -1
- package/dist/es2017/transports/metaplaylist/pipelines.js +35 -24
- package/dist/es2017/transports/smooth/extract_timings_infos.d.ts +2 -2
- package/dist/es2017/transports/smooth/extract_timings_infos.js +17 -19
- package/dist/es2017/transports/smooth/is_mp4_embedded_track.d.ts +1 -1
- package/dist/es2017/transports/smooth/is_mp4_embedded_track.js +1 -1
- package/dist/es2017/transports/smooth/isobmff/create_audio_init_segment.d.ts +0 -1
- package/dist/es2017/transports/smooth/isobmff/create_audio_init_segment.js +3 -4
- package/dist/es2017/transports/smooth/isobmff/create_boxes.js +23 -32
- package/dist/es2017/transports/smooth/isobmff/create_init_segment.js +2 -2
- package/dist/es2017/transports/smooth/isobmff/create_traf_box.js +2 -2
- package/dist/es2017/transports/smooth/isobmff/get_aaces_header.js +4 -16
- package/dist/es2017/transports/smooth/isobmff/parse_tfrf.js +2 -2
- package/dist/es2017/transports/smooth/isobmff/parse_tfxd.js +1 -1
- package/dist/es2017/transports/smooth/isobmff/patch_segment.js +12 -11
- package/dist/es2017/transports/smooth/pipelines.d.ts +1 -1
- package/dist/es2017/transports/smooth/pipelines.js +84 -61
- package/dist/es2017/transports/smooth/segment_loader.d.ts +3 -3
- package/dist/es2017/transports/smooth/segment_loader.js +44 -29
- package/dist/es2017/transports/smooth/utils.d.ts +4 -4
- package/dist/es2017/transports/smooth/utils.js +10 -6
- package/dist/es2017/transports/types.d.ts +22 -27
- package/dist/es2017/transports/utils/byte_range.js +1 -2
- package/dist/es2017/transports/utils/call_custom_manifest_loader.d.ts +3 -3
- package/dist/es2017/transports/utils/call_custom_manifest_loader.js +10 -8
- package/dist/es2017/transports/utils/check_isobmff_integrity.js +4 -4
- package/dist/es2017/transports/utils/generate_manifest_loader.d.ts +3 -3
- package/dist/es2017/transports/utils/generate_manifest_loader.js +12 -6
- package/dist/es2017/transports/utils/get_isobmff_timing_infos.d.ts +2 -2
- package/dist/es2017/transports/utils/get_isobmff_timing_infos.js +12 -11
- package/dist/es2017/transports/utils/infer_segment_container.d.ts +1 -1
- package/dist/es2017/transports/utils/infer_segment_container.js +1 -3
- package/dist/es2017/transports/utils/parse_text_track.d.ts +4 -4
- package/dist/es2017/transports/utils/parse_text_track.js +6 -16
- package/dist/es2017/utils/array_includes.js +2 -6
- package/dist/es2017/utils/assert.js +3 -6
- package/dist/es2017/utils/base64.js +87 -29
- package/dist/es2017/utils/byte_parsing.js +64 -56
- package/dist/es2017/utils/cancellable_sleep.d.ts +1 -1
- package/dist/es2017/utils/create_cancellable_promise.d.ts +1 -1
- package/dist/es2017/utils/deep_merge.js +4 -4
- package/dist/es2017/utils/event_emitter.d.ts +1 -1
- package/dist/es2017/utils/event_emitter.js +1 -2
- package/dist/es2017/utils/get_fuzzed_delay.js +1 -1
- package/dist/es2017/utils/global_scope.d.ts +1 -1
- package/dist/es2017/utils/global_scope.js +10 -3
- package/dist/es2017/utils/hash_buffer.js +1 -1
- package/dist/es2017/utils/languages/normalize.js +5 -5
- package/dist/es2017/utils/logger.js +12 -22
- package/dist/es2017/utils/monotonic_timestamp.d.ts +6 -9
- package/dist/es2017/utils/monotonic_timestamp.js +13 -5
- package/dist/es2017/utils/object_assign.d.ts +6 -3
- package/dist/es2017/utils/object_assign.js +5 -7
- package/dist/es2017/utils/object_values.d.ts +1 -1
- package/dist/es2017/utils/object_values.js +4 -4
- package/dist/es2017/utils/queue_microtask.js +3 -3
- package/dist/es2017/utils/ranges.js +22 -29
- package/dist/es2017/utils/reference.d.ts +1 -1
- package/dist/es2017/utils/reference.js +1 -3
- package/dist/es2017/utils/request/fetch.d.ts +1 -1
- package/dist/es2017/utils/request/fetch.js +24 -23
- package/dist/es2017/utils/request/request_error.js +2 -2
- package/dist/es2017/utils/request/xhr.d.ts +1 -1
- package/dist/es2017/utils/request/xhr.js +19 -17
- package/dist/es2017/utils/retry_promise_with_backoff.d.ts +10 -1
- package/dist/es2017/utils/retry_promise_with_backoff.js +15 -3
- package/dist/es2017/utils/slice_uint8array.js +3 -3
- package/dist/es2017/utils/starts_with.js +3 -3
- package/dist/es2017/utils/string_parsing.js +16 -18
- package/dist/es2017/utils/sync_or_async.js +6 -2
- package/dist/es2017/utils/task_canceller.js +1 -2
- package/dist/es2017/utils/wrapInPromise.d.ts +1 -1
- package/dist/es2017/utils/xml-parser.d.ts +70 -0
- package/dist/es2017/utils/xml-parser.js +322 -0
- package/dist/es2017/worker_entry_point.js +2 -2
- package/dist/mpd-parser.wasm +0 -0
- package/dist/rx-player.js +46203 -45666
- package/dist/rx-player.min.js +1 -1
- package/dist/worker.es5.js +2 -0
- package/dist/worker.es5.js.LICENSE.txt +1 -0
- package/dist/worker.js +8 -3
- package/package.json +20 -10
- package/dist/commonjs/compat/index.d.ts +0 -36
- package/dist/commonjs/compat/index.js +0 -64
- package/dist/commonjs/core/api/debug/buffer_graph.d.ts +0 -28
- package/dist/commonjs/core/api/debug/buffer_graph.js +0 -173
- package/dist/commonjs/core/api/debug/buffer_size_graph.js +0 -132
- package/dist/commonjs/core/api/debug/modules/general_info.d.ts +0 -3
- package/dist/commonjs/core/api/debug/modules/general_info.js +0 -232
- package/dist/commonjs/core/api/debug/modules/segment_buffer_content.d.ts +0 -4
- package/dist/commonjs/core/api/debug/modules/segment_buffer_content.js +0 -125
- package/dist/commonjs/core/api/debug/modules/segment_buffer_size.d.ts +0 -3
- package/dist/commonjs/core/api/debug/modules/segment_buffer_size.js +0 -38
- package/dist/commonjs/core/api/debug/render.d.ts +0 -3
- package/dist/commonjs/core/api/index.d.ts +0 -20
- package/dist/commonjs/core/api/index.js +0 -22
- package/dist/commonjs/core/api/option_utils.d.ts +0 -124
- package/dist/commonjs/core/api/option_utils.js +0 -318
- package/dist/commonjs/core/api/playback_observer.d.ts +0 -521
- package/dist/commonjs/core/api/playback_observer.js +0 -771
- package/dist/commonjs/core/api/public_api.d.ts +0 -751
- package/dist/commonjs/core/api/public_api.js +0 -2458
- package/dist/commonjs/core/api/track_management/index.d.ts +0 -18
- package/dist/commonjs/core/api/track_management/media_element_tracks_store.d.ts +0 -197
- package/dist/commonjs/core/api/track_management/media_element_tracks_store.js +0 -688
- package/dist/commonjs/core/api/track_management/track_dispatcher.d.ts +0 -100
- package/dist/commonjs/core/api/track_management/track_dispatcher.js +0 -184
- package/dist/commonjs/core/api/track_management/tracks_store.d.ts +0 -441
- package/dist/commonjs/core/api/track_management/tracks_store.js +0 -1066
- package/dist/commonjs/core/api/utils.d.ts +0 -66
- package/dist/commonjs/core/api/utils.js +0 -175
- package/dist/commonjs/core/decrypt/__tests__/__global__/utils.d.ts +0 -178
- package/dist/commonjs/core/decrypt/__tests__/__global__/utils.js +0 -413
- package/dist/commonjs/core/decrypt/attach_media_keys.d.ts +0 -53
- package/dist/commonjs/core/decrypt/attach_media_keys.js +0 -121
- package/dist/commonjs/core/decrypt/clear_on_stop.js +0 -43
- package/dist/commonjs/core/decrypt/content_decryptor.d.ts +0 -184
- package/dist/commonjs/core/decrypt/content_decryptor.js +0 -1035
- package/dist/commonjs/core/decrypt/create_or_load_session.d.ts +0 -63
- package/dist/commonjs/core/decrypt/create_or_load_session.js +0 -127
- package/dist/commonjs/core/decrypt/create_session.d.ts +0 -53
- package/dist/commonjs/core/decrypt/create_session.js +0 -215
- package/dist/commonjs/core/decrypt/dispose_decryption_resources.js +0 -91
- package/dist/commonjs/core/decrypt/find_key_system.d.ts +0 -48
- package/dist/commonjs/core/decrypt/find_key_system.js +0 -369
- package/dist/commonjs/core/decrypt/get_media_keys.d.ts +0 -44
- package/dist/commonjs/core/decrypt/get_media_keys.js +0 -156
- package/dist/commonjs/core/decrypt/index.d.ts +0 -26
- package/dist/commonjs/core/decrypt/init_media_keys.d.ts +0 -26
- package/dist/commonjs/core/decrypt/init_media_keys.js +0 -93
- package/dist/commonjs/core/decrypt/session_events_listener.d.ts +0 -75
- package/dist/commonjs/core/decrypt/session_events_listener.js +0 -330
- package/dist/commonjs/core/decrypt/set_server_certificate.d.ts +0 -51
- package/dist/commonjs/core/decrypt/set_server_certificate.js +0 -146
- package/dist/commonjs/core/decrypt/types.d.ts +0 -374
- package/dist/commonjs/core/decrypt/utils/are_init_values_compatible.js +0 -116
- package/dist/commonjs/core/decrypt/utils/check_key_statuses.d.ts +0 -52
- package/dist/commonjs/core/decrypt/utils/check_key_statuses.js +0 -211
- package/dist/commonjs/core/decrypt/utils/clean_old_loaded_sessions.d.ts +0 -26
- package/dist/commonjs/core/decrypt/utils/clean_old_stored_persistent_info.d.ts +0 -32
- package/dist/commonjs/core/decrypt/utils/init_data_values_container.d.ts +0 -69
- package/dist/commonjs/core/decrypt/utils/init_data_values_container.js +0 -126
- package/dist/commonjs/core/decrypt/utils/is_session_usable.d.ts +0 -24
- package/dist/commonjs/core/decrypt/utils/is_session_usable.js +0 -52
- package/dist/commonjs/core/decrypt/utils/key_session_record.d.ts +0 -104
- package/dist/commonjs/core/decrypt/utils/key_session_record.js +0 -190
- package/dist/commonjs/core/decrypt/utils/loaded_sessions_store.d.ts +0 -215
- package/dist/commonjs/core/decrypt/utils/loaded_sessions_store.js +0 -515
- package/dist/commonjs/core/decrypt/utils/media_keys_infos_store.d.ts +0 -56
- package/dist/commonjs/core/decrypt/utils/media_keys_infos_store.js +0 -46
- package/dist/commonjs/core/decrypt/utils/persistent_sessions_store.d.ts +0 -94
- package/dist/commonjs/core/decrypt/utils/persistent_sessions_store.js +0 -346
- package/dist/commonjs/core/decrypt/utils/serializable_bytes.d.ts +0 -44
- package/dist/commonjs/core/decrypt/utils/serializable_bytes.js +0 -50
- package/dist/commonjs/core/decrypt/utils/server_certificate_store.d.ts +0 -64
- package/dist/commonjs/core/decrypt/utils/server_certificate_store.js +0 -114
- package/dist/commonjs/core/init/directfile_content_initializer.d.ts +0 -97
- package/dist/commonjs/core/init/directfile_content_initializer.js +0 -267
- package/dist/commonjs/core/init/media_source_content_initializer.d.ts +0 -165
- package/dist/commonjs/core/init/media_source_content_initializer.js +0 -865
- package/dist/commonjs/core/init/multithread/main_thread/multi_thread_content_initializer.d.ts +0 -167
- package/dist/commonjs/core/init/multithread/main_thread/multi_thread_content_initializer.js +0 -1393
- package/dist/commonjs/core/init/multithread/main_thread/send_message.d.ts +0 -2
- package/dist/commonjs/core/init/multithread/main_thread/send_message.js +0 -13
- package/dist/commonjs/core/init/multithread/worker/content_preparer.d.ts +0 -92
- package/dist/commonjs/core/init/multithread/worker/content_preparer.js +0 -259
- package/dist/commonjs/core/init/multithread/worker/globals.d.ts +0 -13
- package/dist/commonjs/core/init/multithread/worker/globals.js +0 -26
- package/dist/commonjs/core/init/multithread/worker/index.d.ts +0 -2
- package/dist/commonjs/core/init/multithread/worker/index.js +0 -4
- package/dist/commonjs/core/init/multithread/worker/send_message.d.ts +0 -3
- package/dist/commonjs/core/init/multithread/worker/send_message.js +0 -25
- package/dist/commonjs/core/init/multithread/worker/track_choice_setter.d.ts +0 -19
- package/dist/commonjs/core/init/multithread/worker/track_choice_setter.js +0 -140
- package/dist/commonjs/core/init/multithread/worker/worker_playback_observer.d.ts +0 -21
- package/dist/commonjs/core/init/multithread/worker/worker_playback_observer.js +0 -47
- package/dist/commonjs/core/init/multithread/worker/worker_portal.d.ts +0 -1
- package/dist/commonjs/core/init/multithread/worker/worker_portal.js +0 -727
- package/dist/commonjs/core/init/multithread/worker/worker_text_displayer_interface.d.ts +0 -64
- package/dist/commonjs/core/init/multithread/worker/worker_text_displayer_interface.js +0 -127
- package/dist/commonjs/core/init/types.d.ts +0 -226
- package/dist/commonjs/core/init/utils/DecipherabilityFreezeDetector.d.ts +0 -54
- package/dist/commonjs/core/init/utils/DecipherabilityFreezeDetector.js +0 -129
- package/dist/commonjs/core/init/utils/content_time_boundaries_observer.d.ts +0 -192
- package/dist/commonjs/core/init/utils/content_time_boundaries_observer.js +0 -518
- package/dist/commonjs/core/init/utils/create_content_time_boundaries_observer.d.ts +0 -28
- package/dist/commonjs/core/init/utils/create_content_time_boundaries_observer.js +0 -48
- package/dist/commonjs/core/init/utils/create_core_playback_observer.d.ts +0 -61
- package/dist/commonjs/core/init/utils/create_core_playback_observer.js +0 -130
- package/dist/commonjs/core/init/utils/create_media_source.d.ts +0 -37
- package/dist/commonjs/core/init/utils/create_media_source.js +0 -108
- package/dist/commonjs/core/init/utils/end_of_stream.d.ts +0 -33
- package/dist/commonjs/core/init/utils/end_of_stream.js +0 -115
- package/dist/commonjs/core/init/utils/get_initial_time.d.ts +0 -76
- package/dist/commonjs/core/init/utils/get_initial_time.js +0 -116
- package/dist/commonjs/core/init/utils/get_loaded_reference.d.ts +0 -28
- package/dist/commonjs/core/init/utils/get_loaded_reference.js +0 -61
- package/dist/commonjs/core/init/utils/initial_seek_and_play.d.ts +0 -61
- package/dist/commonjs/core/init/utils/initial_seek_and_play.js +0 -210
- package/dist/commonjs/core/init/utils/initialize_content_decryption.d.ts +0 -86
- package/dist/commonjs/core/init/utils/initialize_content_decryption.js +0 -113
- package/dist/commonjs/core/init/utils/main_thread_text_displayer_interface.d.ts +0 -35
- package/dist/commonjs/core/init/utils/media_source_duration_updater.js +0 -270
- package/dist/commonjs/core/init/utils/rebuffering_controller.d.ts +0 -114
- package/dist/commonjs/core/init/utils/rebuffering_controller.js +0 -445
- package/dist/commonjs/core/init/utils/stream_events_emitter/are_same_stream_events.js +0 -37
- package/dist/commonjs/core/init/utils/stream_events_emitter/index.d.ts +0 -18
- package/dist/commonjs/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts +0 -25
- package/dist/commonjs/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +0 -91
- package/dist/commonjs/core/init/utils/stream_events_emitter/stream_events_emitter.d.ts +0 -53
- package/dist/commonjs/core/init/utils/stream_events_emitter/stream_events_emitter.js +0 -234
- package/dist/commonjs/core/init/utils/stream_events_emitter/types.d.ts +0 -41
- package/dist/commonjs/core/init/utils/throw_on_media_error.d.ts +0 -23
- package/dist/commonjs/core/init/utils/throw_on_media_error.js +0 -61
- package/dist/commonjs/core/segment_buffers/garbage_collector.d.ts +0 -43
- package/dist/commonjs/core/segment_buffers/garbage_collector.js +0 -220
- package/dist/commonjs/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.d.ts +0 -134
- package/dist/commonjs/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.js +0 -350
- package/dist/commonjs/core/segment_buffers/implementations/audio_video/index.d.ts +0 -17
- package/dist/commonjs/core/segment_buffers/implementations/index.d.ts +0 -19
- package/dist/commonjs/core/segment_buffers/implementations/index.js +0 -35
- package/dist/commonjs/core/segment_buffers/implementations/text/index.d.ts +0 -3
- package/dist/commonjs/core/segment_buffers/implementations/text/text_segment_buffer.d.ts +0 -89
- package/dist/commonjs/core/segment_buffers/implementations/text/text_segment_buffer.js +0 -253
- package/dist/commonjs/core/segment_buffers/implementations/types.d.ts +0 -309
- package/dist/commonjs/core/segment_buffers/implementations/types.js +0 -117
- package/dist/commonjs/core/segment_buffers/index.d.ts +0 -21
- package/dist/commonjs/core/segment_buffers/index.js +0 -28
- package/dist/commonjs/core/segment_buffers/inventory/buffered_history.d.ts +0 -89
- package/dist/commonjs/core/segment_buffers/inventory/index.d.ts +0 -21
- package/dist/commonjs/core/segment_buffers/inventory/segment_inventory.d.ts +0 -238
- package/dist/commonjs/core/segment_buffers/inventory/segment_inventory.js +0 -906
- package/dist/commonjs/core/segment_buffers/inventory/types.d.ts +0 -27
- package/dist/commonjs/core/segment_buffers/inventory/utils.d.ts +0 -33
- package/dist/commonjs/core/segment_buffers/inventory/utils.js +0 -54
- package/dist/commonjs/core/segment_buffers/segment_buffers_store.d.ts +0 -171
- package/dist/commonjs/core/segment_buffers/segment_buffers_store.js +0 -292
- package/dist/commonjs/manifest/adaptation.d.ts +0 -135
- package/dist/commonjs/manifest/adaptation.js +0 -242
- package/dist/commonjs/manifest/manifest.d.ts +0 -388
- package/dist/commonjs/manifest/manifest.js +0 -496
- package/dist/commonjs/manifest/period.d.ts +0 -106
- package/dist/commonjs/manifest/period.js +0 -236
- package/dist/commonjs/manifest/representation.d.ts +0 -238
- package/dist/commonjs/manifest/representation.js +0 -376
- package/dist/commonjs/manifest/representation_index/index.d.ts +0 -18
- package/dist/commonjs/manifest/representation_index/static.d.ts +0 -101
- package/dist/commonjs/manifest/representation_index/static.js +0 -143
- package/dist/commonjs/manifest/representation_index/types.d.ts +0 -420
- package/dist/commonjs/manifest/update_period_in_place.d.ts +0 -52
- package/dist/commonjs/manifest/update_period_in_place.js +0 -172
- package/dist/commonjs/manifest/update_periods.d.ts +0 -50
- package/dist/commonjs/manifest/update_periods.js +0 -228
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.d.ts +0 -23
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.js +0 -331
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/BaseURL.d.ts +0 -23
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/BaseURL.js +0 -33
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/ContentComponent.d.ts +0 -22
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/ContentProtection.d.ts +0 -21
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/EventStream.d.ts +0 -23
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/EventStream.js +0 -113
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/Initialization.d.ts +0 -21
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/Initialization.js +0 -42
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/MPD.d.ts +0 -21
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/MPD.js +0 -164
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/Period.d.ts +0 -21
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/Period.js +0 -132
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/Representation.d.ts +0 -21
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/Representation.js +0 -209
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.d.ts +0 -22
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.js +0 -108
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/SegmentList.d.ts +0 -21
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.d.ts +0 -23
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.js +0 -92
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/SegmentTimeline.d.ts +0 -21
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.d.ts +0 -23
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.js +0 -52
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/utils.d.ts +0 -187
- package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/utils.js +0 -354
- package/dist/commonjs/parsers/manifest/dash/js-parser/parse_from_document.d.ts +0 -24
- package/dist/commonjs/parsers/manifest/dash/js-parser/parse_from_document.js +0 -131
- package/dist/commonjs/text_displayer/html/html_parsers.js +0 -25
- package/dist/commonjs/text_displayer/html/html_text_displayer.d.ts +0 -100
- package/dist/commonjs/text_displayer/html/html_text_displayer.js +0 -317
- package/dist/commonjs/text_displayer/html/text_track_cues_store.d.ts +0 -65
- package/dist/commonjs/text_displayer/html/text_track_cues_store.js +0 -378
- package/dist/commonjs/text_displayer/html/update_proportional_elements.js +0 -65
- package/dist/commonjs/text_displayer/html/utils.js +0 -115
- package/dist/commonjs/text_displayer/index.d.ts +0 -2
- package/dist/commonjs/text_displayer/manual_time_ranges.js +0 -52
- package/dist/commonjs/text_displayer/native/native_parsers.d.ts +0 -11
- package/dist/commonjs/text_displayer/native/native_parsers.js +0 -25
- package/dist/commonjs/text_displayer/native/native_text_displayer.d.ts +0 -56
- package/dist/commonjs/text_displayer/native/native_text_displayer.js +0 -207
- package/dist/commonjs/text_displayer/types.d.ts +0 -74
- package/dist/commonjs/transports/dash/extract_complete_chunks.js +0 -91
- package/dist/commonjs/transports/utils/find_complete_box.js +0 -56
- package/dist/es2017/compat/index.d.ts +0 -36
- package/dist/es2017/compat/index.js +0 -42
- package/dist/es2017/core/api/debug/buffer_graph.d.ts +0 -28
- package/dist/es2017/core/api/debug/buffer_graph.js +0 -169
- package/dist/es2017/core/api/debug/buffer_size_graph.js +0 -103
- package/dist/es2017/core/api/debug/modules/general_info.d.ts +0 -3
- package/dist/es2017/core/api/debug/modules/general_info.js +0 -188
- package/dist/es2017/core/api/debug/modules/segment_buffer_content.d.ts +0 -4
- package/dist/es2017/core/api/debug/modules/segment_buffer_content.js +0 -122
- package/dist/es2017/core/api/debug/modules/segment_buffer_size.d.ts +0 -3
- package/dist/es2017/core/api/debug/modules/segment_buffer_size.js +0 -35
- package/dist/es2017/core/api/debug/render.d.ts +0 -3
- package/dist/es2017/core/api/debug/render.js +0 -32
- package/dist/es2017/core/api/debug/utils.js +0 -54
- package/dist/es2017/core/api/index.d.ts +0 -20
- package/dist/es2017/core/api/index.js +0 -19
- package/dist/es2017/core/api/option_utils.d.ts +0 -124
- package/dist/es2017/core/api/option_utils.js +0 -315
- package/dist/es2017/core/api/playback_observer.d.ts +0 -521
- package/dist/es2017/core/api/playback_observer.js +0 -770
- package/dist/es2017/core/api/public_api.d.ts +0 -751
- package/dist/es2017/core/api/public_api.js +0 -2346
- package/dist/es2017/core/api/track_management/index.d.ts +0 -18
- package/dist/es2017/core/api/track_management/media_element_tracks_store.d.ts +0 -197
- package/dist/es2017/core/api/track_management/media_element_tracks_store.js +0 -669
- package/dist/es2017/core/api/track_management/track_dispatcher.d.ts +0 -100
- package/dist/es2017/core/api/track_management/track_dispatcher.js +0 -166
- package/dist/es2017/core/api/track_management/tracks_store.d.ts +0 -441
- package/dist/es2017/core/api/track_management/tracks_store.js +0 -981
- package/dist/es2017/core/api/utils.d.ts +0 -66
- package/dist/es2017/core/api/utils.js +0 -167
- package/dist/es2017/core/decrypt/__tests__/__global__/utils.d.ts +0 -178
- package/dist/es2017/core/decrypt/__tests__/__global__/utils.js +0 -363
- package/dist/es2017/core/decrypt/attach_media_keys.d.ts +0 -53
- package/dist/es2017/core/decrypt/attach_media_keys.js +0 -72
- package/dist/es2017/core/decrypt/clear_on_stop.js +0 -40
- package/dist/es2017/core/decrypt/content_decryptor.d.ts +0 -184
- package/dist/es2017/core/decrypt/content_decryptor.js +0 -792
- package/dist/es2017/core/decrypt/create_or_load_session.d.ts +0 -63
- package/dist/es2017/core/decrypt/create_or_load_session.js +0 -75
- package/dist/es2017/core/decrypt/create_session.d.ts +0 -53
- package/dist/es2017/core/decrypt/create_session.js +0 -150
- package/dist/es2017/core/decrypt/dispose_decryption_resources.js +0 -42
- package/dist/es2017/core/decrypt/find_key_system.d.ts +0 -48
- package/dist/es2017/core/decrypt/find_key_system.js +0 -281
- package/dist/es2017/core/decrypt/get_media_keys.d.ts +0 -44
- package/dist/es2017/core/decrypt/get_media_keys.js +0 -100
- package/dist/es2017/core/decrypt/index.d.ts +0 -26
- package/dist/es2017/core/decrypt/index.js +0 -26
- package/dist/es2017/core/decrypt/init_media_keys.d.ts +0 -26
- package/dist/es2017/core/decrypt/init_media_keys.js +0 -47
- package/dist/es2017/core/decrypt/session_events_listener.d.ts +0 -75
- package/dist/es2017/core/decrypt/session_events_listener.js +0 -249
- package/dist/es2017/core/decrypt/set_server_certificate.d.ts +0 -51
- package/dist/es2017/core/decrypt/set_server_certificate.js +0 -83
- package/dist/es2017/core/decrypt/types.d.ts +0 -374
- package/dist/es2017/core/decrypt/utils/are_init_values_compatible.js +0 -113
- package/dist/es2017/core/decrypt/utils/check_key_statuses.d.ts +0 -52
- package/dist/es2017/core/decrypt/utils/check_key_statuses.js +0 -165
- package/dist/es2017/core/decrypt/utils/clean_old_loaded_sessions.d.ts +0 -26
- package/dist/es2017/core/decrypt/utils/clean_old_stored_persistent_info.d.ts +0 -32
- package/dist/es2017/core/decrypt/utils/init_data_values_container.d.ts +0 -69
- package/dist/es2017/core/decrypt/utils/init_data_values_container.js +0 -96
- package/dist/es2017/core/decrypt/utils/is_session_usable.d.ts +0 -24
- package/dist/es2017/core/decrypt/utils/is_session_usable.js +0 -49
- package/dist/es2017/core/decrypt/utils/key_id_comparison.js +0 -48
- package/dist/es2017/core/decrypt/utils/key_session_record.d.ts +0 -104
- package/dist/es2017/core/decrypt/utils/key_session_record.js +0 -153
- package/dist/es2017/core/decrypt/utils/loaded_sessions_store.d.ts +0 -215
- package/dist/es2017/core/decrypt/utils/loaded_sessions_store.js +0 -365
- package/dist/es2017/core/decrypt/utils/media_keys_infos_store.d.ts +0 -56
- package/dist/es2017/core/decrypt/utils/media_keys_infos_store.js +0 -44
- package/dist/es2017/core/decrypt/utils/persistent_sessions_store.d.ts +0 -94
- package/dist/es2017/core/decrypt/utils/persistent_sessions_store.js +0 -321
- package/dist/es2017/core/decrypt/utils/serializable_bytes.d.ts +0 -44
- package/dist/es2017/core/decrypt/utils/serializable_bytes.js +0 -46
- package/dist/es2017/core/decrypt/utils/server_certificate_store.d.ts +0 -64
- package/dist/es2017/core/decrypt/utils/server_certificate_store.js +0 -112
- package/dist/es2017/core/init/directfile_content_initializer.d.ts +0 -97
- package/dist/es2017/core/init/directfile_content_initializer.js +0 -238
- package/dist/es2017/core/init/media_source_content_initializer.d.ts +0 -165
- package/dist/es2017/core/init/media_source_content_initializer.js +0 -685
- package/dist/es2017/core/init/multithread/main_thread/multi_thread_content_initializer.d.ts +0 -167
- package/dist/es2017/core/init/multithread/main_thread/multi_thread_content_initializer.js +0 -1317
- package/dist/es2017/core/init/multithread/main_thread/send_message.d.ts +0 -2
- package/dist/es2017/core/init/multithread/main_thread/send_message.js +0 -10
- package/dist/es2017/core/init/multithread/worker/content_preparer.d.ts +0 -92
- package/dist/es2017/core/init/multithread/worker/content_preparer.js +0 -236
- package/dist/es2017/core/init/multithread/worker/globals.d.ts +0 -13
- package/dist/es2017/core/init/multithread/worker/globals.js +0 -18
- package/dist/es2017/core/init/multithread/worker/index.d.ts +0 -2
- package/dist/es2017/core/init/multithread/worker/index.js +0 -2
- package/dist/es2017/core/init/multithread/worker/send_message.d.ts +0 -3
- package/dist/es2017/core/init/multithread/worker/send_message.js +0 -20
- package/dist/es2017/core/init/multithread/worker/track_choice_setter.d.ts +0 -19
- package/dist/es2017/core/init/multithread/worker/track_choice_setter.js +0 -114
- package/dist/es2017/core/init/multithread/worker/worker_playback_observer.d.ts +0 -21
- package/dist/es2017/core/init/multithread/worker/worker_playback_observer.js +0 -43
- package/dist/es2017/core/init/multithread/worker/worker_portal.d.ts +0 -1
- package/dist/es2017/core/init/multithread/worker/worker_portal.js +0 -671
- package/dist/es2017/core/init/multithread/worker/worker_text_displayer_interface.d.ts +0 -64
- package/dist/es2017/core/init/multithread/worker/worker_text_displayer_interface.js +0 -121
- package/dist/es2017/core/init/types.d.ts +0 -226
- package/dist/es2017/core/init/utils/DecipherabilityFreezeDetector.d.ts +0 -54
- package/dist/es2017/core/init/utils/DecipherabilityFreezeDetector.js +0 -93
- package/dist/es2017/core/init/utils/content_time_boundaries_observer.d.ts +0 -192
- package/dist/es2017/core/init/utils/content_time_boundaries_observer.js +0 -468
- package/dist/es2017/core/init/utils/create_content_time_boundaries_observer.d.ts +0 -28
- package/dist/es2017/core/init/utils/create_content_time_boundaries_observer.js +0 -41
- package/dist/es2017/core/init/utils/create_core_playback_observer.d.ts +0 -61
- package/dist/es2017/core/init/utils/create_core_playback_observer.js +0 -122
- package/dist/es2017/core/init/utils/create_media_source.d.ts +0 -37
- package/dist/es2017/core/init/utils/create_media_source.js +0 -103
- package/dist/es2017/core/init/utils/end_of_stream.d.ts +0 -33
- package/dist/es2017/core/init/utils/end_of_stream.js +0 -88
- package/dist/es2017/core/init/utils/get_initial_time.d.ts +0 -76
- package/dist/es2017/core/init/utils/get_initial_time.js +0 -113
- package/dist/es2017/core/init/utils/get_loaded_reference.d.ts +0 -28
- package/dist/es2017/core/init/utils/get_loaded_reference.js +0 -58
- package/dist/es2017/core/init/utils/initial_seek_and_play.d.ts +0 -61
- package/dist/es2017/core/init/utils/initial_seek_and_play.js +0 -206
- package/dist/es2017/core/init/utils/initialize_content_decryption.d.ts +0 -86
- package/dist/es2017/core/init/utils/initialize_content_decryption.js +0 -110
- package/dist/es2017/core/init/utils/main_thread_text_displayer_interface.d.ts +0 -35
- package/dist/es2017/core/init/utils/media_source_duration_updater.js +0 -263
- package/dist/es2017/core/init/utils/rebuffering_controller.d.ts +0 -114
- package/dist/es2017/core/init/utils/rebuffering_controller.js +0 -421
- package/dist/es2017/core/init/utils/stream_events_emitter/are_same_stream_events.js +0 -35
- package/dist/es2017/core/init/utils/stream_events_emitter/index.d.ts +0 -18
- package/dist/es2017/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts +0 -25
- package/dist/es2017/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +0 -85
- package/dist/es2017/core/init/utils/stream_events_emitter/stream_events_emitter.d.ts +0 -53
- package/dist/es2017/core/init/utils/stream_events_emitter/stream_events_emitter.js +0 -180
- package/dist/es2017/core/init/utils/stream_events_emitter/types.d.ts +0 -41
- package/dist/es2017/core/init/utils/throw_on_media_error.d.ts +0 -23
- package/dist/es2017/core/init/utils/throw_on_media_error.js +0 -58
- package/dist/es2017/core/segment_buffers/garbage_collector.d.ts +0 -43
- package/dist/es2017/core/segment_buffers/garbage_collector.js +0 -137
- package/dist/es2017/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.d.ts +0 -134
- package/dist/es2017/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.js +0 -259
- package/dist/es2017/core/segment_buffers/implementations/audio_video/index.d.ts +0 -17
- package/dist/es2017/core/segment_buffers/implementations/audio_video/index.js +0 -17
- package/dist/es2017/core/segment_buffers/implementations/index.d.ts +0 -19
- package/dist/es2017/core/segment_buffers/implementations/index.js +0 -18
- package/dist/es2017/core/segment_buffers/implementations/text/index.d.ts +0 -3
- package/dist/es2017/core/segment_buffers/implementations/text/index.js +0 -2
- package/dist/es2017/core/segment_buffers/implementations/text/text_segment_buffer.d.ts +0 -89
- package/dist/es2017/core/segment_buffers/implementations/text/text_segment_buffer.js +0 -152
- package/dist/es2017/core/segment_buffers/implementations/types.d.ts +0 -309
- package/dist/es2017/core/segment_buffers/implementations/types.js +0 -112
- package/dist/es2017/core/segment_buffers/implementations/utils/manual_time_ranges.js +0 -63
- package/dist/es2017/core/segment_buffers/index.d.ts +0 -21
- package/dist/es2017/core/segment_buffers/index.js +0 -21
- package/dist/es2017/core/segment_buffers/inventory/buffered_history.d.ts +0 -89
- package/dist/es2017/core/segment_buffers/inventory/buffered_history.js +0 -90
- package/dist/es2017/core/segment_buffers/inventory/index.d.ts +0 -21
- package/dist/es2017/core/segment_buffers/inventory/index.js +0 -18
- package/dist/es2017/core/segment_buffers/inventory/segment_inventory.d.ts +0 -238
- package/dist/es2017/core/segment_buffers/inventory/segment_inventory.js +0 -863
- package/dist/es2017/core/segment_buffers/inventory/types.d.ts +0 -27
- package/dist/es2017/core/segment_buffers/inventory/utils.d.ts +0 -33
- package/dist/es2017/core/segment_buffers/inventory/utils.js +0 -49
- package/dist/es2017/core/segment_buffers/segment_buffers_store.d.ts +0 -171
- package/dist/es2017/core/segment_buffers/segment_buffers_store.js +0 -281
- package/dist/es2017/manifest/adaptation.d.ts +0 -135
- package/dist/es2017/manifest/adaptation.js +0 -195
- package/dist/es2017/manifest/manifest.d.ts +0 -388
- package/dist/es2017/manifest/manifest.js +0 -383
- package/dist/es2017/manifest/period.d.ts +0 -106
- package/dist/es2017/manifest/period.js +0 -194
- package/dist/es2017/manifest/representation.d.ts +0 -238
- package/dist/es2017/manifest/representation.js +0 -344
- package/dist/es2017/manifest/representation_index/index.d.ts +0 -18
- package/dist/es2017/manifest/representation_index/static.d.ts +0 -101
- package/dist/es2017/manifest/representation_index/static.js +0 -139
- package/dist/es2017/manifest/representation_index/types.d.ts +0 -420
- package/dist/es2017/manifest/update_period_in_place.d.ts +0 -52
- package/dist/es2017/manifest/update_period_in_place.js +0 -110
- package/dist/es2017/manifest/update_periods.d.ts +0 -50
- package/dist/es2017/manifest/update_periods.js +0 -192
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.d.ts +0 -23
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.js +0 -311
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/BaseURL.d.ts +0 -23
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/BaseURL.js +0 -30
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/ContentComponent.d.ts +0 -22
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/ContentProtection.d.ts +0 -21
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/EventStream.d.ts +0 -23
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/EventStream.js +0 -94
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/Initialization.d.ts +0 -21
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/Initialization.js +0 -39
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/MPD.d.ts +0 -21
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/MPD.js +0 -144
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/Period.d.ts +0 -21
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/Period.js +0 -112
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/Representation.d.ts +0 -21
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/Representation.js +0 -189
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.d.ts +0 -22
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.js +0 -89
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/SegmentList.d.ts +0 -21
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.d.ts +0 -23
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.js +0 -73
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/SegmentTimeline.d.ts +0 -21
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.d.ts +0 -23
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.js +0 -49
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/utils.d.ts +0 -187
- package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/utils.js +0 -306
- package/dist/es2017/parsers/manifest/dash/js-parser/parse_from_document.d.ts +0 -24
- package/dist/es2017/parsers/manifest/dash/js-parser/parse_from_document.js +0 -106
- package/dist/es2017/text_displayer/html/html_parsers.js +0 -22
- package/dist/es2017/text_displayer/html/html_text_displayer.d.ts +0 -100
- package/dist/es2017/text_displayer/html/html_text_displayer.js +0 -311
- package/dist/es2017/text_displayer/html/text_track_cues_store.d.ts +0 -65
- package/dist/es2017/text_displayer/html/text_track_cues_store.js +0 -358
- package/dist/es2017/text_displayer/html/update_proportional_elements.js +0 -62
- package/dist/es2017/text_displayer/html/utils.js +0 -107
- package/dist/es2017/text_displayer/index.d.ts +0 -2
- package/dist/es2017/text_displayer/manual_time_ranges.js +0 -48
- package/dist/es2017/text_displayer/native/native_parsers.d.ts +0 -11
- package/dist/es2017/text_displayer/native/native_parsers.js +0 -22
- package/dist/es2017/text_displayer/native/native_text_displayer.d.ts +0 -56
- package/dist/es2017/text_displayer/native/native_text_displayer.js +0 -203
- package/dist/es2017/text_displayer/types.d.ts +0 -74
- package/dist/es2017/transports/dash/extract_complete_chunks.js +0 -63
- package/dist/es2017/transports/utils/find_complete_box.js +0 -53
- /package/dist/commonjs/core/{segment_buffers → segment_sinks}/implementations/audio_video/index.js +0 -0
- /package/dist/commonjs/core/{segment_buffers → segment_sinks}/implementations/text/index.js +0 -0
- /package/dist/commonjs/core/{segment_buffers → segment_sinks}/implementations/utils/manual_time_ranges.d.ts +0 -0
- /package/dist/commonjs/core/{segment_buffers → segment_sinks}/implementations/utils/manual_time_ranges.js +0 -0
- /package/dist/commonjs/core/{segment_buffers → segment_sinks}/inventory/buffered_history.js +0 -0
- /package/dist/commonjs/core/{segment_buffers → segment_sinks}/inventory/index.js +0 -0
- /package/dist/commonjs/core/{init/utils/stream_events_emitter → segment_sinks/inventory}/types.js +0 -0
- /package/dist/commonjs/{text_displayer → core}/types.js +0 -0
- /package/dist/commonjs/{core → main_thread}/api/debug/buffer_size_graph.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/api/debug/constants.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/api/debug/constants.js +0 -0
- /package/dist/commonjs/{core → main_thread}/api/debug/index.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/api/debug/index.js +0 -0
- /package/dist/commonjs/{core → main_thread}/api/debug/render.js +0 -0
- /package/dist/commonjs/{core → main_thread}/api/debug/utils.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/api/debug/utils.js +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/clear_on_stop.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/dispose_decryption_resources.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/get_key_system_configuration.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/get_key_system_configuration.js +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/index.js +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/types.js +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/utils/are_init_values_compatible.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/utils/clean_old_loaded_sessions.js +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/utils/clean_old_stored_persistent_info.js +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/utils/get_drm_system_id.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/utils/get_drm_system_id.js +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/utils/key_id_comparison.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/decrypt/utils/key_id_comparison.js +0 -0
- /package/dist/commonjs/{core → main_thread}/init/index.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/init/index.js +0 -0
- /package/dist/commonjs/{core → main_thread}/init/types.js +0 -0
- /package/dist/commonjs/{core → main_thread}/init/utils/main_thread_text_displayer_interface.js +0 -0
- /package/dist/commonjs/{core → main_thread}/init/utils/stream_events_emitter/are_same_stream_events.d.ts +0 -0
- /package/dist/commonjs/{core → main_thread}/init/utils/stream_events_emitter/index.js +0 -0
- /package/dist/commonjs/{core/segment_buffers/inventory → main_thread/init/utils/stream_events_emitter}/types.js +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/html/html_parsers.d.ts +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/html/index.d.ts +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/html/index.js +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/html/update_proportional_elements.d.ts +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/html/utils.d.ts +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/index.js +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/manual_time_ranges.d.ts +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/native/index.d.ts +0 -0
- /package/dist/commonjs/{text_displayer → main_thread/text_displayer}/native/index.js +0 -0
- /package/dist/commonjs/{core/api/track_management → main_thread/tracks_store}/index.js +0 -0
- /package/dist/commonjs/manifest/{representation_index → classes/representation_index}/index.js +0 -0
- /package/dist/commonjs/manifest/{representation_index → classes/representation_index}/types.js +0 -0
- /package/dist/commonjs/{core/init → mse}/utils/media_source_duration_updater.d.ts +0 -0
- /package/dist/commonjs/{transports/dash → parsers/containers/isobmff}/extract_complete_chunks.d.ts +0 -0
- /package/dist/commonjs/{transports/utils → parsers/containers/isobmff}/find_complete_box.d.ts +0 -0
- /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/index.d.ts +0 -0
- /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/index.js +0 -0
- /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentComponent.js +0 -0
- /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentProtection.js +0 -0
- /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentList.js +0 -0
- /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTimeline.js +0 -0
- /package/dist/es2017/core/{segment_buffers → segment_sinks}/implementations/utils/manual_time_ranges.d.ts +0 -0
- /package/dist/es2017/core/{init/utils/stream_events_emitter → segment_sinks/inventory}/types.js +0 -0
- /package/dist/es2017/{text_displayer → core}/types.js +0 -0
- /package/dist/es2017/{core → main_thread}/api/debug/buffer_size_graph.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/api/debug/constants.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/api/debug/constants.js +0 -0
- /package/dist/es2017/{core → main_thread}/api/debug/index.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/api/debug/index.js +0 -0
- /package/dist/es2017/{core → main_thread}/api/debug/utils.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/clear_on_stop.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/dispose_decryption_resources.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/get_key_system_configuration.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/get_key_system_configuration.js +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/types.js +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/utils/are_init_values_compatible.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/utils/clean_old_loaded_sessions.js +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/utils/clean_old_stored_persistent_info.js +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/utils/get_drm_system_id.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/utils/get_drm_system_id.js +0 -0
- /package/dist/es2017/{core → main_thread}/decrypt/utils/key_id_comparison.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/init/index.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/init/index.js +0 -0
- /package/dist/es2017/{core → main_thread}/init/types.js +0 -0
- /package/dist/es2017/{core → main_thread}/init/utils/main_thread_text_displayer_interface.js +0 -0
- /package/dist/es2017/{core → main_thread}/init/utils/stream_events_emitter/are_same_stream_events.d.ts +0 -0
- /package/dist/es2017/{core → main_thread}/init/utils/stream_events_emitter/index.js +0 -0
- /package/dist/es2017/{core/segment_buffers/inventory → main_thread/init/utils/stream_events_emitter}/types.js +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/html/html_parsers.d.ts +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/html/index.d.ts +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/html/index.js +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/html/update_proportional_elements.d.ts +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/html/utils.d.ts +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/index.js +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/manual_time_ranges.d.ts +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/native/index.d.ts +0 -0
- /package/dist/es2017/{text_displayer → main_thread/text_displayer}/native/index.js +0 -0
- /package/dist/es2017/{core/api/track_management → main_thread/tracks_store}/index.js +0 -0
- /package/dist/es2017/manifest/{representation_index → classes/representation_index}/index.js +0 -0
- /package/dist/es2017/manifest/{representation_index → classes/representation_index}/types.js +0 -0
- /package/dist/es2017/{core/init → mse}/utils/media_source_duration_updater.d.ts +0 -0
- /package/dist/es2017/{transports/dash → parsers/containers/isobmff}/extract_complete_chunks.d.ts +0 -0
- /package/dist/es2017/{transports/utils → parsers/containers/isobmff}/find_complete_box.d.ts +0 -0
- /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/index.d.ts +0 -0
- /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/index.js +0 -0
- /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentComponent.js +0 -0
- /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentProtection.js +0 -0
- /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentList.js +0 -0
- /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTimeline.js +0 -0
|
@@ -0,0 +1,1394 @@
|
|
|
1
|
+
import isCodecSupported from "../../compat/is_codec_supported";
|
|
2
|
+
import mayMediaElementFailOnUndecipherableData from "../../compat/may_media_element_fail_on_undecipherable_data";
|
|
3
|
+
import shouldReloadMediaSourceOnDecipherabilityUpdate from "../../compat/should_reload_media_source_on_decipherability_update";
|
|
4
|
+
import { EncryptedMediaError, MediaError, NetworkError, OtherError, SourceBufferError, } from "../../errors";
|
|
5
|
+
import features from "../../features";
|
|
6
|
+
import log from "../../log";
|
|
7
|
+
import { replicateUpdatesOnManifestMetadata, updateDecipherabilityFromKeyIds, updateDecipherabilityFromProtectionData, } from "../../manifest";
|
|
8
|
+
import MainMediaSourceInterface from "../../mse/main_media_source_interface";
|
|
9
|
+
import arrayFind from "../../utils/array_find";
|
|
10
|
+
import assert, { assertUnreachable } from "../../utils/assert";
|
|
11
|
+
import idGenerator from "../../utils/id_generator";
|
|
12
|
+
import isNullOrUndefined from "../../utils/is_null_or_undefined";
|
|
13
|
+
import objectAssign from "../../utils/object_assign";
|
|
14
|
+
import SharedReference from "../../utils/reference";
|
|
15
|
+
import { RequestError } from "../../utils/request";
|
|
16
|
+
import TaskCanceller, { CancellationError } from "../../utils/task_canceller";
|
|
17
|
+
import { ContentDecryptorState, getKeySystemConfiguration } from "../decrypt";
|
|
18
|
+
import sendMessage from "./send_message";
|
|
19
|
+
import { ContentInitializer } from "./types";
|
|
20
|
+
import createCorePlaybackObserver from "./utils/create_core_playback_observer";
|
|
21
|
+
import { resetMediaElement } from "./utils/create_media_source";
|
|
22
|
+
import getInitialTime from "./utils/get_initial_time";
|
|
23
|
+
import getLoadedReference from "./utils/get_loaded_reference";
|
|
24
|
+
import performInitialSeekAndPlay from "./utils/initial_seek_and_play";
|
|
25
|
+
import RebufferingController from "./utils/rebuffering_controller";
|
|
26
|
+
import StreamEventsEmitter from "./utils/stream_events_emitter/stream_events_emitter";
|
|
27
|
+
import listenToMediaError from "./utils/throw_on_media_error";
|
|
28
|
+
const generateContentId = idGenerator();
|
|
29
|
+
/**
|
|
30
|
+
* @class MultiThreadContentInitializer
|
|
31
|
+
*/
|
|
32
|
+
export default class MultiThreadContentInitializer extends ContentInitializer {
|
|
33
|
+
/**
|
|
34
|
+
* Create a new `MultiThreadContentInitializer`, associated to the given
|
|
35
|
+
* settings.
|
|
36
|
+
* @param {Object} settings
|
|
37
|
+
*/
|
|
38
|
+
constructor(settings) {
|
|
39
|
+
super();
|
|
40
|
+
this._settings = settings;
|
|
41
|
+
this._initCanceller = new TaskCanceller();
|
|
42
|
+
this._currentMediaSourceCanceller = new TaskCanceller();
|
|
43
|
+
this._currentMediaSourceCanceller.linkToSignal(this._initCanceller.signal);
|
|
44
|
+
this._currentContentInfo = null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Perform non-destructive preparation steps, to prepare a future content.
|
|
48
|
+
*/
|
|
49
|
+
prepare() {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
if (this._currentContentInfo !== null || this._initCanceller.isUsed()) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const contentId = generateContentId();
|
|
55
|
+
const { adaptiveOptions, transportOptions, worker } = this._settings;
|
|
56
|
+
const { wantedBufferAhead, maxVideoBufferSize, maxBufferAhead, maxBufferBehind } = this._settings.bufferOptions;
|
|
57
|
+
const initialVideoBitrate = adaptiveOptions.initialBitrates.video;
|
|
58
|
+
const initialAudioBitrate = adaptiveOptions.initialBitrates.audio;
|
|
59
|
+
this._currentContentInfo = {
|
|
60
|
+
contentId,
|
|
61
|
+
manifest: null,
|
|
62
|
+
mainThreadMediaSource: null,
|
|
63
|
+
rebufferingController: null,
|
|
64
|
+
streamEventsEmitter: null,
|
|
65
|
+
initialTime: undefined,
|
|
66
|
+
autoPlay: undefined,
|
|
67
|
+
initialPlayPerformed: null,
|
|
68
|
+
};
|
|
69
|
+
sendMessage(worker, {
|
|
70
|
+
type: "prepare" /* MainThreadMessageType.PrepareContent */,
|
|
71
|
+
value: {
|
|
72
|
+
contentId,
|
|
73
|
+
url: this._settings.url,
|
|
74
|
+
hasText: this._hasTextBufferFeature(),
|
|
75
|
+
transportOptions,
|
|
76
|
+
initialVideoBitrate,
|
|
77
|
+
initialAudioBitrate,
|
|
78
|
+
manifestRetryOptions: this._settings.manifestRequestSettings,
|
|
79
|
+
segmentRetryOptions: this._settings.segmentRequestOptions,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
this._initCanceller.signal.register(() => {
|
|
83
|
+
sendMessage(worker, {
|
|
84
|
+
type: "stop" /* MainThreadMessageType.StopContent */,
|
|
85
|
+
contentId,
|
|
86
|
+
value: null,
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
if (this._initCanceller.isUsed()) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
// Also bind all `SharedReference` objects:
|
|
93
|
+
const throttleVideoBitrate = (_a = adaptiveOptions.throttlers.throttleBitrate.video) !== null && _a !== void 0 ? _a : new SharedReference(Infinity);
|
|
94
|
+
bindNumberReferencesToWorker(worker, this._initCanceller.signal, [wantedBufferAhead, "wantedBufferAhead"], [maxVideoBufferSize, "maxVideoBufferSize"], [maxBufferAhead, "maxBufferAhead"], [maxBufferBehind, "maxBufferBehind"], [throttleVideoBitrate, "throttleVideoBitrate"]);
|
|
95
|
+
const limitVideoResolution = (_b = adaptiveOptions.throttlers.limitResolution.video) !== null && _b !== void 0 ? _b : new SharedReference({
|
|
96
|
+
height: undefined,
|
|
97
|
+
width: undefined,
|
|
98
|
+
pixelRatio: 1,
|
|
99
|
+
});
|
|
100
|
+
limitVideoResolution.onUpdate((newVal) => {
|
|
101
|
+
sendMessage(worker, {
|
|
102
|
+
type: "ref-update" /* MainThreadMessageType.ReferenceUpdate */,
|
|
103
|
+
value: { name: "limitVideoResolution", newVal },
|
|
104
|
+
});
|
|
105
|
+
}, { clearSignal: this._initCanceller.signal, emitCurrentValue: true });
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Update URL of the Manifest.
|
|
109
|
+
* @param {Array.<string>|undefined} urls - URLs to reach that Manifest from
|
|
110
|
+
* the most prioritized URL to the least prioritized URL.
|
|
111
|
+
* @param {boolean} refreshNow - If `true` the resource in question (e.g.
|
|
112
|
+
* DASH's MPD) will be refreshed immediately.
|
|
113
|
+
*/
|
|
114
|
+
updateContentUrls(urls, refreshNow) {
|
|
115
|
+
if (this._currentContentInfo === null) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
sendMessage(this._settings.worker, {
|
|
119
|
+
type: "urls-update" /* MainThreadMessageType.ContentUrlsUpdate */,
|
|
120
|
+
contentId: this._currentContentInfo.contentId,
|
|
121
|
+
value: { urls, refreshNow },
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @param {HTMLMediaElement} mediaElement
|
|
126
|
+
* @param {Object} playbackObserver
|
|
127
|
+
*/
|
|
128
|
+
start(mediaElement, playbackObserver) {
|
|
129
|
+
this.prepare(); // Load Manifest if not already done
|
|
130
|
+
if (this._initCanceller.isUsed()) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
let textDisplayer = null;
|
|
134
|
+
if (this._settings.textTrackOptions.textTrackMode === "html" &&
|
|
135
|
+
features.htmlTextDisplayer !== null) {
|
|
136
|
+
assert(this._hasTextBufferFeature());
|
|
137
|
+
textDisplayer = new features.htmlTextDisplayer(mediaElement, this._settings.textTrackOptions.textTrackElement);
|
|
138
|
+
}
|
|
139
|
+
else if (features.nativeTextDisplayer !== null) {
|
|
140
|
+
assert(this._hasTextBufferFeature());
|
|
141
|
+
textDisplayer = new features.nativeTextDisplayer(mediaElement);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
assert(!this._hasTextBufferFeature());
|
|
145
|
+
}
|
|
146
|
+
this._initCanceller.signal.register(() => {
|
|
147
|
+
textDisplayer === null || textDisplayer === void 0 ? void 0 : textDisplayer.stop();
|
|
148
|
+
});
|
|
149
|
+
/** Translate errors coming from the media element into RxPlayer errors. */
|
|
150
|
+
listenToMediaError(mediaElement, (error) => this._onFatalError(error), this._initCanceller.signal);
|
|
151
|
+
/** Send content protection initialization data. */
|
|
152
|
+
const lastContentProtection = new SharedReference(null);
|
|
153
|
+
const mediaSourceStatus = new SharedReference(0 /* MediaSourceInitializationStatus.Nothing */);
|
|
154
|
+
const drmInitializationStatus = this._initializeContentDecryption(mediaElement, lastContentProtection, mediaSourceStatus, () => reloadMediaSource(0, undefined, undefined), this._initCanceller.signal);
|
|
155
|
+
const playbackStartParams = {
|
|
156
|
+
mediaElement,
|
|
157
|
+
textDisplayer,
|
|
158
|
+
playbackObserver,
|
|
159
|
+
drmInitializationStatus,
|
|
160
|
+
mediaSourceStatus,
|
|
161
|
+
};
|
|
162
|
+
mediaSourceStatus.onUpdate((msInitStatus, stopListeningMSStatus) => {
|
|
163
|
+
if (msInitStatus === 2 /* MediaSourceInitializationStatus.Attached */) {
|
|
164
|
+
stopListeningMSStatus();
|
|
165
|
+
this._startPlaybackIfReady(playbackStartParams);
|
|
166
|
+
}
|
|
167
|
+
}, { clearSignal: this._initCanceller.signal, emitCurrentValue: true });
|
|
168
|
+
drmInitializationStatus.onUpdate((initializationStatus, stopListeningDrm) => {
|
|
169
|
+
if (initializationStatus.initializationState.type === "initialized") {
|
|
170
|
+
stopListeningDrm();
|
|
171
|
+
this._startPlaybackIfReady(playbackStartParams);
|
|
172
|
+
}
|
|
173
|
+
}, { emitCurrentValue: true, clearSignal: this._initCanceller.signal });
|
|
174
|
+
/**
|
|
175
|
+
* Callback allowing to reload the current content.
|
|
176
|
+
* @param {number} deltaPosition - Position you want to seek to after
|
|
177
|
+
* reloading, as a delta in seconds from the last polled playing position.
|
|
178
|
+
* @param {number|undefined} minimumPosition - If set, minimum time bound
|
|
179
|
+
* in seconds after `deltaPosition` has been applied.
|
|
180
|
+
* @param {number|undefined} maximumPosition - If set, minimum time bound
|
|
181
|
+
* in seconds after `deltaPosition` has been applied.
|
|
182
|
+
*/
|
|
183
|
+
const reloadMediaSource = (deltaPosition, minimumPosition, maximumPosition) => {
|
|
184
|
+
var _a;
|
|
185
|
+
const contentInfo = this._currentContentInfo;
|
|
186
|
+
if (contentInfo === null) {
|
|
187
|
+
log.warn("MTCI: Asked to reload when no content is loaded.");
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const lastObservation = playbackObserver.getReference().getValue();
|
|
191
|
+
const currentPosition = lastObservation.position.getWanted();
|
|
192
|
+
const isPaused = ((_a = contentInfo.initialPlayPerformed) === null || _a === void 0 ? void 0 : _a.getValue()) === true ||
|
|
193
|
+
contentInfo.autoPlay === undefined
|
|
194
|
+
? lastObservation.paused
|
|
195
|
+
: !contentInfo.autoPlay;
|
|
196
|
+
let position = currentPosition + deltaPosition;
|
|
197
|
+
if (minimumPosition !== undefined) {
|
|
198
|
+
position = Math.max(minimumPosition, position);
|
|
199
|
+
}
|
|
200
|
+
if (maximumPosition !== undefined) {
|
|
201
|
+
position = Math.min(maximumPosition, position);
|
|
202
|
+
}
|
|
203
|
+
this._reload(mediaElement, textDisplayer, playbackObserver, mediaSourceStatus, position, !isPaused);
|
|
204
|
+
};
|
|
205
|
+
const onmessage = (msg) => {
|
|
206
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26;
|
|
207
|
+
const msgData = msg.data;
|
|
208
|
+
switch (msgData.type) {
|
|
209
|
+
case "attach-media-source" /* WorkerMessageType.AttachMediaSource */: {
|
|
210
|
+
if (((_a = this._currentContentInfo) === null || _a === void 0 ? void 0 : _a.contentId) !== msgData.contentId) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const mediaSourceLink = msgData.value;
|
|
214
|
+
mediaSourceStatus.onUpdate((currStatus, stopListening) => {
|
|
215
|
+
if (currStatus === 1 /* MediaSourceInitializationStatus.AttachNow */) {
|
|
216
|
+
stopListening();
|
|
217
|
+
log.info("MTCI: Attaching MediaSource URL to the media element");
|
|
218
|
+
if (mediaSourceLink.type === "handle") {
|
|
219
|
+
mediaElement.srcObject = mediaSourceLink.value;
|
|
220
|
+
this._currentMediaSourceCanceller.signal.register(() => {
|
|
221
|
+
mediaElement.srcObject = null;
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
mediaElement.src = mediaSourceLink.value;
|
|
226
|
+
this._currentMediaSourceCanceller.signal.register(() => {
|
|
227
|
+
resetMediaElement(mediaElement, mediaSourceLink.value);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
mediaSourceStatus.setValue(2 /* MediaSourceInitializationStatus.Attached */);
|
|
231
|
+
}
|
|
232
|
+
}, { emitCurrentValue: true, clearSignal: this._initCanceller.signal });
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
case "warning" /* WorkerMessageType.Warning */:
|
|
236
|
+
if (((_b = this._currentContentInfo) === null || _b === void 0 ? void 0 : _b.contentId) !== msgData.contentId) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
this.trigger("warning", formatWorkerError(msgData.value));
|
|
240
|
+
break;
|
|
241
|
+
case "error" /* WorkerMessageType.Error */:
|
|
242
|
+
if (((_c = this._currentContentInfo) === null || _c === void 0 ? void 0 : _c.contentId) !== msgData.contentId) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this._onFatalError(formatWorkerError(msgData.value));
|
|
246
|
+
break;
|
|
247
|
+
case "create-media-source" /* WorkerMessageType.CreateMediaSource */:
|
|
248
|
+
this._onCreateMediaSourceMessage(msgData, mediaElement, mediaSourceStatus, this._settings.worker);
|
|
249
|
+
break;
|
|
250
|
+
case "add-source-buffer" /* WorkerMessageType.AddSourceBuffer */:
|
|
251
|
+
{
|
|
252
|
+
if (((_e = (_d = this._currentContentInfo) === null || _d === void 0 ? void 0 : _d.mainThreadMediaSource) === null || _e === void 0 ? void 0 : _e.id) !==
|
|
253
|
+
msgData.mediaSourceId) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const mediaSource = this._currentContentInfo.mainThreadMediaSource;
|
|
257
|
+
mediaSource.addSourceBuffer(msgData.value.sourceBufferType, msgData.value.codec);
|
|
258
|
+
}
|
|
259
|
+
break;
|
|
260
|
+
case "source-buffer-append" /* WorkerMessageType.SourceBufferAppend */:
|
|
261
|
+
{
|
|
262
|
+
if (((_g = (_f = this._currentContentInfo) === null || _f === void 0 ? void 0 : _f.mainThreadMediaSource) === null || _g === void 0 ? void 0 : _g.id) !==
|
|
263
|
+
msgData.mediaSourceId) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const mediaSource = this._currentContentInfo.mainThreadMediaSource;
|
|
267
|
+
const sourceBuffer = arrayFind(mediaSource.sourceBuffers, (s) => s.type === msgData.sourceBufferType);
|
|
268
|
+
if (sourceBuffer === undefined) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
sourceBuffer
|
|
272
|
+
.appendBuffer(msgData.value.data, msgData.value.params)
|
|
273
|
+
.then((buffered) => {
|
|
274
|
+
sendMessage(this._settings.worker, {
|
|
275
|
+
type: "sb-success" /* MainThreadMessageType.SourceBufferSuccess */,
|
|
276
|
+
mediaSourceId: mediaSource.id,
|
|
277
|
+
sourceBufferType: sourceBuffer.type,
|
|
278
|
+
operationId: msgData.operationId,
|
|
279
|
+
value: { buffered },
|
|
280
|
+
});
|
|
281
|
+
})
|
|
282
|
+
.catch((error) => {
|
|
283
|
+
sendMessage(this._settings.worker, {
|
|
284
|
+
type: "sb-error" /* MainThreadMessageType.SourceBufferError */,
|
|
285
|
+
mediaSourceId: mediaSource.id,
|
|
286
|
+
sourceBufferType: sourceBuffer.type,
|
|
287
|
+
operationId: msgData.operationId,
|
|
288
|
+
value: error instanceof CancellationError
|
|
289
|
+
? { errorName: "CancellationError" }
|
|
290
|
+
: formatSourceBufferError(error).serialize(),
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
case "source-buffer-remove" /* WorkerMessageType.SourceBufferRemove */:
|
|
296
|
+
{
|
|
297
|
+
if (((_j = (_h = this._currentContentInfo) === null || _h === void 0 ? void 0 : _h.mainThreadMediaSource) === null || _j === void 0 ? void 0 : _j.id) !==
|
|
298
|
+
msgData.mediaSourceId) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const mediaSource = this._currentContentInfo.mainThreadMediaSource;
|
|
302
|
+
const sourceBuffer = arrayFind(mediaSource.sourceBuffers, (s) => s.type === msgData.sourceBufferType);
|
|
303
|
+
if (sourceBuffer === undefined) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
sourceBuffer
|
|
307
|
+
.remove(msgData.value.start, msgData.value.end)
|
|
308
|
+
.then((buffered) => {
|
|
309
|
+
sendMessage(this._settings.worker, {
|
|
310
|
+
type: "sb-success" /* MainThreadMessageType.SourceBufferSuccess */,
|
|
311
|
+
mediaSourceId: mediaSource.id,
|
|
312
|
+
sourceBufferType: sourceBuffer.type,
|
|
313
|
+
operationId: msgData.operationId,
|
|
314
|
+
value: { buffered },
|
|
315
|
+
});
|
|
316
|
+
})
|
|
317
|
+
.catch((error) => {
|
|
318
|
+
sendMessage(this._settings.worker, {
|
|
319
|
+
type: "sb-error" /* MainThreadMessageType.SourceBufferError */,
|
|
320
|
+
mediaSourceId: mediaSource.id,
|
|
321
|
+
sourceBufferType: sourceBuffer.type,
|
|
322
|
+
operationId: msgData.operationId,
|
|
323
|
+
value: error instanceof CancellationError
|
|
324
|
+
? { errorName: "CancellationError" }
|
|
325
|
+
: formatSourceBufferError(error).serialize(),
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
break;
|
|
330
|
+
case "abort-source-buffer" /* WorkerMessageType.AbortSourceBuffer */:
|
|
331
|
+
{
|
|
332
|
+
if (((_l = (_k = this._currentContentInfo) === null || _k === void 0 ? void 0 : _k.mainThreadMediaSource) === null || _l === void 0 ? void 0 : _l.id) !==
|
|
333
|
+
msgData.mediaSourceId) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
const mediaSource = this._currentContentInfo.mainThreadMediaSource;
|
|
337
|
+
const sourceBuffer = arrayFind(mediaSource.sourceBuffers, (s) => s.type === msgData.sourceBufferType);
|
|
338
|
+
if (sourceBuffer === undefined) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
sourceBuffer.abort();
|
|
342
|
+
}
|
|
343
|
+
break;
|
|
344
|
+
case "update-media-source-duration" /* WorkerMessageType.UpdateMediaSourceDuration */:
|
|
345
|
+
{
|
|
346
|
+
if (((_o = (_m = this._currentContentInfo) === null || _m === void 0 ? void 0 : _m.mainThreadMediaSource) === null || _o === void 0 ? void 0 : _o.id) !==
|
|
347
|
+
msgData.mediaSourceId) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
const mediaSource = this._currentContentInfo.mainThreadMediaSource;
|
|
351
|
+
if ((mediaSource === null || mediaSource === void 0 ? void 0 : mediaSource.id) !== msgData.mediaSourceId) {
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
mediaSource.setDuration(msgData.value.duration, msgData.value.isRealEndKnown);
|
|
355
|
+
}
|
|
356
|
+
break;
|
|
357
|
+
case "stop-media-source-duration" /* WorkerMessageType.InterruptMediaSourceDurationUpdate */:
|
|
358
|
+
{
|
|
359
|
+
if (((_q = (_p = this._currentContentInfo) === null || _p === void 0 ? void 0 : _p.mainThreadMediaSource) === null || _q === void 0 ? void 0 : _q.id) !==
|
|
360
|
+
msgData.mediaSourceId) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
const mediaSource = this._currentContentInfo.mainThreadMediaSource;
|
|
364
|
+
if ((mediaSource === null || mediaSource === void 0 ? void 0 : mediaSource.id) !== msgData.mediaSourceId) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
mediaSource.interruptDurationSetting();
|
|
368
|
+
}
|
|
369
|
+
break;
|
|
370
|
+
case "end-of-stream" /* WorkerMessageType.EndOfStream */:
|
|
371
|
+
{
|
|
372
|
+
if (((_s = (_r = this._currentContentInfo) === null || _r === void 0 ? void 0 : _r.mainThreadMediaSource) === null || _s === void 0 ? void 0 : _s.id) !==
|
|
373
|
+
msgData.mediaSourceId) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
this._currentContentInfo.mainThreadMediaSource.maintainEndOfStream();
|
|
377
|
+
}
|
|
378
|
+
break;
|
|
379
|
+
case "stop-end-of-stream" /* WorkerMessageType.InterruptEndOfStream */:
|
|
380
|
+
{
|
|
381
|
+
if (((_u = (_t = this._currentContentInfo) === null || _t === void 0 ? void 0 : _t.mainThreadMediaSource) === null || _u === void 0 ? void 0 : _u.id) !==
|
|
382
|
+
msgData.mediaSourceId) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
this._currentContentInfo.mainThreadMediaSource.stopEndOfStream();
|
|
386
|
+
}
|
|
387
|
+
break;
|
|
388
|
+
case "dispose-media-source" /* WorkerMessageType.DisposeMediaSource */:
|
|
389
|
+
{
|
|
390
|
+
if (((_w = (_v = this._currentContentInfo) === null || _v === void 0 ? void 0 : _v.mainThreadMediaSource) === null || _w === void 0 ? void 0 : _w.id) !==
|
|
391
|
+
msgData.mediaSourceId) {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
this._currentContentInfo.mainThreadMediaSource.dispose();
|
|
395
|
+
}
|
|
396
|
+
break;
|
|
397
|
+
case "needs-buffer-flush" /* WorkerMessageType.NeedsBufferFlush */: {
|
|
398
|
+
if (((_x = this._currentContentInfo) === null || _x === void 0 ? void 0 : _x.contentId) !== msgData.contentId) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
const currentTime = mediaElement.currentTime;
|
|
402
|
+
const relativeResumingPosition = (_z = (_y = msgData.value) === null || _y === void 0 ? void 0 : _y.relativeResumingPosition) !== null && _z !== void 0 ? _z : 0;
|
|
403
|
+
const canBeApproximateSeek = Boolean((_0 = msgData.value) === null || _0 === void 0 ? void 0 : _0.relativePosHasBeenDefaulted);
|
|
404
|
+
let wantedSeekingTime;
|
|
405
|
+
if (relativeResumingPosition === 0 && canBeApproximateSeek) {
|
|
406
|
+
// in case relativeResumingPosition is 0, we still perform
|
|
407
|
+
// a tiny seek to be sure that the browser will correclty reload the video.
|
|
408
|
+
wantedSeekingTime = currentTime + 0.001;
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
wantedSeekingTime = currentTime + relativeResumingPosition;
|
|
412
|
+
}
|
|
413
|
+
playbackObserver.setCurrentTime(wantedSeekingTime);
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
case "active-period-changed" /* WorkerMessageType.ActivePeriodChanged */: {
|
|
417
|
+
if (((_1 = this._currentContentInfo) === null || _1 === void 0 ? void 0 : _1.contentId) !== msgData.contentId ||
|
|
418
|
+
this._currentContentInfo.manifest === null) {
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
const period = arrayFind(this._currentContentInfo.manifest.periods, (p) => p.id === msgData.value.periodId);
|
|
422
|
+
if (period !== undefined) {
|
|
423
|
+
this.trigger("activePeriodChanged", { period });
|
|
424
|
+
}
|
|
425
|
+
break;
|
|
426
|
+
}
|
|
427
|
+
case "adaptation-changed" /* WorkerMessageType.AdaptationChanged */: {
|
|
428
|
+
if (((_2 = this._currentContentInfo) === null || _2 === void 0 ? void 0 : _2.contentId) !== msgData.contentId ||
|
|
429
|
+
this._currentContentInfo.manifest === null) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
const period = arrayFind(this._currentContentInfo.manifest.periods, (p) => p.id === msgData.value.periodId);
|
|
433
|
+
if (period === undefined) {
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
if (msgData.value.adaptationId === null) {
|
|
437
|
+
this.trigger("adaptationChange", {
|
|
438
|
+
period,
|
|
439
|
+
adaptation: null,
|
|
440
|
+
type: msgData.value.type,
|
|
441
|
+
});
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
const adaptations = (_3 = period.adaptations[msgData.value.type]) !== null && _3 !== void 0 ? _3 : [];
|
|
445
|
+
const adaptation = arrayFind(adaptations, (a) => a.id === msgData.value.adaptationId);
|
|
446
|
+
if (adaptation !== undefined) {
|
|
447
|
+
this.trigger("adaptationChange", {
|
|
448
|
+
period,
|
|
449
|
+
adaptation,
|
|
450
|
+
type: msgData.value.type,
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
break;
|
|
454
|
+
}
|
|
455
|
+
case "representation-changed" /* WorkerMessageType.RepresentationChanged */: {
|
|
456
|
+
if (((_4 = this._currentContentInfo) === null || _4 === void 0 ? void 0 : _4.contentId) !== msgData.contentId ||
|
|
457
|
+
this._currentContentInfo.manifest === null) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
const period = arrayFind(this._currentContentInfo.manifest.periods, (p) => p.id === msgData.value.periodId);
|
|
461
|
+
if (period === undefined) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (msgData.value.representationId === null) {
|
|
465
|
+
this.trigger("representationChange", {
|
|
466
|
+
period,
|
|
467
|
+
type: msgData.value.type,
|
|
468
|
+
representation: null,
|
|
469
|
+
});
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
const adaptations = (_5 = period.adaptations[msgData.value.type]) !== null && _5 !== void 0 ? _5 : [];
|
|
473
|
+
const adaptation = arrayFind(adaptations, (a) => a.id === msgData.value.adaptationId);
|
|
474
|
+
if (adaptation === undefined) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
const representation = arrayFind(adaptation.representations, (r) => r.id === msgData.value.representationId);
|
|
478
|
+
if (representation !== undefined) {
|
|
479
|
+
this.trigger("representationChange", {
|
|
480
|
+
period,
|
|
481
|
+
type: msgData.value.type,
|
|
482
|
+
representation,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
487
|
+
case "encryption-data-encountered" /* WorkerMessageType.EncryptionDataEncountered */:
|
|
488
|
+
if (((_6 = this._currentContentInfo) === null || _6 === void 0 ? void 0 : _6.contentId) !== msgData.contentId) {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
lastContentProtection.setValue(msgData.value);
|
|
492
|
+
break;
|
|
493
|
+
case "manifest-ready" /* WorkerMessageType.ManifestReady */: {
|
|
494
|
+
if (((_7 = this._currentContentInfo) === null || _7 === void 0 ? void 0 : _7.contentId) !== msgData.contentId) {
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
const manifest = msgData.value.manifest;
|
|
498
|
+
try {
|
|
499
|
+
const codecUpdate = updateManifestCodecSupport(manifest);
|
|
500
|
+
if (codecUpdate.length > 0) {
|
|
501
|
+
sendMessage(this._settings.worker, {
|
|
502
|
+
type: "codec-support-update" /* MainThreadMessageType.CodecSupportUpdate */,
|
|
503
|
+
value: codecUpdate,
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
catch (err) {
|
|
508
|
+
this._onFatalError(err);
|
|
509
|
+
}
|
|
510
|
+
this._currentContentInfo.manifest = manifest;
|
|
511
|
+
this._startPlaybackIfReady(playbackStartParams);
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
case "manifest-update" /* WorkerMessageType.ManifestUpdate */:
|
|
515
|
+
if (((_8 = this._currentContentInfo) === null || _8 === void 0 ? void 0 : _8.contentId) !== msgData.contentId) {
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
const manifest = (_9 = this._currentContentInfo) === null || _9 === void 0 ? void 0 : _9.manifest;
|
|
519
|
+
if (isNullOrUndefined(manifest)) {
|
|
520
|
+
log.error("MTCI: Manifest update but no Manifest loaded");
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
replicateUpdatesOnManifestMetadata(manifest, msgData.value.manifest, msgData.value.updates);
|
|
524
|
+
(_11 = (_10 = this._currentContentInfo) === null || _10 === void 0 ? void 0 : _10.streamEventsEmitter) === null || _11 === void 0 ? void 0 : _11.onManifestUpdate(manifest);
|
|
525
|
+
// TODO only on added `Representation`?
|
|
526
|
+
try {
|
|
527
|
+
const codecUpdate = updateManifestCodecSupport(manifest);
|
|
528
|
+
if (codecUpdate.length > 0) {
|
|
529
|
+
sendMessage(this._settings.worker, {
|
|
530
|
+
type: "codec-support-update" /* MainThreadMessageType.CodecSupportUpdate */,
|
|
531
|
+
value: codecUpdate,
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
catch (err) {
|
|
536
|
+
this._onFatalError(err);
|
|
537
|
+
}
|
|
538
|
+
this.trigger("manifestUpdate", msgData.value.updates);
|
|
539
|
+
break;
|
|
540
|
+
case "update-playback-rate" /* WorkerMessageType.UpdatePlaybackRate */:
|
|
541
|
+
if (((_12 = this._currentContentInfo) === null || _12 === void 0 ? void 0 : _12.contentId) !== msgData.contentId) {
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
playbackObserver.setPlaybackRate(msgData.value);
|
|
545
|
+
break;
|
|
546
|
+
case "bitrate-estimate-change" /* WorkerMessageType.BitrateEstimateChange */:
|
|
547
|
+
if (((_13 = this._currentContentInfo) === null || _13 === void 0 ? void 0 : _13.contentId) !== msgData.contentId) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
this.trigger("bitrateEstimateChange", {
|
|
551
|
+
type: msgData.value.bufferType,
|
|
552
|
+
bitrate: msgData.value.bitrate,
|
|
553
|
+
});
|
|
554
|
+
break;
|
|
555
|
+
case "inband-event" /* WorkerMessageType.InbandEvent */:
|
|
556
|
+
if (((_14 = this._currentContentInfo) === null || _14 === void 0 ? void 0 : _14.contentId) !== msgData.contentId) {
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
this.trigger("inbandEvents", msgData.value);
|
|
560
|
+
break;
|
|
561
|
+
case "locked-stream" /* WorkerMessageType.LockedStream */: {
|
|
562
|
+
if (((_15 = this._currentContentInfo) === null || _15 === void 0 ? void 0 : _15.contentId) !== msgData.contentId ||
|
|
563
|
+
this._currentContentInfo.manifest === null) {
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
const period = arrayFind(this._currentContentInfo.manifest.periods, (p) => p.id === msgData.value.periodId);
|
|
567
|
+
if (period === undefined) {
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
(_16 = this._currentContentInfo.rebufferingController) === null || _16 === void 0 ? void 0 : _16.onLockedStream(msgData.value.bufferType, period);
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
case "period-stream-ready" /* WorkerMessageType.PeriodStreamReady */: {
|
|
574
|
+
if (((_17 = this._currentContentInfo) === null || _17 === void 0 ? void 0 : _17.contentId) !== msgData.contentId ||
|
|
575
|
+
this._currentContentInfo.manifest === null) {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
const period = arrayFind(this._currentContentInfo.manifest.periods, (p) => p.id === msgData.value.periodId);
|
|
579
|
+
if (period === undefined) {
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
const ref = new SharedReference(undefined);
|
|
583
|
+
ref.onUpdate((adapChoice) => {
|
|
584
|
+
if (this._currentContentInfo === null) {
|
|
585
|
+
ref.finish();
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
if (!isNullOrUndefined(adapChoice)) {
|
|
589
|
+
adapChoice.representations.onUpdate((repChoice, stopListening) => {
|
|
590
|
+
if (this._currentContentInfo === null) {
|
|
591
|
+
stopListening();
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
sendMessage(this._settings.worker, {
|
|
595
|
+
type: "rep-update" /* MainThreadMessageType.RepresentationUpdate */,
|
|
596
|
+
contentId: this._currentContentInfo.contentId,
|
|
597
|
+
value: {
|
|
598
|
+
periodId: msgData.value.periodId,
|
|
599
|
+
adaptationId: adapChoice.adaptationId,
|
|
600
|
+
bufferType: msgData.value.bufferType,
|
|
601
|
+
choice: repChoice,
|
|
602
|
+
},
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
sendMessage(this._settings.worker, {
|
|
607
|
+
type: "track-update" /* MainThreadMessageType.TrackUpdate */,
|
|
608
|
+
contentId: this._currentContentInfo.contentId,
|
|
609
|
+
value: {
|
|
610
|
+
periodId: msgData.value.periodId,
|
|
611
|
+
bufferType: msgData.value.bufferType,
|
|
612
|
+
choice: isNullOrUndefined(adapChoice)
|
|
613
|
+
? adapChoice
|
|
614
|
+
: {
|
|
615
|
+
adaptationId: adapChoice.adaptationId,
|
|
616
|
+
switchingMode: adapChoice.switchingMode,
|
|
617
|
+
initialRepresentations: adapChoice.representations.getValue(),
|
|
618
|
+
relativeResumingPosition: adapChoice.relativeResumingPosition,
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
});
|
|
622
|
+
});
|
|
623
|
+
this.trigger("periodStreamReady", {
|
|
624
|
+
period,
|
|
625
|
+
type: msgData.value.bufferType,
|
|
626
|
+
adaptationRef: ref,
|
|
627
|
+
});
|
|
628
|
+
break;
|
|
629
|
+
}
|
|
630
|
+
case "period-stream-cleared" /* WorkerMessageType.PeriodStreamCleared */: {
|
|
631
|
+
if (((_18 = this._currentContentInfo) === null || _18 === void 0 ? void 0 : _18.contentId) !== msgData.contentId ||
|
|
632
|
+
this._currentContentInfo.manifest === null) {
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
const period = arrayFind(this._currentContentInfo.manifest.periods, (p) => p.id === msgData.value.periodId);
|
|
636
|
+
if (period === undefined) {
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
this.trigger("periodStreamCleared", {
|
|
640
|
+
period,
|
|
641
|
+
type: msgData.value.bufferType,
|
|
642
|
+
});
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
case "discontinuity-update" /* WorkerMessageType.DiscontinuityUpdate */:
|
|
646
|
+
if (((_19 = this._currentContentInfo) === null || _19 === void 0 ? void 0 : _19.contentId) !== msgData.contentId ||
|
|
647
|
+
this._currentContentInfo.manifest === null) {
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
const period = arrayFind(this._currentContentInfo.manifest.periods, (p) => p.id === msgData.value.periodId);
|
|
651
|
+
if (period === undefined) {
|
|
652
|
+
log.warn("MTCI: Discontinuity's Period not found", msgData.value.periodId);
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
(_20 = this._currentContentInfo.rebufferingController) === null || _20 === void 0 ? void 0 : _20.updateDiscontinuityInfo({
|
|
656
|
+
period,
|
|
657
|
+
bufferType: msgData.value.bufferType,
|
|
658
|
+
discontinuity: msgData.value.discontinuity,
|
|
659
|
+
position: msgData.value.position,
|
|
660
|
+
});
|
|
661
|
+
break;
|
|
662
|
+
case "push-text-data" /* WorkerMessageType.PushTextData */: {
|
|
663
|
+
if (((_21 = this._currentContentInfo) === null || _21 === void 0 ? void 0 : _21.contentId) !== msgData.contentId) {
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
if (textDisplayer === null) {
|
|
667
|
+
log.warn("Init: Received AddTextData message but no text displayer exists");
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
try {
|
|
671
|
+
const ranges = textDisplayer.pushTextData(msgData.value);
|
|
672
|
+
sendMessage(this._settings.worker, {
|
|
673
|
+
type: "add-text-success" /* MainThreadMessageType.PushTextDataSuccess */,
|
|
674
|
+
contentId: msgData.contentId,
|
|
675
|
+
value: { ranges },
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
catch (err) {
|
|
679
|
+
const message = err instanceof Error ? err.message : "Unknown error";
|
|
680
|
+
sendMessage(this._settings.worker, {
|
|
681
|
+
type: "push-text-error" /* MainThreadMessageType.PushTextDataError */,
|
|
682
|
+
contentId: msgData.contentId,
|
|
683
|
+
value: { message },
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
case "remove-text-data" /* WorkerMessageType.RemoveTextData */: {
|
|
690
|
+
if (((_22 = this._currentContentInfo) === null || _22 === void 0 ? void 0 : _22.contentId) !== msgData.contentId) {
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
if (textDisplayer === null) {
|
|
694
|
+
log.warn("Init: Received RemoveTextData message but no text displayer exists");
|
|
695
|
+
}
|
|
696
|
+
else {
|
|
697
|
+
try {
|
|
698
|
+
const ranges = textDisplayer.removeBuffer(msgData.value.start, msgData.value.end);
|
|
699
|
+
sendMessage(this._settings.worker, {
|
|
700
|
+
type: "remove-text-success" /* MainThreadMessageType.RemoveTextDataSuccess */,
|
|
701
|
+
contentId: msgData.contentId,
|
|
702
|
+
value: { ranges },
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
catch (err) {
|
|
706
|
+
const message = err instanceof Error ? err.message : "Unknown error";
|
|
707
|
+
sendMessage(this._settings.worker, {
|
|
708
|
+
type: "remove-text-error" /* MainThreadMessageType.RemoveTextDataError */,
|
|
709
|
+
contentId: msgData.contentId,
|
|
710
|
+
value: { message },
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
break;
|
|
715
|
+
}
|
|
716
|
+
case "reset-text-displayer" /* WorkerMessageType.ResetTextDisplayer */: {
|
|
717
|
+
if (((_23 = this._currentContentInfo) === null || _23 === void 0 ? void 0 : _23.contentId) !== msgData.contentId) {
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
if (textDisplayer === null) {
|
|
721
|
+
log.warn("Init: Received ResetTextDisplayer message but no text displayer exists");
|
|
722
|
+
}
|
|
723
|
+
else {
|
|
724
|
+
textDisplayer.reset();
|
|
725
|
+
}
|
|
726
|
+
break;
|
|
727
|
+
}
|
|
728
|
+
case "stop-text-displayer" /* WorkerMessageType.StopTextDisplayer */: {
|
|
729
|
+
if (((_24 = this._currentContentInfo) === null || _24 === void 0 ? void 0 : _24.contentId) !== msgData.contentId) {
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
if (textDisplayer === null) {
|
|
733
|
+
log.warn("Init: Received StopTextDisplayer message but no text displayer exists");
|
|
734
|
+
}
|
|
735
|
+
else {
|
|
736
|
+
textDisplayer.stop();
|
|
737
|
+
}
|
|
738
|
+
break;
|
|
739
|
+
}
|
|
740
|
+
case "reloading-media-source" /* WorkerMessageType.ReloadingMediaSource */:
|
|
741
|
+
{
|
|
742
|
+
if (((_25 = this._currentContentInfo) === null || _25 === void 0 ? void 0 : _25.contentId) !== msgData.contentId) {
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
reloadMediaSource(msgData.value.timeOffset, msgData.value.minimumPosition, msgData.value.maximumPosition);
|
|
746
|
+
}
|
|
747
|
+
break;
|
|
748
|
+
case "needs-decipherability-flush" /* WorkerMessageType.NeedsDecipherabilityFlush */:
|
|
749
|
+
{
|
|
750
|
+
if (((_26 = this._currentContentInfo) === null || _26 === void 0 ? void 0 : _26.contentId) !== msgData.contentId) {
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
const keySystem = getKeySystemConfiguration(mediaElement);
|
|
754
|
+
if (shouldReloadMediaSourceOnDecipherabilityUpdate(keySystem === null || keySystem === void 0 ? void 0 : keySystem[0])) {
|
|
755
|
+
reloadMediaSource(0, undefined, undefined);
|
|
756
|
+
}
|
|
757
|
+
else {
|
|
758
|
+
const lastObservation = playbackObserver.getReference().getValue();
|
|
759
|
+
const currentPosition = lastObservation.position.getWanted();
|
|
760
|
+
// simple seek close to the current position
|
|
761
|
+
// to flush the buffers
|
|
762
|
+
if (currentPosition + 0.001 < lastObservation.duration) {
|
|
763
|
+
playbackObserver.setCurrentTime(mediaElement.currentTime + 0.001);
|
|
764
|
+
}
|
|
765
|
+
else {
|
|
766
|
+
playbackObserver.setCurrentTime(currentPosition);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
break;
|
|
771
|
+
case "log" /* WorkerMessageType.LogMessage */: {
|
|
772
|
+
const formatted = msgData.value.logs.map((l) => {
|
|
773
|
+
switch (typeof l) {
|
|
774
|
+
case "string":
|
|
775
|
+
case "number":
|
|
776
|
+
case "boolean":
|
|
777
|
+
case "undefined":
|
|
778
|
+
return l;
|
|
779
|
+
case "object":
|
|
780
|
+
if (l === null) {
|
|
781
|
+
return null;
|
|
782
|
+
}
|
|
783
|
+
return formatWorkerError(l);
|
|
784
|
+
default:
|
|
785
|
+
assertUnreachable(l);
|
|
786
|
+
}
|
|
787
|
+
});
|
|
788
|
+
switch (msgData.value.logLevel) {
|
|
789
|
+
case "NONE":
|
|
790
|
+
break;
|
|
791
|
+
case "ERROR":
|
|
792
|
+
log.error(...formatted);
|
|
793
|
+
break;
|
|
794
|
+
case "WARNING":
|
|
795
|
+
log.warn(...formatted);
|
|
796
|
+
break;
|
|
797
|
+
case "INFO":
|
|
798
|
+
log.info(...formatted);
|
|
799
|
+
break;
|
|
800
|
+
case "DEBUG":
|
|
801
|
+
log.debug(...formatted);
|
|
802
|
+
break;
|
|
803
|
+
default:
|
|
804
|
+
assertUnreachable(msgData.value.logLevel);
|
|
805
|
+
}
|
|
806
|
+
break;
|
|
807
|
+
}
|
|
808
|
+
case "init-success" /* WorkerMessageType.InitSuccess */:
|
|
809
|
+
case "init-error" /* WorkerMessageType.InitError */:
|
|
810
|
+
// Should already be handled by the API
|
|
811
|
+
break;
|
|
812
|
+
default:
|
|
813
|
+
assertUnreachable(msgData);
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
this._settings.worker.addEventListener("message", onmessage);
|
|
817
|
+
this._initCanceller.signal.register(() => {
|
|
818
|
+
this._settings.worker.removeEventListener("message", onmessage);
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
dispose() {
|
|
822
|
+
var _a;
|
|
823
|
+
this._initCanceller.cancel();
|
|
824
|
+
if (this._currentContentInfo !== null) {
|
|
825
|
+
(_a = this._currentContentInfo.mainThreadMediaSource) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
826
|
+
this._currentContentInfo = null;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
_onFatalError(err) {
|
|
830
|
+
if (this._initCanceller.isUsed()) {
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
this._initCanceller.cancel();
|
|
834
|
+
this.trigger("error", err);
|
|
835
|
+
}
|
|
836
|
+
_initializeContentDecryption(mediaElement, lastContentProtection, mediaSourceStatus, reloadMediaSource, cancelSignal) {
|
|
837
|
+
const { keySystems } = this._settings;
|
|
838
|
+
// TODO private?
|
|
839
|
+
const createEmeDisabledReference = (errMsg) => {
|
|
840
|
+
mediaSourceStatus.setValue(1 /* MediaSourceInitializationStatus.AttachNow */);
|
|
841
|
+
lastContentProtection.onUpdate((data, stopListening) => {
|
|
842
|
+
if (data === null) {
|
|
843
|
+
// initial value
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
stopListening();
|
|
847
|
+
const err = new EncryptedMediaError("MEDIA_IS_ENCRYPTED_ERROR", errMsg);
|
|
848
|
+
this._onFatalError(err);
|
|
849
|
+
}, { clearSignal: cancelSignal });
|
|
850
|
+
const ref = new SharedReference({
|
|
851
|
+
initializationState: { type: "initialized", value: null },
|
|
852
|
+
drmSystemId: undefined,
|
|
853
|
+
});
|
|
854
|
+
ref.finish(); // We know that no new value will be triggered
|
|
855
|
+
return ref;
|
|
856
|
+
};
|
|
857
|
+
if (keySystems.length === 0) {
|
|
858
|
+
return createEmeDisabledReference("No `keySystems` option given.");
|
|
859
|
+
}
|
|
860
|
+
else if (features.decrypt === null) {
|
|
861
|
+
return createEmeDisabledReference("EME feature not activated.");
|
|
862
|
+
}
|
|
863
|
+
const drmStatusRef = new SharedReference({
|
|
864
|
+
initializationState: { type: "uninitialized", value: null },
|
|
865
|
+
drmSystemId: undefined,
|
|
866
|
+
}, cancelSignal);
|
|
867
|
+
const ContentDecryptor = features.decrypt;
|
|
868
|
+
if (!ContentDecryptor.hasEmeApis()) {
|
|
869
|
+
return createEmeDisabledReference("EME API not available on the current page.");
|
|
870
|
+
}
|
|
871
|
+
log.debug("MTCI: Creating ContentDecryptor");
|
|
872
|
+
const contentDecryptor = new ContentDecryptor(mediaElement, keySystems);
|
|
873
|
+
contentDecryptor.addEventListener("keyIdsCompatibilityUpdate", (updates) => {
|
|
874
|
+
if (this._currentContentInfo === null ||
|
|
875
|
+
this._currentContentInfo.manifest === null) {
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
const manUpdates = updateDecipherabilityFromKeyIds(this._currentContentInfo.manifest, updates);
|
|
879
|
+
if (mayMediaElementFailOnUndecipherableData &&
|
|
880
|
+
manUpdates.some((e) => e.representation.decipherable !== true)) {
|
|
881
|
+
reloadMediaSource();
|
|
882
|
+
}
|
|
883
|
+
else {
|
|
884
|
+
sendMessage(this._settings.worker, {
|
|
885
|
+
type: "decipherability-update" /* MainThreadMessageType.DecipherabilityStatusUpdate */,
|
|
886
|
+
contentId: this._currentContentInfo.contentId,
|
|
887
|
+
value: manUpdates.map((s) => ({
|
|
888
|
+
representationUniqueId: s.representation.uniqueId,
|
|
889
|
+
decipherable: s.representation.decipherable,
|
|
890
|
+
})),
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
this.trigger("decipherabilityUpdate", manUpdates);
|
|
894
|
+
});
|
|
895
|
+
contentDecryptor.addEventListener("blackListProtectionData", (protData) => {
|
|
896
|
+
if (this._currentContentInfo === null ||
|
|
897
|
+
this._currentContentInfo.manifest === null) {
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
const manUpdates = updateDecipherabilityFromProtectionData(this._currentContentInfo.manifest, protData);
|
|
901
|
+
if (mayMediaElementFailOnUndecipherableData &&
|
|
902
|
+
manUpdates.some((e) => e.representation.decipherable !== true)) {
|
|
903
|
+
reloadMediaSource();
|
|
904
|
+
}
|
|
905
|
+
else {
|
|
906
|
+
sendMessage(this._settings.worker, {
|
|
907
|
+
type: "decipherability-update" /* MainThreadMessageType.DecipherabilityStatusUpdate */,
|
|
908
|
+
contentId: this._currentContentInfo.contentId,
|
|
909
|
+
value: manUpdates.map((s) => ({
|
|
910
|
+
representationUniqueId: s.representation.uniqueId,
|
|
911
|
+
decipherable: s.representation.decipherable,
|
|
912
|
+
})),
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
this.trigger("decipherabilityUpdate", manUpdates);
|
|
916
|
+
});
|
|
917
|
+
contentDecryptor.addEventListener("stateChange", (state) => {
|
|
918
|
+
if (state === ContentDecryptorState.WaitingForAttachment) {
|
|
919
|
+
mediaSourceStatus.onUpdate((currStatus, stopListening) => {
|
|
920
|
+
if (currStatus === 0 /* MediaSourceInitializationStatus.Nothing */) {
|
|
921
|
+
mediaSourceStatus.setValue(1 /* MediaSourceInitializationStatus.AttachNow */);
|
|
922
|
+
}
|
|
923
|
+
else if (currStatus === 2 /* MediaSourceInitializationStatus.Attached */) {
|
|
924
|
+
stopListening();
|
|
925
|
+
if (state === ContentDecryptorState.WaitingForAttachment) {
|
|
926
|
+
contentDecryptor.attach();
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}, { clearSignal: cancelSignal, emitCurrentValue: true });
|
|
930
|
+
}
|
|
931
|
+
else if (state === ContentDecryptorState.ReadyForContent) {
|
|
932
|
+
drmStatusRef.setValue({
|
|
933
|
+
initializationState: { type: "initialized", value: null },
|
|
934
|
+
drmSystemId: contentDecryptor.systemId,
|
|
935
|
+
});
|
|
936
|
+
contentDecryptor.removeEventListener("stateChange");
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
contentDecryptor.addEventListener("error", (error) => {
|
|
940
|
+
this._onFatalError(error);
|
|
941
|
+
});
|
|
942
|
+
contentDecryptor.addEventListener("warning", (error) => {
|
|
943
|
+
this.trigger("warning", error);
|
|
944
|
+
});
|
|
945
|
+
lastContentProtection.onUpdate((data) => {
|
|
946
|
+
if (data === null) {
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
contentDecryptor.onInitializationData(data);
|
|
950
|
+
}, { clearSignal: cancelSignal });
|
|
951
|
+
cancelSignal.register(() => {
|
|
952
|
+
contentDecryptor.dispose();
|
|
953
|
+
});
|
|
954
|
+
return drmStatusRef;
|
|
955
|
+
}
|
|
956
|
+
_hasTextBufferFeature() {
|
|
957
|
+
return ((this._settings.textTrackOptions.textTrackMode === "html" &&
|
|
958
|
+
features.htmlTextDisplayer !== null) ||
|
|
959
|
+
features.nativeTextDisplayer !== null);
|
|
960
|
+
}
|
|
961
|
+
_reload(mediaElement, textDisplayer, playbackObserver, mediaSourceStatus, position, autoPlay) {
|
|
962
|
+
this._currentMediaSourceCanceller.cancel();
|
|
963
|
+
this._currentMediaSourceCanceller = new TaskCanceller();
|
|
964
|
+
this._currentMediaSourceCanceller.linkToSignal(this._initCanceller.signal);
|
|
965
|
+
mediaSourceStatus.setValue(1 /* MediaSourceInitializationStatus.AttachNow */);
|
|
966
|
+
this.trigger("reloadingMediaSource", { position, autoPlay });
|
|
967
|
+
mediaSourceStatus.onUpdate((status, stopListeningMSStatusUpdates) => {
|
|
968
|
+
if (status !== 2 /* MediaSourceInitializationStatus.Attached */) {
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
stopListeningMSStatusUpdates();
|
|
972
|
+
const corePlaybackObserver = this._setUpModulesOnNewMediaSource({
|
|
973
|
+
initialTime: position,
|
|
974
|
+
autoPlay,
|
|
975
|
+
mediaElement,
|
|
976
|
+
textDisplayer,
|
|
977
|
+
playbackObserver,
|
|
978
|
+
}, this._currentMediaSourceCanceller.signal);
|
|
979
|
+
if (!this._currentMediaSourceCanceller.isUsed() &&
|
|
980
|
+
corePlaybackObserver !== null &&
|
|
981
|
+
this._currentContentInfo !== null) {
|
|
982
|
+
const contentId = this._currentContentInfo.contentId;
|
|
983
|
+
corePlaybackObserver.listen((obs) => {
|
|
984
|
+
sendMessage(this._settings.worker, {
|
|
985
|
+
type: "observation" /* MainThreadMessageType.PlaybackObservation */,
|
|
986
|
+
contentId,
|
|
987
|
+
value: objectAssign(obs, {
|
|
988
|
+
position: obs.position.serialize(),
|
|
989
|
+
}),
|
|
990
|
+
});
|
|
991
|
+
}, {
|
|
992
|
+
includeLastObservation: true,
|
|
993
|
+
clearSignal: this._currentMediaSourceCanceller.signal,
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
}, {
|
|
997
|
+
clearSignal: this._currentMediaSourceCanceller.signal,
|
|
998
|
+
emitCurrentValue: true,
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Start-up modules and mechanisms (initial seek, auto-play etc.) needed each
|
|
1003
|
+
* time a content is loaded AND re-loaded on a `HTMLMediaElement`, when the
|
|
1004
|
+
* manifest is known.
|
|
1005
|
+
*
|
|
1006
|
+
* Note that this does not include reacting to incoming worker messages nor
|
|
1007
|
+
* sending them, those actions have to be handled separately.
|
|
1008
|
+
*
|
|
1009
|
+
* @param {Object} parameters
|
|
1010
|
+
* @param {Object} cancelSignal
|
|
1011
|
+
* @returns {Object|null} - Playback Observer created for this content. `null`
|
|
1012
|
+
* only if playback initialization failed (most likely because it has been
|
|
1013
|
+
* cancelled).
|
|
1014
|
+
*/
|
|
1015
|
+
_setUpModulesOnNewMediaSource(parameters, cancelSignal) {
|
|
1016
|
+
if (cancelSignal.isCancelled()) {
|
|
1017
|
+
return null;
|
|
1018
|
+
}
|
|
1019
|
+
if (this._currentContentInfo === null) {
|
|
1020
|
+
log.error("MTCI: Setting up modules without a contentId");
|
|
1021
|
+
return null;
|
|
1022
|
+
}
|
|
1023
|
+
if (this._currentContentInfo.manifest === null) {
|
|
1024
|
+
log.error("MTCI: Setting up modules without a loaded Manifest");
|
|
1025
|
+
return null;
|
|
1026
|
+
}
|
|
1027
|
+
const { manifest, mainThreadMediaSource: mediaSource } = this._currentContentInfo;
|
|
1028
|
+
const { speed } = this._settings;
|
|
1029
|
+
const { initialTime, autoPlay, mediaElement, textDisplayer, playbackObserver } = parameters;
|
|
1030
|
+
this._currentContentInfo.initialTime = initialTime;
|
|
1031
|
+
this._currentContentInfo.autoPlay = autoPlay;
|
|
1032
|
+
const { autoPlayResult, initialPlayPerformed } = performInitialSeekAndPlay({
|
|
1033
|
+
mediaElement,
|
|
1034
|
+
playbackObserver,
|
|
1035
|
+
startTime: initialTime,
|
|
1036
|
+
mustAutoPlay: autoPlay,
|
|
1037
|
+
onWarning: (err) => this.trigger("warning", err),
|
|
1038
|
+
isDirectfile: false,
|
|
1039
|
+
}, cancelSignal);
|
|
1040
|
+
this._currentContentInfo.initialPlayPerformed = initialPlayPerformed;
|
|
1041
|
+
const corePlaybackObserver = createCorePlaybackObserver(playbackObserver, {
|
|
1042
|
+
autoPlay,
|
|
1043
|
+
initialPlayPerformed,
|
|
1044
|
+
manifest,
|
|
1045
|
+
mediaSource,
|
|
1046
|
+
speed,
|
|
1047
|
+
textDisplayer,
|
|
1048
|
+
}, cancelSignal);
|
|
1049
|
+
if (cancelSignal.isCancelled()) {
|
|
1050
|
+
return null;
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Class trying to avoid various stalling situations, emitting "stalled"
|
|
1054
|
+
* events when it cannot, as well as "unstalled" events when it get out of one.
|
|
1055
|
+
*/
|
|
1056
|
+
const rebufferingController = new RebufferingController(playbackObserver, manifest, speed);
|
|
1057
|
+
rebufferingController.addEventListener("stalled", (evt) => this.trigger("stalled", evt));
|
|
1058
|
+
rebufferingController.addEventListener("unstalled", () => this.trigger("unstalled", null));
|
|
1059
|
+
rebufferingController.addEventListener("warning", (err) => this.trigger("warning", err));
|
|
1060
|
+
cancelSignal.register(() => {
|
|
1061
|
+
rebufferingController.destroy();
|
|
1062
|
+
});
|
|
1063
|
+
rebufferingController.start();
|
|
1064
|
+
this._currentContentInfo.rebufferingController = rebufferingController;
|
|
1065
|
+
const currentContentInfo = this._currentContentInfo;
|
|
1066
|
+
initialPlayPerformed.onUpdate((isPerformed, stopListening) => {
|
|
1067
|
+
if (isPerformed) {
|
|
1068
|
+
stopListening();
|
|
1069
|
+
const streamEventsEmitter = new StreamEventsEmitter(manifest, mediaElement, playbackObserver);
|
|
1070
|
+
currentContentInfo.streamEventsEmitter = streamEventsEmitter;
|
|
1071
|
+
streamEventsEmitter.addEventListener("event", (payload) => {
|
|
1072
|
+
this.trigger("streamEvent", payload);
|
|
1073
|
+
}, cancelSignal);
|
|
1074
|
+
streamEventsEmitter.addEventListener("eventSkip", (payload) => {
|
|
1075
|
+
this.trigger("streamEventSkip", payload);
|
|
1076
|
+
}, cancelSignal);
|
|
1077
|
+
streamEventsEmitter.start();
|
|
1078
|
+
cancelSignal.register(() => {
|
|
1079
|
+
streamEventsEmitter.stop();
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
}, { clearSignal: cancelSignal, emitCurrentValue: true });
|
|
1083
|
+
/**
|
|
1084
|
+
* Emit a "loaded" events once the initial play has been performed and the
|
|
1085
|
+
* media can begin playback.
|
|
1086
|
+
* Also emits warning events if issues arise when doing so.
|
|
1087
|
+
*/
|
|
1088
|
+
autoPlayResult
|
|
1089
|
+
.then(() => {
|
|
1090
|
+
getLoadedReference(playbackObserver, mediaElement, false, cancelSignal).onUpdate((isLoaded, stopListening) => {
|
|
1091
|
+
if (isLoaded) {
|
|
1092
|
+
stopListening();
|
|
1093
|
+
this.trigger("loaded", { segmentSinksStore: null });
|
|
1094
|
+
}
|
|
1095
|
+
}, { emitCurrentValue: true, clearSignal: cancelSignal });
|
|
1096
|
+
})
|
|
1097
|
+
.catch((err) => {
|
|
1098
|
+
if (cancelSignal.isCancelled()) {
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
this._onFatalError(err);
|
|
1102
|
+
});
|
|
1103
|
+
return corePlaybackObserver;
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Initialize content playback if and only if those conditions are filled:
|
|
1107
|
+
* - The Manifest is fetched and stored in `this._currentContentInfo`.
|
|
1108
|
+
* - `drmInitializationStatus` indicates that DRM matters are initialized.
|
|
1109
|
+
* - `mediaSourceStatus` indicates that the MediaSource is attached to the
|
|
1110
|
+
* `mediaElement`.
|
|
1111
|
+
*
|
|
1112
|
+
* In other cases, this method will do nothing.
|
|
1113
|
+
*
|
|
1114
|
+
* To call when any of those conditions might become `true`, to start-up
|
|
1115
|
+
* playback.
|
|
1116
|
+
*
|
|
1117
|
+
* @param {Object} parameters
|
|
1118
|
+
* @returns {boolean} - Returns `true` if all conditions where met for
|
|
1119
|
+
* playback start.
|
|
1120
|
+
*/
|
|
1121
|
+
_startPlaybackIfReady(parameters) {
|
|
1122
|
+
if (this._currentContentInfo === null || this._currentContentInfo.manifest === null) {
|
|
1123
|
+
return false;
|
|
1124
|
+
}
|
|
1125
|
+
const drmInitStatus = parameters.drmInitializationStatus.getValue();
|
|
1126
|
+
if (drmInitStatus.initializationState.type !== "initialized") {
|
|
1127
|
+
return false;
|
|
1128
|
+
}
|
|
1129
|
+
const msInitStatus = parameters.mediaSourceStatus.getValue();
|
|
1130
|
+
if (msInitStatus !== 2 /* MediaSourceInitializationStatus.Attached */) {
|
|
1131
|
+
return false;
|
|
1132
|
+
}
|
|
1133
|
+
const { contentId, manifest } = this._currentContentInfo;
|
|
1134
|
+
log.debug("MTCI: Calculating initial time");
|
|
1135
|
+
const initialTime = getInitialTime(manifest, this._settings.lowLatencyMode, this._settings.startAt);
|
|
1136
|
+
log.debug("MTCI: Initial time calculated:", initialTime);
|
|
1137
|
+
const { enableFastSwitching, onCodecSwitch } = this._settings.bufferOptions;
|
|
1138
|
+
const corePlaybackObserver = this._setUpModulesOnNewMediaSource({
|
|
1139
|
+
initialTime,
|
|
1140
|
+
autoPlay: this._settings.autoPlay,
|
|
1141
|
+
mediaElement: parameters.mediaElement,
|
|
1142
|
+
textDisplayer: parameters.textDisplayer,
|
|
1143
|
+
playbackObserver: parameters.playbackObserver,
|
|
1144
|
+
}, this._currentMediaSourceCanceller.signal);
|
|
1145
|
+
if (this._currentMediaSourceCanceller.isUsed() || corePlaybackObserver === null) {
|
|
1146
|
+
return true;
|
|
1147
|
+
}
|
|
1148
|
+
const initialObservation = corePlaybackObserver.getReference().getValue();
|
|
1149
|
+
const sentInitialObservation = objectAssign(initialObservation, {
|
|
1150
|
+
position: initialObservation.position.serialize(),
|
|
1151
|
+
});
|
|
1152
|
+
sendMessage(this._settings.worker, {
|
|
1153
|
+
type: "start" /* MainThreadMessageType.StartPreparedContent */,
|
|
1154
|
+
contentId,
|
|
1155
|
+
value: {
|
|
1156
|
+
initialTime,
|
|
1157
|
+
initialObservation: sentInitialObservation,
|
|
1158
|
+
drmSystemId: drmInitStatus.drmSystemId,
|
|
1159
|
+
enableFastSwitching,
|
|
1160
|
+
onCodecSwitch,
|
|
1161
|
+
},
|
|
1162
|
+
});
|
|
1163
|
+
corePlaybackObserver.listen((obs) => {
|
|
1164
|
+
sendMessage(this._settings.worker, {
|
|
1165
|
+
type: "observation" /* MainThreadMessageType.PlaybackObservation */,
|
|
1166
|
+
contentId,
|
|
1167
|
+
value: objectAssign(obs, { position: obs.position.serialize() }),
|
|
1168
|
+
});
|
|
1169
|
+
}, {
|
|
1170
|
+
includeLastObservation: false,
|
|
1171
|
+
clearSignal: this._currentMediaSourceCanceller.signal,
|
|
1172
|
+
});
|
|
1173
|
+
this.trigger("manifestReady", manifest);
|
|
1174
|
+
return true;
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Handles Worker messages asking to create a MediaSource.
|
|
1178
|
+
* @param {Object} msg - The worker's message received.
|
|
1179
|
+
* @param {HTMLMediaElement} mediaElement - HTMLMediaElement on which the
|
|
1180
|
+
* content plays.
|
|
1181
|
+
* @param {Worker} worker - The WebWorker concerned, messages may be sent back
|
|
1182
|
+
* to it.
|
|
1183
|
+
*/
|
|
1184
|
+
_onCreateMediaSourceMessage(msg, mediaElement, mediaSourceStatus, worker) {
|
|
1185
|
+
var _a;
|
|
1186
|
+
if (((_a = this._currentContentInfo) === null || _a === void 0 ? void 0 : _a.contentId) !== msg.contentId) {
|
|
1187
|
+
log.info("MTCI: Ignoring MediaSource attachment due to wrong `contentId`");
|
|
1188
|
+
}
|
|
1189
|
+
else {
|
|
1190
|
+
const { mediaSourceId } = msg;
|
|
1191
|
+
try {
|
|
1192
|
+
mediaSourceStatus.onUpdate((currStatus, stopListening) => {
|
|
1193
|
+
if (this._currentContentInfo === null) {
|
|
1194
|
+
stopListening();
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
if (currStatus === 1 /* MediaSourceInitializationStatus.AttachNow */) {
|
|
1198
|
+
stopListening();
|
|
1199
|
+
const mediaSource = new MainMediaSourceInterface(mediaSourceId);
|
|
1200
|
+
this._currentContentInfo.mainThreadMediaSource = mediaSource;
|
|
1201
|
+
mediaSource.addEventListener("mediaSourceOpen", () => {
|
|
1202
|
+
sendMessage(worker, {
|
|
1203
|
+
type: "media-source-ready-state-change" /* MainThreadMessageType.MediaSourceReadyStateChange */,
|
|
1204
|
+
mediaSourceId,
|
|
1205
|
+
value: "open",
|
|
1206
|
+
});
|
|
1207
|
+
});
|
|
1208
|
+
mediaSource.addEventListener("mediaSourceEnded", () => {
|
|
1209
|
+
sendMessage(worker, {
|
|
1210
|
+
type: "media-source-ready-state-change" /* MainThreadMessageType.MediaSourceReadyStateChange */,
|
|
1211
|
+
mediaSourceId,
|
|
1212
|
+
value: "ended",
|
|
1213
|
+
});
|
|
1214
|
+
});
|
|
1215
|
+
mediaSource.addEventListener("mediaSourceClose", () => {
|
|
1216
|
+
sendMessage(worker, {
|
|
1217
|
+
type: "media-source-ready-state-change" /* MainThreadMessageType.MediaSourceReadyStateChange */,
|
|
1218
|
+
mediaSourceId,
|
|
1219
|
+
value: "closed",
|
|
1220
|
+
});
|
|
1221
|
+
});
|
|
1222
|
+
let url = null;
|
|
1223
|
+
if (mediaSource.handle.type === "handle") {
|
|
1224
|
+
mediaElement.srcObject = mediaSource.handle.value;
|
|
1225
|
+
}
|
|
1226
|
+
else {
|
|
1227
|
+
url = URL.createObjectURL(mediaSource.handle.value);
|
|
1228
|
+
mediaElement.src = url;
|
|
1229
|
+
}
|
|
1230
|
+
this._currentMediaSourceCanceller.signal.register(() => {
|
|
1231
|
+
mediaSource.dispose();
|
|
1232
|
+
resetMediaElement(mediaElement, url);
|
|
1233
|
+
});
|
|
1234
|
+
mediaSourceStatus.setValue(2 /* MediaSourceInitializationStatus.Attached */);
|
|
1235
|
+
}
|
|
1236
|
+
}, {
|
|
1237
|
+
emitCurrentValue: true,
|
|
1238
|
+
clearSignal: this._currentMediaSourceCanceller.signal,
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
catch (err) {
|
|
1242
|
+
const error = new OtherError("NONE", "Unknown error when creating the MediaSource");
|
|
1243
|
+
this._onFatalError(error);
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
function bindNumberReferencesToWorker(worker, cancellationSignal, ...refs) {
|
|
1249
|
+
for (const ref of refs) {
|
|
1250
|
+
ref[0].onUpdate((newVal) => {
|
|
1251
|
+
// NOTE: The TypeScript checks have already been made by this function's
|
|
1252
|
+
// overload, but the body here is not aware of that.
|
|
1253
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1254
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1255
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
1256
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
1257
|
+
sendMessage(worker, {
|
|
1258
|
+
type: "ref-update" /* MainThreadMessageType.ReferenceUpdate */,
|
|
1259
|
+
value: { name: ref[1], newVal: newVal },
|
|
1260
|
+
});
|
|
1261
|
+
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
1262
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
1263
|
+
/* eslint-enable @typescript-eslint/no-unsafe-call */
|
|
1264
|
+
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
1265
|
+
}, { clearSignal: cancellationSignal, emitCurrentValue: true });
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
function formatWorkerError(sentError) {
|
|
1269
|
+
var _a;
|
|
1270
|
+
switch (sentError.name) {
|
|
1271
|
+
case "NetworkError":
|
|
1272
|
+
return new NetworkError(sentError.code, new RequestError(sentError.baseError.url, sentError.baseError.status, sentError.baseError.type));
|
|
1273
|
+
case "MediaError":
|
|
1274
|
+
/* eslint-disable-next-line */
|
|
1275
|
+
return new MediaError(sentError.code, sentError.reason, {
|
|
1276
|
+
tracks: sentError.tracks,
|
|
1277
|
+
});
|
|
1278
|
+
case "EncryptedMediaError":
|
|
1279
|
+
if (sentError.code === "KEY_STATUS_CHANGE_ERROR") {
|
|
1280
|
+
return new EncryptedMediaError(sentError.code, sentError.reason, {
|
|
1281
|
+
keyStatuses: (_a = sentError.keyStatuses) !== null && _a !== void 0 ? _a : [],
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
else {
|
|
1285
|
+
return new EncryptedMediaError(sentError.code, sentError.reason);
|
|
1286
|
+
}
|
|
1287
|
+
case "OtherError":
|
|
1288
|
+
return new OtherError(sentError.code, sentError.reason);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Ensure that all `Representation` and `Adaptation` have a known status
|
|
1293
|
+
* for their codec support and probe it for cases where that's not the
|
|
1294
|
+
* case.
|
|
1295
|
+
*
|
|
1296
|
+
* Because probing for codec support is always synchronous in the main thread,
|
|
1297
|
+
* calling this function ensures that support is now known.
|
|
1298
|
+
*
|
|
1299
|
+
* @param {Object} manifest
|
|
1300
|
+
*/
|
|
1301
|
+
function updateManifestCodecSupport(manifest) {
|
|
1302
|
+
const codecSupportList = [];
|
|
1303
|
+
const codecSupportMap = new Map();
|
|
1304
|
+
manifest.periods.forEach((p) => {
|
|
1305
|
+
var _a, _b, _c;
|
|
1306
|
+
[
|
|
1307
|
+
...((_a = p.adaptations.audio) !== null && _a !== void 0 ? _a : []),
|
|
1308
|
+
...((_b = p.adaptations.video) !== null && _b !== void 0 ? _b : []),
|
|
1309
|
+
...((_c = p.adaptations.text) !== null && _c !== void 0 ? _c : []),
|
|
1310
|
+
].forEach((a) => {
|
|
1311
|
+
let hasSupportedCodecs = false;
|
|
1312
|
+
a.representations.forEach((r) => {
|
|
1313
|
+
var _a, _b;
|
|
1314
|
+
if (r.isSupported !== undefined) {
|
|
1315
|
+
if (!hasSupportedCodecs && r.isSupported) {
|
|
1316
|
+
hasSupportedCodecs = true;
|
|
1317
|
+
}
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
let isSupported = false;
|
|
1321
|
+
const mimeType = (_a = r.mimeType) !== null && _a !== void 0 ? _a : "";
|
|
1322
|
+
let codecs = (_b = r.codecs) !== null && _b !== void 0 ? _b : [];
|
|
1323
|
+
if (codecs.length === 0) {
|
|
1324
|
+
codecs = [""];
|
|
1325
|
+
}
|
|
1326
|
+
for (let codecIdx = 0; codecIdx < codecs.length; codecIdx++) {
|
|
1327
|
+
const codec = codecs[codecIdx];
|
|
1328
|
+
isSupported = checkCodecSupport(mimeType, codec);
|
|
1329
|
+
if (isSupported) {
|
|
1330
|
+
r.codecs = [codec];
|
|
1331
|
+
break;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
r.isSupported = isSupported;
|
|
1335
|
+
if (r.isSupported) {
|
|
1336
|
+
hasSupportedCodecs = true;
|
|
1337
|
+
}
|
|
1338
|
+
if (!hasSupportedCodecs) {
|
|
1339
|
+
if (a.isSupported !== false) {
|
|
1340
|
+
a.isSupported = false;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
else {
|
|
1344
|
+
a.isSupported = true;
|
|
1345
|
+
}
|
|
1346
|
+
});
|
|
1347
|
+
});
|
|
1348
|
+
["audio", "video"].forEach((ttype) => {
|
|
1349
|
+
const forType = p.adaptations[ttype];
|
|
1350
|
+
if (forType !== undefined && forType.every((a) => a.isSupported === false)) {
|
|
1351
|
+
throw new MediaError("MANIFEST_INCOMPATIBLE_CODECS_ERROR", "No supported " + ttype + " adaptations", { tracks: undefined });
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
});
|
|
1355
|
+
return codecSupportList;
|
|
1356
|
+
function checkCodecSupport(mimeType, codec) {
|
|
1357
|
+
var _a;
|
|
1358
|
+
const knownSupport = (_a = codecSupportMap.get(mimeType)) === null || _a === void 0 ? void 0 : _a.get(codec);
|
|
1359
|
+
let isSupported;
|
|
1360
|
+
if (knownSupport !== undefined) {
|
|
1361
|
+
isSupported = knownSupport;
|
|
1362
|
+
}
|
|
1363
|
+
else {
|
|
1364
|
+
const mimeTypeStr = `${mimeType};codecs="${codec}"`;
|
|
1365
|
+
isSupported = isCodecSupported(mimeTypeStr);
|
|
1366
|
+
codecSupportList.push({
|
|
1367
|
+
mimeType,
|
|
1368
|
+
codec,
|
|
1369
|
+
result: isSupported,
|
|
1370
|
+
});
|
|
1371
|
+
const prevCodecMap = codecSupportMap.get(mimeType);
|
|
1372
|
+
if (prevCodecMap !== undefined) {
|
|
1373
|
+
prevCodecMap.set(codec, isSupported);
|
|
1374
|
+
}
|
|
1375
|
+
else {
|
|
1376
|
+
const codecMap = new Map();
|
|
1377
|
+
codecMap.set(codec, isSupported);
|
|
1378
|
+
codecSupportMap.set(mimeType, codecMap);
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
return isSupported;
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
function formatSourceBufferError(error) {
|
|
1385
|
+
if (error instanceof SourceBufferError) {
|
|
1386
|
+
return error;
|
|
1387
|
+
}
|
|
1388
|
+
else if (error instanceof Error) {
|
|
1389
|
+
return new SourceBufferError(error.name, error.message, error.name === "QuotaExceededError");
|
|
1390
|
+
}
|
|
1391
|
+
else {
|
|
1392
|
+
return new SourceBufferError("Error", "Unknown SourceBufferError Error", false);
|
|
1393
|
+
}
|
|
1394
|
+
}
|