rx-player 4.2.0-dev.2024090300 → 4.2.0-dev.2024090500
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/VERSION +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/commonjs/compat/add_class_name.d.ts.map +1 -1
- package/dist/commonjs/compat/add_class_name.js +1 -2
- package/dist/commonjs/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/commonjs/compat/browser_compatibility_types.js +4 -1
- package/dist/commonjs/compat/clear_element_src.js +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.js +2 -4
- package/dist/commonjs/compat/eme/custom_media_keys/ms_media_keys_constructor.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/ms_media_keys_constructor.js +2 -4
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.js +3 -6
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.js +2 -17
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +1 -2
- package/dist/commonjs/compat/eme/eme-api-implementation.js +0 -2
- package/dist/commonjs/compat/event_listeners.d.ts.map +1 -1
- package/dist/commonjs/compat/event_listeners.js +2 -6
- package/dist/commonjs/compat/has_mse_in_worker.js +1 -1
- package/dist/commonjs/compat/is_codec_supported.d.ts.map +1 -1
- package/dist/commonjs/compat/is_codec_supported.js +0 -2
- package/dist/commonjs/compat/is_vtt_cue.d.ts.map +1 -1
- package/dist/commonjs/compat/is_vtt_cue.js +1 -2
- package/dist/commonjs/compat/on_height_width_change.d.ts.map +1 -1
- package/dist/commonjs/compat/patch_webkit_source_buffer.d.ts.map +1 -1
- package/dist/commonjs/compat/patch_webkit_source_buffer.js +8 -18
- package/dist/commonjs/compat/remove_cue.js +2 -2
- package/dist/commonjs/core/fetchers/index.d.ts +4 -4
- package/dist/commonjs/core/fetchers/index.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/index.js +2 -2
- package/dist/commonjs/core/fetchers/segment/index.d.ts +6 -5
- package/dist/commonjs/core/fetchers/segment/index.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/segment/index.js +2 -2
- package/dist/{es2017/core/stream/representation/utils/downloading_queue.d.ts → commonjs/core/fetchers/segment/segment_queue.d.ts} +63 -80
- package/dist/commonjs/core/fetchers/segment/segment_queue.d.ts.map +1 -0
- package/dist/commonjs/core/{stream/representation/utils/downloading_queue.js → fetchers/segment/segment_queue.js} +132 -111
- package/dist/commonjs/core/fetchers/segment/{segment_fetcher_creator.d.ts → segment_queue_creator.d.ts} +25 -12
- package/dist/commonjs/core/fetchers/segment/segment_queue_creator.d.ts.map +1 -0
- package/dist/commonjs/core/fetchers/segment/{segment_fetcher_creator.js → segment_queue_creator.js} +15 -9
- package/dist/commonjs/core/fetchers/segment/task_prioritizer.d.ts +9 -0
- package/dist/commonjs/core/fetchers/segment/task_prioritizer.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/segment/task_prioritizer.js +38 -8
- package/dist/commonjs/core/fetchers/utils/schedule_request.js +1 -1
- package/dist/commonjs/core/main/common/content_time_boundaries_observer.js +21 -10
- package/dist/commonjs/core/main/worker/content_preparer.d.ts +3 -3
- package/dist/commonjs/core/main/worker/content_preparer.d.ts.map +1 -1
- package/dist/commonjs/core/main/worker/content_preparer.js +2 -2
- package/dist/commonjs/core/main/worker/send_message.js +1 -1
- package/dist/commonjs/core/main/worker/worker_main.js +2 -2
- package/dist/commonjs/core/segment_sinks/implementations/text/text_segment_buffer.js +1 -5
- package/dist/commonjs/core/segment_sinks/inventory/segment_inventory.js +39 -30
- package/dist/commonjs/core/segment_sinks/segment_buffers_store.d.ts.map +1 -1
- package/dist/commonjs/core/segment_sinks/segment_buffers_store.js +3 -2
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.d.ts +1 -1
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.d.ts.map +1 -1
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +3 -3
- package/dist/commonjs/core/stream/adaptation/types.d.ts +2 -2
- package/dist/commonjs/core/stream/adaptation/types.d.ts.map +1 -1
- package/dist/commonjs/core/stream/orchestrator/get_time_ranges_for_content.d.ts.map +1 -1
- package/dist/commonjs/core/stream/orchestrator/get_time_ranges_for_content.js +27 -6
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.d.ts +3 -3
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.d.ts.map +1 -1
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.js +3 -3
- package/dist/commonjs/core/stream/period/period_stream.d.ts +1 -1
- package/dist/commonjs/core/stream/period/period_stream.d.ts.map +1 -1
- package/dist/commonjs/core/stream/period/period_stream.js +2 -2
- package/dist/commonjs/core/stream/period/types.d.ts +2 -2
- package/dist/commonjs/core/stream/period/types.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/representation_stream.d.ts +1 -1
- package/dist/commonjs/core/stream/representation/representation_stream.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/representation_stream.js +19 -28
- package/dist/commonjs/core/stream/representation/types.d.ts +2 -2
- package/dist/commonjs/core/stream/representation/types.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/utils/get_needed_segments.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/utils/get_needed_segments.js +39 -18
- package/dist/commonjs/core/types.d.ts +2 -2
- package/dist/commonjs/core/types.d.ts.map +1 -1
- package/dist/commonjs/default_config.d.ts.map +1 -1
- package/dist/commonjs/default_config.js +0 -8
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +0 -13
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +0 -4
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +1 -2
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +2 -13
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +1 -2
- package/dist/commonjs/features/add_features.d.ts.map +1 -1
- package/dist/commonjs/features/add_features.js +31 -10
- package/dist/commonjs/main_thread/api/option_utils.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/option_utils.js +2 -6
- package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/public_api.js +33 -27
- package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/persistent_sessions_store.js +4 -3
- package/dist/commonjs/main_thread/init/media_source_content_initializer.js +6 -6
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +32 -37
- package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.js +1 -5
- package/dist/commonjs/main_thread/text_displayer/native/native_text_displayer.js +3 -7
- package/dist/commonjs/main_thread/tracks_store/track_dispatcher.js +1 -1
- package/dist/commonjs/main_thread/types.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/manifest.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/manifest.js +0 -6
- package/dist/commonjs/manifest/utils.d.ts.map +1 -1
- package/dist/commonjs/manifest/utils.js +72 -62
- package/dist/commonjs/mse/main_media_source_interface.js +1 -1
- package/dist/commonjs/multithread_types.d.ts +2 -2
- package/dist/commonjs/multithread_types.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +12 -6
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +14 -7
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +8 -4
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +10 -5
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +10 -5
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.js +14 -7
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/EventStream.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/EventStream.js +2 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/MPD.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/MPD.js +8 -4
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Period.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Period.js +10 -5
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Representation.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Representation.js +10 -5
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +2 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +2 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +4 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/MPD.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +10 -5
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Period.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +2 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/root.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/root.js +2 -1
- package/dist/commonjs/parsers/manifest/local/representation_index.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/local/representation_index.js +29 -8
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.js +31 -10
- package/dist/commonjs/parsers/manifest/smooth/create_parser.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/smooth/create_parser.js +2 -1
- package/dist/commonjs/parsers/manifest/smooth/shared_smooth_segment_timeline.js +26 -4
- package/dist/commonjs/parsers/manifest/utils/get_first_time_from_adaptation.js +29 -7
- package/dist/commonjs/parsers/manifest/utils/get_last_time_from_adaptation.js +29 -7
- package/dist/commonjs/parsers/texttracks/srt/html.js +28 -6
- package/dist/commonjs/parsers/texttracks/ttml/html/create_element.js +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/html/parse_ttml_to_div.js +29 -7
- package/dist/commonjs/parsers/texttracks/ttml/native/parse_ttml_to_vtt.d.ts.map +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/native/parse_ttml_to_vtt.js +26 -5
- package/dist/commonjs/parsers/texttracks/ttml/resolve_styles_inheritance.d.ts.map +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/resolve_styles_inheritance.js +25 -4
- package/dist/commonjs/parsers/texttracks/webvtt/html/to_html.d.ts +9 -3
- package/dist/commonjs/parsers/texttracks/webvtt/html/to_html.d.ts.map +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/html/to_html.js +9 -3
- package/dist/commonjs/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +30 -8
- package/dist/commonjs/public_types.d.ts +5 -7
- package/dist/commonjs/public_types.d.ts.map +1 -1
- package/dist/commonjs/transports/smooth/extract_timings_infos.js +30 -8
- package/dist/commonjs/utils/array_find.d.ts +1 -1
- package/dist/commonjs/utils/array_find.d.ts.map +1 -1
- package/dist/commonjs/utils/array_find.js +3 -1
- package/dist/commonjs/utils/array_find_index.d.ts +1 -1
- package/dist/commonjs/utils/array_find_index.d.ts.map +1 -1
- package/dist/commonjs/utils/array_find_index.js +3 -1
- package/dist/commonjs/utils/array_includes.d.ts.map +1 -1
- package/dist/commonjs/utils/array_includes.js +1 -3
- package/dist/commonjs/utils/assert.d.ts.map +1 -1
- package/dist/commonjs/utils/assert.js +0 -2
- package/dist/commonjs/utils/base64.d.ts +1 -1
- package/dist/commonjs/utils/base64.d.ts.map +1 -1
- package/dist/commonjs/utils/base64.js +3 -2
- package/dist/commonjs/utils/event_emitter.js +1 -1
- package/dist/commonjs/utils/flat_map.d.ts.map +1 -1
- package/dist/commonjs/utils/flat_map.js +1 -2
- package/dist/commonjs/utils/id_generator.d.ts.map +1 -1
- package/dist/commonjs/utils/id_generator.js +0 -1
- package/dist/commonjs/utils/logger.js +1 -1
- package/dist/commonjs/utils/monotonic_timestamp.js +2 -2
- package/dist/commonjs/utils/noop.js +1 -2
- package/dist/commonjs/utils/object_assign.d.ts.map +1 -1
- package/dist/commonjs/utils/object_assign.js +27 -6
- package/dist/commonjs/utils/object_values.d.ts.map +1 -1
- package/dist/commonjs/utils/object_values.js +1 -1
- package/dist/commonjs/utils/reference.js +1 -1
- package/dist/commonjs/utils/request/xhr.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/es2017/compat/add_class_name.d.ts.map +1 -1
- package/dist/es2017/compat/add_class_name.js +1 -2
- package/dist/es2017/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/es2017/compat/browser_compatibility_types.js +4 -1
- package/dist/es2017/compat/clear_element_src.js +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.js +2 -4
- package/dist/es2017/compat/eme/custom_media_keys/ms_media_keys_constructor.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/ms_media_keys_constructor.js +2 -4
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.js +3 -6
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.js +2 -17
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +1 -2
- package/dist/es2017/compat/eme/eme-api-implementation.js +0 -2
- package/dist/es2017/compat/event_listeners.d.ts.map +1 -1
- package/dist/es2017/compat/event_listeners.js +2 -6
- package/dist/es2017/compat/has_mse_in_worker.js +1 -1
- package/dist/es2017/compat/is_codec_supported.d.ts.map +1 -1
- package/dist/es2017/compat/is_codec_supported.js +0 -2
- package/dist/es2017/compat/is_vtt_cue.d.ts.map +1 -1
- package/dist/es2017/compat/is_vtt_cue.js +1 -2
- package/dist/es2017/compat/on_height_width_change.d.ts.map +1 -1
- package/dist/es2017/compat/patch_webkit_source_buffer.d.ts.map +1 -1
- package/dist/es2017/compat/patch_webkit_source_buffer.js +8 -18
- package/dist/es2017/compat/remove_cue.js +2 -2
- package/dist/es2017/core/fetchers/index.d.ts +4 -4
- package/dist/es2017/core/fetchers/index.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/index.js +2 -2
- package/dist/es2017/core/fetchers/segment/index.d.ts +6 -5
- package/dist/es2017/core/fetchers/segment/index.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/segment/index.js +2 -2
- package/dist/{commonjs/core/stream/representation/utils/downloading_queue.d.ts → es2017/core/fetchers/segment/segment_queue.d.ts} +63 -80
- package/dist/es2017/core/fetchers/segment/segment_queue.d.ts.map +1 -0
- package/dist/es2017/core/{stream/representation/utils/downloading_queue.js → fetchers/segment/segment_queue.js} +126 -105
- package/dist/es2017/core/fetchers/segment/{segment_fetcher_creator.d.ts → segment_queue_creator.d.ts} +25 -12
- package/dist/es2017/core/fetchers/segment/segment_queue_creator.d.ts.map +1 -0
- package/dist/es2017/core/fetchers/segment/{segment_fetcher_creator.js → segment_queue_creator.js} +12 -6
- package/dist/es2017/core/fetchers/segment/task_prioritizer.d.ts +9 -0
- package/dist/es2017/core/fetchers/segment/task_prioritizer.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/segment/task_prioritizer.js +10 -2
- package/dist/es2017/core/fetchers/utils/schedule_request.js +1 -1
- package/dist/es2017/core/main/common/content_time_boundaries_observer.js +4 -4
- package/dist/es2017/core/main/worker/content_preparer.d.ts +3 -3
- package/dist/es2017/core/main/worker/content_preparer.d.ts.map +1 -1
- package/dist/es2017/core/main/worker/content_preparer.js +3 -3
- package/dist/es2017/core/main/worker/send_message.js +1 -1
- package/dist/es2017/core/main/worker/worker_main.js +2 -2
- package/dist/es2017/core/segment_sinks/implementations/text/text_segment_buffer.js +1 -5
- package/dist/es2017/core/segment_sinks/inventory/segment_inventory.js +1 -2
- package/dist/es2017/core/segment_sinks/segment_buffers_store.d.ts.map +1 -1
- package/dist/es2017/core/segment_sinks/segment_buffers_store.js +3 -2
- package/dist/es2017/core/stream/adaptation/adaptation_stream.d.ts +1 -1
- package/dist/es2017/core/stream/adaptation/adaptation_stream.d.ts.map +1 -1
- package/dist/es2017/core/stream/adaptation/adaptation_stream.js +3 -3
- package/dist/es2017/core/stream/adaptation/types.d.ts +2 -2
- package/dist/es2017/core/stream/adaptation/types.d.ts.map +1 -1
- package/dist/es2017/core/stream/orchestrator/get_time_ranges_for_content.d.ts.map +1 -1
- package/dist/es2017/core/stream/orchestrator/get_time_ranges_for_content.js +1 -2
- package/dist/es2017/core/stream/orchestrator/stream_orchestrator.d.ts +3 -3
- package/dist/es2017/core/stream/orchestrator/stream_orchestrator.d.ts.map +1 -1
- package/dist/es2017/core/stream/orchestrator/stream_orchestrator.js +3 -3
- package/dist/es2017/core/stream/period/period_stream.d.ts +1 -1
- package/dist/es2017/core/stream/period/period_stream.d.ts.map +1 -1
- package/dist/es2017/core/stream/period/period_stream.js +2 -2
- package/dist/es2017/core/stream/period/types.d.ts +2 -2
- package/dist/es2017/core/stream/period/types.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/representation_stream.d.ts +1 -1
- package/dist/es2017/core/stream/representation/representation_stream.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/representation_stream.js +19 -28
- package/dist/es2017/core/stream/representation/types.d.ts +2 -2
- package/dist/es2017/core/stream/representation/types.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/utils/get_needed_segments.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/utils/get_needed_segments.js +1 -2
- package/dist/es2017/core/types.d.ts +2 -2
- package/dist/es2017/core/types.d.ts.map +1 -1
- package/dist/es2017/default_config.d.ts.map +1 -1
- package/dist/es2017/default_config.js +0 -8
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +0 -13
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +0 -4
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +1 -2
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +2 -13
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +1 -2
- package/dist/es2017/features/add_features.d.ts.map +1 -1
- package/dist/es2017/features/add_features.js +1 -2
- package/dist/es2017/main_thread/api/option_utils.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/option_utils.js +2 -6
- package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/public_api.js +29 -23
- package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/utils/persistent_sessions_store.js +2 -1
- package/dist/es2017/main_thread/init/media_source_content_initializer.js +6 -6
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +7 -12
- package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.js +1 -5
- package/dist/es2017/main_thread/text_displayer/native/native_text_displayer.js +3 -7
- package/dist/es2017/main_thread/tracks_store/track_dispatcher.js +1 -1
- package/dist/es2017/main_thread/types.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/manifest.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/manifest.js +0 -6
- package/dist/es2017/manifest/utils.d.ts.map +1 -1
- package/dist/es2017/manifest/utils.js +1 -2
- package/dist/es2017/mse/main_media_source_interface.js +1 -1
- package/dist/es2017/multithread_types.d.ts +2 -2
- package/dist/es2017/multithread_types.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/parse_s_element.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +12 -6
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +14 -7
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +8 -4
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Period.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +10 -5
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +10 -5
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.js +14 -7
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/EventStream.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/EventStream.js +2 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/MPD.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/MPD.js +8 -4
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Period.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Period.js +10 -5
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Representation.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Representation.js +10 -5
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +1 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +2 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +2 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +4 -2
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/MPD.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +10 -5
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Period.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +2 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/root.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/root.js +2 -1
- package/dist/es2017/parsers/manifest/local/representation_index.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/local/representation_index.js +1 -2
- package/dist/es2017/parsers/manifest/metaplaylist/metaplaylist_parser.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/metaplaylist/metaplaylist_parser.js +2 -3
- package/dist/es2017/parsers/manifest/smooth/create_parser.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/smooth/create_parser.js +2 -1
- package/dist/es2017/parsers/manifest/smooth/shared_smooth_segment_timeline.js +2 -2
- package/dist/es2017/parsers/manifest/utils/get_first_time_from_adaptation.js +2 -2
- package/dist/es2017/parsers/manifest/utils/get_last_time_from_adaptation.js +2 -2
- package/dist/es2017/parsers/texttracks/srt/html.js +2 -2
- package/dist/es2017/parsers/texttracks/ttml/html/create_element.js +1 -1
- package/dist/es2017/parsers/texttracks/ttml/html/parse_ttml_to_div.js +3 -3
- package/dist/es2017/parsers/texttracks/ttml/native/parse_ttml_to_vtt.d.ts.map +1 -1
- package/dist/es2017/parsers/texttracks/ttml/native/parse_ttml_to_vtt.js +1 -2
- package/dist/es2017/parsers/texttracks/ttml/resolve_styles_inheritance.d.ts.map +1 -1
- package/dist/es2017/parsers/texttracks/ttml/resolve_styles_inheritance.js +1 -2
- package/dist/es2017/parsers/texttracks/webvtt/html/to_html.d.ts +9 -3
- package/dist/es2017/parsers/texttracks/webvtt/html/to_html.d.ts.map +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/html/to_html.js +9 -3
- package/dist/es2017/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +2 -2
- package/dist/es2017/public_types.d.ts +5 -7
- package/dist/es2017/public_types.d.ts.map +1 -1
- package/dist/es2017/transports/smooth/extract_timings_infos.js +3 -3
- package/dist/es2017/utils/array_find.d.ts +1 -1
- package/dist/es2017/utils/array_find.d.ts.map +1 -1
- package/dist/es2017/utils/array_find.js +3 -1
- package/dist/es2017/utils/array_find_index.d.ts +1 -1
- package/dist/es2017/utils/array_find_index.d.ts.map +1 -1
- package/dist/es2017/utils/array_find_index.js +3 -1
- package/dist/es2017/utils/array_includes.d.ts.map +1 -1
- package/dist/es2017/utils/array_includes.js +1 -3
- package/dist/es2017/utils/assert.d.ts.map +1 -1
- package/dist/es2017/utils/assert.js +0 -2
- package/dist/es2017/utils/base64.d.ts +1 -1
- package/dist/es2017/utils/base64.d.ts.map +1 -1
- package/dist/es2017/utils/base64.js +3 -2
- package/dist/es2017/utils/event_emitter.js +1 -1
- package/dist/es2017/utils/flat_map.d.ts.map +1 -1
- package/dist/es2017/utils/flat_map.js +1 -2
- package/dist/es2017/utils/id_generator.d.ts.map +1 -1
- package/dist/es2017/utils/id_generator.js +0 -1
- package/dist/es2017/utils/logger.js +1 -1
- package/dist/es2017/utils/monotonic_timestamp.js +2 -2
- package/dist/es2017/utils/noop.js +1 -2
- package/dist/es2017/utils/object_assign.d.ts.map +1 -1
- package/dist/es2017/utils/object_assign.js +1 -2
- package/dist/es2017/utils/object_values.d.ts.map +1 -1
- package/dist/es2017/utils/object_values.js +1 -2
- package/dist/es2017/utils/reference.js +1 -1
- package/dist/es2017/utils/request/xhr.js +1 -1
- package/dist/rx-player.js +39336 -18
- package/dist/rx-player.min.js +18 -0
- package/dist/worker.js +5 -5
- package/package.json +16 -9
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/compat/__tests__/add_text_track.test.ts +8 -12
- package/src/compat/__tests__/browser_compatibility_types.test.ts +0 -7
- package/src/compat/__tests__/browser_version.test.ts +20 -19
- package/src/compat/__tests__/can_patch_isobmff.test.ts +7 -10
- package/src/compat/__tests__/can_rely_on_video_visibility_and_size.test.ts +17 -21
- package/src/compat/__tests__/can_reuse_media_keys.test.ts +13 -21
- package/src/compat/__tests__/clear_element_src.test.ts +37 -34
- package/src/compat/__tests__/enable_audio_track.test.ts +22 -21
- package/src/compat/__tests__/is_codec_supported.test.ts +17 -18
- package/src/compat/__tests__/is_seeking_approximate.test.ts +8 -14
- package/src/compat/__tests__/is_vtt_cue.test.ts +8 -13
- package/src/compat/__tests__/make_vtt_cue.test.ts +7 -12
- package/src/compat/__tests__/patch_webkit_source_buffer.test.ts +44 -32
- package/src/compat/__tests__/remove_cue.test.ts +30 -31
- package/src/compat/__tests__/should_favour_custom_safari_EME.test.ts +21 -26
- package/src/compat/__tests__/should_renew_media_key_system_access.test.ts +9 -17
- package/src/compat/__tests__/should_unset_media_keys.test.ts +7 -14
- package/src/compat/__tests__/should_validate_metadata.test.ts +7 -17
- package/src/compat/__tests__/should_wait_for_data_before_loaded.test.ts +17 -26
- package/src/compat/__tests__/should_wait_for_have_enough_data.test.ts +10 -15
- package/src/compat/add_class_name.ts +1 -2
- package/src/compat/browser_compatibility_types.ts +4 -2
- package/src/compat/clear_element_src.ts +1 -1
- package/src/compat/eme/custom_media_keys/moz_media_keys_constructor.ts +1 -2
- package/src/compat/eme/custom_media_keys/ms_media_keys_constructor.ts +1 -2
- package/src/compat/eme/custom_media_keys/old_webkit_media_keys.ts +3 -6
- package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +2 -17
- package/src/compat/eme/custom_media_keys/webkit_media_keys_constructor.ts +1 -4
- package/src/compat/eme/eme-api-implementation.ts +0 -2
- package/src/compat/event_listeners.ts +2 -6
- package/src/compat/has_mse_in_worker.ts +1 -1
- package/src/compat/is_codec_supported.ts +0 -2
- package/src/compat/is_debug_mode_enabled.ts +1 -1
- package/src/compat/is_vtt_cue.ts +1 -2
- package/src/compat/on_height_width_change.ts +1 -2
- package/src/compat/patch_webkit_source_buffer.ts +48 -29
- package/src/compat/remove_cue.ts +2 -2
- package/src/core/adaptive/__tests__/buffer_based_chooser.test.ts +21 -26
- package/src/core/fetchers/README.md +13 -12
- package/src/core/fetchers/index.ts +5 -8
- package/src/core/fetchers/segment/__tests__/task_prioritizer.test.ts +17 -23
- package/src/core/fetchers/segment/index.ts +6 -5
- package/src/core/{stream/representation/utils/downloading_queue.ts → fetchers/segment/segment_queue.ts} +204 -166
- package/src/core/fetchers/segment/{segment_fetcher_creator.ts → segment_queue_creator.ts} +31 -14
- package/src/core/fetchers/segment/task_prioritizer.ts +10 -2
- package/src/core/fetchers/utils/schedule_request.ts +1 -1
- package/src/core/main/common/content_time_boundaries_observer.ts +4 -4
- package/src/core/main/worker/content_preparer.ts +5 -5
- package/src/core/main/worker/send_message.ts +1 -1
- package/src/core/main/worker/worker_main.ts +2 -2
- package/src/core/segment_sinks/implementations/text/text_segment_buffer.ts +1 -5
- package/src/core/segment_sinks/inventory/segment_inventory.ts +1 -2
- package/src/core/segment_sinks/segment_buffers_store.ts +3 -2
- package/src/core/stream/adaptation/adaptation_stream.ts +3 -3
- package/src/core/stream/adaptation/types.ts +2 -2
- package/src/core/stream/orchestrator/get_time_ranges_for_content.ts +1 -2
- package/src/core/stream/orchestrator/stream_orchestrator.ts +4 -4
- package/src/core/stream/period/period_stream.ts +2 -2
- package/src/core/stream/period/types.ts +2 -2
- package/src/core/stream/representation/representation_stream.ts +59 -56
- package/src/core/stream/representation/types.ts +3 -4
- package/src/core/stream/representation/utils/get_needed_segments.ts +1 -2
- package/src/core/types.ts +2 -4
- package/src/default_config.ts +0 -8
- package/src/errors/__tests__/format_error.test.ts +18 -18
- package/src/experimental/features/__tests__/multi_thread.test.ts +5 -5
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/capabilities.test.ts +11 -11
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/DRMInfos.test.ts +18 -26
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/HDCPPolicy.test.ts +13 -21
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/decodingInfos.test.ts +24 -20
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/defaultCodecFinder.test.ts +28 -30
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaContentType.test.ts +32 -38
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaDisplayInfos.test.ts +64 -51
- package/src/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.ts +4 -17
- package/src/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.ts +0 -4
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.ts +1 -2
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.ts +16 -14
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.ts +1 -2
- package/src/features/__tests__/add_features.test.ts +12 -11
- package/src/features/add_features.ts +1 -2
- package/src/features/list/__tests__/dash_wasm.test.ts +4 -4
- package/src/main_thread/api/__tests__/option_utils.test.ts +114 -70
- package/src/main_thread/api/__tests__/public_api.test.ts +85 -48
- package/src/main_thread/api/option_utils.ts +2 -6
- package/src/main_thread/api/public_api.ts +24 -18
- package/src/main_thread/decrypt/__tests__/__global__/get_license.test.ts +12 -18
- package/src/main_thread/decrypt/__tests__/__global__/init_data.test.ts +128 -101
- package/src/main_thread/decrypt/__tests__/__global__/media_key_system_access.test.ts +26 -33
- package/src/main_thread/decrypt/__tests__/__global__/media_keys.test.ts +46 -48
- package/src/main_thread/decrypt/__tests__/__global__/server_certificate.test.ts +33 -34
- package/src/main_thread/decrypt/__tests__/__global__/utils.ts +13 -17
- package/src/main_thread/decrypt/session_events_listener.ts +1 -1
- package/src/main_thread/decrypt/utils/__tests__/clean_old_loaded_sessions.test.ts +0 -5
- package/src/main_thread/decrypt/utils/__tests__/clean_old_stored_persistent_info.test.ts +14 -17
- package/src/main_thread/decrypt/utils/persistent_sessions_store.ts +2 -1
- package/src/main_thread/init/media_source_content_initializer.ts +7 -7
- package/src/main_thread/init/multi_thread_content_initializer.ts +7 -12
- package/src/main_thread/init/utils/__tests__/are_same_stream_events.test.ts +11 -16
- package/src/main_thread/init/utils/__tests__/refresh_scheduled_events_list.test.ts +48 -18
- package/src/main_thread/text_displayer/html/__tests__/text_track_cues_store.test.ts +32 -17
- package/src/main_thread/text_displayer/html/html_text_displayer.ts +1 -5
- package/src/main_thread/text_displayer/native/native_text_displayer.ts +3 -7
- package/src/main_thread/tracks_store/__tests__/media_element_tracks_store.test.ts +33 -28
- package/src/main_thread/tracks_store/track_dispatcher.ts +1 -1
- package/src/main_thread/types.ts +0 -1
- package/src/manifest/classes/__tests__/adaptation.test.ts +167 -62
- package/src/manifest/classes/__tests__/manifest.test.ts +130 -74
- package/src/manifest/classes/__tests__/period.test.ts +293 -211
- package/src/manifest/classes/__tests__/update_period_in_place.test.ts +0 -2
- package/src/manifest/classes/__tests__/update_periods.test.ts +57 -57
- package/src/manifest/classes/manifest.ts +0 -6
- package/src/manifest/utils.ts +1 -2
- package/src/mse/main_media_source_interface.ts +1 -1
- package/src/mse/types.ts +1 -1
- package/src/multithread_types.ts +2 -2
- package/src/parsers/manifest/dash/common/__tests__/get_clock_offset.test.ts +5 -10
- package/src/parsers/manifest/dash/common/__tests__/get_http_utc-timing_url.test.ts +38 -30
- package/src/parsers/manifest/dash/common/__tests__/get_periods_time_infos.test.ts +0 -3
- package/src/parsers/manifest/dash/common/indexes/timeline/parse_s_element.ts +12 -6
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.ts +14 -7
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.ts +8 -4
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/Period.ts +10 -5
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.ts +10 -5
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/ContentProtection.test.ts +15 -27
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/Initialization.test.ts +13 -17
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/SegmentURL.test.ts +18 -15
- package/src/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.ts +14 -7
- package/src/parsers/manifest/dash/native-parser/node_parsers/EventStream.ts +2 -1
- package/src/parsers/manifest/dash/native-parser/node_parsers/MPD.ts +8 -4
- package/src/parsers/manifest/dash/native-parser/node_parsers/Period.ts +10 -5
- package/src/parsers/manifest/dash/native-parser/node_parsers/Representation.ts +10 -5
- package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/ContentProtection.test.ts +15 -27
- package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/Initialization.test.ts +13 -17
- package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/SegmentTimeline.test.ts +9 -14
- package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/SegmentURL.test.ts +18 -15
- package/src/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.ts +1 -2
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.ts +2 -1
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.ts +2 -1
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.ts +4 -2
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/MPD.ts +10 -5
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/Period.ts +2 -1
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/root.ts +2 -1
- package/src/parsers/manifest/local/representation_index.ts +1 -2
- package/src/parsers/manifest/metaplaylist/metaplaylist_parser.ts +2 -3
- package/src/parsers/manifest/smooth/create_parser.ts +2 -1
- package/src/parsers/manifest/smooth/shared_smooth_segment_timeline.ts +2 -2
- package/src/parsers/manifest/utils/__tests__/update_segment_timeline.test.ts +3 -8
- package/src/parsers/manifest/utils/get_first_time_from_adaptation.ts +2 -2
- package/src/parsers/manifest/utils/get_last_time_from_adaptation.ts +2 -2
- package/src/parsers/texttracks/srt/html.ts +2 -2
- package/src/parsers/texttracks/ttml/__tests__/resolve_styles_inheritance.test.ts +3 -7
- package/src/parsers/texttracks/ttml/html/__tests__/__global__/html_ttml_parser.test.ts +4 -4
- package/src/parsers/texttracks/ttml/html/create_element.ts +1 -1
- package/src/parsers/texttracks/ttml/html/parse_ttml_to_div.ts +3 -3
- package/src/parsers/texttracks/ttml/native/parse_ttml_to_vtt.ts +1 -2
- package/src/parsers/texttracks/ttml/resolve_styles_inheritance.ts +1 -2
- package/src/parsers/texttracks/webvtt/__tests__/parse_cue_block.test.ts +11 -11
- package/src/parsers/texttracks/webvtt/html/__tests__/convert_payload_to_html.test.ts +5 -18
- package/src/parsers/texttracks/webvtt/html/__tests__/parse_style_block.test.ts +23 -28
- package/src/parsers/texttracks/webvtt/html/__tests__/parse_webvtt_to_div.test.ts +9 -14
- package/src/parsers/texttracks/webvtt/html/__tests__/to_html.test.ts +11 -11
- package/src/parsers/texttracks/webvtt/html/to_html.ts +9 -3
- package/src/parsers/texttracks/webvtt/native/parse_vtt_to_cues.ts +2 -2
- package/src/public_types.ts +7 -8
- package/src/tools/TextTrackRenderer/text_track_renderer.ts +1 -1
- package/src/transports/smooth/extract_timings_infos.ts +3 -3
- package/src/transports/smooth/isobmff/__tests__/create_boxes.test.ts +30 -28
- package/src/transports/utils/__tests__/check_isobmff_integrity.test.ts +38 -44
- package/src/utils/__tests__/array_find.test.ts +12 -12
- package/src/utils/__tests__/array_find_index.test.ts +13 -12
- package/src/utils/__tests__/array_includes.test.ts +7 -7
- package/src/utils/__tests__/assert.test.ts +19 -25
- package/src/utils/__tests__/base64.test.ts +18 -13
- package/src/utils/__tests__/event_emitter.test.ts +225 -50
- package/src/utils/__tests__/flat_map.test.ts +2 -6
- package/src/utils/__tests__/starts_with.test.ts +7 -8
- package/src/utils/array_find.ts +3 -7
- package/src/utils/array_find_index.ts +3 -7
- package/src/utils/array_includes.ts +1 -3
- package/src/utils/assert.ts +0 -2
- package/src/utils/base64.ts +3 -2
- package/src/utils/event_emitter.ts +1 -1
- package/src/utils/flat_map.ts +1 -2
- package/src/utils/id_generator.ts +0 -2
- package/src/utils/is_worker.ts +1 -1
- package/src/utils/logger.ts +1 -1
- package/src/utils/monotonic_timestamp.ts +2 -2
- package/src/utils/noop.ts +1 -2
- package/src/utils/object_assign.ts +1 -2
- package/src/utils/object_values.ts +1 -2
- package/src/utils/reference.ts +1 -1
- package/src/utils/request/xhr.ts +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.d.ts.map +0 -1
- package/dist/commonjs/core/stream/representation/utils/downloading_queue.d.ts.map +0 -1
- package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.d.ts.map +0 -1
- package/dist/es2017/core/stream/representation/utils/downloading_queue.d.ts.map +0 -1
|
@@ -24,11 +24,31 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
24
24
|
}
|
|
25
25
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
26
|
};
|
|
27
|
+
var __values = (this && this.__values) || function(o) {
|
|
28
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
29
|
+
if (m) return m.call(o);
|
|
30
|
+
if (o && typeof o.length === "number") return {
|
|
31
|
+
next: function () {
|
|
32
|
+
if (o && i >= o.length) o = void 0;
|
|
33
|
+
return { value: o && o[i++], done: !o };
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
37
|
+
};
|
|
27
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
39
|
var log_1 = require("../../../log");
|
|
29
40
|
var array_find_index_1 = require("../../../utils/array_find_index");
|
|
30
41
|
var create_cancellable_promise_1 = require("../../../utils/create_cancellable_promise");
|
|
31
42
|
var task_canceller_1 = require("../../../utils/task_canceller");
|
|
43
|
+
/**
|
|
44
|
+
* Utilitary class which allows to perform multiple tasks at once each with an
|
|
45
|
+
* associated priority.
|
|
46
|
+
*
|
|
47
|
+
* This class will then schedule the given tasks in the right order based on the
|
|
48
|
+
* priorities.
|
|
49
|
+
*
|
|
50
|
+
* @class TaskPrioritizer
|
|
51
|
+
*/
|
|
32
52
|
var TaskPrioritizer = /** @class */ (function () {
|
|
33
53
|
/**
|
|
34
54
|
* @param {Options} prioritizerOptions
|
|
@@ -269,15 +289,25 @@ var TaskPrioritizer = /** @class */ (function () {
|
|
|
269
289
|
* `this._prioritySteps.low`).
|
|
270
290
|
*/
|
|
271
291
|
TaskPrioritizer.prototype._interruptCancellableTasks = function () {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
292
|
+
var e_1, _a;
|
|
293
|
+
try {
|
|
294
|
+
for (var _b = __values(this._pendingTasks), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
295
|
+
var pendingObj = _c.value;
|
|
296
|
+
if (pendingObj.priority >= this._prioritySteps.low) {
|
|
297
|
+
this._interruptPendingTask(pendingObj);
|
|
298
|
+
// The previous call could have a lot of potential side-effects.
|
|
299
|
+
// It is safer to re-start the function to not miss any pending
|
|
300
|
+
// task that needs to be cancelled.
|
|
301
|
+
return this._interruptCancellableTasks();
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
306
|
+
finally {
|
|
307
|
+
try {
|
|
308
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
280
309
|
}
|
|
310
|
+
finally { if (e_1) throw e_1.error; }
|
|
281
311
|
}
|
|
282
312
|
};
|
|
283
313
|
/**
|
|
@@ -296,7 +296,7 @@ function scheduleRequestWithCdns(cdns, cdnPrioritizer, performRequest, options,
|
|
|
296
296
|
var canceller = new task_canceller_1.default();
|
|
297
297
|
var unlinkCanceller = canceller.linkToSignal(cancellationSignal);
|
|
298
298
|
return new Promise(function (res, rej) {
|
|
299
|
-
|
|
299
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
300
300
|
cdnPrioritizer === null || cdnPrioritizer === void 0 ? void 0 : cdnPrioritizer.addEventListener("priorityChange", function () {
|
|
301
301
|
var updatedPrioritaryCdn = getCdnToRequest();
|
|
302
302
|
if (cancellationSignal.isCancelled()) {
|
|
@@ -515,6 +515,7 @@ function getLastAvailablePositionFromAdaptation(adaptation) {
|
|
|
515
515
|
* @returns {Number|undefined|null}
|
|
516
516
|
*/
|
|
517
517
|
function getEndingPositionFromAdaptation(adaptation) {
|
|
518
|
+
var e_4, _a;
|
|
518
519
|
var representations = adaptation.representations;
|
|
519
520
|
var min = null;
|
|
520
521
|
/**
|
|
@@ -524,18 +525,28 @@ function getEndingPositionFromAdaptation(adaptation) {
|
|
|
524
525
|
* This variable allows to optimize the logic here when this is the case.
|
|
525
526
|
*/
|
|
526
527
|
var lastIndex;
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
528
|
+
try {
|
|
529
|
+
for (var representations_2 = __values(representations), representations_2_1 = representations_2.next(); !representations_2_1.done; representations_2_1 = representations_2.next()) {
|
|
530
|
+
var representation = representations_2_1.value;
|
|
531
|
+
if (representation.index !== lastIndex) {
|
|
532
|
+
lastIndex = representation.index;
|
|
533
|
+
var lastPosition = representation.index.getEnd();
|
|
534
|
+
if (lastPosition === undefined) {
|
|
535
|
+
// we cannot tell
|
|
536
|
+
return undefined;
|
|
537
|
+
}
|
|
538
|
+
if (lastPosition !== null) {
|
|
539
|
+
min = (0, is_null_or_undefined_1.default)(min) ? lastPosition : Math.min(min, lastPosition);
|
|
540
|
+
}
|
|
537
541
|
}
|
|
538
542
|
}
|
|
539
543
|
}
|
|
544
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
545
|
+
finally {
|
|
546
|
+
try {
|
|
547
|
+
if (representations_2_1 && !representations_2_1.done && (_a = representations_2.return)) _a.call(representations_2);
|
|
548
|
+
}
|
|
549
|
+
finally { if (e_4) throw e_4.error; }
|
|
550
|
+
}
|
|
540
551
|
return min;
|
|
541
552
|
}
|
|
@@ -4,7 +4,7 @@ import type { IContentInitializationData } from "../../../multithread_types";
|
|
|
4
4
|
import type { IRepresentationEstimator } from "../../adaptive";
|
|
5
5
|
import CmcdDataBuilder from "../../cmcd";
|
|
6
6
|
import type { IManifestRefreshSettings } from "../../fetchers";
|
|
7
|
-
import { ManifestFetcher,
|
|
7
|
+
import { ManifestFetcher, SegmentQueueCreator } from "../../fetchers";
|
|
8
8
|
import SegmentSinksStore from "../../segment_sinks";
|
|
9
9
|
import type { INeedsMediaSourceReloadPayload } from "../../stream";
|
|
10
10
|
import DecipherabilityFreezeDetector from "../common/DecipherabilityFreezeDetector";
|
|
@@ -88,10 +88,10 @@ export interface IPreparedContentData {
|
|
|
88
88
|
/** Allows to send timed text media data so it can be rendered. */
|
|
89
89
|
workerTextSender: WorkerTextDisplayerInterface | null;
|
|
90
90
|
/**
|
|
91
|
-
* Allows to create `
|
|
91
|
+
* Allows to create `SegmentQueue` which simplifies complex media segment
|
|
92
92
|
* fetching.
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
segmentQueueCreator: SegmentQueueCreator;
|
|
95
95
|
/**
|
|
96
96
|
* Allows to store and update the wanted tracks and Representation inside that
|
|
97
97
|
* track.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content_preparer.d.ts","sourceRoot":"","sources":["../../../../../src/core/main/worker/content_preparer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAG1D,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AAWpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,eAAe,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,wBAA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iBAAiB,IAAI,oBAAoB,GAAG,IAAI;IAIhD,uBAAuB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,IAAI;IAIjE,iBAAiB,CAAC,UAAU,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC;IAmD5E,qBAAqB;CAI7B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC;;;OAGG;IACH,WAAW,EAAE,qBAAqB,CAAC;IACnC,0DAA0D;IAC1D,eAAe,EAAE,eAAe,CAAC;IACjC;;;;OAIG;IACH,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D;;;OAGG;IACH,uBAAuB,EAAE,wBAAwB,CAAC;IAClD;;;OAGG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,kEAAkE;IAClE,gBAAgB,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACtD;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IACzC;;;OAGG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;CACtC"}
|
|
@@ -102,7 +102,7 @@ var ContentPreparer = /** @class */ (function () {
|
|
|
102
102
|
var unbindRejectOnCancellation = currentMediaSourceCanceller.signal.register(function (error) {
|
|
103
103
|
rej(error);
|
|
104
104
|
});
|
|
105
|
-
var
|
|
105
|
+
var segmentQueueCreator = new fetchers_1.SegmentQueueCreator(dashPipelines, cmcdDataBuilder, context.segmentRetryOptions, contentCanceller.signal);
|
|
106
106
|
var trackChoiceSetter = new track_choice_setter_1.default();
|
|
107
107
|
var _c = __read(createMediaSourceAndBuffersStore(contentId, {
|
|
108
108
|
hasMseInWorker: _this._hasMseInWorker,
|
|
@@ -119,7 +119,7 @@ var ContentPreparer = /** @class */ (function () {
|
|
|
119
119
|
manifestFetcher: manifestFetcher,
|
|
120
120
|
representationEstimator: representationEstimator,
|
|
121
121
|
segmentSinksStore: segmentSinksStore,
|
|
122
|
-
|
|
122
|
+
segmentQueueCreator: segmentQueueCreator,
|
|
123
123
|
workerTextSender: workerTextSender,
|
|
124
124
|
trackChoiceSetter: trackChoiceSetter,
|
|
125
125
|
};
|
|
@@ -431,7 +431,7 @@ function loadOrReloadPreparedContent(val, contentPreparer, playbackObservationRe
|
|
|
431
431
|
});
|
|
432
432
|
return;
|
|
433
433
|
}
|
|
434
|
-
var contentId = preparedContent.contentId, cmcdDataBuilder = preparedContent.cmcdDataBuilder, manifest = preparedContent.manifest, mediaSource = preparedContent.mediaSource, representationEstimator = preparedContent.representationEstimator, segmentSinksStore = preparedContent.segmentSinksStore,
|
|
434
|
+
var contentId = preparedContent.contentId, cmcdDataBuilder = preparedContent.cmcdDataBuilder, manifest = preparedContent.manifest, mediaSource = preparedContent.mediaSource, representationEstimator = preparedContent.representationEstimator, segmentSinksStore = preparedContent.segmentSinksStore, segmentQueueCreator = preparedContent.segmentQueueCreator;
|
|
435
435
|
var drmSystemId = val.drmSystemId, enableFastSwitching = val.enableFastSwitching, initialTime = val.initialTime, onCodecSwitch = val.onCodecSwitch;
|
|
436
436
|
playbackObservationRef.onUpdate(function (observation) {
|
|
437
437
|
if (preparedContent.decipherabilityFreezeDetector.needToReload(observation)) {
|
|
@@ -481,7 +481,7 @@ function loadOrReloadPreparedContent(val, contentPreparer, playbackObservationRe
|
|
|
481
481
|
});
|
|
482
482
|
},
|
|
483
483
|
}, currentLoadCanceller.signal);
|
|
484
|
-
(0, stream_1.default)({ initialPeriod: manifest.periods[0], manifest: manifest }, playbackObserver, representationEstimator, segmentSinksStore,
|
|
484
|
+
(0, stream_1.default)({ initialPeriod: manifest.periods[0], manifest: manifest }, playbackObserver, representationEstimator, segmentSinksStore, segmentQueueCreator, {
|
|
485
485
|
wantedBufferAhead: globals_1.wantedBufferAhead,
|
|
486
486
|
maxVideoBufferSize: globals_1.maxVideoBufferSize,
|
|
487
487
|
maxBufferAhead: globals_1.maxBufferAhead,
|
|
@@ -243,15 +243,11 @@ function assertChunkIsTextTrackSegmentData(chunk) {
|
|
|
243
243
|
* a hack to tell TypeScript to perform that check.
|
|
244
244
|
*/
|
|
245
245
|
if (0 /* __ENVIRONMENT__.CURRENT_ENV */ === 1 /* __ENVIRONMENT__.DEV */) {
|
|
246
|
-
|
|
247
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
248
|
-
// @ts-ignore
|
|
246
|
+
// @ts-expect-error: unused function for type checking
|
|
249
247
|
function _checkType(input) {
|
|
250
248
|
function checkEqual(_arg) {
|
|
251
249
|
/* nothing */
|
|
252
250
|
}
|
|
253
251
|
checkEqual(input);
|
|
254
252
|
}
|
|
255
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
256
|
-
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
|
257
253
|
}
|
|
@@ -874,7 +874,7 @@ function guessBufferedEndFromRangeEnd(lastSegmentInRange, rangeEnd, bufferType)
|
|
|
874
874
|
* @returns {string}
|
|
875
875
|
*/
|
|
876
876
|
function prettyPrintInventory(inventory) {
|
|
877
|
-
var _a;
|
|
877
|
+
var e_3, _a, _b;
|
|
878
878
|
var roundingError = 1 / 60;
|
|
879
879
|
var encounteredReps = {};
|
|
880
880
|
var letters = [];
|
|
@@ -891,46 +891,55 @@ function prettyPrintInventory(inventory) {
|
|
|
891
891
|
return currentLetter;
|
|
892
892
|
}
|
|
893
893
|
var str = "";
|
|
894
|
-
|
|
895
|
-
var
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
encounteredReps[periodId] = (_a = {}, _a[representationId] = currentLetter, _a);
|
|
904
|
-
}
|
|
905
|
-
else {
|
|
906
|
-
var previousLetter = encounteredPeriod[representationId];
|
|
907
|
-
if (previousLetter === undefined) {
|
|
894
|
+
try {
|
|
895
|
+
for (var inventory_1 = __values(inventory), inventory_1_1 = inventory_1.next(); !inventory_1_1.done; inventory_1_1 = inventory_1.next()) {
|
|
896
|
+
var chunk = inventory_1_1.value;
|
|
897
|
+
if (chunk.bufferedStart !== undefined && chunk.bufferedEnd !== undefined) {
|
|
898
|
+
var periodId = chunk.infos.period.id;
|
|
899
|
+
var representationId = chunk.infos.representation.id;
|
|
900
|
+
var encounteredPeriod = encounteredReps[periodId];
|
|
901
|
+
var currentLetter = void 0;
|
|
902
|
+
if (encounteredPeriod === undefined) {
|
|
908
903
|
currentLetter = generateNewLetter(chunk.infos);
|
|
909
|
-
|
|
904
|
+
encounteredReps[periodId] = (_b = {}, _b[representationId] = currentLetter, _b);
|
|
910
905
|
}
|
|
911
906
|
else {
|
|
912
|
-
|
|
907
|
+
var previousLetter = encounteredPeriod[representationId];
|
|
908
|
+
if (previousLetter === undefined) {
|
|
909
|
+
currentLetter = generateNewLetter(chunk.infos);
|
|
910
|
+
encounteredPeriod[representationId] = currentLetter;
|
|
911
|
+
}
|
|
912
|
+
else {
|
|
913
|
+
currentLetter = previousLetter;
|
|
914
|
+
}
|
|
913
915
|
}
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
916
|
+
if (lastChunk === null) {
|
|
917
|
+
str += "".concat(chunk.bufferedStart.toFixed(2), "|").concat(currentLetter, "|");
|
|
918
|
+
}
|
|
919
|
+
else if (lastLetter === currentLetter) {
|
|
920
|
+
if (lastChunk.bufferedEnd + roundingError < chunk.bufferedStart) {
|
|
921
|
+
str +=
|
|
922
|
+
"".concat(lastChunk.bufferedEnd.toFixed(2), " ~ ") +
|
|
923
|
+
"".concat(chunk.bufferedStart.toFixed(2), "|").concat(currentLetter, "|");
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
else {
|
|
920
927
|
str +=
|
|
921
928
|
"".concat(lastChunk.bufferedEnd.toFixed(2), " ~ ") +
|
|
922
929
|
"".concat(chunk.bufferedStart.toFixed(2), "|").concat(currentLetter, "|");
|
|
923
930
|
}
|
|
931
|
+
lastChunk = chunk;
|
|
932
|
+
lastLetter = currentLetter;
|
|
924
933
|
}
|
|
925
|
-
else {
|
|
926
|
-
str +=
|
|
927
|
-
"".concat(lastChunk.bufferedEnd.toFixed(2), " ~ ") +
|
|
928
|
-
"".concat(chunk.bufferedStart.toFixed(2), "|").concat(currentLetter, "|");
|
|
929
|
-
}
|
|
930
|
-
lastChunk = chunk;
|
|
931
|
-
lastLetter = currentLetter;
|
|
932
934
|
}
|
|
933
935
|
}
|
|
936
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
937
|
+
finally {
|
|
938
|
+
try {
|
|
939
|
+
if (inventory_1_1 && !inventory_1_1.done && (_a = inventory_1.return)) _a.call(inventory_1);
|
|
940
|
+
}
|
|
941
|
+
finally { if (e_3) throw e_3.error; }
|
|
942
|
+
}
|
|
934
943
|
if (lastChunk !== null) {
|
|
935
944
|
str += String(lastChunk.end.toFixed(2));
|
|
936
945
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment_buffers_store.d.ts","sourceRoot":"","sources":["../../../../src/core/segment_sinks/segment_buffers_store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"segment_buffers_store.d.ts","sourceRoot":"","sources":["../../../../src/core/segment_sinks/segment_buffers_store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAMvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MA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;;;;OAqBG;IACI,SAAS,CACd,UAAU,EAAE,WAAW,GAErB;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,KAAK,EAAE,WAAW,CAAA;KAAE,GAC3C;QAAE,IAAI,EAAE,eAAe,CAAA;KAAE,GACzB;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE;IAWxB;;;;;;;;;;;;;;;OAeG;IACI,oBAAoB,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BhF;;;;;;OAMG;IACI,kBAAkB,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAgBxD;;;;;;;;;;;OAWG;IACI,iBAAiB,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW;IAwD7E;;;OAGG;IACI,kBAAkB,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAYxD;;OAEG;IACI,UAAU,IAAI,IAAI;IAQzB;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAqB/B,OAAO,CAAC,+BAA+B;IAehC,sBAAsB,IAAI,mBAAmB;CASrD"}
|
|
@@ -31,6 +31,7 @@ var log_1 = require("../../log");
|
|
|
31
31
|
var assert_1 = require("../../utils/assert");
|
|
32
32
|
var create_cancellable_promise_1 = require("../../utils/create_cancellable_promise");
|
|
33
33
|
var is_null_or_undefined_1 = require("../../utils/is_null_or_undefined");
|
|
34
|
+
var noop_1 = require("../../utils/noop");
|
|
34
35
|
var implementations_1 = require("./implementations");
|
|
35
36
|
var text_1 = require("./implementations/text");
|
|
36
37
|
var POSSIBLE_BUFFER_TYPES = ["audio", "video", "text"];
|
|
@@ -153,8 +154,8 @@ var SegmentSinksStore = /** @class */ (function () {
|
|
|
153
154
|
return Promise.resolve();
|
|
154
155
|
}
|
|
155
156
|
return (0, create_cancellable_promise_1.default)(cancelWaitSignal, function (res) {
|
|
156
|
-
|
|
157
|
-
var onAddedOrDisabled;
|
|
157
|
+
// eslint-disable-next-line prefer-const
|
|
158
|
+
var onAddedOrDisabled = noop_1.default;
|
|
158
159
|
var removeCallback = function () {
|
|
159
160
|
var indexOf = _this._onNativeBufferAddedOrDisabled.indexOf(onAddedOrDisabled);
|
|
160
161
|
if (indexOf >= 0) {
|
|
@@ -30,5 +30,5 @@ import type { IAdaptationStreamArguments, IAdaptationStreamCallbacks } from "./t
|
|
|
30
30
|
* triggered, to immediately stop all operations the `AdaptationStream` is
|
|
31
31
|
* doing.
|
|
32
32
|
*/
|
|
33
|
-
export default function AdaptationStream({ playbackObserver, content, options, representationEstimator, segmentSink,
|
|
33
|
+
export default function AdaptationStream({ playbackObserver, content, options, representationEstimator, segmentSink, segmentQueueCreator, wantedBufferAhead, maxVideoBufferSize, }: IAdaptationStreamArguments, callbacks: IAdaptationStreamCallbacks, parentCancelSignal: CancellationSignal): void;
|
|
34
34
|
//# sourceMappingURL=adaptation_stream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adaptation_stream.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/adaptation/adaptation_stream.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AASxE,OAAO,KAAK,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,EACE,gBAAgB,EAChB,OAAO,EACP,OAAO,EACP,uBAAuB,EACvB,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"adaptation_stream.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/adaptation/adaptation_stream.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AASxE,OAAO,KAAK,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,EACE,gBAAgB,EAChB,OAAO,EACP,OAAO,EACP,uBAAuB,EACvB,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,GACnB,EAAE,0BAA0B,EAC7B,SAAS,EAAE,0BAA0B,EACrC,kBAAkB,EAAE,kBAAkB,GACrC,IAAI,CA4aN"}
|
|
@@ -92,7 +92,7 @@ var get_representations_switch_strategy_1 = require("./get_representations_switc
|
|
|
92
92
|
* doing.
|
|
93
93
|
*/
|
|
94
94
|
function AdaptationStream(_a, callbacks, parentCancelSignal) {
|
|
95
|
-
var playbackObserver = _a.playbackObserver, content = _a.content, options = _a.options, representationEstimator = _a.representationEstimator, segmentSink = _a.segmentSink,
|
|
95
|
+
var playbackObserver = _a.playbackObserver, content = _a.content, options = _a.options, representationEstimator = _a.representationEstimator, segmentSink = _a.segmentSink, segmentQueueCreator = _a.segmentQueueCreator, wantedBufferAhead = _a.wantedBufferAhead, maxVideoBufferSize = _a.maxVideoBufferSize;
|
|
96
96
|
var manifest = content.manifest, period = content.period, adaptation = content.adaptation;
|
|
97
97
|
/** Allows to cancel everything the `AdaptationStream` is doing. */
|
|
98
98
|
var adapStreamCanceller = new task_canceller_1.default();
|
|
@@ -124,7 +124,7 @@ function AdaptationStream(_a, callbacks, parentCancelSignal) {
|
|
|
124
124
|
// Start-up Adaptive logic
|
|
125
125
|
var _b = representationEstimator({ manifest: manifest, period: period, adaptation: adaptation }, currentRepresentation, representationsList, playbackObserver, adapStreamCanceller.signal), estimateRef = _b.estimates, abrCallbacks = _b.callbacks;
|
|
126
126
|
/** Allows a `RepresentationStream` to easily fetch media segments. */
|
|
127
|
-
var
|
|
127
|
+
var segmentQueue = segmentQueueCreator.createSegmentQueue(adaptation.type,
|
|
128
128
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
129
129
|
{
|
|
130
130
|
onRequestBegin: abrCallbacks.requestBegin,
|
|
@@ -407,7 +407,7 @@ function AdaptationStream(_a, callbacks, parentCancelSignal) {
|
|
|
407
407
|
playbackObserver: playbackObserver,
|
|
408
408
|
content: { representation: representation, adaptation: adaptation, period: period, manifest: manifest },
|
|
409
409
|
segmentSink: segmentSink,
|
|
410
|
-
|
|
410
|
+
segmentQueue: segmentQueue,
|
|
411
411
|
terminate: terminateCurrentStream,
|
|
412
412
|
options: {
|
|
413
413
|
bufferGoal: bufferGoal,
|
|
@@ -3,7 +3,7 @@ import type { IReadOnlyPlaybackObserver } from "../../../playback_observer";
|
|
|
3
3
|
import type { IAudioTrackSwitchingMode, IVideoTrackSwitchingMode } from "../../../public_types";
|
|
4
4
|
import type { IReadOnlySharedReference } from "../../../utils/reference";
|
|
5
5
|
import type { IRepresentationEstimator } from "../../adaptive";
|
|
6
|
-
import type {
|
|
6
|
+
import type { SegmentQueueCreator } from "../../fetchers";
|
|
7
7
|
import type { IBufferType, SegmentSink } from "../../segment_sinks";
|
|
8
8
|
import type { IRepresentationsChoice, IRepresentationStreamCallbacks, IRepresentationStreamPlaybackObservation } from "../representation";
|
|
9
9
|
/** Callbacks called by the `AdaptationStream` on various events. */
|
|
@@ -125,7 +125,7 @@ export interface IAdaptationStreamArguments {
|
|
|
125
125
|
/** SourceBuffer wrapper - needed to push media segments. */
|
|
126
126
|
segmentSink: SegmentSink;
|
|
127
127
|
/** Module used to fetch the wanted media segments. */
|
|
128
|
-
|
|
128
|
+
segmentQueueCreator: SegmentQueueCreator;
|
|
129
129
|
/**
|
|
130
130
|
* "Buffer goal" wanted, or the ideal amount of time ahead of the current
|
|
131
131
|
* position in the current SegmentSink. When this amount has been reached
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/adaptation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OA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OAAO,CAAC;QAChB,UAAU,EAAE,WAAW,CAAC;QACxB,eAAe,EAAE,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;KACnE,CAAC;IACF,OAAO,EAAE,wBAAwB,CAAC;IAClC,iDAAiD;IACjD,uBAAuB,EAAE,wBAAwB,CAAC;IAClD,4DAA4D;IAC5D,WAAW,EAAE,WAAW,CAAC;IACzB,sDAAsD;IACtD,mBAAmB,EAAE,mBAAmB,CAAC;IACzC;;;;OAIG;IACH,iBAAiB,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC;IACpD;;;;;OAKG;IACH,kBAAkB,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC;CACtD;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;;;OAUG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;;;;;;;;;;;OAYG;IACH,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,iEAAiE;AACjE,MAAM,WAAW,iBAAiB;IAChC,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IAErB,gEAAgE;IAChE,aAAa,EAAE,mBAAmB,CAAC;IAEnC,sDAAsD;IACtD,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C;;;OAGG;IACH,eAAe,EAAE,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;CACnE;AAED,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,GAAG,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_time_ranges_for_content.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/orchestrator/get_time_ranges_for_content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,KAAK,CAAC;IACd,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,cAAc,EAAE,uBAAuB,CAAC;CACzC,CAAC,GACD,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"get_time_ranges_for_content.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/orchestrator/get_time_ranges_for_content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,KAAK,CAAC;IACd,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,cAAc,EAAE,uBAAuB,CAAC;CACzC,CAAC,GACD,MAAM,EAAE,CAkCV"}
|
|
@@ -14,6 +14,17 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
var __values = (this && this.__values) || function(o) {
|
|
18
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
19
|
+
if (m) return m.call(o);
|
|
20
|
+
if (o && typeof o.length === "number") return {
|
|
21
|
+
next: function () {
|
|
22
|
+
if (o && i >= o.length) o = void 0;
|
|
23
|
+
return { value: o && o[i++], done: !o };
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
27
|
+
};
|
|
17
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
29
|
exports.default = getTimeRangesForContent;
|
|
19
30
|
var log_1 = require("../../../log");
|
|
@@ -25,13 +36,13 @@ var log_1 = require("../../../log");
|
|
|
25
36
|
* @returns {Array.<Object>}
|
|
26
37
|
*/
|
|
27
38
|
function getTimeRangesForContent(segmentSink, contents) {
|
|
39
|
+
var e_1, _a;
|
|
28
40
|
if (contents.length === 0) {
|
|
29
41
|
return [];
|
|
30
42
|
}
|
|
31
43
|
var accumulator = [];
|
|
32
44
|
var inventory = segmentSink.getLastKnownInventory();
|
|
33
|
-
var _loop_1 = function (
|
|
34
|
-
var chunk = inventory[i];
|
|
45
|
+
var _loop_1 = function (chunk) {
|
|
35
46
|
var hasContent = contents.some(function (content) {
|
|
36
47
|
return (chunk.infos.period.id === content.period.id &&
|
|
37
48
|
chunk.infos.adaptation.id === content.adaptation.id &&
|
|
@@ -53,10 +64,20 @@ function getTimeRangesForContent(segmentSink, contents) {
|
|
|
53
64
|
}
|
|
54
65
|
}
|
|
55
66
|
};
|
|
56
|
-
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
try {
|
|
68
|
+
for (var inventory_1 = __values(inventory), inventory_1_1 = inventory_1.next(); !inventory_1_1.done; inventory_1_1 = inventory_1.next()) {
|
|
69
|
+
var chunk = inventory_1_1.value;
|
|
70
|
+
var state_1 = _loop_1(chunk);
|
|
71
|
+
if (typeof state_1 === "object")
|
|
72
|
+
return state_1.value;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
76
|
+
finally {
|
|
77
|
+
try {
|
|
78
|
+
if (inventory_1_1 && !inventory_1_1.done && (_a = inventory_1.return)) _a.call(inventory_1);
|
|
79
|
+
}
|
|
80
|
+
finally { if (e_1) throw e_1.error; }
|
|
60
81
|
}
|
|
61
82
|
return accumulator;
|
|
62
83
|
}
|
|
@@ -18,7 +18,7 @@ import type { IReadOnlyPlaybackObserver } from "../../../playback_observer";
|
|
|
18
18
|
import type { IReadOnlySharedReference } from "../../../utils/reference";
|
|
19
19
|
import type { CancellationSignal } from "../../../utils/task_canceller";
|
|
20
20
|
import type { IRepresentationEstimator } from "../../adaptive";
|
|
21
|
-
import type {
|
|
21
|
+
import type { SegmentQueueCreator } from "../../fetchers";
|
|
22
22
|
import type { IBufferType } from "../../segment_sinks";
|
|
23
23
|
import type SegmentSinksStore from "../../segment_sinks";
|
|
24
24
|
import type { IPeriodStreamCallbacks, IPeriodStreamOptions, IPeriodStreamPlaybackObservation } from "../period";
|
|
@@ -43,7 +43,7 @@ import type { IPeriodStreamCallbacks, IPeriodStreamOptions, IPeriodStreamPlaybac
|
|
|
43
43
|
* Representation to play.
|
|
44
44
|
* @param {Object} segmentSinksStore - Will be used to lazily create
|
|
45
45
|
* SegmentSink instances associated with the current content.
|
|
46
|
-
* @param {Object}
|
|
46
|
+
* @param {Object} segmentQueueCreator - Allow to download segments.
|
|
47
47
|
* @param {Object} options
|
|
48
48
|
* @param {Object} callbacks - The `StreamOrchestrator` relies on a system of
|
|
49
49
|
* callbacks that it will call on various events.
|
|
@@ -67,7 +67,7 @@ import type { IPeriodStreamCallbacks, IPeriodStreamOptions, IPeriodStreamPlaybac
|
|
|
67
67
|
export default function StreamOrchestrator(content: {
|
|
68
68
|
manifest: IManifest;
|
|
69
69
|
initialPeriod: IPeriod;
|
|
70
|
-
}, playbackObserver: IReadOnlyPlaybackObserver<IStreamOrchestratorPlaybackObservation>, representationEstimator: IRepresentationEstimator, segmentSinksStore: SegmentSinksStore,
|
|
70
|
+
}, playbackObserver: IReadOnlyPlaybackObserver<IStreamOrchestratorPlaybackObservation>, representationEstimator: IRepresentationEstimator, segmentSinksStore: SegmentSinksStore, segmentQueueCreator: SegmentQueueCreator, options: IStreamOrchestratorOptions, callbacks: IStreamOrchestratorCallbacks, orchestratorCancelSignal: CancellationSignal): void;
|
|
71
71
|
export type IStreamOrchestratorPlaybackObservation = IPeriodStreamPlaybackObservation;
|
|
72
72
|
/** Options tweaking the behavior of the StreamOrchestrator. */
|
|
73
73
|
export type IStreamOrchestratorOptions = IPeriodStreamOptions & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream_orchestrator.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/orchestrator/stream_orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EACV,SAAS,EAET,OAAO,EACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAG5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAGzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"stream_orchestrator.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/orchestrator/stream_orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EACV,SAAS,EAET,OAAO,EACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAG5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAGzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,qBAA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;;;;;;OASG;IACH,yBAAyB,IAAI,IAAI,CAAC;CACnC;AAED,sDAAsD;AACtD,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB,mEAAmE;IACnE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,yDAAyD;AACzD,MAAM,WAAW,8BAA8B;IAC7C;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;;;OAIG;IACH,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,+CAA+C;AAC/C,MAAM,WAAW,oBAAoB;IACnC,wBAAwB;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,6BAA6B;IAC7B,UAAU,EAAE,WAAW,CAAC;CACzB"}
|
|
@@ -132,7 +132,7 @@ var get_time_ranges_for_content_1 = require("./get_time_ranges_for_content");
|
|
|
132
132
|
* Representation to play.
|
|
133
133
|
* @param {Object} segmentSinksStore - Will be used to lazily create
|
|
134
134
|
* SegmentSink instances associated with the current content.
|
|
135
|
-
* @param {Object}
|
|
135
|
+
* @param {Object} segmentQueueCreator - Allow to download segments.
|
|
136
136
|
* @param {Object} options
|
|
137
137
|
* @param {Object} callbacks - The `StreamOrchestrator` relies on a system of
|
|
138
138
|
* callbacks that it will call on various events.
|
|
@@ -153,7 +153,7 @@ var get_time_ranges_for_content_1 = require("./get_time_ranges_for_content");
|
|
|
153
153
|
* when triggered, to immediately stop all operations the `PeriodStream` is
|
|
154
154
|
* doing.
|
|
155
155
|
*/
|
|
156
|
-
function StreamOrchestrator(content, playbackObserver, representationEstimator, segmentSinksStore,
|
|
156
|
+
function StreamOrchestrator(content, playbackObserver, representationEstimator, segmentSinksStore, segmentQueueCreator, options, callbacks, orchestratorCancelSignal) {
|
|
157
157
|
var e_1, _a;
|
|
158
158
|
var manifest = content.manifest, initialPeriod = content.initialPeriod;
|
|
159
159
|
var maxBufferAhead = options.maxBufferAhead, maxBufferBehind = options.maxBufferBehind, wantedBufferAhead = options.wantedBufferAhead, maxVideoBufferSize = options.maxVideoBufferSize;
|
|
@@ -481,7 +481,7 @@ function StreamOrchestrator(content, playbackObserver, representationEstimator,
|
|
|
481
481
|
content: { manifest: manifest, period: basePeriod },
|
|
482
482
|
garbageCollectors: garbageCollectors,
|
|
483
483
|
maxVideoBufferSize: maxVideoBufferSize,
|
|
484
|
-
|
|
484
|
+
segmentQueueCreator: segmentQueueCreator,
|
|
485
485
|
segmentSinksStore: segmentSinksStore,
|
|
486
486
|
options: options,
|
|
487
487
|
playbackObserver: playbackObserver,
|
|
@@ -46,5 +46,5 @@ import type { IPeriodStreamArguments, IPeriodStreamCallbacks } from "./types";
|
|
|
46
46
|
* triggered, to immediately stop all operations the `PeriodStream` is
|
|
47
47
|
* doing.
|
|
48
48
|
*/
|
|
49
|
-
export default function PeriodStream({ bufferType, content, garbageCollectors, playbackObserver, representationEstimator,
|
|
49
|
+
export default function PeriodStream({ bufferType, content, garbageCollectors, playbackObserver, representationEstimator, segmentQueueCreator, segmentSinksStore, options, wantedBufferAhead, maxVideoBufferSize, }: IPeriodStreamArguments, callbacks: IPeriodStreamCallbacks, parentCancelSignal: CancellationSignal): void;
|
|
50
50
|
//# sourceMappingURL=period_stream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"period_stream.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/period/period_stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAeH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAWxE,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAGjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,EACE,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"period_stream.d.ts","sourceRoot":"","sources":["../../../../../src/core/stream/period/period_stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAeH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAWxE,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAGjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,EACE,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,EACP,iBAAiB,EACjB,kBAAkB,GACnB,EAAE,sBAAsB,EACzB,SAAS,EAAE,sBAAsB,EACjC,kBAAkB,EAAE,kBAAkB,GACrC,IAAI,CA+VN"}
|
|
@@ -120,7 +120,7 @@ var get_adaptation_switch_strategy_1 = require("./utils/get_adaptation_switch_st
|
|
|
120
120
|
*/
|
|
121
121
|
function PeriodStream(_a, callbacks, parentCancelSignal) {
|
|
122
122
|
var _this = this;
|
|
123
|
-
var bufferType = _a.bufferType, content = _a.content, garbageCollectors = _a.garbageCollectors, playbackObserver = _a.playbackObserver, representationEstimator = _a.representationEstimator,
|
|
123
|
+
var bufferType = _a.bufferType, content = _a.content, garbageCollectors = _a.garbageCollectors, playbackObserver = _a.playbackObserver, representationEstimator = _a.representationEstimator, segmentQueueCreator = _a.segmentQueueCreator, segmentSinksStore = _a.segmentSinksStore, options = _a.options, wantedBufferAhead = _a.wantedBufferAhead, maxVideoBufferSize = _a.maxVideoBufferSize;
|
|
124
124
|
var manifest = content.manifest, period = content.period;
|
|
125
125
|
/**
|
|
126
126
|
* Emits the chosen Adaptation and Representations for the current type.
|
|
@@ -355,7 +355,7 @@ function PeriodStream(_a, callbacks, parentCancelSignal) {
|
|
|
355
355
|
playbackObserver: adaptationPlaybackObserver,
|
|
356
356
|
representationEstimator: representationEstimator,
|
|
357
357
|
segmentSink: segmentSink,
|
|
358
|
-
|
|
358
|
+
segmentQueueCreator: segmentQueueCreator,
|
|
359
359
|
wantedBufferAhead: wantedBufferAhead,
|
|
360
360
|
maxVideoBufferSize: maxVideoBufferSize,
|
|
361
361
|
}, __assign(__assign({}, callbacks), { error: onAdaptationStreamError }), cancelSignal);
|