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
|
@@ -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 IShouldWaitForDataBeforeLoaded from "../should_wait_for_data_before_loaded";
|
|
8
3
|
|
|
9
4
|
describe("compat - shouldWaitForDataBeforeLoaded", () => {
|
|
10
5
|
beforeEach(() => {
|
|
@@ -17,10 +12,10 @@ describe("compat - shouldWaitForDataBeforeLoaded", () => {
|
|
|
17
12
|
isSafariMobile: false,
|
|
18
13
|
};
|
|
19
14
|
});
|
|
20
|
-
const shouldWaitForDataBeforeLoaded = (
|
|
21
|
-
"../should_wait_for_data_before_loaded"
|
|
22
|
-
)
|
|
23
|
-
expect(shouldWaitForDataBeforeLoaded
|
|
15
|
+
const shouldWaitForDataBeforeLoaded = (
|
|
16
|
+
await vi.importActual("../should_wait_for_data_before_loaded")
|
|
17
|
+
).default as typeof IShouldWaitForDataBeforeLoaded;
|
|
18
|
+
expect(shouldWaitForDataBeforeLoaded(false)).toBe(true);
|
|
24
19
|
});
|
|
25
20
|
|
|
26
21
|
it("should return true if we are not on Safari browser but in directfile mode", async () => {
|
|
@@ -29,10 +24,10 @@ describe("compat - shouldWaitForDataBeforeLoaded", () => {
|
|
|
29
24
|
isSafariMobile: false,
|
|
30
25
|
};
|
|
31
26
|
});
|
|
32
|
-
const shouldWaitForDataBeforeLoaded = (
|
|
33
|
-
"../should_wait_for_data_before_loaded"
|
|
34
|
-
)
|
|
35
|
-
expect(shouldWaitForDataBeforeLoaded
|
|
27
|
+
const shouldWaitForDataBeforeLoaded = (
|
|
28
|
+
await vi.importActual("../should_wait_for_data_before_loaded")
|
|
29
|
+
).default as typeof IShouldWaitForDataBeforeLoaded;
|
|
30
|
+
expect(shouldWaitForDataBeforeLoaded(true)).toBe(true);
|
|
36
31
|
});
|
|
37
32
|
|
|
38
33
|
it("should return true if we are on the Safari browser but not in directfile mode", async () => {
|
|
@@ -41,10 +36,10 @@ describe("compat - shouldWaitForDataBeforeLoaded", () => {
|
|
|
41
36
|
isSafariMobile: true,
|
|
42
37
|
};
|
|
43
38
|
});
|
|
44
|
-
const shouldWaitForDataBeforeLoaded = (
|
|
45
|
-
"../should_wait_for_data_before_loaded"
|
|
46
|
-
)
|
|
47
|
-
expect(shouldWaitForDataBeforeLoaded
|
|
39
|
+
const shouldWaitForDataBeforeLoaded = (
|
|
40
|
+
await vi.importActual("../should_wait_for_data_before_loaded")
|
|
41
|
+
).default as typeof IShouldWaitForDataBeforeLoaded;
|
|
42
|
+
expect(shouldWaitForDataBeforeLoaded(false)).toBe(true);
|
|
48
43
|
});
|
|
49
44
|
|
|
50
45
|
// eslint-disable-next-line max-len
|
|
@@ -54,13 +49,9 @@ describe("compat - shouldWaitForDataBeforeLoaded", () => {
|
|
|
54
49
|
isSafariMobile: true,
|
|
55
50
|
};
|
|
56
51
|
});
|
|
57
|
-
const shouldWaitForDataBeforeLoaded = (
|
|
58
|
-
"../should_wait_for_data_before_loaded"
|
|
59
|
-
)
|
|
60
|
-
expect(shouldWaitForDataBeforeLoaded
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
beforeEach(() => {
|
|
64
|
-
vi.resetModules();
|
|
52
|
+
const shouldWaitForDataBeforeLoaded = (
|
|
53
|
+
await vi.importActual("../should_wait_for_data_before_loaded")
|
|
54
|
+
).default as typeof IShouldWaitForDataBeforeLoaded;
|
|
55
|
+
expect(shouldWaitForDataBeforeLoaded(true)).toBe(false);
|
|
65
56
|
});
|
|
66
57
|
});
|
|
@@ -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 IShouldWaitForHaveEnoughData from "../should_wait_for_have_enough_data";
|
|
8
3
|
|
|
9
4
|
describe("compat - shouldWaitForHaveEnoughData", () => {
|
|
10
5
|
beforeEach(() => {
|
|
@@ -17,10 +12,10 @@ describe("compat - shouldWaitForHaveEnoughData", () => {
|
|
|
17
12
|
isPlayStation5: false,
|
|
18
13
|
};
|
|
19
14
|
});
|
|
20
|
-
const shouldWaitForHaveEnoughData = (
|
|
21
|
-
"../should_wait_for_have_enough_data"
|
|
22
|
-
)
|
|
23
|
-
expect(shouldWaitForHaveEnoughData
|
|
15
|
+
const shouldWaitForHaveEnoughData = (
|
|
16
|
+
await vi.importActual("../should_wait_for_have_enough_data")
|
|
17
|
+
).default as typeof IShouldWaitForHaveEnoughData;
|
|
18
|
+
expect(shouldWaitForHaveEnoughData()).toBe(false);
|
|
24
19
|
});
|
|
25
20
|
|
|
26
21
|
it("should return true if we are on the Playstation 5", async () => {
|
|
@@ -28,10 +23,10 @@ describe("compat - shouldWaitForHaveEnoughData", () => {
|
|
|
28
23
|
return {
|
|
29
24
|
isPlayStation5: true,
|
|
30
25
|
};
|
|
31
|
-
})
|
|
32
|
-
const shouldWaitForHaveEnoughData = (
|
|
33
|
-
"../should_wait_for_have_enough_data"
|
|
34
|
-
)
|
|
35
|
-
expect(shouldWaitForHaveEnoughData
|
|
26
|
+
});
|
|
27
|
+
const shouldWaitForHaveEnoughData = (
|
|
28
|
+
await vi.importActual("../should_wait_for_have_enough_data")
|
|
29
|
+
).default as typeof IShouldWaitForHaveEnoughData;
|
|
30
|
+
expect(shouldWaitForHaveEnoughData()).toBe(true);
|
|
36
31
|
});
|
|
37
32
|
});
|
|
@@ -26,9 +26,8 @@ export default function addClassName(elt: HTMLElement, className: string): void
|
|
|
26
26
|
if (hasClassList === undefined) {
|
|
27
27
|
hasClassList =
|
|
28
28
|
elt.classList !== undefined &&
|
|
29
|
-
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
30
30
|
typeof elt.classList.add === "function";
|
|
31
|
-
/* eslint-enable @typescript-eslint/unbound-method */
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
if (hasClassList) {
|
|
@@ -299,8 +299,8 @@ export interface IMediaElement extends IEventTarget<IMediaElementEventMap> {
|
|
|
299
299
|
videoTracks?: ICompatVideoTrackList;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-restricted-types */
|
|
303
302
|
// @ts-expect-error unused function, just used for compile-time typechecking
|
|
303
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-restricted-types
|
|
304
304
|
function testMediaElement(x: HTMLMediaElement) {
|
|
305
305
|
assertCompatibleIMediaElement(x);
|
|
306
306
|
}
|
|
@@ -308,6 +308,7 @@ function assertCompatibleIMediaElement(_x: IMediaElement) {
|
|
|
308
308
|
// Noop
|
|
309
309
|
}
|
|
310
310
|
// @ts-expect-error unused function, just used for compile-time typechecking
|
|
311
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-restricted-types
|
|
311
312
|
function testMediaSource(x: MediaSource) {
|
|
312
313
|
assertCompatibleIMediaSource(x);
|
|
313
314
|
}
|
|
@@ -315,6 +316,7 @@ function assertCompatibleIMediaSource(_x: IMediaSource) {
|
|
|
315
316
|
// Noop
|
|
316
317
|
}
|
|
317
318
|
// @ts-expect-error unused function, just used for compile-time typechecking
|
|
319
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-restricted-types
|
|
318
320
|
function testSourceBuffer(x: SourceBuffer) {
|
|
319
321
|
assertCompatibleISourceBuffer(x);
|
|
320
322
|
}
|
|
@@ -322,13 +324,13 @@ function assertCompatibleISourceBuffer(_x: ISourceBuffer) {
|
|
|
322
324
|
// Noop
|
|
323
325
|
}
|
|
324
326
|
// @ts-expect-error unused function, just used for compile-time typechecking
|
|
327
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-restricted-types
|
|
325
328
|
function testSourceBufferList(x: SourceBufferList) {
|
|
326
329
|
assertCompatibleISourceBufferList(x);
|
|
327
330
|
}
|
|
328
331
|
function assertCompatibleISourceBufferList(_x: ISourceBufferList) {
|
|
329
332
|
// Noop
|
|
330
333
|
}
|
|
331
|
-
/* eslint-enable @typescript-eslint/no-unused-vars, @typescript-eslint/no-restricted-types */
|
|
332
334
|
|
|
333
335
|
/**
|
|
334
336
|
* AudioTrackList implementation (that TS forgot).
|
|
@@ -40,7 +40,7 @@ export default function clearElementSrc(element: IMediaElement): void {
|
|
|
40
40
|
if (childNodes[j].nodeName === "track") {
|
|
41
41
|
try {
|
|
42
42
|
element.removeChild(childNodes[j]);
|
|
43
|
-
} catch (
|
|
43
|
+
} catch (_err) {
|
|
44
44
|
log.warn("Compat: Could not remove text track child from element.");
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -32,9 +32,8 @@ if (
|
|
|
32
32
|
MozMediaKeys !== undefined &&
|
|
33
33
|
MozMediaKeys.prototype !== undefined &&
|
|
34
34
|
typeof MozMediaKeys.isTypeSupported === "function" &&
|
|
35
|
-
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
36
36
|
typeof MozMediaKeys.prototype.createSession === "function"
|
|
37
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
38
37
|
) {
|
|
39
38
|
MozMediaKeysConstructor = MozMediaKeys;
|
|
40
39
|
}
|
|
@@ -58,9 +58,8 @@ if (
|
|
|
58
58
|
MSMediaKeys !== undefined &&
|
|
59
59
|
MSMediaKeys.prototype !== undefined &&
|
|
60
60
|
typeof MSMediaKeys.isTypeSupported === "function" &&
|
|
61
|
-
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
62
62
|
typeof MSMediaKeys.prototype.createSession === "function"
|
|
63
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
64
63
|
) {
|
|
65
64
|
MSMediaKeysConstructor = MSMediaKeys;
|
|
66
65
|
}
|
|
@@ -110,15 +110,12 @@ class OldWebkitMediaKeySession
|
|
|
110
110
|
if (this._key.indexOf("clearkey") >= 0) {
|
|
111
111
|
const licenseTypedArray =
|
|
112
112
|
license instanceof ArrayBuffer ? new Uint8Array(license) : license;
|
|
113
|
-
|
|
114
|
-
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
115
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
116
114
|
const json = JSON.parse(utf8ToStr(licenseTypedArray));
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
|
117
116
|
const key = base64ToBytes(json.keys[0].k);
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
|
118
118
|
const kid = base64ToBytes(json.keys[0].kid);
|
|
119
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
120
|
-
/* eslint-enable @typescript-eslint/no-unsafe-argument */
|
|
121
|
-
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
122
119
|
resolve(this._vid.webkitAddKey(this._key, key, kid, /* sessionId */ ""));
|
|
123
120
|
} else {
|
|
124
121
|
resolve(this._vid.webkitAddKey(this._key, license, null, /* sessionId */ ""));
|
|
@@ -110,7 +110,6 @@ class WebkitMediaKeySession
|
|
|
110
110
|
|
|
111
111
|
public update(license: BufferSource): Promise<void> {
|
|
112
112
|
return new Promise((resolve, reject) => {
|
|
113
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
114
113
|
if (
|
|
115
114
|
this._nativeSession === undefined ||
|
|
116
115
|
this._nativeSession.update === undefined ||
|
|
@@ -127,14 +126,11 @@ class WebkitMediaKeySession
|
|
|
127
126
|
} else {
|
|
128
127
|
uInt8Arraylicense = new Uint8Array(license.buffer);
|
|
129
128
|
}
|
|
130
|
-
|
|
131
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
132
130
|
resolve(this._nativeSession.update(uInt8Arraylicense));
|
|
133
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
134
131
|
} catch (err) {
|
|
135
132
|
reject(err);
|
|
136
133
|
}
|
|
137
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
138
134
|
});
|
|
139
135
|
}
|
|
140
136
|
|
|
@@ -176,9 +172,8 @@ class WebkitMediaKeySession
|
|
|
176
172
|
reject("No session to close.");
|
|
177
173
|
return;
|
|
178
174
|
}
|
|
179
|
-
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
180
176
|
this._nativeSession.close();
|
|
181
|
-
/* eslint-enable @typescript-eslint/no-floating-promises */
|
|
182
177
|
resolve();
|
|
183
178
|
});
|
|
184
179
|
}
|
|
@@ -192,11 +187,7 @@ class WebkitMediaKeySession
|
|
|
192
187
|
}
|
|
193
188
|
|
|
194
189
|
get sessionId(): string {
|
|
195
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
196
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
197
190
|
return this._nativeSession?.sessionId ?? "";
|
|
198
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
199
|
-
/* eslint-enable @typescript-eslint/no-unsafe-return */
|
|
200
191
|
}
|
|
201
192
|
|
|
202
193
|
private _listenEvent(session: MediaKeySession): void {
|
|
@@ -206,9 +197,6 @@ class WebkitMediaKeySession
|
|
|
206
197
|
this.trigger(evt.type, evt);
|
|
207
198
|
};
|
|
208
199
|
|
|
209
|
-
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
210
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
211
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
212
200
|
["keymessage", "message", "keyadded", "ready", "keyerror", "error"].forEach((evt) => {
|
|
213
201
|
session.addEventListener(evt, onEvent);
|
|
214
202
|
session.addEventListener(`webkit${evt}`, onEvent);
|
|
@@ -222,9 +210,6 @@ class WebkitMediaKeySession
|
|
|
222
210
|
},
|
|
223
211
|
);
|
|
224
212
|
};
|
|
225
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
226
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
227
|
-
/* eslint-enable @typescript-eslint/no-unsafe-call */
|
|
228
213
|
}
|
|
229
214
|
}
|
|
230
215
|
|
|
@@ -26,8 +26,6 @@ interface IWebKitMediaKeysConstructor {
|
|
|
26
26
|
|
|
27
27
|
let WebKitMediaKeysConstructor: undefined | IWebKitMediaKeysConstructor;
|
|
28
28
|
|
|
29
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
30
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
31
29
|
const { WebKitMediaKeys } = globalScope as typeof globalThis & {
|
|
32
30
|
WebKitMediaKeys?: IWebKitMediaKeysConstructor;
|
|
33
31
|
};
|
|
@@ -35,13 +33,12 @@ const { WebKitMediaKeys } = globalScope as typeof globalThis & {
|
|
|
35
33
|
if (
|
|
36
34
|
WebKitMediaKeys !== undefined &&
|
|
37
35
|
typeof WebKitMediaKeys.isTypeSupported === "function" &&
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
38
37
|
typeof WebKitMediaKeys.prototype.createSession === "function" &&
|
|
39
38
|
typeof (HTMLMediaElement.prototype as IMediaElement).webkitSetMediaKeys === "function"
|
|
40
39
|
) {
|
|
41
40
|
WebKitMediaKeysConstructor = WebKitMediaKeys;
|
|
42
41
|
}
|
|
43
|
-
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
44
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
45
42
|
|
|
46
43
|
export type { IWebKitMediaKeys };
|
|
47
44
|
export { WebKitMediaKeysConstructor };
|
|
@@ -319,11 +319,9 @@ function defaultSetMediaKeys(
|
|
|
319
319
|
): Promise<unknown> {
|
|
320
320
|
try {
|
|
321
321
|
let ret: unknown;
|
|
322
|
-
/* eslint-disable @typescript-eslint/unbound-method */
|
|
323
322
|
if (typeof elt.setMediaKeys === "function") {
|
|
324
323
|
ret = elt.setMediaKeys(mediaKeys as MediaKeys);
|
|
325
324
|
}
|
|
326
|
-
/* eslint-enable @typescript-eslint/unbound-method */
|
|
327
325
|
|
|
328
326
|
// If we get in the following code, it means that no compat case has been
|
|
329
327
|
// found and no standard setMediaKeys API exists. This case is particulary
|
|
@@ -176,20 +176,16 @@ function createCompatibleEventListener(
|
|
|
176
176
|
(element as IEventEmitterLike).addEventListener(eventName, listener);
|
|
177
177
|
} else {
|
|
178
178
|
hasSetOnFn = true;
|
|
179
|
-
|
|
180
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
179
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
181
180
|
(element as any)["on" + eventName] = listener;
|
|
182
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
183
181
|
}
|
|
184
182
|
cancelSignal.register(() => {
|
|
185
183
|
if (typeof element.removeEventListener === "function") {
|
|
186
184
|
(element as IEventEmitterLike).removeEventListener(eventName, listener);
|
|
187
185
|
}
|
|
188
186
|
if (hasSetOnFn) {
|
|
189
|
-
|
|
190
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
191
188
|
delete (element as any)["on" + eventName];
|
|
192
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
193
189
|
}
|
|
194
190
|
});
|
|
195
191
|
});
|
|
@@ -47,9 +47,7 @@ export default function isCodecSupported(mimeType: string): boolean {
|
|
|
47
47
|
return false;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/* eslint-disable @typescript-eslint/unbound-method */
|
|
51
50
|
if (typeof MediaSource_.isTypeSupported === "function") {
|
|
52
|
-
/* eslint-enable @typescript-eslint/unbound-method */
|
|
53
51
|
const cachedSupport = supportMap.get(mimeType);
|
|
54
52
|
if (cachedSupport !== undefined) {
|
|
55
53
|
return cachedSupport;
|
package/src/compat/is_vtt_cue.ts
CHANGED
|
@@ -25,7 +25,6 @@ import type { ICompatVTTCue } from "./browser_compatibility_types";
|
|
|
25
25
|
export default function isVTTCue(
|
|
26
26
|
cue: ICompatVTTCue | TextTrackCue,
|
|
27
27
|
): cue is ICompatVTTCue {
|
|
28
|
-
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
29
29
|
return typeof globalScope.VTTCue === "function" && cue instanceof globalScope.VTTCue;
|
|
30
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
31
30
|
}
|
|
@@ -26,9 +26,8 @@ export interface IResolution {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
interface IResizeObserverConstructor {
|
|
29
|
-
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/prefer-function-type
|
|
30
30
|
new (callback: IResizeObserverCallback): IResizeObserver;
|
|
31
|
-
/* eslint-enable @typescript-eslint/prefer-function-type */
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
interface IResizeObserver {
|
|
@@ -20,29 +20,45 @@ import isNode from "../utils/is_node";
|
|
|
20
20
|
import isNullOrUndefined from "../utils/is_null_or_undefined";
|
|
21
21
|
import queueMicrotask from "../utils/queue_microtask";
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
interface IWebKitSourceBufferConstructor {
|
|
24
|
+
new (): IWebKitSourceBuffer;
|
|
25
|
+
prototype: IWebKitSourceBuffer;
|
|
26
|
+
}
|
|
24
27
|
|
|
25
|
-
interface IWebKitSourceBuffer
|
|
26
|
-
|
|
28
|
+
interface IWebKitSourceBuffer
|
|
29
|
+
extends EventEmitter<{
|
|
30
|
+
updatestart: Event;
|
|
31
|
+
update: Event;
|
|
32
|
+
updateend: Event;
|
|
33
|
+
error: Event | Error;
|
|
34
|
+
}> {
|
|
35
|
+
_emitUpdate?: (eventName: "error" | "update", val: unknown) => void;
|
|
36
|
+
appendBuffer?: (data: BufferSource) => void;
|
|
37
|
+
updating: boolean;
|
|
38
|
+
append(data: BufferSource): void;
|
|
27
39
|
remove(from: number, to: number): void;
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
// TODO This is the last ugly side-effect here.
|
|
31
43
|
// Either remove it or find the best way to implement that
|
|
32
44
|
export default function patchWebkitSourceBuffer(): void {
|
|
33
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
34
|
-
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
35
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
36
45
|
// old WebKit SourceBuffer implementation,
|
|
37
46
|
// where a synchronous append is used instead of appendBuffer
|
|
38
47
|
if (
|
|
39
48
|
!isNode &&
|
|
40
|
-
!isNullOrUndefined(
|
|
41
|
-
|
|
49
|
+
!isNullOrUndefined(
|
|
50
|
+
(
|
|
51
|
+
globalScope as typeof globalScope & {
|
|
52
|
+
WebKitSourceBuffer?: IWebKitSourceBufferConstructor;
|
|
53
|
+
}
|
|
54
|
+
).WebKitSourceBuffer,
|
|
55
|
+
) &&
|
|
56
|
+
(
|
|
57
|
+
globalScope as typeof globalScope & {
|
|
58
|
+
WebKitSourceBuffer: IWebKitSourceBufferConstructor;
|
|
59
|
+
}
|
|
60
|
+
).WebKitSourceBuffer.prototype.addEventListener === undefined
|
|
42
61
|
) {
|
|
43
|
-
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
44
|
-
|
|
45
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
46
62
|
const sourceBufferWebkitRef: IWebKitSourceBufferConstructor = (
|
|
47
63
|
globalScope as unknown as {
|
|
48
64
|
WebKitSourceBuffer: IWebKitSourceBufferConstructor;
|
|
@@ -52,42 +68,45 @@ export default function patchWebkitSourceBuffer(): void {
|
|
|
52
68
|
|
|
53
69
|
for (const fnName in EventEmitter.prototype) {
|
|
54
70
|
if (EventEmitter.prototype.hasOwnProperty(fnName)) {
|
|
55
|
-
|
|
56
|
-
|
|
71
|
+
(sourceBufferWebkitProto as unknown as Record<string, unknown>)[fnName] = (
|
|
72
|
+
EventEmitter.prototype as unknown as Record<string, unknown>
|
|
73
|
+
)[fnName];
|
|
57
74
|
}
|
|
58
75
|
}
|
|
59
|
-
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
60
76
|
|
|
61
|
-
|
|
77
|
+
(
|
|
78
|
+
sourceBufferWebkitProto as unknown as {
|
|
79
|
+
_listeners: Array<() => void>;
|
|
80
|
+
}
|
|
81
|
+
)._listeners = [];
|
|
62
82
|
|
|
63
|
-
sourceBufferWebkitProto._emitUpdate = function (
|
|
83
|
+
sourceBufferWebkitProto._emitUpdate = function (
|
|
84
|
+
eventName: "error" | "update",
|
|
85
|
+
val: unknown,
|
|
86
|
+
) {
|
|
64
87
|
queueMicrotask(() => {
|
|
65
|
-
|
|
66
|
-
this.trigger(eventName, val);
|
|
88
|
+
// @ts-expect-error: trigger is normally protected
|
|
89
|
+
this.trigger(eventName, val as Event);
|
|
67
90
|
this.updating = false;
|
|
68
|
-
|
|
69
|
-
|
|
91
|
+
// @ts-expect-error: trigger is normally protected
|
|
92
|
+
this.trigger("updateend", new Event("updateend"));
|
|
70
93
|
});
|
|
71
94
|
};
|
|
72
95
|
|
|
73
|
-
sourceBufferWebkitProto.appendBuffer = function (data:
|
|
74
|
-
/* eslint-disable no-invalid-this */
|
|
75
|
-
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
96
|
+
sourceBufferWebkitProto.appendBuffer = function (data: BufferSource) {
|
|
76
97
|
if (this.updating) {
|
|
77
98
|
throw new Error("updating");
|
|
78
99
|
}
|
|
79
|
-
|
|
100
|
+
// @ts-expect-error: trigger is normally protected
|
|
101
|
+
this.trigger("updatestart", new Event("updatestart"));
|
|
80
102
|
this.updating = true;
|
|
81
103
|
try {
|
|
82
104
|
this.append(data);
|
|
83
105
|
} catch (error) {
|
|
84
|
-
this._emitUpdate("error", error);
|
|
106
|
+
this._emitUpdate?.("error", error);
|
|
85
107
|
return;
|
|
86
108
|
}
|
|
87
|
-
this._emitUpdate("update");
|
|
88
|
-
/* eslint-enable no-invalid-this */
|
|
109
|
+
this._emitUpdate?.("update", new Event("update"));
|
|
89
110
|
};
|
|
90
111
|
}
|
|
91
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
92
|
-
/* eslint-enable @typescript-eslint/no-unsafe-call */
|
|
93
112
|
}
|
package/src/compat/remove_cue.ts
CHANGED
|
@@ -50,7 +50,7 @@ export default function removeCue(track: TextTrack, cue: TextTrackCue): void {
|
|
|
50
50
|
track.mode = "hidden";
|
|
51
51
|
try {
|
|
52
52
|
track.removeCue(cue);
|
|
53
|
-
} catch (
|
|
53
|
+
} catch (_err) {
|
|
54
54
|
log.warn("Compat: Could not remove cue from text track.");
|
|
55
55
|
}
|
|
56
56
|
track.mode = trackMode;
|
|
@@ -58,7 +58,7 @@ export default function removeCue(track: TextTrack, cue: TextTrackCue): void {
|
|
|
58
58
|
}
|
|
59
59
|
try {
|
|
60
60
|
track.removeCue(cue);
|
|
61
|
-
} catch (
|
|
61
|
+
} catch (_err) {
|
|
62
62
|
log.warn("Compat: Could not remove cue from text track.");
|
|
63
63
|
}
|
|
64
64
|
}
|