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
|
@@ -47,28 +47,31 @@ function parsePeriodChildren(periodChildren: NodeList): [IPeriodChildren, Error[
|
|
|
47
47
|
const currentElement = periodChildren[i] as Element;
|
|
48
48
|
|
|
49
49
|
switch (currentElement.nodeName) {
|
|
50
|
-
case "BaseURL":
|
|
50
|
+
case "BaseURL": {
|
|
51
51
|
const [baseURLObj, baseURLWarnings] = parseBaseURL(currentElement);
|
|
52
52
|
if (baseURLObj !== undefined) {
|
|
53
53
|
baseURLs.push(baseURLObj);
|
|
54
54
|
}
|
|
55
55
|
warnings = warnings.concat(baseURLWarnings);
|
|
56
56
|
break;
|
|
57
|
+
}
|
|
57
58
|
|
|
58
|
-
case "AdaptationSet":
|
|
59
|
+
case "AdaptationSet": {
|
|
59
60
|
const [adaptation, adaptationWarnings] =
|
|
60
61
|
createAdaptationSetIntermediateRepresentation(currentElement);
|
|
61
62
|
adaptations.push(adaptation);
|
|
62
63
|
warnings = warnings.concat(adaptationWarnings);
|
|
63
64
|
break;
|
|
65
|
+
}
|
|
64
66
|
|
|
65
|
-
case "EventStream":
|
|
67
|
+
case "EventStream": {
|
|
66
68
|
const [eventStream, eventStreamWarnings] = parseEventStream(currentElement);
|
|
67
69
|
eventStreams.push(eventStream);
|
|
68
70
|
warnings = warnings.concat(eventStreamWarnings);
|
|
69
71
|
break;
|
|
72
|
+
}
|
|
70
73
|
|
|
71
|
-
case "SegmentTemplate":
|
|
74
|
+
case "SegmentTemplate": {
|
|
72
75
|
const [parsedSegmentTemplate, segmentTemplateWarnings] =
|
|
73
76
|
parseSegmentTemplate(currentElement);
|
|
74
77
|
segmentTemplate = parsedSegmentTemplate;
|
|
@@ -76,8 +79,9 @@ function parsePeriodChildren(periodChildren: NodeList): [IPeriodChildren, Error[
|
|
|
76
79
|
warnings = warnings.concat(segmentTemplateWarnings);
|
|
77
80
|
}
|
|
78
81
|
break;
|
|
82
|
+
}
|
|
79
83
|
|
|
80
|
-
case "ContentProtection":
|
|
84
|
+
case "ContentProtection": {
|
|
81
85
|
const [contentProtection, contentProtectionWarnings] =
|
|
82
86
|
parseContentProtection(currentElement);
|
|
83
87
|
if (contentProtectionWarnings.length > 0) {
|
|
@@ -87,6 +91,7 @@ function parsePeriodChildren(periodChildren: NodeList): [IPeriodChildren, Error[
|
|
|
87
91
|
contentProtections.push(contentProtection);
|
|
88
92
|
}
|
|
89
93
|
break;
|
|
94
|
+
}
|
|
90
95
|
}
|
|
91
96
|
}
|
|
92
97
|
}
|
|
@@ -53,39 +53,43 @@ function parseRepresentationChildren(
|
|
|
53
53
|
const currentElement = representationChildren[i] as Element;
|
|
54
54
|
|
|
55
55
|
switch (currentElement.nodeName) {
|
|
56
|
-
case "BaseURL":
|
|
56
|
+
case "BaseURL": {
|
|
57
57
|
const [baseURLObj, baseURLWarnings] = parseBaseURL(currentElement);
|
|
58
58
|
if (baseURLObj !== undefined) {
|
|
59
59
|
children.baseURLs.push(baseURLObj);
|
|
60
60
|
}
|
|
61
61
|
warnings = warnings.concat(baseURLWarnings);
|
|
62
62
|
break;
|
|
63
|
+
}
|
|
63
64
|
case "InbandEventStream":
|
|
64
65
|
if (children.inbandEventStreams === undefined) {
|
|
65
66
|
children.inbandEventStreams = [];
|
|
66
67
|
}
|
|
67
68
|
children.inbandEventStreams.push(parseScheme(currentElement));
|
|
68
69
|
break;
|
|
69
|
-
case "SegmentBase":
|
|
70
|
+
case "SegmentBase": {
|
|
70
71
|
const [segmentBase, segmentBaseWarnings] = parseSegmentBase(currentElement);
|
|
71
72
|
children.segmentBase = segmentBase;
|
|
72
73
|
if (segmentBaseWarnings.length > 0) {
|
|
73
74
|
warnings = warnings.concat(segmentBaseWarnings);
|
|
74
75
|
}
|
|
75
76
|
break;
|
|
76
|
-
|
|
77
|
+
}
|
|
78
|
+
case "SegmentList": {
|
|
77
79
|
const [segmentList, segmentListWarnings] = parseSegmentList(currentElement);
|
|
78
80
|
warnings = warnings.concat(segmentListWarnings);
|
|
79
81
|
children.segmentList = segmentList;
|
|
80
82
|
break;
|
|
81
|
-
|
|
83
|
+
}
|
|
84
|
+
case "SegmentTemplate": {
|
|
82
85
|
const [segmentTemplate, segmentTemplateWarnings] =
|
|
83
86
|
parseSegmentTemplate(currentElement);
|
|
84
87
|
warnings = warnings.concat(segmentTemplateWarnings);
|
|
85
88
|
children.segmentTemplate = segmentTemplate;
|
|
86
89
|
break;
|
|
90
|
+
}
|
|
87
91
|
|
|
88
|
-
case "ContentProtection":
|
|
92
|
+
case "ContentProtection": {
|
|
89
93
|
const [contentProtection, contentProtectionWarnings] =
|
|
90
94
|
parseContentProtection(currentElement);
|
|
91
95
|
if (contentProtectionWarnings.length > 0) {
|
|
@@ -95,6 +99,7 @@ function parseRepresentationChildren(
|
|
|
95
99
|
contentProtections.push(contentProtection);
|
|
96
100
|
}
|
|
97
101
|
break;
|
|
102
|
+
}
|
|
98
103
|
case "SupplementalProperty":
|
|
99
104
|
if (isNullOrUndefined(children.supplementalProperties)) {
|
|
100
105
|
children.supplementalProperties = [parseScheme(currentElement)];
|
package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/ContentProtection.test.ts
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { describe, beforeEach, it, expect, vi } from "vitest";
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
6
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
7
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import type IParseContentProtection from "../ContentProtection";
|
|
8
3
|
|
|
9
4
|
function testStringAttribute(attributeName: string, variableName?: string): void {
|
|
10
5
|
const _variableName = variableName ?? attributeName;
|
|
11
6
|
|
|
12
7
|
it(`should correctly parse a ContentProtection element with a correct ${attributeName} attribute`, async () => {
|
|
13
|
-
const parseContentProtection = (
|
|
14
|
-
|
|
15
|
-
).default;
|
|
8
|
+
const parseContentProtection = (await vi.importActual("../ContentProtection"))
|
|
9
|
+
.default as typeof IParseContentProtection;
|
|
16
10
|
const element1 = new DOMParser().parseFromString(
|
|
17
11
|
`<ContentProtection ${attributeName}="foobar" />`,
|
|
18
12
|
"text/xml",
|
|
@@ -39,9 +33,8 @@ describe("DASH Node Parsers - ContentProtection", () => {
|
|
|
39
33
|
});
|
|
40
34
|
|
|
41
35
|
it("should correctly parse a ContentProtection element without attributes", async () => {
|
|
42
|
-
const parseContentProtection = (
|
|
43
|
-
|
|
44
|
-
).default;
|
|
36
|
+
const parseContentProtection = (await vi.importActual("../ContentProtection"))
|
|
37
|
+
.default as typeof IParseContentProtection;
|
|
45
38
|
const element = new DOMParser().parseFromString("<ContentProtection />", "text/xml")
|
|
46
39
|
.childNodes[0] as Element;
|
|
47
40
|
expect(parseContentProtection(element)).toEqual([
|
|
@@ -61,9 +54,8 @@ describe("DASH Node Parsers - ContentProtection", () => {
|
|
|
61
54
|
vi.doMock("../../../../../../utils/string_parsing", () => ({
|
|
62
55
|
hexToBytes: mockHexToBytes,
|
|
63
56
|
}));
|
|
64
|
-
const parseContentProtection = (
|
|
65
|
-
|
|
66
|
-
).default;
|
|
57
|
+
const parseContentProtection = (await vi.importActual("../ContentProtection"))
|
|
58
|
+
.default as typeof IParseContentProtection;
|
|
67
59
|
const element1 = new DOMParser()
|
|
68
60
|
.parseFromString(
|
|
69
61
|
`<?xml version="1.0" encoding="utf-8"?>
|
|
@@ -97,9 +89,8 @@ describe("DASH Node Parsers - ContentProtection", () => {
|
|
|
97
89
|
vi.doMock("../../../../../../utils/string_parsing", () => ({
|
|
98
90
|
hexToBytes: mockHexToBytes,
|
|
99
91
|
}));
|
|
100
|
-
const parseContentProtection = (
|
|
101
|
-
|
|
102
|
-
).default;
|
|
92
|
+
const parseContentProtection = (await vi.importActual("../ContentProtection"))
|
|
93
|
+
.default as typeof IParseContentProtection;
|
|
103
94
|
const element = new DOMParser()
|
|
104
95
|
.parseFromString(
|
|
105
96
|
`<?xml version="1.0" encoding="utf-8"?>
|
|
@@ -130,9 +121,8 @@ describe("DASH Node Parsers - ContentProtection", () => {
|
|
|
130
121
|
});
|
|
131
122
|
|
|
132
123
|
it("should correctly parse a ContentProtection with cenc:pssh children", async () => {
|
|
133
|
-
const parseContentProtection = (
|
|
134
|
-
|
|
135
|
-
).default;
|
|
124
|
+
const parseContentProtection = (await vi.importActual("../ContentProtection"))
|
|
125
|
+
.default as typeof IParseContentProtection;
|
|
136
126
|
const element = new DOMParser()
|
|
137
127
|
.parseFromString(
|
|
138
128
|
`<?xml version="1.0" encoding="utf-8"?>
|
|
@@ -171,9 +161,8 @@ describe("DASH Node Parsers - ContentProtection", () => {
|
|
|
171
161
|
vi.doMock("../../../../../../utils/string_parsing", () => ({
|
|
172
162
|
hexToBytes: mockHexToBytes,
|
|
173
163
|
}));
|
|
174
|
-
const parseContentProtection = (
|
|
175
|
-
|
|
176
|
-
).default;
|
|
164
|
+
const parseContentProtection = (await vi.importActual("../ContentProtection"))
|
|
165
|
+
.default as typeof IParseContentProtection;
|
|
177
166
|
const element = new DOMParser()
|
|
178
167
|
.parseFromString(
|
|
179
168
|
`<?xml version="1.0" encoding="utf-8"?>
|
|
@@ -209,9 +198,8 @@ describe("DASH Node Parsers - ContentProtection", () => {
|
|
|
209
198
|
});
|
|
210
199
|
|
|
211
200
|
it("should return a warning if one of the cenc:pssh is invalid base64", async () => {
|
|
212
|
-
const parseContentProtection = (
|
|
213
|
-
|
|
214
|
-
).default;
|
|
201
|
+
const parseContentProtection = (await vi.importActual("../ContentProtection"))
|
|
202
|
+
.default as typeof IParseContentProtection;
|
|
215
203
|
const element = new DOMParser()
|
|
216
204
|
.parseFromString(
|
|
217
205
|
`<?xml version="1.0" encoding="utf-8"?>
|
package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/Initialization.test.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { describe, beforeEach, it, expect, vi } from "vitest";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
6
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
7
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import type IInitialization from "../Initialization";
|
|
3
|
+
import type { MPDError as IMPDError } from "../utils";
|
|
8
4
|
|
|
9
5
|
describe("DASH Node Parsers - Initialization", () => {
|
|
10
6
|
beforeEach(() => {
|
|
@@ -16,8 +12,8 @@ describe("DASH Node Parsers - Initialization", () => {
|
|
|
16
12
|
vi.doMock("../../../../../../log", () => log);
|
|
17
13
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
18
14
|
|
|
19
|
-
const parseInitialization = (
|
|
20
|
-
.default;
|
|
15
|
+
const parseInitialization = (await vi.importActual("../Initialization"))
|
|
16
|
+
.default as typeof IInitialization;
|
|
21
17
|
const element1 = new DOMParser().parseFromString("<Foo />", "text/xml")
|
|
22
18
|
.childNodes[0] as Element;
|
|
23
19
|
expect(parseInitialization(element1)).toEqual([{}, []]);
|
|
@@ -35,8 +31,8 @@ describe("DASH Node Parsers - Initialization", () => {
|
|
|
35
31
|
vi.doMock("../../../../../../log", () => log);
|
|
36
32
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
37
33
|
|
|
38
|
-
const parseInitialization = (
|
|
39
|
-
.default;
|
|
34
|
+
const parseInitialization = (await vi.importActual("../Initialization"))
|
|
35
|
+
.default as typeof IInitialization;
|
|
40
36
|
const element1 = new DOMParser().parseFromString('<Foo range="0-1" />', "text/xml")
|
|
41
37
|
.childNodes[0] as Element;
|
|
42
38
|
expect(parseInitialization(element1)).toEqual([{ range: [0, 1] }, []]);
|
|
@@ -56,9 +52,9 @@ describe("DASH Node Parsers - Initialization", () => {
|
|
|
56
52
|
vi.doMock("../../../../../../log", () => log);
|
|
57
53
|
const mockLog = vi.spyOn(log.default, "warn").mockImplementation(vi.fn());
|
|
58
54
|
|
|
59
|
-
const parseInitialization = (
|
|
60
|
-
.default;
|
|
61
|
-
const MPDError = (
|
|
55
|
+
const parseInitialization = (await vi.importActual("../Initialization"))
|
|
56
|
+
.default as typeof IInitialization;
|
|
57
|
+
const MPDError = (await vi.importActual("../utils")).MPDError as typeof IMPDError;
|
|
62
58
|
const element1 = new DOMParser().parseFromString('<Foo range="a" />', "text/xml")
|
|
63
59
|
.childNodes[0] as Element;
|
|
64
60
|
const error1 = new MPDError('`range` property has an unrecognized format "a"');
|
|
@@ -83,8 +79,8 @@ describe("DASH Node Parsers - Initialization", () => {
|
|
|
83
79
|
vi.doMock("../../../../../../log", () => log);
|
|
84
80
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
85
81
|
|
|
86
|
-
const parseInitialization = (
|
|
87
|
-
.default;
|
|
82
|
+
const parseInitialization = (await vi.importActual("../Initialization"))
|
|
83
|
+
.default as typeof IInitialization;
|
|
88
84
|
const element1 = new DOMParser().parseFromString('<Foo sourceURL="a" />', "text/xml")
|
|
89
85
|
.childNodes[0] as Element;
|
|
90
86
|
expect(parseInitialization(element1)).toEqual([{ media: "a" }, []]);
|
|
@@ -102,8 +98,8 @@ describe("DASH Node Parsers - Initialization", () => {
|
|
|
102
98
|
vi.doMock("../../../../../../log", () => log);
|
|
103
99
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
104
100
|
|
|
105
|
-
const parseInitialization = (
|
|
106
|
-
.default;
|
|
101
|
+
const parseInitialization = (await vi.importActual("../Initialization"))
|
|
102
|
+
.default as typeof IInitialization;
|
|
107
103
|
const element1 = new DOMParser().parseFromString(
|
|
108
104
|
'<Foo sourceURL="a" range="4-10" />',
|
|
109
105
|
"text/xml",
|
package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/SegmentTimeline.test.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { describe, beforeEach, it, expect, vi } from "vitest";
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
6
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
7
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import type SegmentTimelineParser from "../SegmentTimeline";
|
|
8
3
|
|
|
9
4
|
describe("DASH Node parsers - SegmentTimeline", () => {
|
|
10
5
|
beforeEach(() => {
|
|
@@ -12,8 +7,8 @@ describe("DASH Node parsers - SegmentTimeline", () => {
|
|
|
12
7
|
});
|
|
13
8
|
|
|
14
9
|
it("should return a function to parse lazily the timeline", async () => {
|
|
15
|
-
const parseSegmentTimeline = (
|
|
16
|
-
.default;
|
|
10
|
+
const parseSegmentTimeline = (await vi.importActual("../SegmentTimeline"))
|
|
11
|
+
.default as typeof SegmentTimelineParser;
|
|
17
12
|
|
|
18
13
|
const element = new DOMParser().parseFromString("<Root><S /></Root>", "text/xml")
|
|
19
14
|
.childNodes[0] as Element;
|
|
@@ -26,8 +21,8 @@ describe("DASH Node parsers - SegmentTimeline", () => {
|
|
|
26
21
|
});
|
|
27
22
|
|
|
28
23
|
it("should return an empty HTMLCollection if no S element is present", async () => {
|
|
29
|
-
const parseSegmentTimeline = (
|
|
30
|
-
.default;
|
|
24
|
+
const parseSegmentTimeline = (await vi.importActual("../SegmentTimeline"))
|
|
25
|
+
.default as typeof SegmentTimelineParser;
|
|
31
26
|
|
|
32
27
|
const element = new DOMParser().parseFromString("<Root />", "text/xml")
|
|
33
28
|
.childNodes[0] as Element;
|
|
@@ -43,8 +38,8 @@ describe("DASH Node parsers - SegmentTimeline", () => {
|
|
|
43
38
|
});
|
|
44
39
|
|
|
45
40
|
it("should return an empty HTMLCollection for an Invalid XML", async () => {
|
|
46
|
-
const parseSegmentTimeline = (
|
|
47
|
-
.default;
|
|
41
|
+
const parseSegmentTimeline = (await vi.importActual("../SegmentTimeline"))
|
|
42
|
+
.default as typeof SegmentTimelineParser;
|
|
48
43
|
|
|
49
44
|
const element = new DOMParser().parseFromString(
|
|
50
45
|
"<Root><S></S><S<S></Root>",
|
|
@@ -62,8 +57,8 @@ describe("DASH Node parsers - SegmentTimeline", () => {
|
|
|
62
57
|
});
|
|
63
58
|
|
|
64
59
|
it("should parse S elements only when called for the first time", async () => {
|
|
65
|
-
const parseSegmentTimeline = (
|
|
66
|
-
.default;
|
|
60
|
+
const parseSegmentTimeline = (await vi.importActual("../SegmentTimeline"))
|
|
61
|
+
.default as typeof SegmentTimelineParser;
|
|
67
62
|
|
|
68
63
|
const sElement1 = new DOMParser().parseFromString("<S>1</S>", "text/xml")
|
|
69
64
|
.childNodes[0] as Element;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { describe, beforeEach, it, expect, vi } from "vitest";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
6
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
7
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import type ISegmentUrl from "../SegmentURL";
|
|
3
|
+
import type { MPDError as IMPDError } from "../utils";
|
|
8
4
|
|
|
9
5
|
describe("DASH Node Parsers - SegmentURL", () => {
|
|
10
6
|
beforeEach(() => {
|
|
@@ -16,7 +12,8 @@ describe("DASH Node Parsers - SegmentURL", () => {
|
|
|
16
12
|
vi.doMock("../../../../../../log", () => log);
|
|
17
13
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
18
14
|
|
|
19
|
-
const parseSegmentURL = (
|
|
15
|
+
const parseSegmentURL = (await vi.importActual("../SegmentURL"))
|
|
16
|
+
.default as typeof ISegmentUrl;
|
|
20
17
|
const element1 = new DOMParser().parseFromString("<Foo />", "text/xml")
|
|
21
18
|
.childNodes[0] as Element;
|
|
22
19
|
expect(parseSegmentURL(element1)).toEqual([{}, []]);
|
|
@@ -34,7 +31,8 @@ describe("DASH Node Parsers - SegmentURL", () => {
|
|
|
34
31
|
vi.doMock("../../../../../../log", () => log);
|
|
35
32
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
36
33
|
|
|
37
|
-
const parseSegmentURL = (
|
|
34
|
+
const parseSegmentURL = (await vi.importActual("../SegmentURL"))
|
|
35
|
+
.default as typeof ISegmentUrl;
|
|
38
36
|
const element1 = new DOMParser().parseFromString(
|
|
39
37
|
'<Foo mediaRange="10-100" />',
|
|
40
38
|
"text/xml",
|
|
@@ -56,8 +54,9 @@ describe("DASH Node Parsers - SegmentURL", () => {
|
|
|
56
54
|
vi.doMock("../../../../../../log", () => log);
|
|
57
55
|
const mockLog = vi.spyOn(log.default, "warn").mockImplementation(vi.fn());
|
|
58
56
|
|
|
59
|
-
const parseSegmentURL = (
|
|
60
|
-
|
|
57
|
+
const parseSegmentURL = (await vi.importActual("../SegmentURL"))
|
|
58
|
+
.default as typeof ISegmentUrl;
|
|
59
|
+
const MPDError = (await vi.importActual("../utils")).MPDError as typeof IMPDError;
|
|
61
60
|
const element1 = new DOMParser().parseFromString('<Foo mediaRange="a" />', "text/xml")
|
|
62
61
|
.childNodes[0] as Element;
|
|
63
62
|
const error1 = new MPDError('`mediaRange` property has an unrecognized format "a"');
|
|
@@ -84,7 +83,8 @@ describe("DASH Node Parsers - SegmentURL", () => {
|
|
|
84
83
|
vi.doMock("../../../../../../log", () => log);
|
|
85
84
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
86
85
|
|
|
87
|
-
const parseSegmentURL = (
|
|
86
|
+
const parseSegmentURL = (await vi.importActual("../SegmentURL"))
|
|
87
|
+
.default as typeof ISegmentUrl;
|
|
88
88
|
const element1 = new DOMParser().parseFromString(
|
|
89
89
|
'<Foo indexRange="0-100" />',
|
|
90
90
|
"text/xml",
|
|
@@ -106,8 +106,9 @@ describe("DASH Node Parsers - SegmentURL", () => {
|
|
|
106
106
|
vi.doMock("../../../../../../log", () => log);
|
|
107
107
|
const mockLog = vi.spyOn(log.default, "warn").mockImplementation(vi.fn());
|
|
108
108
|
|
|
109
|
-
const parseSegmentURL = (
|
|
110
|
-
|
|
109
|
+
const parseSegmentURL = (await vi.importActual("../SegmentURL"))
|
|
110
|
+
.default as typeof ISegmentUrl;
|
|
111
|
+
const MPDError = (await vi.importActual("../utils")).MPDError as typeof IMPDError;
|
|
111
112
|
const element1 = new DOMParser().parseFromString('<Foo indexRange="a" />', "text/xml")
|
|
112
113
|
.childNodes[0] as Element;
|
|
113
114
|
const error1 = new MPDError('`indexRange` property has an unrecognized format "a"');
|
|
@@ -132,7 +133,8 @@ describe("DASH Node Parsers - SegmentURL", () => {
|
|
|
132
133
|
vi.doMock("../../../../../../log", () => log);
|
|
133
134
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
134
135
|
|
|
135
|
-
const parseSegmentURL = (
|
|
136
|
+
const parseSegmentURL = (await vi.importActual("../SegmentURL"))
|
|
137
|
+
.default as typeof ISegmentUrl;
|
|
136
138
|
const element1 = new DOMParser().parseFromString('<Foo media="a" />', "text/xml")
|
|
137
139
|
.childNodes[0] as Element;
|
|
138
140
|
expect(parseSegmentURL(element1)).toEqual([{ media: "a" }, []]);
|
|
@@ -150,7 +152,8 @@ describe("DASH Node Parsers - SegmentURL", () => {
|
|
|
150
152
|
vi.doMock("../../../../../../log", () => log);
|
|
151
153
|
const mockLog = vi.spyOn(log.default, "warn");
|
|
152
154
|
|
|
153
|
-
const parseSegmentURL = (
|
|
155
|
+
const parseSegmentURL = (await vi.importActual("../SegmentURL"))
|
|
156
|
+
.default as typeof ISegmentUrl;
|
|
154
157
|
const element1 = new DOMParser().parseFromString('<Foo index="a" />', "text/xml")
|
|
155
158
|
.childNodes[0] as Element;
|
|
156
159
|
expect(parseSegmentURL(element1)).toEqual([{ index: "a" }, []]);
|
|
@@ -146,9 +146,8 @@ export default class DashWasmParser {
|
|
|
146
146
|
/** Re-used TextDecoder instance. */
|
|
147
147
|
const textDecoder = new TextDecoder();
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
150
150
|
const self = this;
|
|
151
|
-
/* eslint-enable @typescript-eslint/no-this-alias */
|
|
152
151
|
|
|
153
152
|
const imports = {
|
|
154
153
|
env: {
|
|
@@ -363,10 +363,11 @@ export function generateAdaptationSetAttrParser(
|
|
|
363
363
|
case AttributeName.AvailabilityTimeComplete:
|
|
364
364
|
adaptationAttrs.availabilityTimeComplete = dataView.getUint8(0) === 0;
|
|
365
365
|
break;
|
|
366
|
-
case AttributeName.Label:
|
|
366
|
+
case AttributeName.Label: {
|
|
367
367
|
const label = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
368
368
|
adaptationAttrs.label = label;
|
|
369
369
|
break;
|
|
370
|
+
}
|
|
370
371
|
|
|
371
372
|
// TODO
|
|
372
373
|
// case AttributeName.StartsWithSap:
|
|
@@ -41,10 +41,11 @@ export function generateContentProtectionAttrParser(
|
|
|
41
41
|
case AttributeName.ContentProtectionValue:
|
|
42
42
|
cpAttrs.value = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
43
43
|
break;
|
|
44
|
-
case AttributeName.ContentProtectionKeyId:
|
|
44
|
+
case AttributeName.ContentProtectionKeyId: {
|
|
45
45
|
const kid = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
46
46
|
cpAttrs.keyId = hexToBytes(kid.replace(/-/g, ""));
|
|
47
47
|
break;
|
|
48
|
+
}
|
|
48
49
|
case AttributeName.ContentProtectionCencPSSH:
|
|
49
50
|
try {
|
|
50
51
|
const b64 = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
@@ -80,7 +80,7 @@ export function generateEventStreamAttrParser(
|
|
|
80
80
|
case AttributeName.TimeScale:
|
|
81
81
|
esAttrs.timescale = dataView.getFloat64(ptr, true);
|
|
82
82
|
break;
|
|
83
|
-
case AttributeName.Namespace:
|
|
83
|
+
case AttributeName.Namespace: {
|
|
84
84
|
const xmlNs = { key: "", value: "" };
|
|
85
85
|
let offset = ptr;
|
|
86
86
|
const keySize = dataView.getUint32(offset);
|
|
@@ -99,6 +99,7 @@ export function generateEventStreamAttrParser(
|
|
|
99
99
|
esAttrs.namespaces.push(xmlNs);
|
|
100
100
|
}
|
|
101
101
|
break;
|
|
102
|
+
}
|
|
102
103
|
}
|
|
103
104
|
};
|
|
104
105
|
}
|
|
@@ -127,11 +128,12 @@ function generateEventAttrParser(
|
|
|
127
128
|
case AttributeName.Id:
|
|
128
129
|
eventAttr.id = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
129
130
|
break;
|
|
130
|
-
case AttributeName.EventStreamEltRange:
|
|
131
|
+
case AttributeName.EventStreamEltRange: {
|
|
131
132
|
const rangeStart = dataView.getFloat64(ptr, true);
|
|
132
133
|
const rangeEnd = dataView.getFloat64(ptr + 8, true);
|
|
133
134
|
eventAttr.eventStreamData = fullMpd.slice(rangeStart, rangeEnd);
|
|
134
135
|
break;
|
|
136
|
+
}
|
|
135
137
|
}
|
|
136
138
|
};
|
|
137
139
|
}
|
|
@@ -122,18 +122,21 @@ export function generateMPDAttrParser(
|
|
|
122
122
|
case AttributeName.Type:
|
|
123
123
|
mpdAttrs.type = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
124
124
|
break;
|
|
125
|
-
case AttributeName.AvailabilityStartTime:
|
|
125
|
+
case AttributeName.AvailabilityStartTime: {
|
|
126
126
|
const startTime = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
127
127
|
mpdAttrs.availabilityStartTime = new Date(startTime).getTime() / 1000;
|
|
128
128
|
break;
|
|
129
|
-
|
|
129
|
+
}
|
|
130
|
+
case AttributeName.AvailabilityEndTime: {
|
|
130
131
|
const endTime = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
131
132
|
mpdAttrs.availabilityEndTime = new Date(endTime).getTime() / 1000;
|
|
132
133
|
break;
|
|
133
|
-
|
|
134
|
+
}
|
|
135
|
+
case AttributeName.PublishTime: {
|
|
134
136
|
const publishTime = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
135
137
|
mpdAttrs.publishTime = new Date(publishTime).getTime() / 1000;
|
|
136
138
|
break;
|
|
139
|
+
}
|
|
137
140
|
case AttributeName.MediaPresentationDuration:
|
|
138
141
|
dataView = new DataView(linearMemory.buffer);
|
|
139
142
|
mpdAttrs.duration = dataView.getFloat64(ptr, true);
|
|
@@ -162,11 +165,12 @@ export function generateMPDAttrParser(
|
|
|
162
165
|
dataView = new DataView(linearMemory.buffer);
|
|
163
166
|
mpdAttrs.maxSubsegmentDuration = dataView.getFloat64(ptr, true);
|
|
164
167
|
break;
|
|
165
|
-
case AttributeName.Location:
|
|
168
|
+
case AttributeName.Location: {
|
|
166
169
|
const location = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
167
170
|
mpdChildren.locations.push(location);
|
|
168
171
|
break;
|
|
169
|
-
|
|
172
|
+
}
|
|
173
|
+
case AttributeName.Namespace: {
|
|
170
174
|
const xmlNs = { key: "", value: "" };
|
|
171
175
|
dataView = new DataView(linearMemory.buffer);
|
|
172
176
|
let offset = ptr;
|
|
@@ -186,6 +190,7 @@ export function generateMPDAttrParser(
|
|
|
186
190
|
mpdAttrs.namespaces.push(xmlNs);
|
|
187
191
|
}
|
|
188
192
|
break;
|
|
193
|
+
}
|
|
189
194
|
}
|
|
190
195
|
};
|
|
191
196
|
}
|
|
@@ -183,7 +183,7 @@ export function generatePeriodAttrParser(
|
|
|
183
183
|
periodAttrs.availabilityTimeComplete =
|
|
184
184
|
new DataView(linearMemory.buffer).getUint8(0) === 0;
|
|
185
185
|
break;
|
|
186
|
-
case AttributeName.Namespace:
|
|
186
|
+
case AttributeName.Namespace: {
|
|
187
187
|
const xmlNs = { key: "", value: "" };
|
|
188
188
|
const dataView = new DataView(linearMemory.buffer);
|
|
189
189
|
let offset = ptr;
|
|
@@ -203,6 +203,7 @@ export function generatePeriodAttrParser(
|
|
|
203
203
|
periodAttrs.namespaces.push(xmlNs);
|
|
204
204
|
}
|
|
205
205
|
break;
|
|
206
|
+
}
|
|
206
207
|
}
|
|
207
208
|
};
|
|
208
209
|
}
|
|
@@ -35,7 +35,7 @@ export function generateRootChildrenParser(
|
|
|
35
35
|
): (nodeId: number) => void {
|
|
36
36
|
return function onRootChildren(nodeId: number) {
|
|
37
37
|
switch (nodeId) {
|
|
38
|
-
case TagName.MPD:
|
|
38
|
+
case TagName.MPD: {
|
|
39
39
|
rootObj.mpd = {
|
|
40
40
|
children: {
|
|
41
41
|
baseURLs: [],
|
|
@@ -58,6 +58,7 @@ export function generateRootChildrenParser(
|
|
|
58
58
|
);
|
|
59
59
|
parsersStack.pushParsers(nodeId, childrenParser, attributeParser);
|
|
60
60
|
break;
|
|
61
|
+
}
|
|
61
62
|
|
|
62
63
|
default:
|
|
63
64
|
// Allows to make sure we're not mistakenly closing a re-opened
|
|
@@ -54,8 +54,7 @@ export default class LocalRepresentationIndex implements IRepresentationIndex {
|
|
|
54
54
|
const startTime = up;
|
|
55
55
|
const endTime = up + duration;
|
|
56
56
|
const wantedSegments: ILocalIndexSegment[] = [];
|
|
57
|
-
for (
|
|
58
|
-
const segment = this._index.segments[i];
|
|
57
|
+
for (const segment of this._index.segments) {
|
|
59
58
|
const segmentStart = segment.time;
|
|
60
59
|
if (endTime <= segmentStart) {
|
|
61
60
|
break;
|
|
@@ -91,7 +91,7 @@ export default function parseMetaPlaylist(
|
|
|
91
91
|
try {
|
|
92
92
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
93
93
|
parsedData = JSON.parse(data);
|
|
94
|
-
} catch (
|
|
94
|
+
} catch (_error) {
|
|
95
95
|
throw new Error("MPL Parser: Bad MetaPlaylist file. Expected JSON.");
|
|
96
96
|
}
|
|
97
97
|
} else {
|
|
@@ -118,8 +118,7 @@ export default function parseMetaPlaylist(
|
|
|
118
118
|
throw new Error("MPL Parser: No content found.");
|
|
119
119
|
}
|
|
120
120
|
const ressources: Array<{ url: string; transportType: string }> = [];
|
|
121
|
-
for (
|
|
122
|
-
const content = contents[i];
|
|
121
|
+
for (const content of contents) {
|
|
123
122
|
if (
|
|
124
123
|
isNullOrUndefined(content.url) ||
|
|
125
124
|
isNullOrUndefined(content.startTime) ||
|
|
@@ -312,7 +312,7 @@ function createSmoothStreamingParser(
|
|
|
312
312
|
root,
|
|
313
313
|
(res, _name, node) => {
|
|
314
314
|
switch (_name) {
|
|
315
|
-
case "QualityLevel":
|
|
315
|
+
case "QualityLevel": {
|
|
316
316
|
const qualityLevel = parseQualityLevel(node, adaptationType);
|
|
317
317
|
if (qualityLevel === null) {
|
|
318
318
|
return res;
|
|
@@ -326,6 +326,7 @@ function createSmoothStreamingParser(
|
|
|
326
326
|
res.qualityLevels.push(qualityLevel);
|
|
327
327
|
}
|
|
328
328
|
break;
|
|
329
|
+
}
|
|
329
330
|
case "c":
|
|
330
331
|
res.cNodes.push(node);
|
|
331
332
|
break;
|
|
@@ -200,11 +200,11 @@ export default class SharedSmoothSegmentTimeline {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
this.refresh();
|
|
203
|
-
for (
|
|
203
|
+
for (const nextSeg of nextSegments) {
|
|
204
204
|
addSegmentInfos(
|
|
205
205
|
this.timeline,
|
|
206
206
|
this.timescale,
|
|
207
|
-
|
|
207
|
+
nextSeg,
|
|
208
208
|
currentSegment.privateInfos.smoothMediaSegment,
|
|
209
209
|
);
|
|
210
210
|
}
|