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
|
@@ -1,1393 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
18
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
-
if (!m) return o;
|
|
20
|
-
var i = m.call(o), r, ar = [], e;
|
|
21
|
-
try {
|
|
22
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
23
|
-
}
|
|
24
|
-
catch (error) { e = { error: error }; }
|
|
25
|
-
finally {
|
|
26
|
-
try {
|
|
27
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
28
|
-
}
|
|
29
|
-
finally { if (e) throw e.error; }
|
|
30
|
-
}
|
|
31
|
-
return ar;
|
|
32
|
-
};
|
|
33
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
34
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
35
|
-
if (ar || !(i in from)) {
|
|
36
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
37
|
-
ar[i] = from[i];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
41
|
-
};
|
|
42
|
-
var __values = (this && this.__values) || function(o) {
|
|
43
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
44
|
-
if (m) return m.call(o);
|
|
45
|
-
if (o && typeof o.length === "number") return {
|
|
46
|
-
next: function () {
|
|
47
|
-
if (o && i >= o.length) o = void 0;
|
|
48
|
-
return { value: o && o[i++], done: !o };
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
52
|
-
};
|
|
53
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
var compat_1 = require("../../../../compat");
|
|
55
|
-
var errors_1 = require("../../../../errors");
|
|
56
|
-
var features_1 = require("../../../../features");
|
|
57
|
-
var log_1 = require("../../../../log");
|
|
58
|
-
var manifest_1 = require("../../../../manifest");
|
|
59
|
-
var main_media_source_interface_1 = require("../../../../mse/main_media_source_interface");
|
|
60
|
-
var array_find_1 = require("../../../../utils/array_find");
|
|
61
|
-
var assert_1 = require("../../../../utils/assert");
|
|
62
|
-
var id_generator_1 = require("../../../../utils/id_generator");
|
|
63
|
-
var is_null_or_undefined_1 = require("../../../../utils/is_null_or_undefined");
|
|
64
|
-
var object_assign_1 = require("../../../../utils/object_assign");
|
|
65
|
-
var reference_1 = require("../../../../utils/reference");
|
|
66
|
-
var request_1 = require("../../../../utils/request");
|
|
67
|
-
var task_canceller_1 = require("../../../../utils/task_canceller");
|
|
68
|
-
var decrypt_1 = require("../../../decrypt");
|
|
69
|
-
var types_1 = require("../../types");
|
|
70
|
-
var create_core_playback_observer_1 = require("../../utils/create_core_playback_observer");
|
|
71
|
-
var create_media_source_1 = require("../../utils/create_media_source");
|
|
72
|
-
var get_initial_time_1 = require("../../utils/get_initial_time");
|
|
73
|
-
var get_loaded_reference_1 = require("../../utils/get_loaded_reference");
|
|
74
|
-
var initial_seek_and_play_1 = require("../../utils/initial_seek_and_play");
|
|
75
|
-
var rebuffering_controller_1 = require("../../utils/rebuffering_controller");
|
|
76
|
-
var stream_events_emitter_1 = require("../../utils/stream_events_emitter/stream_events_emitter");
|
|
77
|
-
var throw_on_media_error_1 = require("../../utils/throw_on_media_error");
|
|
78
|
-
var send_message_1 = require("./send_message");
|
|
79
|
-
var generateContentId = (0, id_generator_1.default)();
|
|
80
|
-
/**
|
|
81
|
-
* @class MultiThreadContentInitializer
|
|
82
|
-
*/
|
|
83
|
-
var MultiThreadContentInitializer = /** @class */ (function (_super) {
|
|
84
|
-
__extends(MultiThreadContentInitializer, _super);
|
|
85
|
-
/**
|
|
86
|
-
* Create a new `MultiThreadContentInitializer`, associated to the given
|
|
87
|
-
* settings.
|
|
88
|
-
* @param {Object} settings
|
|
89
|
-
*/
|
|
90
|
-
function MultiThreadContentInitializer(settings) {
|
|
91
|
-
var _this = _super.call(this) || this;
|
|
92
|
-
_this._settings = settings;
|
|
93
|
-
_this._initCanceller = new task_canceller_1.default();
|
|
94
|
-
_this._currentMediaSourceCanceller = new task_canceller_1.default();
|
|
95
|
-
_this._currentMediaSourceCanceller.linkToSignal(_this._initCanceller.signal);
|
|
96
|
-
_this._currentContentInfo = null;
|
|
97
|
-
return _this;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Perform non-destructive preparation steps, to prepare a future content.
|
|
101
|
-
*/
|
|
102
|
-
MultiThreadContentInitializer.prototype.prepare = function () {
|
|
103
|
-
var _a, _b;
|
|
104
|
-
if (this._currentContentInfo !== null || this._initCanceller.isUsed()) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
var contentId = generateContentId();
|
|
108
|
-
var _c = this._settings, adaptiveOptions = _c.adaptiveOptions, transportOptions = _c.transportOptions, worker = _c.worker;
|
|
109
|
-
var _d = this._settings.bufferOptions, wantedBufferAhead = _d.wantedBufferAhead, maxVideoBufferSize = _d.maxVideoBufferSize, maxBufferAhead = _d.maxBufferAhead, maxBufferBehind = _d.maxBufferBehind;
|
|
110
|
-
var initialVideoBitrate = adaptiveOptions.initialBitrates.video;
|
|
111
|
-
var initialAudioBitrate = adaptiveOptions.initialBitrates.audio;
|
|
112
|
-
this._currentContentInfo = {
|
|
113
|
-
contentId: contentId,
|
|
114
|
-
manifest: null,
|
|
115
|
-
mainThreadMediaSource: null,
|
|
116
|
-
rebufferingController: null,
|
|
117
|
-
streamEventsEmitter: null,
|
|
118
|
-
initialTime: undefined,
|
|
119
|
-
autoPlay: undefined,
|
|
120
|
-
initialPlayPerformed: null,
|
|
121
|
-
};
|
|
122
|
-
(0, send_message_1.default)(worker, { type: "prepare" /* MainThreadMessageType.PrepareContent */,
|
|
123
|
-
value: { contentId: contentId, url: this._settings.url,
|
|
124
|
-
hasText: this._hasTextBufferFeature(), transportOptions: transportOptions, initialVideoBitrate: initialVideoBitrate, initialAudioBitrate: initialAudioBitrate, manifestRetryOptions: this._settings.manifestRequestSettings,
|
|
125
|
-
segmentRetryOptions: this._settings.segmentRequestOptions } });
|
|
126
|
-
this._initCanceller.signal.register(function () {
|
|
127
|
-
(0, send_message_1.default)(worker, { type: "stop" /* MainThreadMessageType.StopContent */, contentId: contentId, value: null });
|
|
128
|
-
});
|
|
129
|
-
if (this._initCanceller.isUsed()) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
// Also bind all `SharedReference` objects:
|
|
133
|
-
var throttleVideoBitrate = (_a = adaptiveOptions.throttlers.throttleBitrate.video) !== null && _a !== void 0 ? _a : new reference_1.default(Infinity);
|
|
134
|
-
bindNumberReferencesToWorker(worker, this._initCanceller.signal, [wantedBufferAhead, "wantedBufferAhead"], [maxVideoBufferSize, "maxVideoBufferSize"], [maxBufferAhead, "maxBufferAhead"], [maxBufferBehind, "maxBufferBehind"], [throttleVideoBitrate, "throttleVideoBitrate"]);
|
|
135
|
-
var limitVideoResolution = (_b = adaptiveOptions.throttlers.limitResolution.video) !== null && _b !== void 0 ? _b : new reference_1.default({
|
|
136
|
-
height: undefined,
|
|
137
|
-
width: undefined,
|
|
138
|
-
pixelRatio: 1,
|
|
139
|
-
});
|
|
140
|
-
limitVideoResolution.onUpdate(function (newVal) {
|
|
141
|
-
(0, send_message_1.default)(worker, { type: "ref-update" /* MainThreadMessageType.ReferenceUpdate */,
|
|
142
|
-
value: { name: "limitVideoResolution", newVal: newVal } });
|
|
143
|
-
}, { clearSignal: this._initCanceller.signal, emitCurrentValue: true });
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* Update URL of the Manifest.
|
|
147
|
-
* @param {Array.<string>|undefined} urls - URLs to reach that Manifest from
|
|
148
|
-
* the most prioritized URL to the least prioritized URL.
|
|
149
|
-
* @param {boolean} refreshNow - If `true` the resource in question (e.g.
|
|
150
|
-
* DASH's MPD) will be refreshed immediately.
|
|
151
|
-
*/
|
|
152
|
-
MultiThreadContentInitializer.prototype.updateContentUrls = function (urls, refreshNow) {
|
|
153
|
-
if (this._currentContentInfo === null) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
(0, send_message_1.default)(this._settings.worker, { type: "urls-update" /* MainThreadMessageType.ContentUrlsUpdate */,
|
|
157
|
-
contentId: this._currentContentInfo.contentId,
|
|
158
|
-
value: { urls: urls, refreshNow: refreshNow } });
|
|
159
|
-
};
|
|
160
|
-
/**
|
|
161
|
-
* @param {HTMLMediaElement} mediaElement
|
|
162
|
-
* @param {Object} playbackObserver
|
|
163
|
-
*/
|
|
164
|
-
MultiThreadContentInitializer.prototype.start = function (mediaElement, playbackObserver) {
|
|
165
|
-
var _this = this;
|
|
166
|
-
this.prepare(); // Load Manifest if not already done
|
|
167
|
-
if (this._initCanceller.isUsed()) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
var textDisplayer = null;
|
|
171
|
-
if (this._settings.textTrackOptions.textTrackMode === "html" &&
|
|
172
|
-
features_1.default.htmlTextDisplayer !== null) {
|
|
173
|
-
(0, assert_1.default)(this._hasTextBufferFeature());
|
|
174
|
-
textDisplayer = new features_1.default.htmlTextDisplayer(mediaElement, this._settings.textTrackOptions.textTrackElement);
|
|
175
|
-
}
|
|
176
|
-
else if (features_1.default.nativeTextDisplayer !== null) {
|
|
177
|
-
(0, assert_1.default)(this._hasTextBufferFeature());
|
|
178
|
-
textDisplayer = new features_1.default.nativeTextDisplayer(mediaElement);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
(0, assert_1.default)(!this._hasTextBufferFeature());
|
|
182
|
-
}
|
|
183
|
-
this._initCanceller.signal.register(function () {
|
|
184
|
-
textDisplayer === null || textDisplayer === void 0 ? void 0 : textDisplayer.stop();
|
|
185
|
-
});
|
|
186
|
-
/** Translate errors coming from the media element into RxPlayer errors. */
|
|
187
|
-
(0, throw_on_media_error_1.default)(mediaElement, function (error) { return _this._onFatalError(error); }, this._initCanceller.signal);
|
|
188
|
-
/** Send content protection initialization data. */
|
|
189
|
-
var lastContentProtection = new reference_1.default(null);
|
|
190
|
-
var mediaSourceStatus = new reference_1.default(0 /* MediaSourceInitializationStatus.Nothing */);
|
|
191
|
-
var drmInitializationStatus = this._initializeContentDecryption(mediaElement, lastContentProtection, mediaSourceStatus, this._initCanceller.signal);
|
|
192
|
-
var playbackStartParams = { mediaElement: mediaElement, textDisplayer: textDisplayer, playbackObserver: playbackObserver, drmInitializationStatus: drmInitializationStatus, mediaSourceStatus: mediaSourceStatus };
|
|
193
|
-
mediaSourceStatus.onUpdate(function (msInitStatus, stopListeningMSStatus) {
|
|
194
|
-
if (msInitStatus === 2 /* MediaSourceInitializationStatus.Attached */) {
|
|
195
|
-
stopListeningMSStatus();
|
|
196
|
-
_this._startPlaybackIfReady(playbackStartParams);
|
|
197
|
-
}
|
|
198
|
-
}, { clearSignal: this._initCanceller.signal, emitCurrentValue: true });
|
|
199
|
-
drmInitializationStatus.onUpdate(function (initializationStatus, stopListeningDrm) {
|
|
200
|
-
if (initializationStatus.initializationState.type === "initialized") {
|
|
201
|
-
stopListeningDrm();
|
|
202
|
-
_this._startPlaybackIfReady(playbackStartParams);
|
|
203
|
-
}
|
|
204
|
-
}, { emitCurrentValue: true, clearSignal: this._initCanceller.signal });
|
|
205
|
-
var onmessage = function (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, _27, _28;
|
|
207
|
-
var 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
|
-
var mediaSourceLink_1 = msgData.value;
|
|
214
|
-
mediaSourceStatus.onUpdate(function (currStatus, stopListening) {
|
|
215
|
-
if (currStatus === 1 /* MediaSourceInitializationStatus.AttachNow */) {
|
|
216
|
-
stopListening();
|
|
217
|
-
log_1.default.info("MTCI: Attaching MediaSource URL to the media element");
|
|
218
|
-
if (mediaSourceLink_1.type === "handle") {
|
|
219
|
-
mediaElement.srcObject = mediaSourceLink_1.value;
|
|
220
|
-
_this._currentMediaSourceCanceller.signal.register(function () {
|
|
221
|
-
mediaElement.srcObject = null;
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
mediaElement.src = mediaSourceLink_1.value;
|
|
226
|
-
_this._currentMediaSourceCanceller.signal.register(function () {
|
|
227
|
-
(0, create_media_source_1.resetMediaElement)(mediaElement, mediaSourceLink_1.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) !== msgData.mediaSourceId) {
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
var mediaSource = _this._currentContentInfo.mainThreadMediaSource;
|
|
256
|
-
mediaSource.addSourceBuffer(msgData.value.sourceBufferType, msgData.value.codec);
|
|
257
|
-
}
|
|
258
|
-
break;
|
|
259
|
-
case "source-buffer-append" /* WorkerMessageType.SourceBufferAppend */:
|
|
260
|
-
{
|
|
261
|
-
if (((_g = (_f = _this._currentContentInfo) === null || _f === void 0 ? void 0 : _f.mainThreadMediaSource) === null || _g === void 0 ? void 0 : _g.id) !== msgData.mediaSourceId) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
var mediaSource_1 = _this._currentContentInfo.mainThreadMediaSource;
|
|
265
|
-
var sourceBuffer_1 = (0, array_find_1.default)(mediaSource_1.sourceBuffers, function (s) {
|
|
266
|
-
return s.type === msgData.sourceBufferType;
|
|
267
|
-
});
|
|
268
|
-
if (sourceBuffer_1 === undefined) {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
sourceBuffer_1.appendBuffer(msgData.value.data, msgData.value.params)
|
|
272
|
-
.then(function (buffered) {
|
|
273
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
274
|
-
type: "sb-success" /* MainThreadMessageType.SourceBufferSuccess */,
|
|
275
|
-
mediaSourceId: mediaSource_1.id,
|
|
276
|
-
sourceBufferType: sourceBuffer_1.type,
|
|
277
|
-
operationId: msgData.operationId,
|
|
278
|
-
value: { buffered: buffered },
|
|
279
|
-
});
|
|
280
|
-
})
|
|
281
|
-
.catch(function (error) {
|
|
282
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
283
|
-
type: "sb-error" /* MainThreadMessageType.SourceBufferError */,
|
|
284
|
-
mediaSourceId: mediaSource_1.id,
|
|
285
|
-
sourceBufferType: sourceBuffer_1.type,
|
|
286
|
-
operationId: msgData.operationId,
|
|
287
|
-
value: error instanceof task_canceller_1.CancellationError ?
|
|
288
|
-
{ errorName: "CancellationError" } :
|
|
289
|
-
formatSourceBufferError(error).serialize(),
|
|
290
|
-
});
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
break;
|
|
294
|
-
case "source-buffer-remove" /* WorkerMessageType.SourceBufferRemove */:
|
|
295
|
-
{
|
|
296
|
-
if (((_j = (_h = _this._currentContentInfo) === null || _h === void 0 ? void 0 : _h.mainThreadMediaSource) === null || _j === void 0 ? void 0 : _j.id) !== msgData.mediaSourceId) {
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
var mediaSource_2 = _this._currentContentInfo.mainThreadMediaSource;
|
|
300
|
-
var sourceBuffer_2 = (0, array_find_1.default)(mediaSource_2.sourceBuffers, function (s) {
|
|
301
|
-
return s.type === msgData.sourceBufferType;
|
|
302
|
-
});
|
|
303
|
-
if (sourceBuffer_2 === undefined) {
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
sourceBuffer_2.remove(msgData.value.start, msgData.value.end)
|
|
307
|
-
.then(function (buffered) {
|
|
308
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
309
|
-
type: "sb-success" /* MainThreadMessageType.SourceBufferSuccess */,
|
|
310
|
-
mediaSourceId: mediaSource_2.id,
|
|
311
|
-
sourceBufferType: sourceBuffer_2.type,
|
|
312
|
-
operationId: msgData.operationId,
|
|
313
|
-
value: { buffered: buffered },
|
|
314
|
-
});
|
|
315
|
-
})
|
|
316
|
-
.catch(function (error) {
|
|
317
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
318
|
-
type: "sb-error" /* MainThreadMessageType.SourceBufferError */,
|
|
319
|
-
mediaSourceId: mediaSource_2.id,
|
|
320
|
-
sourceBufferType: sourceBuffer_2.type,
|
|
321
|
-
operationId: msgData.operationId,
|
|
322
|
-
value: error instanceof task_canceller_1.CancellationError ?
|
|
323
|
-
{ errorName: "CancellationError" } :
|
|
324
|
-
formatSourceBufferError(error).serialize(),
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
break;
|
|
329
|
-
case "abort-source-buffer" /* WorkerMessageType.AbortSourceBuffer */:
|
|
330
|
-
{
|
|
331
|
-
if (((_l = (_k = _this._currentContentInfo) === null || _k === void 0 ? void 0 : _k.mainThreadMediaSource) === null || _l === void 0 ? void 0 : _l.id) !== msgData.mediaSourceId) {
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
var mediaSource = _this._currentContentInfo.mainThreadMediaSource;
|
|
335
|
-
var sourceBuffer = (0, array_find_1.default)(mediaSource.sourceBuffers, function (s) {
|
|
336
|
-
return s.type === msgData.sourceBufferType;
|
|
337
|
-
});
|
|
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) !== msgData.mediaSourceId) {
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
var mediaSource = _this._currentContentInfo.mainThreadMediaSource;
|
|
350
|
-
if ((mediaSource === null || mediaSource === void 0 ? void 0 : mediaSource.id) !== msgData.mediaSourceId) {
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
mediaSource.setDuration(msgData.value.duration, msgData.value.isRealEndKnown);
|
|
354
|
-
}
|
|
355
|
-
break;
|
|
356
|
-
case "stop-media-source-duration" /* WorkerMessageType.InterruptMediaSourceDurationUpdate */:
|
|
357
|
-
{
|
|
358
|
-
if (((_q = (_p = _this._currentContentInfo) === null || _p === void 0 ? void 0 : _p.mainThreadMediaSource) === null || _q === void 0 ? void 0 : _q.id) !== msgData.mediaSourceId) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
var mediaSource = _this._currentContentInfo.mainThreadMediaSource;
|
|
362
|
-
if ((mediaSource === null || mediaSource === void 0 ? void 0 : mediaSource.id) !== msgData.mediaSourceId) {
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
mediaSource.interruptDurationSetting();
|
|
366
|
-
}
|
|
367
|
-
break;
|
|
368
|
-
case "end-of-stream" /* WorkerMessageType.EndOfStream */:
|
|
369
|
-
{
|
|
370
|
-
if (((_s = (_r = _this._currentContentInfo) === null || _r === void 0 ? void 0 : _r.mainThreadMediaSource) === null || _s === void 0 ? void 0 : _s.id) !== msgData.mediaSourceId) {
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
_this._currentContentInfo.mainThreadMediaSource.maintainEndOfStream();
|
|
374
|
-
}
|
|
375
|
-
break;
|
|
376
|
-
case "stop-end-of-stream" /* WorkerMessageType.InterruptEndOfStream */:
|
|
377
|
-
{
|
|
378
|
-
if (((_u = (_t = _this._currentContentInfo) === null || _t === void 0 ? void 0 : _t.mainThreadMediaSource) === null || _u === void 0 ? void 0 : _u.id) !== msgData.mediaSourceId) {
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
_this._currentContentInfo.mainThreadMediaSource.stopEndOfStream();
|
|
382
|
-
}
|
|
383
|
-
break;
|
|
384
|
-
case "dispose-media-source" /* WorkerMessageType.DisposeMediaSource */:
|
|
385
|
-
{
|
|
386
|
-
if (((_w = (_v = _this._currentContentInfo) === null || _v === void 0 ? void 0 : _v.mainThreadMediaSource) === null || _w === void 0 ? void 0 : _w.id) !== msgData.mediaSourceId) {
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
_this._currentContentInfo.mainThreadMediaSource.dispose();
|
|
390
|
-
}
|
|
391
|
-
break;
|
|
392
|
-
case "needs-buffer-flush" /* WorkerMessageType.NeedsBufferFlush */: {
|
|
393
|
-
if (((_x = _this._currentContentInfo) === null || _x === void 0 ? void 0 : _x.contentId) !== msgData.contentId) {
|
|
394
|
-
return;
|
|
395
|
-
}
|
|
396
|
-
var currentTime = mediaElement.currentTime;
|
|
397
|
-
var relativeResumingPosition = (_z = (_y = msgData.value) === null || _y === void 0 ? void 0 : _y.relativeResumingPosition) !== null && _z !== void 0 ? _z : 0;
|
|
398
|
-
var canBeApproximateSeek = Boolean((_0 = msgData.value) === null || _0 === void 0 ? void 0 : _0.relativePosHasBeenDefaulted);
|
|
399
|
-
var wantedSeekingTime = void 0;
|
|
400
|
-
if (relativeResumingPosition === 0 && canBeApproximateSeek) {
|
|
401
|
-
// in case relativeResumingPosition is 0, we still perform
|
|
402
|
-
// a tiny seek to be sure that the browser will correclty reload the video.
|
|
403
|
-
wantedSeekingTime = currentTime + 0.001;
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
wantedSeekingTime = currentTime + relativeResumingPosition;
|
|
407
|
-
}
|
|
408
|
-
playbackObserver.setCurrentTime(wantedSeekingTime);
|
|
409
|
-
break;
|
|
410
|
-
}
|
|
411
|
-
case "active-period-changed" /* WorkerMessageType.ActivePeriodChanged */: {
|
|
412
|
-
if (((_1 = _this._currentContentInfo) === null || _1 === void 0 ? void 0 : _1.contentId) !== msgData.contentId ||
|
|
413
|
-
_this._currentContentInfo.manifest === null) {
|
|
414
|
-
return;
|
|
415
|
-
}
|
|
416
|
-
var period_1 = (0, array_find_1.default)(_this._currentContentInfo.manifest.periods, function (p) {
|
|
417
|
-
return p.id === msgData.value.periodId;
|
|
418
|
-
});
|
|
419
|
-
if (period_1 !== undefined) {
|
|
420
|
-
_this.trigger("activePeriodChanged", { period: period_1 });
|
|
421
|
-
}
|
|
422
|
-
break;
|
|
423
|
-
}
|
|
424
|
-
case "adaptation-changed" /* WorkerMessageType.AdaptationChanged */: {
|
|
425
|
-
if (((_2 = _this._currentContentInfo) === null || _2 === void 0 ? void 0 : _2.contentId) !== msgData.contentId ||
|
|
426
|
-
_this._currentContentInfo.manifest === null) {
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
var period_2 = (0, array_find_1.default)(_this._currentContentInfo.manifest.periods, function (p) {
|
|
430
|
-
return p.id === msgData.value.periodId;
|
|
431
|
-
});
|
|
432
|
-
if (period_2 === undefined) {
|
|
433
|
-
return;
|
|
434
|
-
}
|
|
435
|
-
if (msgData.value.adaptationId === null) {
|
|
436
|
-
_this.trigger("adaptationChange", { period: period_2, adaptation: null,
|
|
437
|
-
type: msgData.value.type });
|
|
438
|
-
return;
|
|
439
|
-
}
|
|
440
|
-
var adaptations = (_3 = period_2.adaptations[msgData.value.type]) !== null && _3 !== void 0 ? _3 : [];
|
|
441
|
-
var adaptation = (0, array_find_1.default)(adaptations, function (a) {
|
|
442
|
-
return a.id === msgData.value.adaptationId;
|
|
443
|
-
});
|
|
444
|
-
if (adaptation !== undefined) {
|
|
445
|
-
_this.trigger("adaptationChange", { period: period_2, adaptation: adaptation, type: msgData.value.type });
|
|
446
|
-
}
|
|
447
|
-
break;
|
|
448
|
-
}
|
|
449
|
-
case "representation-changed" /* WorkerMessageType.RepresentationChanged */: {
|
|
450
|
-
if (((_4 = _this._currentContentInfo) === null || _4 === void 0 ? void 0 : _4.contentId) !== msgData.contentId ||
|
|
451
|
-
_this._currentContentInfo.manifest === null) {
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
|
-
var period_3 = (0, array_find_1.default)(_this._currentContentInfo.manifest.periods, function (p) {
|
|
455
|
-
return p.id === msgData.value.periodId;
|
|
456
|
-
});
|
|
457
|
-
if (period_3 === undefined) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
if (msgData.value.representationId === null) {
|
|
461
|
-
_this.trigger("representationChange", { period: period_3, type: msgData.value.type,
|
|
462
|
-
representation: null });
|
|
463
|
-
return;
|
|
464
|
-
}
|
|
465
|
-
var adaptations = (_5 = period_3.adaptations[msgData.value.type]) !== null && _5 !== void 0 ? _5 : [];
|
|
466
|
-
var adaptation = (0, array_find_1.default)(adaptations, function (a) {
|
|
467
|
-
return a.id === msgData.value.adaptationId;
|
|
468
|
-
});
|
|
469
|
-
if (adaptation === undefined) {
|
|
470
|
-
return;
|
|
471
|
-
}
|
|
472
|
-
var representation = (0, array_find_1.default)(adaptation.representations, function (r) {
|
|
473
|
-
return r.id === msgData.value.representationId;
|
|
474
|
-
});
|
|
475
|
-
if (representation !== undefined) {
|
|
476
|
-
_this.trigger("representationChange", { period: period_3, type: msgData.value.type, representation: representation });
|
|
477
|
-
}
|
|
478
|
-
break;
|
|
479
|
-
}
|
|
480
|
-
case "encryption-data-encountered" /* WorkerMessageType.EncryptionDataEncountered */:
|
|
481
|
-
if (((_6 = _this._currentContentInfo) === null || _6 === void 0 ? void 0 : _6.contentId) !== msgData.contentId) {
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
lastContentProtection.setValue(msgData.value);
|
|
485
|
-
break;
|
|
486
|
-
case "manifest-ready" /* WorkerMessageType.ManifestReady */: {
|
|
487
|
-
if (((_7 = _this._currentContentInfo) === null || _7 === void 0 ? void 0 : _7.contentId) !== msgData.contentId) {
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
490
|
-
var manifest_2 = msgData.value.manifest;
|
|
491
|
-
try {
|
|
492
|
-
var codecUpdate = updateManifestCodecSupport(manifest_2);
|
|
493
|
-
if (codecUpdate.length > 0) {
|
|
494
|
-
(0, send_message_1.default)(_this._settings.worker, { type: "codec-support-update" /* MainThreadMessageType.CodecSupportUpdate */,
|
|
495
|
-
value: codecUpdate });
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
catch (err) {
|
|
499
|
-
_this._onFatalError(err);
|
|
500
|
-
}
|
|
501
|
-
_this._currentContentInfo.manifest = manifest_2;
|
|
502
|
-
_this._startPlaybackIfReady(playbackStartParams);
|
|
503
|
-
break;
|
|
504
|
-
}
|
|
505
|
-
case "manifest-update" /* WorkerMessageType.ManifestUpdate */:
|
|
506
|
-
if (((_8 = _this._currentContentInfo) === null || _8 === void 0 ? void 0 : _8.contentId) !== msgData.contentId) {
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
var manifest = (_9 = _this._currentContentInfo) === null || _9 === void 0 ? void 0 : _9.manifest;
|
|
510
|
-
if ((0, is_null_or_undefined_1.default)(manifest)) {
|
|
511
|
-
log_1.default.error("MTCI: Manifest update but no Manifest loaded");
|
|
512
|
-
return;
|
|
513
|
-
}
|
|
514
|
-
(0, manifest_1.replicateUpdatesOnManifestMetadata)(manifest, msgData.value.manifest, msgData.value.updates);
|
|
515
|
-
(_11 = (_10 = _this._currentContentInfo) === null || _10 === void 0 ? void 0 : _10.streamEventsEmitter) === null || _11 === void 0 ? void 0 : _11.onManifestUpdate(manifest);
|
|
516
|
-
// TODO only on added `Representation`?
|
|
517
|
-
try {
|
|
518
|
-
var codecUpdate = updateManifestCodecSupport(manifest);
|
|
519
|
-
if (codecUpdate.length > 0) {
|
|
520
|
-
(0, send_message_1.default)(_this._settings.worker, { type: "codec-support-update" /* MainThreadMessageType.CodecSupportUpdate */,
|
|
521
|
-
value: codecUpdate });
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
catch (err) {
|
|
525
|
-
_this._onFatalError(err);
|
|
526
|
-
}
|
|
527
|
-
_this.trigger("manifestUpdate", msgData.value.updates);
|
|
528
|
-
break;
|
|
529
|
-
case "update-playback-rate" /* WorkerMessageType.UpdatePlaybackRate */:
|
|
530
|
-
if (((_12 = _this._currentContentInfo) === null || _12 === void 0 ? void 0 : _12.contentId) !== msgData.contentId) {
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
playbackObserver.setPlaybackRate(msgData.value);
|
|
534
|
-
break;
|
|
535
|
-
case "bitrate-estimate-change" /* WorkerMessageType.BitrateEstimateChange */:
|
|
536
|
-
if (((_13 = _this._currentContentInfo) === null || _13 === void 0 ? void 0 : _13.contentId) !== msgData.contentId) {
|
|
537
|
-
return;
|
|
538
|
-
}
|
|
539
|
-
_this.trigger("bitrateEstimateChange", {
|
|
540
|
-
type: msgData.value.bufferType,
|
|
541
|
-
bitrate: msgData.value.bitrate,
|
|
542
|
-
});
|
|
543
|
-
break;
|
|
544
|
-
case "inband-event" /* WorkerMessageType.InbandEvent */:
|
|
545
|
-
if (((_14 = _this._currentContentInfo) === null || _14 === void 0 ? void 0 : _14.contentId) !== msgData.contentId) {
|
|
546
|
-
return;
|
|
547
|
-
}
|
|
548
|
-
_this.trigger("inbandEvents", msgData.value);
|
|
549
|
-
break;
|
|
550
|
-
case "locked-stream" /* WorkerMessageType.LockedStream */: {
|
|
551
|
-
if (((_15 = _this._currentContentInfo) === null || _15 === void 0 ? void 0 : _15.contentId) !== msgData.contentId ||
|
|
552
|
-
_this._currentContentInfo.manifest === null) {
|
|
553
|
-
return;
|
|
554
|
-
}
|
|
555
|
-
var period_4 = (0, array_find_1.default)(_this._currentContentInfo.manifest.periods, function (p) {
|
|
556
|
-
return p.id === msgData.value.periodId;
|
|
557
|
-
});
|
|
558
|
-
if (period_4 === undefined) {
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
(_16 = _this._currentContentInfo
|
|
562
|
-
.rebufferingController) === null || _16 === void 0 ? void 0 : _16.onLockedStream(msgData.value.bufferType, period_4);
|
|
563
|
-
break;
|
|
564
|
-
}
|
|
565
|
-
case "period-stream-ready" /* WorkerMessageType.PeriodStreamReady */: {
|
|
566
|
-
if (((_17 = _this._currentContentInfo) === null || _17 === void 0 ? void 0 : _17.contentId) !== msgData.contentId ||
|
|
567
|
-
_this._currentContentInfo.manifest === null) {
|
|
568
|
-
return;
|
|
569
|
-
}
|
|
570
|
-
var period_5 = (0, array_find_1.default)(_this._currentContentInfo.manifest.periods, function (p) {
|
|
571
|
-
return p.id === msgData.value.periodId;
|
|
572
|
-
});
|
|
573
|
-
if (period_5 === undefined) {
|
|
574
|
-
return;
|
|
575
|
-
}
|
|
576
|
-
var ref_1 = new reference_1.default(undefined);
|
|
577
|
-
ref_1.onUpdate(function (adapChoice) {
|
|
578
|
-
if (_this._currentContentInfo === null) {
|
|
579
|
-
ref_1.finish();
|
|
580
|
-
return;
|
|
581
|
-
}
|
|
582
|
-
if (!(0, is_null_or_undefined_1.default)(adapChoice)) {
|
|
583
|
-
adapChoice.representations.onUpdate(function (repChoice, stopListening) {
|
|
584
|
-
if (_this._currentContentInfo === null) {
|
|
585
|
-
stopListening();
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
589
|
-
type: "rep-update" /* MainThreadMessageType.RepresentationUpdate */,
|
|
590
|
-
contentId: _this._currentContentInfo.contentId,
|
|
591
|
-
value: {
|
|
592
|
-
periodId: msgData.value.periodId,
|
|
593
|
-
adaptationId: adapChoice.adaptationId,
|
|
594
|
-
bufferType: msgData.value.bufferType,
|
|
595
|
-
choice: repChoice,
|
|
596
|
-
},
|
|
597
|
-
});
|
|
598
|
-
});
|
|
599
|
-
}
|
|
600
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
601
|
-
type: "track-update" /* MainThreadMessageType.TrackUpdate */,
|
|
602
|
-
contentId: _this._currentContentInfo.contentId,
|
|
603
|
-
value: {
|
|
604
|
-
periodId: msgData.value.periodId,
|
|
605
|
-
bufferType: msgData.value.bufferType,
|
|
606
|
-
choice: (0, is_null_or_undefined_1.default)(adapChoice) ?
|
|
607
|
-
adapChoice :
|
|
608
|
-
{
|
|
609
|
-
adaptationId: adapChoice.adaptationId,
|
|
610
|
-
switchingMode: adapChoice.switchingMode,
|
|
611
|
-
initialRepresentations: adapChoice.representations.getValue(),
|
|
612
|
-
relativeResumingPosition: adapChoice.relativeResumingPosition,
|
|
613
|
-
},
|
|
614
|
-
},
|
|
615
|
-
});
|
|
616
|
-
});
|
|
617
|
-
_this.trigger("periodStreamReady", { period: period_5, type: msgData.value.bufferType,
|
|
618
|
-
adaptationRef: ref_1 });
|
|
619
|
-
break;
|
|
620
|
-
}
|
|
621
|
-
case "period-stream-cleared" /* WorkerMessageType.PeriodStreamCleared */: {
|
|
622
|
-
if (((_18 = _this._currentContentInfo) === null || _18 === void 0 ? void 0 : _18.contentId) !== msgData.contentId ||
|
|
623
|
-
_this._currentContentInfo.manifest === null) {
|
|
624
|
-
return;
|
|
625
|
-
}
|
|
626
|
-
var period_6 = (0, array_find_1.default)(_this._currentContentInfo.manifest.periods, function (p) {
|
|
627
|
-
return p.id === msgData.value.periodId;
|
|
628
|
-
});
|
|
629
|
-
if (period_6 === undefined) {
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
_this.trigger("periodStreamCleared", { period: period_6, type: msgData.value.bufferType });
|
|
633
|
-
break;
|
|
634
|
-
}
|
|
635
|
-
case "discontinuity-update" /* WorkerMessageType.DiscontinuityUpdate */:
|
|
636
|
-
if (((_19 = _this._currentContentInfo) === null || _19 === void 0 ? void 0 : _19.contentId) !== msgData.contentId ||
|
|
637
|
-
_this._currentContentInfo.manifest === null) {
|
|
638
|
-
return;
|
|
639
|
-
}
|
|
640
|
-
var period = (0, array_find_1.default)(_this._currentContentInfo.manifest.periods, function (p) {
|
|
641
|
-
return p.id === msgData.value.periodId;
|
|
642
|
-
});
|
|
643
|
-
if (period === undefined) {
|
|
644
|
-
log_1.default.warn("MTCI: Discontinuity's Period not found", msgData.value.periodId);
|
|
645
|
-
return;
|
|
646
|
-
}
|
|
647
|
-
(_20 = _this._currentContentInfo.rebufferingController) === null || _20 === void 0 ? void 0 : _20.updateDiscontinuityInfo({
|
|
648
|
-
period: period,
|
|
649
|
-
bufferType: msgData.value.bufferType,
|
|
650
|
-
discontinuity: msgData.value.discontinuity,
|
|
651
|
-
position: msgData.value.position,
|
|
652
|
-
});
|
|
653
|
-
break;
|
|
654
|
-
case "push-text-data" /* WorkerMessageType.PushTextData */: {
|
|
655
|
-
if (((_21 = _this._currentContentInfo) === null || _21 === void 0 ? void 0 : _21.contentId) !== msgData.contentId) {
|
|
656
|
-
return;
|
|
657
|
-
}
|
|
658
|
-
if (textDisplayer === null) {
|
|
659
|
-
log_1.default.warn("Init: Received AddTextData message but no text displayer exists");
|
|
660
|
-
}
|
|
661
|
-
else {
|
|
662
|
-
try {
|
|
663
|
-
var ranges = textDisplayer.pushTextData(msgData.value);
|
|
664
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
665
|
-
type: "add-text-success" /* MainThreadMessageType.PushTextDataSuccess */,
|
|
666
|
-
contentId: msgData.contentId,
|
|
667
|
-
value: { ranges: ranges },
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
catch (err) {
|
|
671
|
-
var message = err instanceof Error ?
|
|
672
|
-
err.message :
|
|
673
|
-
"Unknown error";
|
|
674
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
675
|
-
type: "push-text-error" /* MainThreadMessageType.PushTextDataError */,
|
|
676
|
-
contentId: msgData.contentId,
|
|
677
|
-
value: { message: message },
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
break;
|
|
682
|
-
}
|
|
683
|
-
case "remove-text-data" /* WorkerMessageType.RemoveTextData */: {
|
|
684
|
-
if (((_22 = _this._currentContentInfo) === null || _22 === void 0 ? void 0 : _22.contentId) !== msgData.contentId) {
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
|
-
if (textDisplayer === null) {
|
|
688
|
-
log_1.default.warn("Init: Received RemoveTextData message but no text displayer exists");
|
|
689
|
-
}
|
|
690
|
-
else {
|
|
691
|
-
try {
|
|
692
|
-
var ranges = textDisplayer.removeBuffer(msgData.value.start, msgData.value.end);
|
|
693
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
694
|
-
type: "remove-text-success" /* MainThreadMessageType.RemoveTextDataSuccess */,
|
|
695
|
-
contentId: msgData.contentId,
|
|
696
|
-
value: { ranges: ranges },
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
catch (err) {
|
|
700
|
-
var message = err instanceof Error ?
|
|
701
|
-
err.message :
|
|
702
|
-
"Unknown error";
|
|
703
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
704
|
-
type: "remove-text-error" /* MainThreadMessageType.RemoveTextDataError */,
|
|
705
|
-
contentId: msgData.contentId,
|
|
706
|
-
value: { message: message },
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
break;
|
|
711
|
-
}
|
|
712
|
-
case "reset-text-displayer" /* WorkerMessageType.ResetTextDisplayer */: {
|
|
713
|
-
if (((_23 = _this._currentContentInfo) === null || _23 === void 0 ? void 0 : _23.contentId) !== msgData.contentId) {
|
|
714
|
-
return;
|
|
715
|
-
}
|
|
716
|
-
if (textDisplayer === null) {
|
|
717
|
-
log_1.default.warn("Init: Received ResetTextDisplayer message but no text displayer exists");
|
|
718
|
-
}
|
|
719
|
-
else {
|
|
720
|
-
textDisplayer.reset();
|
|
721
|
-
}
|
|
722
|
-
break;
|
|
723
|
-
}
|
|
724
|
-
case "stop-text-displayer" /* WorkerMessageType.StopTextDisplayer */: {
|
|
725
|
-
if (((_24 = _this._currentContentInfo) === null || _24 === void 0 ? void 0 : _24.contentId) !== msgData.contentId) {
|
|
726
|
-
return;
|
|
727
|
-
}
|
|
728
|
-
if (textDisplayer === null) {
|
|
729
|
-
log_1.default.warn("Init: Received StopTextDisplayer message but no text displayer exists");
|
|
730
|
-
}
|
|
731
|
-
else {
|
|
732
|
-
textDisplayer.stop();
|
|
733
|
-
}
|
|
734
|
-
break;
|
|
735
|
-
}
|
|
736
|
-
case "reloading-media-source" /* WorkerMessageType.ReloadingMediaSource */:
|
|
737
|
-
{
|
|
738
|
-
if (((_25 = _this._currentContentInfo) === null || _25 === void 0 ? void 0 : _25.contentId) !== msgData.contentId) {
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
var contentInfo = _this._currentContentInfo;
|
|
742
|
-
var lastObservation = playbackObserver.getReference().getValue();
|
|
743
|
-
var currentPosition = lastObservation.position.getWanted();
|
|
744
|
-
var isPaused = ((_26 = contentInfo.initialPlayPerformed) === null || _26 === void 0 ? void 0 : _26.getValue()) === true ||
|
|
745
|
-
contentInfo.autoPlay === undefined ?
|
|
746
|
-
lastObservation.paused :
|
|
747
|
-
!contentInfo.autoPlay;
|
|
748
|
-
var position = currentPosition + msgData.value.timeOffset;
|
|
749
|
-
if (msgData.value.minimumPosition !== undefined) {
|
|
750
|
-
position = Math.max(msgData.value.minimumPosition, position);
|
|
751
|
-
}
|
|
752
|
-
if (msgData.value.maximumPosition !== undefined) {
|
|
753
|
-
position = Math.min(msgData.value.maximumPosition, position);
|
|
754
|
-
}
|
|
755
|
-
_this._reload(mediaElement, textDisplayer, playbackObserver, mediaSourceStatus, position, !isPaused);
|
|
756
|
-
}
|
|
757
|
-
break;
|
|
758
|
-
case "needs-decipherability-flush" /* WorkerMessageType.NeedsDecipherabilityFlush */:
|
|
759
|
-
{
|
|
760
|
-
if (((_27 = _this._currentContentInfo) === null || _27 === void 0 ? void 0 : _27.contentId) !== msgData.contentId) {
|
|
761
|
-
return;
|
|
762
|
-
}
|
|
763
|
-
var contentInfo = _this._currentContentInfo;
|
|
764
|
-
var lastObservation = playbackObserver.getReference().getValue();
|
|
765
|
-
var currentPosition = lastObservation.position.getWanted();
|
|
766
|
-
var keySystem = (0, decrypt_1.getKeySystemConfiguration)(mediaElement);
|
|
767
|
-
if ((0, compat_1.shouldReloadMediaSourceOnDecipherabilityUpdate)(keySystem === null || keySystem === void 0 ? void 0 : keySystem[0])) {
|
|
768
|
-
var isPaused = ((_28 = contentInfo.initialPlayPerformed) === null || _28 === void 0 ? void 0 : _28.getValue()) === true ||
|
|
769
|
-
contentInfo.autoPlay === undefined ?
|
|
770
|
-
lastObservation.paused :
|
|
771
|
-
!contentInfo.autoPlay;
|
|
772
|
-
_this._reload(mediaElement, textDisplayer, playbackObserver, mediaSourceStatus, currentPosition, !isPaused);
|
|
773
|
-
}
|
|
774
|
-
else {
|
|
775
|
-
// simple seek close to the current position
|
|
776
|
-
// to flush the buffers
|
|
777
|
-
if (currentPosition + 0.001 < lastObservation.duration) {
|
|
778
|
-
playbackObserver.setCurrentTime(mediaElement.currentTime + 0.001);
|
|
779
|
-
}
|
|
780
|
-
else {
|
|
781
|
-
playbackObserver.setCurrentTime(currentPosition);
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
break;
|
|
786
|
-
case "log" /* WorkerMessageType.LogMessage */: {
|
|
787
|
-
var formatted = msgData.value.logs.map(function (l) {
|
|
788
|
-
switch (typeof l) {
|
|
789
|
-
case "string":
|
|
790
|
-
case "number":
|
|
791
|
-
case "boolean":
|
|
792
|
-
case "undefined":
|
|
793
|
-
return l;
|
|
794
|
-
case "object":
|
|
795
|
-
if (l === null) {
|
|
796
|
-
return null;
|
|
797
|
-
}
|
|
798
|
-
return formatWorkerError(l);
|
|
799
|
-
default:
|
|
800
|
-
(0, assert_1.assertUnreachable)(l);
|
|
801
|
-
}
|
|
802
|
-
});
|
|
803
|
-
switch (msgData.value.logLevel) {
|
|
804
|
-
case "NONE":
|
|
805
|
-
break;
|
|
806
|
-
case "ERROR":
|
|
807
|
-
log_1.default.error.apply(log_1.default, __spreadArray([], __read(formatted), false));
|
|
808
|
-
break;
|
|
809
|
-
case "WARNING":
|
|
810
|
-
log_1.default.warn.apply(log_1.default, __spreadArray([], __read(formatted), false));
|
|
811
|
-
break;
|
|
812
|
-
case "INFO":
|
|
813
|
-
log_1.default.info.apply(log_1.default, __spreadArray([], __read(formatted), false));
|
|
814
|
-
break;
|
|
815
|
-
case "DEBUG":
|
|
816
|
-
log_1.default.debug.apply(log_1.default, __spreadArray([], __read(formatted), false));
|
|
817
|
-
break;
|
|
818
|
-
default:
|
|
819
|
-
(0, assert_1.assertUnreachable)(msgData.value.logLevel);
|
|
820
|
-
}
|
|
821
|
-
break;
|
|
822
|
-
}
|
|
823
|
-
case "init-success" /* WorkerMessageType.InitSuccess */:
|
|
824
|
-
case "init-error" /* WorkerMessageType.InitError */:
|
|
825
|
-
// Should already be handled by the API
|
|
826
|
-
break;
|
|
827
|
-
default:
|
|
828
|
-
(0, assert_1.assertUnreachable)(msgData);
|
|
829
|
-
}
|
|
830
|
-
};
|
|
831
|
-
this._settings.worker.addEventListener("message", onmessage);
|
|
832
|
-
this._initCanceller.signal.register(function () {
|
|
833
|
-
_this._settings.worker.removeEventListener("message", onmessage);
|
|
834
|
-
});
|
|
835
|
-
};
|
|
836
|
-
MultiThreadContentInitializer.prototype.dispose = function () {
|
|
837
|
-
var _a;
|
|
838
|
-
this._initCanceller.cancel();
|
|
839
|
-
if (this._currentContentInfo !== null) {
|
|
840
|
-
(_a = this._currentContentInfo.mainThreadMediaSource) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
841
|
-
this._currentContentInfo = null;
|
|
842
|
-
}
|
|
843
|
-
};
|
|
844
|
-
MultiThreadContentInitializer.prototype._onFatalError = function (err) {
|
|
845
|
-
if (this._initCanceller.isUsed()) {
|
|
846
|
-
return;
|
|
847
|
-
}
|
|
848
|
-
this._initCanceller.cancel();
|
|
849
|
-
this.trigger("error", err);
|
|
850
|
-
};
|
|
851
|
-
MultiThreadContentInitializer.prototype._initializeContentDecryption = function (mediaElement, lastContentProtection, mediaSourceStatus, cancelSignal) {
|
|
852
|
-
var _this = this;
|
|
853
|
-
var keySystems = this._settings.keySystems;
|
|
854
|
-
// TODO private?
|
|
855
|
-
var createEmeDisabledReference = function (errMsg) {
|
|
856
|
-
mediaSourceStatus.setValue(1 /* MediaSourceInitializationStatus.AttachNow */);
|
|
857
|
-
lastContentProtection.onUpdate(function (data, stopListening) {
|
|
858
|
-
if (data === null) { // initial value
|
|
859
|
-
return;
|
|
860
|
-
}
|
|
861
|
-
stopListening();
|
|
862
|
-
var err = new errors_1.EncryptedMediaError("MEDIA_IS_ENCRYPTED_ERROR", errMsg);
|
|
863
|
-
_this._onFatalError(err);
|
|
864
|
-
}, { clearSignal: cancelSignal });
|
|
865
|
-
var ref = new reference_1.default({
|
|
866
|
-
initializationState: { type: "initialized", value: null },
|
|
867
|
-
drmSystemId: undefined
|
|
868
|
-
});
|
|
869
|
-
ref.finish(); // We know that no new value will be triggered
|
|
870
|
-
return ref;
|
|
871
|
-
};
|
|
872
|
-
if (keySystems.length === 0) {
|
|
873
|
-
return createEmeDisabledReference("No `keySystems` option given.");
|
|
874
|
-
}
|
|
875
|
-
else if (features_1.default.decrypt === null) {
|
|
876
|
-
return createEmeDisabledReference("EME feature not activated.");
|
|
877
|
-
}
|
|
878
|
-
var drmStatusRef = new reference_1.default({
|
|
879
|
-
initializationState: { type: "uninitialized", value: null },
|
|
880
|
-
drmSystemId: undefined,
|
|
881
|
-
}, cancelSignal);
|
|
882
|
-
var ContentDecryptor = features_1.default.decrypt;
|
|
883
|
-
if (!ContentDecryptor.hasEmeApis()) {
|
|
884
|
-
return createEmeDisabledReference("EME API not available on the current page.");
|
|
885
|
-
}
|
|
886
|
-
log_1.default.debug("MTCI: Creating ContentDecryptor");
|
|
887
|
-
var contentDecryptor = new ContentDecryptor(mediaElement, keySystems);
|
|
888
|
-
contentDecryptor.addEventListener("keyIdsCompatibilityUpdate", function (updates) {
|
|
889
|
-
if (_this._currentContentInfo === null ||
|
|
890
|
-
_this._currentContentInfo.manifest === null) {
|
|
891
|
-
return;
|
|
892
|
-
}
|
|
893
|
-
var manUpdates = (0, manifest_1.updateDecipherabilityFromKeyIds)(_this._currentContentInfo.manifest, updates);
|
|
894
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
895
|
-
type: "decipherability-update" /* MainThreadMessageType.DecipherabilityStatusUpdate */,
|
|
896
|
-
contentId: _this._currentContentInfo.contentId,
|
|
897
|
-
value: manUpdates.map(function (s) { return ({
|
|
898
|
-
representationUniqueId: s.representation.uniqueId,
|
|
899
|
-
decipherable: s.representation.decipherable,
|
|
900
|
-
}); }),
|
|
901
|
-
});
|
|
902
|
-
_this.trigger("decipherabilityUpdate", manUpdates);
|
|
903
|
-
});
|
|
904
|
-
contentDecryptor.addEventListener("blackListProtectionData", function (protData) {
|
|
905
|
-
if (_this._currentContentInfo === null ||
|
|
906
|
-
_this._currentContentInfo.manifest === null) {
|
|
907
|
-
return;
|
|
908
|
-
}
|
|
909
|
-
var manUpdates = (0, manifest_1.updateDecipherabilityFromProtectionData)(_this._currentContentInfo.manifest, protData);
|
|
910
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
911
|
-
type: "decipherability-update" /* MainThreadMessageType.DecipherabilityStatusUpdate */,
|
|
912
|
-
contentId: _this._currentContentInfo.contentId,
|
|
913
|
-
value: manUpdates.map(function (s) { return ({
|
|
914
|
-
representationUniqueId: s.representation.uniqueId,
|
|
915
|
-
decipherable: s.representation.decipherable,
|
|
916
|
-
}); }),
|
|
917
|
-
});
|
|
918
|
-
_this.trigger("decipherabilityUpdate", manUpdates);
|
|
919
|
-
});
|
|
920
|
-
contentDecryptor.addEventListener("stateChange", function (state) {
|
|
921
|
-
if (state === decrypt_1.ContentDecryptorState.WaitingForAttachment) {
|
|
922
|
-
mediaSourceStatus.onUpdate(function (currStatus, stopListening) {
|
|
923
|
-
if (currStatus === 0 /* MediaSourceInitializationStatus.Nothing */) {
|
|
924
|
-
mediaSourceStatus.setValue(1 /* MediaSourceInitializationStatus.AttachNow */);
|
|
925
|
-
}
|
|
926
|
-
else if (currStatus === 2 /* MediaSourceInitializationStatus.Attached */) {
|
|
927
|
-
stopListening();
|
|
928
|
-
if (state === decrypt_1.ContentDecryptorState.WaitingForAttachment) {
|
|
929
|
-
contentDecryptor.attach();
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
}, { clearSignal: cancelSignal,
|
|
933
|
-
emitCurrentValue: true });
|
|
934
|
-
}
|
|
935
|
-
else if (state === decrypt_1.ContentDecryptorState.ReadyForContent) {
|
|
936
|
-
drmStatusRef.setValue({ initializationState: { type: "initialized",
|
|
937
|
-
value: null },
|
|
938
|
-
drmSystemId: contentDecryptor.systemId });
|
|
939
|
-
contentDecryptor.removeEventListener("stateChange");
|
|
940
|
-
}
|
|
941
|
-
});
|
|
942
|
-
contentDecryptor.addEventListener("error", function (error) {
|
|
943
|
-
_this._onFatalError(error);
|
|
944
|
-
});
|
|
945
|
-
contentDecryptor.addEventListener("warning", function (error) {
|
|
946
|
-
_this.trigger("warning", error);
|
|
947
|
-
});
|
|
948
|
-
lastContentProtection.onUpdate(function (data) {
|
|
949
|
-
if (data === null) {
|
|
950
|
-
return;
|
|
951
|
-
}
|
|
952
|
-
contentDecryptor.onInitializationData(data);
|
|
953
|
-
}, { clearSignal: cancelSignal });
|
|
954
|
-
cancelSignal.register(function () {
|
|
955
|
-
contentDecryptor.dispose();
|
|
956
|
-
});
|
|
957
|
-
return drmStatusRef;
|
|
958
|
-
};
|
|
959
|
-
MultiThreadContentInitializer.prototype._hasTextBufferFeature = function () {
|
|
960
|
-
return (this._settings.textTrackOptions.textTrackMode === "html" &&
|
|
961
|
-
features_1.default.htmlTextDisplayer !== null) || features_1.default.nativeTextDisplayer !== null;
|
|
962
|
-
};
|
|
963
|
-
MultiThreadContentInitializer.prototype._reload = function (mediaElement, textDisplayer, playbackObserver, mediaSourceStatus, position, autoPlay) {
|
|
964
|
-
var _this = this;
|
|
965
|
-
this._currentMediaSourceCanceller.cancel();
|
|
966
|
-
this._currentMediaSourceCanceller = new task_canceller_1.default();
|
|
967
|
-
this._currentMediaSourceCanceller.linkToSignal(this._initCanceller.signal);
|
|
968
|
-
mediaSourceStatus.setValue(1 /* MediaSourceInitializationStatus.AttachNow */);
|
|
969
|
-
this.trigger("reloadingMediaSource", { position: position, autoPlay: autoPlay });
|
|
970
|
-
mediaSourceStatus.onUpdate(function (status, stopListeningMSStatusUpdates) {
|
|
971
|
-
if (status !== 2 /* MediaSourceInitializationStatus.Attached */) {
|
|
972
|
-
return;
|
|
973
|
-
}
|
|
974
|
-
stopListeningMSStatusUpdates();
|
|
975
|
-
var corePlaybackObserver = _this._setUpModulesOnNewMediaSource({
|
|
976
|
-
initialTime: position,
|
|
977
|
-
autoPlay: autoPlay,
|
|
978
|
-
mediaElement: mediaElement,
|
|
979
|
-
textDisplayer: textDisplayer,
|
|
980
|
-
playbackObserver: playbackObserver,
|
|
981
|
-
}, _this._currentMediaSourceCanceller.signal);
|
|
982
|
-
if (!_this._currentMediaSourceCanceller.isUsed() &&
|
|
983
|
-
corePlaybackObserver !== null &&
|
|
984
|
-
_this._currentContentInfo !== null) {
|
|
985
|
-
var contentId_1 = _this._currentContentInfo.contentId;
|
|
986
|
-
corePlaybackObserver.listen(function (obs) {
|
|
987
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
988
|
-
type: "observation" /* MainThreadMessageType.PlaybackObservation */,
|
|
989
|
-
contentId: contentId_1,
|
|
990
|
-
value: (0, object_assign_1.default)(obs, { position: obs.position.serialize() }),
|
|
991
|
-
});
|
|
992
|
-
}, { includeLastObservation: true,
|
|
993
|
-
clearSignal: _this._currentMediaSourceCanceller.signal });
|
|
994
|
-
}
|
|
995
|
-
}, { clearSignal: this._currentMediaSourceCanceller.signal,
|
|
996
|
-
emitCurrentValue: true });
|
|
997
|
-
};
|
|
998
|
-
/**
|
|
999
|
-
* Start-up modules and mechanisms (initial seek, auto-play etc.) needed each
|
|
1000
|
-
* time a content is loaded AND re-loaded on a `HTMLMediaElement`, when the
|
|
1001
|
-
* manifest is known.
|
|
1002
|
-
*
|
|
1003
|
-
* Note that this does not include reacting to incoming worker messages nor
|
|
1004
|
-
* sending them, those actions have to be handled separately.
|
|
1005
|
-
*
|
|
1006
|
-
* @param {Object} parameters
|
|
1007
|
-
* @param {Object} cancelSignal
|
|
1008
|
-
* @returns {Object|null} - Playback Observer created for this content. `null`
|
|
1009
|
-
* only if playback initialization failed (most likely because it has been
|
|
1010
|
-
* cancelled).
|
|
1011
|
-
*/
|
|
1012
|
-
MultiThreadContentInitializer.prototype._setUpModulesOnNewMediaSource = function (parameters, cancelSignal) {
|
|
1013
|
-
var _this = this;
|
|
1014
|
-
if (cancelSignal.isCancelled()) {
|
|
1015
|
-
return null;
|
|
1016
|
-
}
|
|
1017
|
-
if (this._currentContentInfo === null) {
|
|
1018
|
-
log_1.default.error("MTCI: Setting up modules without a contentId");
|
|
1019
|
-
return null;
|
|
1020
|
-
}
|
|
1021
|
-
if (this._currentContentInfo.manifest === null) {
|
|
1022
|
-
log_1.default.error("MTCI: Setting up modules without a loaded Manifest");
|
|
1023
|
-
return null;
|
|
1024
|
-
}
|
|
1025
|
-
var _a = this._currentContentInfo, manifest = _a.manifest, mediaSource = _a.mainThreadMediaSource;
|
|
1026
|
-
var speed = this._settings.speed;
|
|
1027
|
-
var initialTime = parameters.initialTime, autoPlay = parameters.autoPlay, mediaElement = parameters.mediaElement, textDisplayer = parameters.textDisplayer, playbackObserver = parameters.playbackObserver;
|
|
1028
|
-
this._currentContentInfo.initialTime = initialTime;
|
|
1029
|
-
this._currentContentInfo.autoPlay = autoPlay;
|
|
1030
|
-
var _b = (0, initial_seek_and_play_1.default)({ mediaElement: mediaElement, playbackObserver: playbackObserver, startTime: initialTime,
|
|
1031
|
-
mustAutoPlay: autoPlay,
|
|
1032
|
-
onWarning: function (err) { return _this.trigger("warning", err); },
|
|
1033
|
-
isDirectfile: false }, cancelSignal), autoPlayResult = _b.autoPlayResult, initialPlayPerformed = _b.initialPlayPerformed;
|
|
1034
|
-
this._currentContentInfo.initialPlayPerformed = initialPlayPerformed;
|
|
1035
|
-
var corePlaybackObserver = (0, create_core_playback_observer_1.default)(playbackObserver, { autoPlay: autoPlay, initialPlayPerformed: initialPlayPerformed, manifest: manifest, mediaSource: mediaSource, speed: speed, textDisplayer: textDisplayer }, cancelSignal);
|
|
1036
|
-
if (cancelSignal.isCancelled()) {
|
|
1037
|
-
return null;
|
|
1038
|
-
}
|
|
1039
|
-
/**
|
|
1040
|
-
* Class trying to avoid various stalling situations, emitting "stalled"
|
|
1041
|
-
* events when it cannot, as well as "unstalled" events when it get out of one.
|
|
1042
|
-
*/
|
|
1043
|
-
var rebufferingController = new rebuffering_controller_1.default(playbackObserver, manifest, speed);
|
|
1044
|
-
rebufferingController.addEventListener("stalled", function (evt) {
|
|
1045
|
-
return _this.trigger("stalled", evt);
|
|
1046
|
-
});
|
|
1047
|
-
rebufferingController.addEventListener("unstalled", function () {
|
|
1048
|
-
return _this.trigger("unstalled", null);
|
|
1049
|
-
});
|
|
1050
|
-
rebufferingController.addEventListener("warning", function (err) {
|
|
1051
|
-
return _this.trigger("warning", err);
|
|
1052
|
-
});
|
|
1053
|
-
cancelSignal.register(function () {
|
|
1054
|
-
rebufferingController.destroy();
|
|
1055
|
-
});
|
|
1056
|
-
rebufferingController.start();
|
|
1057
|
-
this._currentContentInfo.rebufferingController = rebufferingController;
|
|
1058
|
-
var currentContentInfo = this._currentContentInfo;
|
|
1059
|
-
initialPlayPerformed.onUpdate(function (isPerformed, stopListening) {
|
|
1060
|
-
if (isPerformed) {
|
|
1061
|
-
stopListening();
|
|
1062
|
-
var streamEventsEmitter_1 = new stream_events_emitter_1.default(manifest, mediaElement, playbackObserver);
|
|
1063
|
-
currentContentInfo.streamEventsEmitter = streamEventsEmitter_1;
|
|
1064
|
-
streamEventsEmitter_1.addEventListener("event", function (payload) {
|
|
1065
|
-
_this.trigger("streamEvent", payload);
|
|
1066
|
-
}, cancelSignal);
|
|
1067
|
-
streamEventsEmitter_1.addEventListener("eventSkip", function (payload) {
|
|
1068
|
-
_this.trigger("streamEventSkip", payload);
|
|
1069
|
-
}, cancelSignal);
|
|
1070
|
-
streamEventsEmitter_1.start();
|
|
1071
|
-
cancelSignal.register(function () {
|
|
1072
|
-
streamEventsEmitter_1.stop();
|
|
1073
|
-
});
|
|
1074
|
-
}
|
|
1075
|
-
}, { clearSignal: cancelSignal, emitCurrentValue: true });
|
|
1076
|
-
/**
|
|
1077
|
-
* Emit a "loaded" events once the initial play has been performed and the
|
|
1078
|
-
* media can begin playback.
|
|
1079
|
-
* Also emits warning events if issues arise when doing so.
|
|
1080
|
-
*/
|
|
1081
|
-
autoPlayResult
|
|
1082
|
-
.then(function () {
|
|
1083
|
-
(0, get_loaded_reference_1.default)(playbackObserver, mediaElement, false, cancelSignal)
|
|
1084
|
-
.onUpdate(function (isLoaded, stopListening) {
|
|
1085
|
-
if (isLoaded) {
|
|
1086
|
-
stopListening();
|
|
1087
|
-
_this.trigger("loaded", { segmentBuffersStore: null });
|
|
1088
|
-
}
|
|
1089
|
-
}, { emitCurrentValue: true, clearSignal: cancelSignal });
|
|
1090
|
-
})
|
|
1091
|
-
.catch(function (err) {
|
|
1092
|
-
if (cancelSignal.isCancelled()) {
|
|
1093
|
-
return;
|
|
1094
|
-
}
|
|
1095
|
-
_this._onFatalError(err);
|
|
1096
|
-
});
|
|
1097
|
-
return corePlaybackObserver;
|
|
1098
|
-
};
|
|
1099
|
-
/**
|
|
1100
|
-
* Initialize content playback if and only if those conditions are filled:
|
|
1101
|
-
* - The Manifest is fetched and stored in `this._currentContentInfo`.
|
|
1102
|
-
* - `drmInitializationStatus` indicates that DRM matters are initialized.
|
|
1103
|
-
* - `mediaSourceStatus` indicates that the MediaSource is attached to the
|
|
1104
|
-
* `mediaElement`.
|
|
1105
|
-
*
|
|
1106
|
-
* In other cases, this method will do nothing.
|
|
1107
|
-
*
|
|
1108
|
-
* To call when any of those conditions might become `true`, to start-up
|
|
1109
|
-
* playback.
|
|
1110
|
-
*
|
|
1111
|
-
* @param {Object} parameters
|
|
1112
|
-
* @returns {boolean} - Returns `true` if all conditions where met for
|
|
1113
|
-
* playback start.
|
|
1114
|
-
*/
|
|
1115
|
-
MultiThreadContentInitializer.prototype._startPlaybackIfReady = function (parameters) {
|
|
1116
|
-
var _this = this;
|
|
1117
|
-
if (this._currentContentInfo === null || this._currentContentInfo.manifest === null) {
|
|
1118
|
-
return false;
|
|
1119
|
-
}
|
|
1120
|
-
var drmInitStatus = parameters.drmInitializationStatus.getValue();
|
|
1121
|
-
if (drmInitStatus.initializationState.type !== "initialized") {
|
|
1122
|
-
return false;
|
|
1123
|
-
}
|
|
1124
|
-
var msInitStatus = parameters.mediaSourceStatus.getValue();
|
|
1125
|
-
if (msInitStatus !== 2 /* MediaSourceInitializationStatus.Attached */) {
|
|
1126
|
-
return false;
|
|
1127
|
-
}
|
|
1128
|
-
var _a = this._currentContentInfo, contentId = _a.contentId, manifest = _a.manifest;
|
|
1129
|
-
log_1.default.debug("MTCI: Calculating initial time");
|
|
1130
|
-
var initialTime = (0, get_initial_time_1.default)(manifest, this._settings.lowLatencyMode, this._settings.startAt);
|
|
1131
|
-
log_1.default.debug("MTCI: Initial time calculated:", initialTime);
|
|
1132
|
-
var _b = this._settings.bufferOptions, enableFastSwitching = _b.enableFastSwitching, onCodecSwitch = _b.onCodecSwitch;
|
|
1133
|
-
var corePlaybackObserver = this._setUpModulesOnNewMediaSource({
|
|
1134
|
-
initialTime: initialTime,
|
|
1135
|
-
autoPlay: this._settings.autoPlay,
|
|
1136
|
-
mediaElement: parameters.mediaElement,
|
|
1137
|
-
textDisplayer: parameters.textDisplayer,
|
|
1138
|
-
playbackObserver: parameters.playbackObserver,
|
|
1139
|
-
}, this._currentMediaSourceCanceller.signal);
|
|
1140
|
-
if (this._currentMediaSourceCanceller.isUsed() || corePlaybackObserver === null) {
|
|
1141
|
-
return true;
|
|
1142
|
-
}
|
|
1143
|
-
var initialObservation = corePlaybackObserver.getReference().getValue();
|
|
1144
|
-
var sentInitialObservation = (0, object_assign_1.default)(initialObservation, {
|
|
1145
|
-
position: initialObservation.position.serialize(),
|
|
1146
|
-
});
|
|
1147
|
-
(0, send_message_1.default)(this._settings.worker, { type: "start" /* MainThreadMessageType.StartPreparedContent */, contentId: contentId, value: { initialTime: initialTime, initialObservation: sentInitialObservation,
|
|
1148
|
-
drmSystemId: drmInitStatus.drmSystemId, enableFastSwitching: enableFastSwitching, onCodecSwitch: onCodecSwitch } });
|
|
1149
|
-
corePlaybackObserver.listen(function (obs) {
|
|
1150
|
-
(0, send_message_1.default)(_this._settings.worker, {
|
|
1151
|
-
type: "observation" /* MainThreadMessageType.PlaybackObservation */,
|
|
1152
|
-
contentId: contentId,
|
|
1153
|
-
value: (0, object_assign_1.default)(obs, { position: obs.position.serialize() }),
|
|
1154
|
-
});
|
|
1155
|
-
}, { includeLastObservation: false,
|
|
1156
|
-
clearSignal: this._currentMediaSourceCanceller.signal });
|
|
1157
|
-
this.trigger("manifestReady", manifest);
|
|
1158
|
-
return true;
|
|
1159
|
-
};
|
|
1160
|
-
/**
|
|
1161
|
-
* Handles Worker messages asking to create a MediaSource.
|
|
1162
|
-
* @param {Object} msg - The worker's message received.
|
|
1163
|
-
* @param {HTMLMediaElement} mediaElement - HTMLMediaElement on which the
|
|
1164
|
-
* content plays.
|
|
1165
|
-
* @param {Worker} worker - The WebWorker concerned, messages may be sent back
|
|
1166
|
-
* to it.
|
|
1167
|
-
*/
|
|
1168
|
-
MultiThreadContentInitializer.prototype._onCreateMediaSourceMessage = function (msg, mediaElement, mediaSourceStatus, worker) {
|
|
1169
|
-
var _this = this;
|
|
1170
|
-
var _a;
|
|
1171
|
-
if (((_a = this._currentContentInfo) === null || _a === void 0 ? void 0 : _a.contentId) !== msg.contentId) {
|
|
1172
|
-
log_1.default.info("MTCI: Ignoring MediaSource attachment due to wrong `contentId`");
|
|
1173
|
-
}
|
|
1174
|
-
else {
|
|
1175
|
-
var mediaSourceId_1 = msg.mediaSourceId;
|
|
1176
|
-
try {
|
|
1177
|
-
mediaSourceStatus.onUpdate(function (currStatus, stopListening) {
|
|
1178
|
-
if (_this._currentContentInfo === null) {
|
|
1179
|
-
stopListening();
|
|
1180
|
-
return;
|
|
1181
|
-
}
|
|
1182
|
-
if (currStatus === 1 /* MediaSourceInitializationStatus.AttachNow */) {
|
|
1183
|
-
stopListening();
|
|
1184
|
-
var mediaSource_3 = new main_media_source_interface_1.default(mediaSourceId_1);
|
|
1185
|
-
_this._currentContentInfo.mainThreadMediaSource = mediaSource_3;
|
|
1186
|
-
mediaSource_3.addEventListener("mediaSourceOpen", function () {
|
|
1187
|
-
(0, send_message_1.default)(worker, {
|
|
1188
|
-
type: "media-source-ready-state-change" /* MainThreadMessageType.MediaSourceReadyStateChange */,
|
|
1189
|
-
mediaSourceId: mediaSourceId_1,
|
|
1190
|
-
value: "open",
|
|
1191
|
-
});
|
|
1192
|
-
});
|
|
1193
|
-
mediaSource_3.addEventListener("mediaSourceEnded", function () {
|
|
1194
|
-
(0, send_message_1.default)(worker, {
|
|
1195
|
-
type: "media-source-ready-state-change" /* MainThreadMessageType.MediaSourceReadyStateChange */,
|
|
1196
|
-
mediaSourceId: mediaSourceId_1,
|
|
1197
|
-
value: "ended",
|
|
1198
|
-
});
|
|
1199
|
-
});
|
|
1200
|
-
mediaSource_3.addEventListener("mediaSourceClose", function () {
|
|
1201
|
-
(0, send_message_1.default)(worker, {
|
|
1202
|
-
type: "media-source-ready-state-change" /* MainThreadMessageType.MediaSourceReadyStateChange */,
|
|
1203
|
-
mediaSourceId: mediaSourceId_1,
|
|
1204
|
-
value: "closed",
|
|
1205
|
-
});
|
|
1206
|
-
});
|
|
1207
|
-
var url_1 = null;
|
|
1208
|
-
if (mediaSource_3.handle.type === "handle") {
|
|
1209
|
-
mediaElement.srcObject = mediaSource_3.handle.value;
|
|
1210
|
-
}
|
|
1211
|
-
else {
|
|
1212
|
-
url_1 = URL.createObjectURL(mediaSource_3.handle.value);
|
|
1213
|
-
mediaElement.src = url_1;
|
|
1214
|
-
}
|
|
1215
|
-
_this._currentMediaSourceCanceller.signal.register(function () {
|
|
1216
|
-
mediaSource_3.dispose();
|
|
1217
|
-
(0, create_media_source_1.resetMediaElement)(mediaElement, url_1);
|
|
1218
|
-
});
|
|
1219
|
-
mediaSourceStatus.setValue(2 /* MediaSourceInitializationStatus.Attached */);
|
|
1220
|
-
}
|
|
1221
|
-
}, { emitCurrentValue: true,
|
|
1222
|
-
clearSignal: this._currentMediaSourceCanceller.signal });
|
|
1223
|
-
}
|
|
1224
|
-
catch (err) {
|
|
1225
|
-
var error = new errors_1.OtherError("NONE", "Unknown error when creating the MediaSource");
|
|
1226
|
-
this._onFatalError(error);
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
};
|
|
1230
|
-
return MultiThreadContentInitializer;
|
|
1231
|
-
}(types_1.ContentInitializer));
|
|
1232
|
-
exports.default = MultiThreadContentInitializer;
|
|
1233
|
-
function bindNumberReferencesToWorker(worker, cancellationSignal) {
|
|
1234
|
-
var e_1, _a;
|
|
1235
|
-
var refs = [];
|
|
1236
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1237
|
-
refs[_i - 2] = arguments[_i];
|
|
1238
|
-
}
|
|
1239
|
-
var _loop_1 = function (ref) {
|
|
1240
|
-
ref[0].onUpdate(function (newVal) {
|
|
1241
|
-
// NOTE: The TypeScript checks have already been made by this function's
|
|
1242
|
-
// overload, but the body here is not aware of that.
|
|
1243
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1244
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1245
|
-
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
1246
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
1247
|
-
(0, send_message_1.default)(worker, { type: "ref-update" /* MainThreadMessageType.ReferenceUpdate */,
|
|
1248
|
-
value: { name: ref[1],
|
|
1249
|
-
newVal: newVal } });
|
|
1250
|
-
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
1251
|
-
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
1252
|
-
/* eslint-enable @typescript-eslint/no-unsafe-call */
|
|
1253
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
1254
|
-
}, { clearSignal: cancellationSignal, emitCurrentValue: true });
|
|
1255
|
-
};
|
|
1256
|
-
try {
|
|
1257
|
-
for (var refs_1 = __values(refs), refs_1_1 = refs_1.next(); !refs_1_1.done; refs_1_1 = refs_1.next()) {
|
|
1258
|
-
var ref = refs_1_1.value;
|
|
1259
|
-
_loop_1(ref);
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1263
|
-
finally {
|
|
1264
|
-
try {
|
|
1265
|
-
if (refs_1_1 && !refs_1_1.done && (_a = refs_1.return)) _a.call(refs_1);
|
|
1266
|
-
}
|
|
1267
|
-
finally { if (e_1) throw e_1.error; }
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
function formatWorkerError(sentError) {
|
|
1271
|
-
var _a;
|
|
1272
|
-
switch (sentError.name) {
|
|
1273
|
-
case "NetworkError":
|
|
1274
|
-
return new errors_1.NetworkError(sentError.code, new request_1.RequestError(sentError.baseError.url, sentError.baseError.status, sentError.baseError.type));
|
|
1275
|
-
case "MediaError":
|
|
1276
|
-
/* eslint-disable-next-line */
|
|
1277
|
-
return new errors_1.MediaError(sentError.code, sentError.reason, {
|
|
1278
|
-
tracks: sentError.tracks,
|
|
1279
|
-
});
|
|
1280
|
-
case "EncryptedMediaError":
|
|
1281
|
-
if (sentError.code === "KEY_STATUS_CHANGE_ERROR") {
|
|
1282
|
-
return new errors_1.EncryptedMediaError(sentError.code, sentError.reason, {
|
|
1283
|
-
keyStatuses: (_a = sentError.keyStatuses) !== null && _a !== void 0 ? _a : [],
|
|
1284
|
-
});
|
|
1285
|
-
}
|
|
1286
|
-
else {
|
|
1287
|
-
return new errors_1.EncryptedMediaError(sentError.code, sentError.reason);
|
|
1288
|
-
}
|
|
1289
|
-
case "OtherError":
|
|
1290
|
-
return new errors_1.OtherError(sentError.code, sentError.reason);
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
/**
|
|
1294
|
-
* Ensure that all `Representation` and `Adaptation` have a known status
|
|
1295
|
-
* for their codec support and probe it for cases where that's not the
|
|
1296
|
-
* case.
|
|
1297
|
-
*
|
|
1298
|
-
* Because probing for codec support is always synchronous in the main thread,
|
|
1299
|
-
* calling this function ensures that support is now known.
|
|
1300
|
-
*
|
|
1301
|
-
* @param {Object} manifest
|
|
1302
|
-
*/
|
|
1303
|
-
function updateManifestCodecSupport(manifest) {
|
|
1304
|
-
var codecSupportList = [];
|
|
1305
|
-
var codecSupportMap = new Map();
|
|
1306
|
-
manifest.periods.forEach(function (p) {
|
|
1307
|
-
var _a, _b, _c;
|
|
1308
|
-
__spreadArray(__spreadArray(__spreadArray([], __read((_a = p.adaptations.audio) !== null && _a !== void 0 ? _a : []), false), __read((_b = p.adaptations.video) !== null && _b !== void 0 ? _b : []), false), __read((_c = p.adaptations.text) !== null && _c !== void 0 ? _c : []), false).forEach(function (a) {
|
|
1309
|
-
var hasSupportedCodecs = false;
|
|
1310
|
-
a.representations.forEach(function (r) {
|
|
1311
|
-
var _a, _b;
|
|
1312
|
-
if (r.isSupported !== undefined) {
|
|
1313
|
-
if (!hasSupportedCodecs && r.isSupported) {
|
|
1314
|
-
hasSupportedCodecs = true;
|
|
1315
|
-
}
|
|
1316
|
-
return;
|
|
1317
|
-
}
|
|
1318
|
-
var isSupported = false;
|
|
1319
|
-
var mimeType = (_a = r.mimeType) !== null && _a !== void 0 ? _a : "";
|
|
1320
|
-
var codecs = (_b = r.codecs) !== null && _b !== void 0 ? _b : [];
|
|
1321
|
-
if (codecs.length === 0) {
|
|
1322
|
-
codecs = [""];
|
|
1323
|
-
}
|
|
1324
|
-
for (var codecIdx = 0; codecIdx < codecs.length; codecIdx++) {
|
|
1325
|
-
var codec = codecs[codecIdx];
|
|
1326
|
-
isSupported = checkCodecSupport(mimeType, codec);
|
|
1327
|
-
if (isSupported) {
|
|
1328
|
-
r.codecs = [codec];
|
|
1329
|
-
break;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
r.isSupported = isSupported;
|
|
1333
|
-
if (r.isSupported) {
|
|
1334
|
-
hasSupportedCodecs = true;
|
|
1335
|
-
}
|
|
1336
|
-
if (!hasSupportedCodecs) {
|
|
1337
|
-
if (a.isSupported !== false) {
|
|
1338
|
-
a.isSupported = false;
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
else {
|
|
1342
|
-
a.isSupported = true;
|
|
1343
|
-
}
|
|
1344
|
-
});
|
|
1345
|
-
});
|
|
1346
|
-
["audio", "video"].forEach(function (ttype) {
|
|
1347
|
-
var forType = p.adaptations[ttype];
|
|
1348
|
-
if (forType !== undefined &&
|
|
1349
|
-
forType.every(function (a) { return a.isSupported === false; })) {
|
|
1350
|
-
throw new errors_1.MediaError("MANIFEST_INCOMPATIBLE_CODECS_ERROR", "No supported " + ttype + " adaptations", { tracks: undefined });
|
|
1351
|
-
}
|
|
1352
|
-
});
|
|
1353
|
-
});
|
|
1354
|
-
return codecSupportList;
|
|
1355
|
-
function checkCodecSupport(mimeType, codec) {
|
|
1356
|
-
var _a;
|
|
1357
|
-
var knownSupport = (_a = codecSupportMap.get(mimeType)) === null || _a === void 0 ? void 0 : _a.get(codec);
|
|
1358
|
-
var isSupported;
|
|
1359
|
-
if (knownSupport !== undefined) {
|
|
1360
|
-
isSupported = knownSupport;
|
|
1361
|
-
}
|
|
1362
|
-
else {
|
|
1363
|
-
var mimeTypeStr = "".concat(mimeType, ";codecs=\"").concat(codec, "\"");
|
|
1364
|
-
isSupported = (0, compat_1.isCodecSupported)(mimeTypeStr);
|
|
1365
|
-
codecSupportList.push({
|
|
1366
|
-
mimeType: mimeType,
|
|
1367
|
-
codec: codec,
|
|
1368
|
-
result: isSupported,
|
|
1369
|
-
});
|
|
1370
|
-
var prevCodecMap = codecSupportMap.get(mimeType);
|
|
1371
|
-
if (prevCodecMap !== undefined) {
|
|
1372
|
-
prevCodecMap.set(codec, isSupported);
|
|
1373
|
-
}
|
|
1374
|
-
else {
|
|
1375
|
-
var codecMap = new Map();
|
|
1376
|
-
codecMap.set(codec, isSupported);
|
|
1377
|
-
codecSupportMap.set(mimeType, codecMap);
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
return isSupported;
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
function formatSourceBufferError(error) {
|
|
1384
|
-
if (error instanceof errors_1.SourceBufferError) {
|
|
1385
|
-
return error;
|
|
1386
|
-
}
|
|
1387
|
-
else if (error instanceof Error) {
|
|
1388
|
-
return new errors_1.SourceBufferError(error.name, error.message, error.name === "QuotaExceededError");
|
|
1389
|
-
}
|
|
1390
|
-
else {
|
|
1391
|
-
return new errors_1.SourceBufferError("Error", "Unknown SourceBufferError Error", false);
|
|
1392
|
-
}
|
|
1393
|
-
}
|