rx-player 4.2.0-dev.2024082600 → 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 +12 -3
- package/VERSION +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/commonjs/compat/add_class_name.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/browser_detection.d.ts +3 -1
- package/dist/commonjs/compat/browser_detection.d.ts.map +1 -1
- package/dist/commonjs/compat/browser_detection.js +8 -1
- package/dist/commonjs/compat/can_reuse_media_keys.d.ts +2 -0
- package/dist/commonjs/compat/can_reuse_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/can_reuse_media_keys.js +3 -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/cmcd/cmcd_data_builder.js +1 -1
- 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/commonjs/core/{stream/representation/utils/downloading_queue.d.ts → 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/{es2017/core/fetchers/segment/segment_fetcher_creator.d.ts → commonjs/core/fetchers/segment/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 +3 -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/adaptation.d.ts +13 -13
- package/dist/commonjs/manifest/classes/manifest.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/manifest.js +0 -6
- package/dist/commonjs/manifest/classes/representation.d.ts +20 -12
- package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
- 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_dash_wasm.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/es2017/compat/add_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/browser_detection.d.ts +3 -1
- package/dist/es2017/compat/browser_detection.d.ts.map +1 -1
- package/dist/es2017/compat/browser_detection.js +7 -1
- package/dist/es2017/compat/can_reuse_media_keys.d.ts +2 -0
- package/dist/es2017/compat/can_reuse_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/can_reuse_media_keys.js +4 -2
- 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/cmcd/cmcd_data_builder.js +1 -1
- 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/es2017/core/{stream/representation/utils/downloading_queue.d.ts → 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/{commonjs/core/fetchers/segment/segment_fetcher_creator.d.ts → es2017/core/fetchers/segment/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 +3 -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/adaptation.d.ts +13 -13
- package/dist/es2017/manifest/classes/manifest.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/manifest.js +0 -6
- package/dist/es2017/manifest/classes/representation.d.ts +20 -12
- package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
- 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/mpd-parser.wasm +0 -0
- 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_dash_wasm.ts +1 -1
- 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 +38 -15
- 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/browser_detection.ts +9 -0
- package/src/compat/can_reuse_media_keys.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/cmcd/cmcd_data_builder.ts +1 -1
- 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 +3 -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/adaptation.ts +13 -13
- package/src/manifest/classes/manifest.ts +0 -6
- package/src/manifest/classes/representation.ts +20 -12
- 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/.vscode/settings.json +0 -7
- 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
|
@@ -1,29 +1,40 @@
|
|
|
1
1
|
import { describe, beforeEach, it, expect, vi } from "vitest";
|
|
2
|
+
import type {
|
|
3
|
+
IParsedAdaptation,
|
|
4
|
+
IParsedPeriod,
|
|
5
|
+
IParsedRepresentation,
|
|
6
|
+
} from "../../../parsers/manifest";
|
|
2
7
|
import type { IPlayerError } from "../../../public_types";
|
|
3
8
|
import getMonotonicTimeStamp from "../../../utils/monotonic_timestamp";
|
|
9
|
+
import type IAdaptation from "../adaptation";
|
|
4
10
|
import CodecSupportCache from "../codec_support_cache";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function generateParsedPeriod(id: string, start: number, end: number | undefined) {
|
|
11
|
+
import type IManifest from "../manifest";
|
|
12
|
+
import type IPeriod from "../period";
|
|
13
|
+
|
|
14
|
+
function generateParsedPeriod(
|
|
15
|
+
id: string,
|
|
16
|
+
start: number,
|
|
17
|
+
end: number | undefined,
|
|
18
|
+
): IParsedPeriod {
|
|
15
19
|
const adaptations = { audio: [generateParsedAudioAdaptation(id)] };
|
|
16
|
-
return {
|
|
20
|
+
return {
|
|
21
|
+
id,
|
|
22
|
+
start,
|
|
23
|
+
end,
|
|
24
|
+
adaptations,
|
|
25
|
+
duration: end === undefined ? undefined : end - start,
|
|
26
|
+
streamEvents: [],
|
|
27
|
+
};
|
|
17
28
|
}
|
|
18
|
-
function generateParsedAudioAdaptation(id: string) {
|
|
29
|
+
function generateParsedAudioAdaptation(id: string): IParsedAdaptation {
|
|
19
30
|
return {
|
|
20
31
|
id,
|
|
21
32
|
type: "audio",
|
|
22
33
|
representations: [generateParsedRepresentation(id)],
|
|
23
34
|
};
|
|
24
35
|
}
|
|
25
|
-
function generateParsedRepresentation(id: string) {
|
|
26
|
-
return { id, bitrate: 100 };
|
|
36
|
+
function generateParsedRepresentation(id: string): IParsedRepresentation {
|
|
37
|
+
return { id, bitrate: 100 } as IParsedRepresentation;
|
|
27
38
|
}
|
|
28
39
|
|
|
29
40
|
describe("Manifest - Manifest", () => {
|
|
@@ -51,6 +62,8 @@ describe("Manifest - Manifest", () => {
|
|
|
51
62
|
it("should create a normalized Manifest structure", async () => {
|
|
52
63
|
const simpleFakeManifest = {
|
|
53
64
|
id: "man",
|
|
65
|
+
transportType: "dash",
|
|
66
|
+
isLastPeriodKnown: true,
|
|
54
67
|
isDynamic: false,
|
|
55
68
|
isLive: false,
|
|
56
69
|
duration: 5,
|
|
@@ -58,6 +71,7 @@ describe("Manifest - Manifest", () => {
|
|
|
58
71
|
minimumSafePosition: 0,
|
|
59
72
|
timeshiftDepth: null,
|
|
60
73
|
maximumTimeData: {
|
|
74
|
+
livePosition: 10,
|
|
61
75
|
isLinear: false,
|
|
62
76
|
maximumSafePosition: 10,
|
|
63
77
|
time: 10,
|
|
@@ -66,7 +80,7 @@ describe("Manifest - Manifest", () => {
|
|
|
66
80
|
periods: [],
|
|
67
81
|
};
|
|
68
82
|
|
|
69
|
-
const Manifest = (
|
|
83
|
+
const Manifest = (await vi.importActual("../manifest")).default as typeof IManifest;
|
|
70
84
|
const warnings: IPlayerError[] = [];
|
|
71
85
|
const manifest = new Manifest(simpleFakeManifest, {}, warnings);
|
|
72
86
|
|
|
@@ -94,6 +108,8 @@ describe("Manifest - Manifest", () => {
|
|
|
94
108
|
const period2 = generateParsedPeriod("1", 12, undefined);
|
|
95
109
|
const simpleFakeManifest = {
|
|
96
110
|
id: "man",
|
|
111
|
+
transportType: "dash",
|
|
112
|
+
isLastPeriodKnown: true,
|
|
97
113
|
isDynamic: false,
|
|
98
114
|
isLive: false,
|
|
99
115
|
duration: 5,
|
|
@@ -101,6 +117,7 @@ describe("Manifest - Manifest", () => {
|
|
|
101
117
|
minimumSafePosition: 0,
|
|
102
118
|
timeshiftDepth: null,
|
|
103
119
|
maximumTimeData: {
|
|
120
|
+
livePosition: 10,
|
|
104
121
|
isLinear: false,
|
|
105
122
|
maximumSafePosition: 10,
|
|
106
123
|
time: 10,
|
|
@@ -109,14 +126,14 @@ describe("Manifest - Manifest", () => {
|
|
|
109
126
|
periods: [period1, period2],
|
|
110
127
|
};
|
|
111
128
|
|
|
112
|
-
const fakePeriod = vi.fn((period) => {
|
|
129
|
+
const fakePeriod = vi.fn((period: IPeriod) => {
|
|
113
130
|
return { id: `foo${period.id}`, adaptations: period.adaptations };
|
|
114
131
|
});
|
|
115
132
|
vi.doMock("../period", () => ({
|
|
116
133
|
default: fakePeriod,
|
|
117
134
|
}));
|
|
118
135
|
|
|
119
|
-
const Manifest = (
|
|
136
|
+
const Manifest = (await vi.importActual("../manifest")).default as typeof IManifest;
|
|
120
137
|
const manifest = new Manifest(simpleFakeManifest, {}, []);
|
|
121
138
|
expect(fakePeriod).toHaveBeenCalledTimes(2);
|
|
122
139
|
expect(fakePeriod).toHaveBeenCalledWith(
|
|
@@ -150,12 +167,15 @@ describe("Manifest - Manifest", () => {
|
|
|
150
167
|
const simpleFakeManifest = {
|
|
151
168
|
id: "man",
|
|
152
169
|
isDynamic: false,
|
|
170
|
+
transportType: "dash",
|
|
171
|
+
isLastPeriodKnown: true,
|
|
153
172
|
isLive: false,
|
|
154
173
|
duration: 5,
|
|
155
174
|
timeBounds: {
|
|
156
175
|
minimumSafePosition: 0,
|
|
157
176
|
timeshiftDepth: null,
|
|
158
177
|
maximumTimeData: {
|
|
178
|
+
livePosition: 10,
|
|
159
179
|
isLinear: false,
|
|
160
180
|
maximumSafePosition: 10,
|
|
161
181
|
time: 10,
|
|
@@ -168,17 +188,16 @@ describe("Manifest - Manifest", () => {
|
|
|
168
188
|
return false;
|
|
169
189
|
};
|
|
170
190
|
|
|
171
|
-
const fakePeriod = vi.fn((period) => {
|
|
172
|
-
return { id: `foo${period.id}` };
|
|
191
|
+
const fakePeriod = vi.fn((period: IParsedPeriod): IPeriod => {
|
|
192
|
+
return { id: `foo${period.id}` } as IPeriod;
|
|
173
193
|
});
|
|
174
194
|
vi.doMock("../period", () => ({
|
|
175
195
|
default: fakePeriod,
|
|
176
196
|
}));
|
|
177
|
-
const Manifest = (
|
|
197
|
+
const Manifest = (await vi.importActual("../manifest")).default as typeof IManifest;
|
|
178
198
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
/* eslint-enable @typescript-eslint/no-unused-expressions */
|
|
199
|
+
const manifest = new Manifest(simpleFakeManifest, { representationFilter }, []);
|
|
200
|
+
expect(manifest).not.toBe(null);
|
|
182
201
|
|
|
183
202
|
expect(fakePeriod).toHaveBeenCalledTimes(2);
|
|
184
203
|
expect(fakePeriod).toHaveBeenCalledWith(
|
|
@@ -207,12 +226,15 @@ describe("Manifest - Manifest", () => {
|
|
|
207
226
|
const simpleFakeManifest = {
|
|
208
227
|
id: "man",
|
|
209
228
|
isDynamic: false,
|
|
229
|
+
transportType: "dash",
|
|
230
|
+
isLastPeriodKnown: true,
|
|
210
231
|
isLive: false,
|
|
211
232
|
duration: 5,
|
|
212
233
|
timeBounds: {
|
|
213
234
|
minimumSafePosition: 0,
|
|
214
235
|
timeshiftDepth: null,
|
|
215
236
|
maximumTimeData: {
|
|
237
|
+
livePosition: 10,
|
|
216
238
|
isLinear: false,
|
|
217
239
|
maximumSafePosition: 10,
|
|
218
240
|
time: 10,
|
|
@@ -221,13 +243,13 @@ describe("Manifest - Manifest", () => {
|
|
|
221
243
|
periods: [period1, period2],
|
|
222
244
|
};
|
|
223
245
|
|
|
224
|
-
const fakePeriod = vi.fn((period) => {
|
|
225
|
-
return { ...period, id: `foo${period.id}` };
|
|
246
|
+
const fakePeriod = vi.fn((period: IParsedPeriod): IPeriod => {
|
|
247
|
+
return { ...period, id: `foo${period.id}` } as unknown as IPeriod;
|
|
226
248
|
});
|
|
227
249
|
vi.doMock("../period", () => ({
|
|
228
250
|
default: fakePeriod,
|
|
229
251
|
}));
|
|
230
|
-
const Manifest = (
|
|
252
|
+
const Manifest = (await vi.importActual("../manifest")).default as typeof IManifest;
|
|
231
253
|
|
|
232
254
|
const manifest = new Manifest(simpleFakeManifest, {}, []);
|
|
233
255
|
expect(fakePeriod).toHaveBeenCalledTimes(2);
|
|
@@ -263,11 +285,14 @@ describe("Manifest - Manifest", () => {
|
|
|
263
285
|
id: "man",
|
|
264
286
|
isDynamic: false,
|
|
265
287
|
isLive: false,
|
|
288
|
+
transportType: "dash",
|
|
289
|
+
isLastPeriodKnown: true,
|
|
266
290
|
duration: 5,
|
|
267
291
|
timeBounds: {
|
|
268
292
|
minimumSafePosition: 0,
|
|
269
293
|
timeshiftDepth: null,
|
|
270
294
|
maximumTimeData: {
|
|
295
|
+
livePosition: 10,
|
|
271
296
|
isLinear: false,
|
|
272
297
|
maximumSafePosition: 10,
|
|
273
298
|
time: 10,
|
|
@@ -276,21 +301,23 @@ describe("Manifest - Manifest", () => {
|
|
|
276
301
|
periods: [period1, period2],
|
|
277
302
|
};
|
|
278
303
|
|
|
279
|
-
const fakePeriod = vi.fn(
|
|
280
|
-
unsupportedAdaptations
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
304
|
+
const fakePeriod = vi.fn(
|
|
305
|
+
(period: IParsedPeriod, unsupportedAdaptations: IAdaptation[]): IPeriod => {
|
|
306
|
+
unsupportedAdaptations.push({
|
|
307
|
+
type: "audio",
|
|
308
|
+
language: "",
|
|
309
|
+
normalized: "",
|
|
310
|
+
audioDescription: false,
|
|
311
|
+
id: period.adaptations.audio?.[0].id ?? "a",
|
|
312
|
+
representations: period.adaptations.audio?.[0].representations ?? [],
|
|
313
|
+
} as unknown as IAdaptation);
|
|
314
|
+
return { ...period, id: `foo${period.id}` } as unknown as IPeriod;
|
|
315
|
+
},
|
|
316
|
+
);
|
|
290
317
|
vi.doMock("../period", () => ({
|
|
291
318
|
default: fakePeriod,
|
|
292
319
|
}));
|
|
293
|
-
const Manifest = (
|
|
320
|
+
const Manifest = (await vi.importActual("../manifest")).default as typeof IManifest;
|
|
294
321
|
|
|
295
322
|
const warnings: IPlayerError[] = [];
|
|
296
323
|
new Manifest(simpleFakeManifest, {}, warnings);
|
|
@@ -303,8 +330,8 @@ describe("Manifest - Manifest", () => {
|
|
|
303
330
|
language: "",
|
|
304
331
|
normalized: "",
|
|
305
332
|
audioDescription: false,
|
|
306
|
-
id: period1.adaptations.audio[0].id,
|
|
307
|
-
representations: period1.adaptations.audio[0].representations,
|
|
333
|
+
id: period1.adaptations.audio?.[0].id,
|
|
334
|
+
representations: period1.adaptations.audio?.[0].representations,
|
|
308
335
|
},
|
|
309
336
|
type: "audio",
|
|
310
337
|
},
|
|
@@ -313,8 +340,8 @@ describe("Manifest - Manifest", () => {
|
|
|
313
340
|
language: "",
|
|
314
341
|
normalized: "",
|
|
315
342
|
audioDescription: false,
|
|
316
|
-
id: period2.adaptations.audio[0].id,
|
|
317
|
-
representations: period2.adaptations.audio[0].representations,
|
|
343
|
+
id: period2.adaptations.audio?.[0].id,
|
|
344
|
+
representations: period2.adaptations.audio?.[0].representations,
|
|
318
345
|
},
|
|
319
346
|
type: "audio",
|
|
320
347
|
},
|
|
@@ -334,6 +361,8 @@ describe("Manifest - Manifest", () => {
|
|
|
334
361
|
availabilityStartTime: 5,
|
|
335
362
|
duration: 12,
|
|
336
363
|
id: "man",
|
|
364
|
+
transportType: "dash",
|
|
365
|
+
isLastPeriodKnown: true,
|
|
337
366
|
isDynamic: false,
|
|
338
367
|
isLive: false,
|
|
339
368
|
lifetime: 13,
|
|
@@ -341,24 +370,31 @@ describe("Manifest - Manifest", () => {
|
|
|
341
370
|
timeBounds: {
|
|
342
371
|
minimumSafePosition: 5,
|
|
343
372
|
timeshiftDepth: null,
|
|
344
|
-
maximumTimeData: {
|
|
373
|
+
maximumTimeData: {
|
|
374
|
+
livePosition: 10,
|
|
375
|
+
isLinear: false,
|
|
376
|
+
maximumSafePosition: 10,
|
|
377
|
+
time,
|
|
378
|
+
},
|
|
345
379
|
},
|
|
346
380
|
suggestedPresentationDelay: 99,
|
|
347
381
|
uris: ["url1", "url2"],
|
|
348
382
|
};
|
|
349
383
|
|
|
350
|
-
const fakePeriod = vi.fn(
|
|
351
|
-
unsupportedAdaptations
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
384
|
+
const fakePeriod = vi.fn(
|
|
385
|
+
(period: IParsedPeriod, unsupportedAdaptations: IAdaptation[]): IPeriod => {
|
|
386
|
+
unsupportedAdaptations.push({
|
|
387
|
+
id: period.adaptations.audio?.[0].id,
|
|
388
|
+
type: "audio",
|
|
389
|
+
representations: [],
|
|
390
|
+
} as unknown as IAdaptation);
|
|
391
|
+
return { ...period, id: `foo${period.id}` } as unknown as IPeriod;
|
|
392
|
+
},
|
|
393
|
+
);
|
|
358
394
|
vi.doMock("../period", () => ({
|
|
359
395
|
default: fakePeriod,
|
|
360
396
|
}));
|
|
361
|
-
const Manifest = (
|
|
397
|
+
const Manifest = (await vi.importActual("../manifest")).default as typeof IManifest;
|
|
362
398
|
const warnings: IPlayerError[] = [];
|
|
363
399
|
const manifest = new Manifest(oldManifestArgs, {}, warnings);
|
|
364
400
|
|
|
@@ -376,8 +412,8 @@ describe("Manifest - Manifest", () => {
|
|
|
376
412
|
expect(manifest.getMaximumSafePosition()).toEqual(10);
|
|
377
413
|
expect(manifest.getMinimumSafePosition()).toEqual(5);
|
|
378
414
|
expect(manifest.periods).toEqual([
|
|
379
|
-
{ id: "foo0", adaptations: oldPeriod1.adaptations, start: 4 },
|
|
380
|
-
{ id: "foo1", adaptations: oldPeriod2.adaptations, start: 12 },
|
|
415
|
+
{ id: "foo0", adaptations: oldPeriod1.adaptations, start: 4, streamEvents: [] },
|
|
416
|
+
{ id: "foo1", adaptations: oldPeriod2.adaptations, start: 12, streamEvents: [] },
|
|
381
417
|
]);
|
|
382
418
|
expect(manifest.suggestedPresentationDelay).toEqual(99);
|
|
383
419
|
expect(manifest.uris).toEqual(["url1", "url2"]);
|
|
@@ -388,18 +424,20 @@ describe("Manifest - Manifest", () => {
|
|
|
388
424
|
});
|
|
389
425
|
|
|
390
426
|
it("should return all URLs given with `getContentUrls`", async () => {
|
|
391
|
-
const fakePeriod = vi.fn(
|
|
392
|
-
unsupportedAdaptations
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
427
|
+
const fakePeriod = vi.fn(
|
|
428
|
+
(period: IParsedPeriod, unsupportedAdaptations: IAdaptation[]): IPeriod => {
|
|
429
|
+
unsupportedAdaptations.push({
|
|
430
|
+
id: period.adaptations.audio?.[0].id,
|
|
431
|
+
type: "audio",
|
|
432
|
+
representations: [],
|
|
433
|
+
} as unknown as IAdaptation);
|
|
434
|
+
return { ...period, id: `foo${period.id}` } as unknown as IPeriod;
|
|
435
|
+
},
|
|
436
|
+
);
|
|
399
437
|
vi.doMock("../period", () => ({
|
|
400
438
|
default: fakePeriod,
|
|
401
439
|
}));
|
|
402
|
-
const Manifest = (
|
|
440
|
+
const Manifest = (await vi.importActual("../manifest")).default as typeof IManifest;
|
|
403
441
|
|
|
404
442
|
const oldPeriod1 = generateParsedPeriod("0", 4, undefined);
|
|
405
443
|
const oldPeriod2 = generateParsedPeriod("1", 12, undefined);
|
|
@@ -409,11 +447,14 @@ describe("Manifest - Manifest", () => {
|
|
|
409
447
|
id: "man",
|
|
410
448
|
isDynamic: false,
|
|
411
449
|
isLive: false,
|
|
450
|
+
transportType: "dash",
|
|
451
|
+
isLastPeriodKnown: true,
|
|
412
452
|
lifetime: 13,
|
|
413
453
|
timeBounds: {
|
|
414
454
|
minimumSafePosition: 0,
|
|
415
455
|
timeshiftDepth: null,
|
|
416
456
|
maximumTimeData: {
|
|
457
|
+
livePosition: 10,
|
|
417
458
|
isLinear: false,
|
|
418
459
|
maximumSafePosition: 10,
|
|
419
460
|
time: 10,
|
|
@@ -433,6 +474,8 @@ describe("Manifest - Manifest", () => {
|
|
|
433
474
|
id: "man",
|
|
434
475
|
isDynamic: false,
|
|
435
476
|
isLive: false,
|
|
477
|
+
transportType: "dash",
|
|
478
|
+
isLastPeriodKnown: true,
|
|
436
479
|
lifetime: 13,
|
|
437
480
|
periods: [
|
|
438
481
|
{ id: "0", start: 4, adaptations: oldPeriod1.adaptations },
|
|
@@ -443,6 +486,7 @@ describe("Manifest - Manifest", () => {
|
|
|
443
486
|
minimumSafePosition: 0,
|
|
444
487
|
timeshiftDepth: null,
|
|
445
488
|
maximumTimeData: {
|
|
489
|
+
livePosition: 10,
|
|
446
490
|
isLinear: false,
|
|
447
491
|
maximumSafePosition: 10,
|
|
448
492
|
time: 10,
|
|
@@ -455,14 +499,16 @@ describe("Manifest - Manifest", () => {
|
|
|
455
499
|
});
|
|
456
500
|
|
|
457
501
|
it("should replace with a new Manifest when calling `replace`", async () => {
|
|
458
|
-
const fakePeriod = vi.fn(
|
|
459
|
-
unsupportedAdaptations
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
502
|
+
const fakePeriod = vi.fn(
|
|
503
|
+
(period: IParsedPeriod, unsupportedAdaptations: IAdaptation[]): IPeriod => {
|
|
504
|
+
unsupportedAdaptations.push({
|
|
505
|
+
id: period.adaptations.audio?.[0].id,
|
|
506
|
+
type: "audio",
|
|
507
|
+
representations: [],
|
|
508
|
+
} as unknown as IAdaptation);
|
|
509
|
+
return { ...period, id: `foo${period.id}` } as unknown as IPeriod;
|
|
510
|
+
},
|
|
511
|
+
);
|
|
466
512
|
const fakeReplacePeriodsRes = {
|
|
467
513
|
updatedPeriods: [],
|
|
468
514
|
addedPeriods: [],
|
|
@@ -482,6 +528,8 @@ describe("Manifest - Manifest", () => {
|
|
|
482
528
|
availabilityStartTime: 5,
|
|
483
529
|
duration: 12,
|
|
484
530
|
id: "man",
|
|
531
|
+
transportType: "dash",
|
|
532
|
+
isLastPeriodKnown: true,
|
|
485
533
|
isDynamic: false,
|
|
486
534
|
isLive: false,
|
|
487
535
|
lifetime: 13,
|
|
@@ -490,6 +538,7 @@ describe("Manifest - Manifest", () => {
|
|
|
490
538
|
minimumSafePosition: 7,
|
|
491
539
|
timeshiftDepth: 10,
|
|
492
540
|
maximumTimeData: {
|
|
541
|
+
livePosition: 10,
|
|
493
542
|
isLinear: true,
|
|
494
543
|
maximumSafePosition: 30,
|
|
495
544
|
time: 30000,
|
|
@@ -499,10 +548,17 @@ describe("Manifest - Manifest", () => {
|
|
|
499
548
|
uris: ["url1", "url2"],
|
|
500
549
|
};
|
|
501
550
|
|
|
502
|
-
const Manifest = (
|
|
551
|
+
const Manifest = (await vi.importActual("../manifest")).default as typeof IManifest;
|
|
503
552
|
const manifest = new Manifest(oldManifestArgs, {}, []);
|
|
504
553
|
|
|
505
|
-
const mockTrigger = vi
|
|
554
|
+
const mockTrigger = vi
|
|
555
|
+
.spyOn(
|
|
556
|
+
manifest as IManifest & {
|
|
557
|
+
trigger: (eventName: string, payload: unknown) => void;
|
|
558
|
+
},
|
|
559
|
+
"trigger",
|
|
560
|
+
)
|
|
561
|
+
.mockImplementation(vi.fn());
|
|
506
562
|
|
|
507
563
|
const newAdaptations = {};
|
|
508
564
|
const newPeriod1 = {
|
|
@@ -535,7 +591,7 @@ describe("Manifest - Manifest", () => {
|
|
|
535
591
|
},
|
|
536
592
|
periods: [newPeriod1, newPeriod2],
|
|
537
593
|
uris: ["url3", "url4"],
|
|
538
|
-
};
|
|
594
|
+
} as unknown as IManifest;
|
|
539
595
|
|
|
540
596
|
manifest.replace(newManifest);
|
|
541
597
|
expect(fakeReplacePeriods).toHaveBeenCalledTimes(1);
|