rx-player 4.0.0-dev.2023092900 → 4.0.0-dev.2023102700
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 +221 -12
- package/FILES.md +0 -4
- package/MAINTAINERS.md +1 -0
- package/README.md +0 -21
- package/VERSION +1 -1
- package/dist/_esm5.processed/compat/add_class_name.js +6 -3
- package/dist/_esm5.processed/compat/add_text_track.js +11 -8
- package/dist/_esm5.processed/compat/browser_compatibility_types.js +13 -9
- package/dist/_esm5.processed/compat/browser_detection.js +49 -34
- package/dist/_esm5.processed/compat/browser_version.js +11 -8
- package/dist/_esm5.processed/compat/can_patch_isobmff.js +6 -3
- package/dist/_esm5.processed/compat/can_rely_on_video_visibility_and_size.js +9 -6
- package/dist/_esm5.processed/compat/can_reuse_media_keys.js +6 -3
- package/dist/_esm5.processed/compat/change_source_buffer_type.js +6 -3
- package/dist/_esm5.processed/compat/clear_element_src.js +12 -9
- package/dist/_esm5.processed/compat/eme/close_session.js +45 -106
- package/dist/_esm5.processed/compat/eme/constants.js +6 -3
- package/dist/_esm5.processed/compat/eme/custom_key_system_access.js +18 -22
- package/dist/_esm5.processed/compat/eme/custom_media_keys/ie11_media_keys.js +78 -102
- package/dist/_esm5.processed/compat/eme/custom_media_keys/index.js +16 -6
- package/dist/_esm5.processed/compat/eme/custom_media_keys/moz_media_keys_constructor.js +18 -15
- package/dist/_esm5.processed/compat/eme/custom_media_keys/ms_media_keys_constructor.js +7 -5
- package/dist/_esm5.processed/compat/eme/custom_media_keys/old_webkit_media_keys.js +70 -88
- package/dist/_esm5.processed/compat/eme/custom_media_keys/types.js +2 -1
- package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys.js +91 -117
- package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +7 -7
- package/dist/_esm5.processed/compat/eme/eme-api-implementation.js +82 -83
- package/dist/_esm5.processed/compat/eme/generate_key_request.js +36 -31
- package/dist/_esm5.processed/compat/eme/get_init_data.js +28 -25
- package/dist/_esm5.processed/compat/eme/get_uuid_kid_from_keystatus_kid.js +8 -5
- package/dist/_esm5.processed/compat/eme/get_webkit_fairplay_initdata.js +17 -14
- package/dist/_esm5.processed/compat/eme/index.js +13 -7
- package/dist/_esm5.processed/compat/eme/load_session.js +26 -69
- package/dist/_esm5.processed/compat/enable_audio_track.js +7 -4
- package/dist/_esm5.processed/compat/event_listeners.js +130 -102
- package/dist/_esm5.processed/compat/get_start_date.js +7 -4
- package/dist/_esm5.processed/compat/global_scope.js +7 -5
- package/dist/_esm5.processed/compat/has_issues_with_high_media_source_duration.js +6 -3
- package/dist/_esm5.processed/compat/index.js +47 -24
- package/dist/_esm5.processed/compat/is_codec_supported.js +8 -5
- package/dist/_esm5.processed/compat/is_debug_mode_enabled.js +4 -1
- package/dist/_esm5.processed/compat/is_node.js +5 -3
- package/dist/_esm5.processed/compat/is_seeking_approximate.js +5 -3
- package/dist/_esm5.processed/compat/is_vtt_cue.js +6 -3
- package/dist/_esm5.processed/compat/is_worker.js +3 -1
- package/dist/_esm5.processed/compat/make_vtt_cue.js +10 -7
- package/dist/_esm5.processed/compat/on_height_width_change.js +25 -22
- package/dist/_esm5.processed/compat/patch_webkit_source_buffer.js +19 -17
- package/dist/_esm5.processed/compat/remove_cue.js +12 -9
- package/dist/_esm5.processed/compat/should_favour_custom_safari_EME.js +7 -4
- package/dist/_esm5.processed/compat/should_reload_media_source_on_decipherability_update.js +4 -1
- package/dist/_esm5.processed/compat/should_renew_media_key_system_access.js +6 -3
- package/dist/_esm5.processed/compat/should_unset_media_keys.js +6 -3
- package/dist/_esm5.processed/compat/should_validate_metadata.js +6 -3
- package/dist/_esm5.processed/compat/should_wait_for_data_before_loaded.js +6 -3
- package/dist/_esm5.processed/compat/should_wait_for_have_enough_data.js +6 -3
- package/dist/_esm5.processed/config.js +15 -14
- package/dist/_esm5.processed/core/adaptive/adaptive_representation_selector.js +123 -94
- package/dist/_esm5.processed/core/adaptive/buffer_based_chooser.js +43 -42
- package/dist/_esm5.processed/core/adaptive/guess_based_chooser.js +37 -44
- package/dist/_esm5.processed/core/adaptive/index.js +4 -2
- package/dist/_esm5.processed/core/adaptive/network_analyzer.js +75 -74
- package/dist/_esm5.processed/core/adaptive/utils/bandwidth_estimator.js +24 -23
- package/dist/_esm5.processed/core/adaptive/utils/ewma.js +13 -12
- package/dist/_esm5.processed/core/adaptive/utils/filter_by_bitrate.js +9 -6
- package/dist/_esm5.processed/core/adaptive/utils/filter_by_resolution.js +18 -19
- package/dist/_esm5.processed/core/adaptive/utils/get_buffer_levels.js +10 -7
- package/dist/_esm5.processed/core/adaptive/utils/last_estimate_storage.js +8 -7
- package/dist/_esm5.processed/core/adaptive/utils/pending_requests_store.js +26 -23
- package/dist/_esm5.processed/core/adaptive/utils/representation_score_calculator.js +25 -23
- package/dist/_esm5.processed/core/adaptive/utils/select_optimal_representation.js +6 -3
- package/dist/_esm5.processed/core/api/debug/buffer_graph.js +41 -40
- package/dist/_esm5.processed/core/api/debug/buffer_size_graph.js +31 -30
- package/dist/_esm5.processed/core/api/debug/constants.js +4 -1
- package/dist/_esm5.processed/core/api/debug/index.js +4 -2
- package/dist/_esm5.processed/core/api/debug/modules/general_info.js +64 -72
- package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_content.js +49 -46
- package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_size.js +15 -12
- package/dist/_esm5.processed/core/api/debug/render.js +16 -13
- package/dist/_esm5.processed/core/api/debug/utils.js +18 -13
- package/dist/_esm5.processed/core/api/index.js +7 -4
- package/dist/_esm5.processed/core/api/option_utils.js +85 -58
- package/dist/_esm5.processed/core/api/playback_observer.js +135 -124
- package/dist/_esm5.processed/core/api/public_api.js +610 -684
- package/dist/_esm5.processed/core/api/track_management/index.js +19 -3
- package/dist/_esm5.processed/core/api/track_management/media_element_tracks_store.js +233 -247
- package/dist/_esm5.processed/core/api/track_management/track_dispatcher.js +45 -58
- package/dist/_esm5.processed/core/api/track_management/tracks_store.js +300 -324
- package/dist/_esm5.processed/core/api/utils.js +32 -24
- package/dist/_esm5.processed/core/decrypt/__tests__/__global__/utils.js +155 -185
- package/dist/_esm5.processed/core/decrypt/attach_media_keys.js +42 -81
- package/dist/_esm5.processed/core/decrypt/clear_on_stop.js +15 -12
- package/dist/_esm5.processed/core/decrypt/content_decryptor.js +392 -510
- package/dist/_esm5.processed/core/decrypt/create_or_load_session.js +44 -90
- package/dist/_esm5.processed/core/decrypt/create_session.js +90 -149
- package/dist/_esm5.processed/core/decrypt/dispose_decryption_resources.js +24 -67
- package/dist/_esm5.processed/core/decrypt/find_key_system.js +94 -155
- package/dist/_esm5.processed/core/decrypt/get_key_system_configuration.js +6 -3
- package/dist/_esm5.processed/core/decrypt/get_media_keys.js +59 -109
- package/dist/_esm5.processed/core/decrypt/index.js +26 -7
- package/dist/_esm5.processed/core/decrypt/init_media_keys.js +17 -59
- package/dist/_esm5.processed/core/decrypt/session_events_listener.js +84 -155
- package/dist/_esm5.processed/core/decrypt/set_server_certificate.js +50 -103
- package/dist/_esm5.processed/core/decrypt/types.js +5 -2
- package/dist/_esm5.processed/core/decrypt/utils/are_init_values_compatible.js +22 -19
- package/dist/_esm5.processed/core/decrypt/utils/check_key_statuses.js +40 -61
- package/dist/_esm5.processed/core/decrypt/utils/clean_old_loaded_sessions.js +17 -61
- package/dist/_esm5.processed/core/decrypt/utils/clean_old_stored_persistent_info.js +8 -5
- package/dist/_esm5.processed/core/decrypt/utils/get_drm_system_id.js +8 -5
- package/dist/_esm5.processed/core/decrypt/utils/init_data_values_container.js +23 -23
- package/dist/_esm5.processed/core/decrypt/utils/is_session_usable.js +15 -12
- package/dist/_esm5.processed/core/decrypt/utils/key_id_comparison.js +14 -21
- package/dist/_esm5.processed/core/decrypt/utils/key_session_record.js +26 -27
- package/dist/_esm5.processed/core/decrypt/utils/loaded_sessions_store.js +206 -310
- package/dist/_esm5.processed/core/decrypt/utils/media_keys_infos_store.js +8 -6
- package/dist/_esm5.processed/core/decrypt/utils/persistent_sessions_store.js +103 -102
- package/dist/_esm5.processed/core/decrypt/utils/serializable_bytes.js +13 -12
- package/dist/_esm5.processed/core/decrypt/utils/server_certificate_store.js +18 -16
- package/dist/_esm5.processed/core/fetchers/cdn_prioritizer.js +37 -56
- package/dist/_esm5.processed/core/fetchers/index.js +7 -3
- package/dist/_esm5.processed/core/fetchers/manifest/index.js +4 -2
- package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.js +233 -313
- package/dist/_esm5.processed/core/fetchers/segment/index.js +4 -2
- package/dist/_esm5.processed/core/fetchers/segment/prioritized_segment_fetcher.js +12 -9
- package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.js +218 -234
- package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher_creator.js +20 -19
- package/dist/_esm5.processed/core/fetchers/segment/task_prioritizer.js +73 -74
- package/dist/_esm5.processed/core/fetchers/utils/error_selector.js +8 -5
- package/dist/_esm5.processed/core/fetchers/utils/schedule_request.js +210 -261
- package/dist/_esm5.processed/core/init/directfile_content_initializer.js +73 -99
- package/dist/_esm5.processed/core/init/index.js +5 -1
- package/dist/_esm5.processed/core/init/media_source_content_initializer.js +256 -320
- package/dist/_esm5.processed/core/init/types.js +7 -24
- package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.js +109 -135
- package/dist/_esm5.processed/core/init/utils/create_media_source.js +35 -30
- package/dist/_esm5.processed/core/init/utils/create_stream_playback_observer.js +12 -10
- package/dist/_esm5.processed/core/init/utils/end_of_stream.js +30 -26
- package/dist/_esm5.processed/core/init/utils/get_initial_time.js +41 -38
- package/dist/_esm5.processed/core/init/utils/get_loaded_reference.js +13 -10
- package/dist/_esm5.processed/core/init/utils/initial_seek_and_play.js +29 -26
- package/dist/_esm5.processed/core/init/utils/initialize_content_decryption.js +30 -27
- package/dist/_esm5.processed/core/init/utils/media_source_duration_updater.js +58 -60
- package/dist/_esm5.processed/core/init/utils/rebuffering_controller.js +140 -161
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/are_same_stream_events.js +3 -1
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/index.js +4 -2
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +28 -30
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/stream_events_emitter.js +71 -90
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/types.js +2 -1
- package/dist/_esm5.processed/core/init/utils/throw_on_media_error.js +16 -13
- package/dist/_esm5.processed/core/segment_buffers/garbage_collector.js +75 -126
- package/dist/_esm5.processed/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.js +130 -147
- package/dist/_esm5.processed/core/segment_buffers/implementations/audio_video/index.js +4 -2
- package/dist/_esm5.processed/core/segment_buffers/implementations/index.js +20 -3
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/html_text_segment_buffer.js +106 -125
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/index.js +4 -2
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/parsers.js +11 -8
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/text_track_cues_store.js +48 -47
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/types.js +2 -1
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/update_proportional_elements.js +18 -15
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/utils.js +22 -15
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/index.js +4 -2
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/native_text_segment_buffer.js +65 -82
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/parsers.js +11 -8
- package/dist/_esm5.processed/core/segment_buffers/implementations/types.js +19 -17
- package/dist/_esm5.processed/core/segment_buffers/implementations/utils/manual_time_ranges.js +23 -22
- package/dist/_esm5.processed/core/segment_buffers/index.js +13 -6
- package/dist/_esm5.processed/core/segment_buffers/inventory/buffered_history.js +24 -22
- package/dist/_esm5.processed/core/segment_buffers/inventory/index.js +8 -3
- package/dist/_esm5.processed/core/segment_buffers/inventory/segment_inventory.js +151 -150
- package/dist/_esm5.processed/core/segment_buffers/inventory/types.js +2 -1
- package/dist/_esm5.processed/core/segment_buffers/inventory/utils.js +9 -4
- package/dist/_esm5.processed/core/segment_buffers/segment_buffers_store.js +82 -89
- package/dist/_esm5.processed/core/stream/adaptation/adaptation_stream.js +118 -166
- package/dist/_esm5.processed/core/stream/adaptation/get_representations_switch_strategy.js +31 -28
- package/dist/_esm5.processed/core/stream/adaptation/index.js +19 -3
- package/dist/_esm5.processed/core/stream/adaptation/types.js +2 -1
- package/dist/_esm5.processed/core/stream/index.js +4 -2
- package/dist/_esm5.processed/core/stream/orchestrator/get_time_ranges_for_content.js +14 -16
- package/dist/_esm5.processed/core/stream/orchestrator/index.js +4 -2
- package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.js +175 -222
- package/dist/_esm5.processed/core/stream/period/index.js +19 -3
- package/dist/_esm5.processed/core/stream/period/period_stream.js +172 -216
- package/dist/_esm5.processed/core/stream/period/types.js +2 -1
- package/dist/_esm5.processed/core/stream/period/utils/get_adaptation_switch_strategy.js +34 -33
- package/dist/_esm5.processed/core/stream/representation/index.js +19 -3
- package/dist/_esm5.processed/core/stream/representation/representation_stream.js +80 -68
- package/dist/_esm5.processed/core/stream/representation/types.js +2 -1
- package/dist/_esm5.processed/core/stream/representation/utils/append_segment_to_buffer.js +33 -84
- package/dist/_esm5.processed/core/stream/representation/utils/check_for_discontinuity.js +32 -29
- package/dist/_esm5.processed/core/stream/representation/utils/downloading_queue.js +126 -145
- package/dist/_esm5.processed/core/stream/representation/utils/force_garbage_collection.js +32 -88
- package/dist/_esm5.processed/core/stream/representation/utils/get_buffer_status.js +61 -48
- package/dist/_esm5.processed/core/stream/representation/utils/get_needed_segments.js +71 -69
- package/dist/_esm5.processed/core/stream/representation/utils/get_segment_priority.js +8 -5
- package/dist/_esm5.processed/core/stream/representation/utils/push_init_segment.js +22 -63
- package/dist/_esm5.processed/core/stream/representation/utils/push_media_segment.js +49 -86
- package/dist/_esm5.processed/default_config.js +4 -2
- package/dist/_esm5.processed/errors/assertion_error.js +10 -26
- package/dist/_esm5.processed/errors/custom_loader_error.js +12 -28
- package/dist/_esm5.processed/errors/encrypted_media_error.js +16 -32
- package/dist/_esm5.processed/errors/error_codes.js +9 -4
- package/dist/_esm5.processed/errors/error_message.js +5 -2
- package/dist/_esm5.processed/errors/format_error.js +9 -7
- package/dist/_esm5.processed/errors/index.js +25 -11
- package/dist/_esm5.processed/errors/is_known_error.js +14 -11
- package/dist/_esm5.processed/errors/media_error.js +17 -33
- package/dist/_esm5.processed/errors/network_error.js +21 -37
- package/dist/_esm5.processed/errors/other_error.js +15 -31
- package/dist/_esm5.processed/errors/request_error.js +17 -33
- package/dist/_esm5.processed/experimental/features/dash_wasm.js +14 -11
- package/dist/_esm5.processed/experimental/features/debug_element.js +7 -4
- package/dist/_esm5.processed/experimental/features/index.d.ts +1 -0
- package/dist/_esm5.processed/experimental/features/index.js +11 -3
- package/dist/_esm5.processed/experimental/features/local.js +9 -6
- package/dist/_esm5.processed/experimental/features/metaplaylist.js +9 -6
- package/dist/_esm5.processed/experimental/index.js +5 -2
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/features/dash.js +6 -3
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/features/metaplaylist.js +6 -3
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/index.js +7 -3
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/load_and_push_segment.js +22 -16
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +22 -19
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +6 -3
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/types.js +2 -1
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +125 -186
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.js +11 -27
- package/dist/_esm5.processed/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +76 -119
- package/dist/_esm5.processed/experimental/tools/createMetaplaylist/index.js +24 -15
- package/dist/_esm5.processed/experimental/tools/index.js +11 -5
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/index.js +38 -43
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.js +31 -34
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/capabilities.js +21 -18
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/index.js +4 -2
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/log.js +5 -3
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +20 -17
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +21 -18
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +13 -10
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +16 -13
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/index.js +16 -14
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +14 -11
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.js +14 -11
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +19 -16
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +11 -8
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/types.js +5 -2
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/utils.js +25 -22
- package/dist/_esm5.processed/experimental/tools/parseBIFThumbnails.js +7 -4
- package/dist/_esm5.processed/features/add_features.js +11 -8
- package/dist/_esm5.processed/features/features_object.js +4 -2
- package/dist/_esm5.processed/features/index.js +7 -4
- package/dist/_esm5.processed/features/list/dash.js +11 -8
- package/dist/_esm5.processed/features/list/directfile.js +9 -5
- package/dist/_esm5.processed/features/list/eme.js +7 -4
- package/dist/_esm5.processed/features/list/html_sami_parser.js +9 -6
- package/dist/_esm5.processed/features/list/html_srt_parser.js +9 -6
- package/dist/_esm5.processed/features/list/html_text_buffer.js +7 -4
- package/dist/_esm5.processed/features/list/html_ttml_parser.js +9 -6
- package/dist/_esm5.processed/features/list/html_vtt_parser.js +9 -6
- package/dist/_esm5.processed/features/list/index.js +31 -14
- package/dist/_esm5.processed/features/list/native_sami_parser.js +9 -6
- package/dist/_esm5.processed/features/list/native_srt_parser.js +9 -6
- package/dist/_esm5.processed/features/list/native_text_buffer.js +7 -4
- package/dist/_esm5.processed/features/list/native_ttml_parser.js +9 -6
- package/dist/_esm5.processed/features/list/native_vtt_parser.js +9 -6
- package/dist/_esm5.processed/features/list/smooth.js +9 -6
- package/dist/_esm5.processed/features/types.js +2 -1
- package/dist/_esm5.processed/index.js +24 -9
- package/dist/_esm5.processed/log.js +5 -3
- package/dist/_esm5.processed/manifest/adaptation.js +52 -55
- package/dist/_esm5.processed/manifest/index.js +32 -13
- package/dist/_esm5.processed/manifest/manifest.js +112 -134
- package/dist/_esm5.processed/manifest/period.js +38 -42
- package/dist/_esm5.processed/manifest/representation.js +78 -61
- package/dist/_esm5.processed/manifest/representation_index/index.js +5 -2
- package/dist/_esm5.processed/manifest/representation_index/static.js +43 -42
- package/dist/_esm5.processed/manifest/representation_index/types.js +2 -1
- package/dist/_esm5.processed/manifest/types.js +5 -2
- package/dist/_esm5.processed/manifest/update_period_in_place.js +38 -48
- package/dist/_esm5.processed/manifest/update_periods.js +59 -69
- package/dist/_esm5.processed/manifest/utils.js +14 -9
- package/dist/_esm5.processed/minimal.js +9 -7
- package/dist/_esm5.processed/parsers/containers/isobmff/constants.js +4 -1
- package/dist/_esm5.processed/parsers/containers/isobmff/create_box.js +14 -10
- package/dist/_esm5.processed/parsers/containers/isobmff/drm/index.js +5 -1
- package/dist/_esm5.processed/parsers/containers/isobmff/drm/playready.js +15 -11
- package/dist/_esm5.processed/parsers/containers/isobmff/get_box.js +48 -40
- package/dist/_esm5.processed/parsers/containers/isobmff/index.js +27 -6
- package/dist/_esm5.processed/parsers/containers/isobmff/read.js +20 -14
- package/dist/_esm5.processed/parsers/containers/isobmff/take_pssh_out.js +25 -20
- package/dist/_esm5.processed/parsers/containers/isobmff/utils.js +130 -112
- package/dist/_esm5.processed/parsers/containers/matroska/index.js +6 -1
- package/dist/_esm5.processed/parsers/containers/matroska/utils.js +67 -63
- package/dist/_esm5.processed/parsers/images/bif.js +40 -29
- package/dist/_esm5.processed/parsers/manifest/dash/common/attach_trickmode_track.js +10 -12
- package/dist/_esm5.processed/parsers/manifest/dash/common/flatten_overlapping_periods.js +10 -7
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_clock_offset.js +8 -5
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_hdr_information.js +10 -6
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_http_utc-timing_url.js +7 -6
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_minimum_and_maximum_positions.js +10 -6
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_periods_time_infos.js +14 -9
- package/dist/_esm5.processed/parsers/manifest/dash/common/index.js +10 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.js +73 -67
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_init_segment.js +9 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +32 -25
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/index.js +11 -5
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.js +81 -70
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.js +130 -123
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +15 -12
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +35 -32
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.js +14 -9
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +30 -22
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/index.js +4 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +14 -11
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +131 -129
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/tokens.js +16 -10
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/utils.js +7 -3
- package/dist/_esm5.processed/parsers/manifest/dash/common/infer_adaptation_type.js +19 -18
- package/dist/_esm5.processed/parsers/manifest/dash/common/manifest_bounds_calculator.js +18 -17
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.js +111 -111
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_availability_start_time.js +4 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.js +86 -85
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.js +97 -82
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.js +39 -37
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.js +61 -69
- package/dist/_esm5.processed/parsers/manifest/dash/common/resolve_base_urls.js +12 -9
- package/dist/_esm5.processed/parsers/manifest/dash/index.js +8 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/index.js +4 -2
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.js +66 -62
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/BaseURL.js +7 -4
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/ContentComponent.js +7 -4
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/ContentProtection.js +22 -19
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/EventStream.js +22 -19
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Initialization.js +11 -8
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/MPD.js +38 -34
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Period.js +34 -30
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Representation.js +44 -40
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.js +24 -21
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentList.js +15 -12
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.js +21 -18
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentTimeline.js +6 -3
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.js +12 -9
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/utils.js +60 -64
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/parse_from_document.js +33 -27
- package/dist/_esm5.processed/parsers/manifest/dash/node_parser_types.js +2 -1
- package/dist/_esm5.processed/parsers/manifest/dash/parsers_types.js +2 -1
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/index.js +4 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +192 -238
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +67 -62
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/BaseURL.js +8 -4
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.js +11 -7
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +17 -13
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +29 -24
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +38 -33
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +37 -32
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +43 -38
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.js +9 -5
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.js +16 -12
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentList.js +11 -7
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.js +20 -16
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.js +11 -7
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/XLink.js +11 -7
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/index.js +5 -1
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/root.js +10 -6
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/parsers_stack.js +22 -20
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/types.js +2 -1
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/utils.js +6 -2
- package/dist/_esm5.processed/parsers/manifest/index.js +17 -1
- package/dist/_esm5.processed/parsers/manifest/local/index.js +4 -2
- package/dist/_esm5.processed/parsers/manifest/local/parse_local_manifest.js +30 -27
- package/dist/_esm5.processed/parsers/manifest/local/representation_index.js +71 -84
- package/dist/_esm5.processed/parsers/manifest/local/types.js +2 -1
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/index.js +4 -2
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/metaplaylist_parser.js +75 -72
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.js +52 -52
- package/dist/_esm5.processed/parsers/manifest/smooth/create_parser.js +200 -176
- package/dist/_esm5.processed/parsers/manifest/smooth/get_codecs.js +13 -8
- package/dist/_esm5.processed/parsers/manifest/smooth/index.js +7 -4
- package/dist/_esm5.processed/parsers/manifest/smooth/parse_C_nodes.js +17 -14
- package/dist/_esm5.processed/parsers/manifest/smooth/parse_protection_node.js +17 -15
- package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.js +102 -98
- package/dist/_esm5.processed/parsers/manifest/smooth/shared_smooth_segment_timeline.js +49 -48
- package/dist/_esm5.processed/parsers/manifest/smooth/utils/add_segment_infos.js +10 -7
- package/dist/_esm5.processed/parsers/manifest/smooth/utils/parseBoolean.js +4 -1
- package/dist/_esm5.processed/parsers/manifest/smooth/utils/reduceChildren.js +6 -3
- package/dist/_esm5.processed/parsers/manifest/smooth/utils/tokens.js +5 -1
- package/dist/_esm5.processed/parsers/manifest/types.js +2 -1
- package/dist/_esm5.processed/parsers/manifest/utils/check_manifest_ids.js +27 -24
- package/dist/_esm5.processed/parsers/manifest/utils/clear_timeline_from_position.js +10 -7
- package/dist/_esm5.processed/parsers/manifest/utils/get_first_time_from_adaptation.js +8 -5
- package/dist/_esm5.processed/parsers/manifest/utils/get_last_time_from_adaptation.js +8 -5
- package/dist/_esm5.processed/parsers/manifest/utils/get_maximum_positions.js +15 -12
- package/dist/_esm5.processed/parsers/manifest/utils/get_minimum_position.js +15 -12
- package/dist/_esm5.processed/parsers/manifest/utils/index_helpers.js +31 -22
- package/dist/_esm5.processed/parsers/manifest/utils/is_segment_still_available.js +9 -6
- package/dist/_esm5.processed/parsers/manifest/utils/update_segment_timeline.js +38 -45
- package/dist/_esm5.processed/parsers/texttracks/index.js +2 -1
- package/dist/_esm5.processed/parsers/texttracks/sami/html.js +45 -43
- package/dist/_esm5.processed/parsers/texttracks/sami/native.js +41 -39
- package/dist/_esm5.processed/parsers/texttracks/srt/find_end_of_cue_block.js +7 -4
- package/dist/_esm5.processed/parsers/texttracks/srt/get_cue_blocks.js +11 -8
- package/dist/_esm5.processed/parsers/texttracks/srt/html.js +32 -29
- package/dist/_esm5.processed/parsers/texttracks/srt/native.js +16 -13
- package/dist/_esm5.processed/parsers/texttracks/srt/parse_cue.js +21 -18
- package/dist/_esm5.processed/parsers/texttracks/srt/parse_timestamp.js +10 -7
- package/dist/_esm5.processed/parsers/texttracks/ttml/get_parameters.js +37 -30
- package/dist/_esm5.processed/parsers/texttracks/ttml/get_styling.js +48 -48
- package/dist/_esm5.processed/parsers/texttracks/ttml/get_time_delimiters.js +14 -11
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_default_ttml_paragraph_style.js +7 -2
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_extent.js +15 -12
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_font_size.js +15 -12
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_line_height.js +11 -8
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_origin.js +15 -12
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_padding.js +25 -22
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/create_element.js +117 -124
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/generate_css_test_outline.js +11 -8
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/index.js +4 -2
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/parse_cue.js +12 -8
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/parse_ttml_to_div.js +14 -11
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/ttml_color_to_css_color.js +10 -7
- package/dist/_esm5.processed/parsers/texttracks/ttml/native/index.js +4 -2
- package/dist/_esm5.processed/parsers/texttracks/ttml/native/parse_cue.js +38 -35
- package/dist/_esm5.processed/parsers/texttracks/ttml/native/parse_ttml_to_vtt.js +11 -8
- package/dist/_esm5.processed/parsers/texttracks/ttml/parse_ttml.js +58 -58
- package/dist/_esm5.processed/parsers/texttracks/ttml/regexps.js +27 -13
- package/dist/_esm5.processed/parsers/texttracks/ttml/resolve_styles_inheritance.js +18 -18
- package/dist/_esm5.processed/parsers/texttracks/ttml/time_parsing.js +28 -26
- package/dist/_esm5.processed/parsers/texttracks/ttml/xml_utils.js +37 -25
- package/dist/_esm5.processed/parsers/texttracks/types.js +2 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/get_cue_blocks.js +12 -9
- package/dist/_esm5.processed/parsers/texttracks/webvtt/get_style_blocks.js +14 -11
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/convert_payload_to_html.js +11 -8
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_default_style_elements.js +8 -5
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_style_attribute.js +60 -60
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_styled_element.js +30 -27
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/index.js +4 -2
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/parse_style_block.js +23 -26
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/parse_webvtt_to_div.js +20 -17
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/to_html.js +23 -18
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/index.js +4 -2
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +19 -16
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/set_settings_on_cue.js +20 -17
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/to_native_cue.js +8 -5
- package/dist/_esm5.processed/parsers/texttracks/webvtt/parse_cue_block.js +26 -18
- package/dist/_esm5.processed/parsers/texttracks/webvtt/parse_timestamp.js +10 -7
- package/dist/_esm5.processed/parsers/texttracks/webvtt/utils.js +15 -7
- package/dist/_esm5.processed/public_types.js +2 -1
- package/dist/_esm5.processed/tools/TextTrackRenderer/index.js +13 -6
- package/dist/_esm5.processed/tools/TextTrackRenderer/text_track_renderer.js +26 -24
- package/dist/_esm5.processed/tools/index.js +6 -4
- package/dist/_esm5.processed/tools/string_utils.js +10 -1
- package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.js +16 -24
- package/dist/_esm5.processed/transports/dash/construct_segment_url.js +6 -3
- package/dist/_esm5.processed/transports/dash/extract_complete_chunks.js +17 -14
- package/dist/_esm5.processed/transports/dash/get_events_out_of_emsgs.js +19 -16
- package/dist/_esm5.processed/transports/dash/index.js +4 -2
- package/dist/_esm5.processed/transports/dash/init_segment_loader.js +47 -27
- package/dist/_esm5.processed/transports/dash/low_latency_segment_loader.js +23 -16
- package/dist/_esm5.processed/transports/dash/manifest_parser.js +68 -60
- package/dist/_esm5.processed/transports/dash/pipelines.js +20 -17
- package/dist/_esm5.processed/transports/dash/segment_loader.js +49 -39
- package/dist/_esm5.processed/transports/dash/segment_parser.js +58 -39
- package/dist/_esm5.processed/transports/dash/text_loader.js +36 -30
- package/dist/_esm5.processed/transports/dash/text_parser.js +39 -29
- package/dist/_esm5.processed/transports/index.js +17 -1
- package/dist/_esm5.processed/transports/local/index.js +4 -2
- package/dist/_esm5.processed/transports/local/pipelines.js +26 -23
- package/dist/_esm5.processed/transports/local/segment_loader.js +26 -23
- package/dist/_esm5.processed/transports/local/segment_parser.js +36 -25
- package/dist/_esm5.processed/transports/local/text_parser.js +42 -27
- package/dist/_esm5.processed/transports/metaplaylist/index.js +4 -2
- package/dist/_esm5.processed/transports/metaplaylist/manifest_loader.js +11 -7
- package/dist/_esm5.processed/transports/metaplaylist/pipelines.js +91 -96
- package/dist/_esm5.processed/transports/smooth/extract_timings_infos.js +26 -20
- package/dist/_esm5.processed/transports/smooth/index.js +4 -2
- package/dist/_esm5.processed/transports/smooth/is_mp4_embedded_track.js +4 -1
- package/dist/_esm5.processed/transports/smooth/isobmff/create_audio_init_segment.js +22 -19
- package/dist/_esm5.processed/transports/smooth/isobmff/create_boxes.js +92 -67
- package/dist/_esm5.processed/transports/smooth/isobmff/create_init_segment.js +29 -26
- package/dist/_esm5.processed/transports/smooth/isobmff/create_traf_box.js +9 -6
- package/dist/_esm5.processed/transports/smooth/isobmff/create_video_init_segment.js +23 -20
- package/dist/_esm5.processed/transports/smooth/isobmff/get_aaces_header.js +10 -7
- package/dist/_esm5.processed/transports/smooth/isobmff/index.js +13 -6
- package/dist/_esm5.processed/transports/smooth/isobmff/parse_tfrf.js +19 -16
- package/dist/_esm5.processed/transports/smooth/isobmff/parse_tfxd.js +9 -6
- package/dist/_esm5.processed/transports/smooth/isobmff/patch_segment.js +41 -38
- package/dist/_esm5.processed/transports/smooth/pipelines.js +106 -96
- package/dist/_esm5.processed/transports/smooth/segment_loader.d.ts +2 -2
- package/dist/_esm5.processed/transports/smooth/segment_loader.js +149 -153
- package/dist/_esm5.processed/transports/smooth/utils.js +7 -3
- package/dist/_esm5.processed/transports/types.js +2 -1
- package/dist/_esm5.processed/transports/utils/byte_range.js +6 -4
- package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.js +23 -18
- package/dist/_esm5.processed/transports/utils/check_isobmff_integrity.js +14 -11
- package/dist/_esm5.processed/transports/utils/find_complete_box.js +11 -8
- package/dist/_esm5.processed/transports/utils/generate_manifest_loader.js +22 -14
- package/dist/_esm5.processed/transports/utils/get_isobmff_timing_infos.js +13 -10
- package/dist/_esm5.processed/transports/utils/infer_segment_container.js +4 -1
- package/dist/_esm5.processed/transports/utils/parse_text_track.js +40 -26
- package/dist/_esm5.processed/utils/are_arrays_of_numbers_equal.js +5 -2
- package/dist/_esm5.processed/utils/are_codecs_compatible.js +11 -9
- package/dist/_esm5.processed/utils/array_find.js +7 -4
- package/dist/_esm5.processed/utils/array_find_index.js +6 -3
- package/dist/_esm5.processed/utils/array_includes.js +12 -11
- package/dist/_esm5.processed/utils/assert.js +13 -9
- package/dist/_esm5.processed/utils/assert_unreachable.js +6 -3
- package/dist/_esm5.processed/utils/base64.js +23 -18
- package/dist/_esm5.processed/utils/byte_parsing.js +30 -17
- package/dist/_esm5.processed/utils/cancellable_sleep.js +8 -5
- package/dist/_esm5.processed/utils/create_cancellable_promise.js +7 -4
- package/dist/_esm5.processed/utils/deep_merge.js +10 -21
- package/dist/_esm5.processed/utils/event_emitter.js +24 -24
- package/dist/_esm5.processed/utils/flat_map.js +7 -4
- package/dist/_esm5.processed/utils/get_fuzzed_delay.js +6 -3
- package/dist/_esm5.processed/utils/hash_buffer.js +7 -4
- package/dist/_esm5.processed/utils/id_generator.js +6 -3
- package/dist/_esm5.processed/utils/initialization_segment_cache.js +11 -12
- package/dist/_esm5.processed/utils/is_non_empty_string.js +4 -1
- package/dist/_esm5.processed/utils/is_null_or_undefined.js +4 -1
- package/dist/_esm5.processed/utils/languages/ISO_639-1_to_ISO_639-3.js +4 -2
- package/dist/_esm5.processed/utils/languages/ISO_639-2_to_ISO_639-3.js +4 -2
- package/dist/_esm5.processed/utils/languages/index.js +7 -3
- package/dist/_esm5.processed/utils/languages/normalize.js +26 -20
- package/dist/_esm5.processed/utils/logger.js +24 -23
- package/dist/_esm5.processed/utils/monotonic_timestamp.js +4 -1
- package/dist/_esm5.processed/utils/noop.js +4 -1
- package/dist/_esm5.processed/utils/object_assign.js +8 -10
- package/dist/_esm5.processed/utils/object_values.js +6 -3
- package/dist/_esm5.processed/utils/ranges.js +94 -71
- package/dist/_esm5.processed/utils/reference.js +48 -52
- package/dist/_esm5.processed/utils/request/fetch.js +79 -109
- package/dist/_esm5.processed/utils/request/index.js +9 -4
- package/dist/_esm5.processed/utils/request/xhr.js +49 -37
- package/dist/_esm5.processed/utils/resolve_url.js +18 -18
- package/dist/_esm5.processed/utils/retry_promise_with_backoff.js +34 -81
- package/dist/_esm5.processed/utils/sleep.js +5 -2
- package/dist/_esm5.processed/utils/slice_uint8array.js +3 -1
- package/dist/_esm5.processed/utils/sorted_list.js +37 -40
- package/dist/_esm5.processed/utils/starts_with.js +5 -2
- package/dist/_esm5.processed/utils/string_parsing.js +84 -73
- package/dist/_esm5.processed/utils/take_first_set.js +9 -10
- package/dist/_esm5.processed/utils/task_canceller.js +51 -71
- package/dist/_esm5.processed/utils/warn_once.js +7 -4
- package/dist/_esm5.processed/utils/weak_map_memory.js +12 -11
- package/dist/_esm5.processed/utils/wrapInPromise.js +5 -2
- package/dist/mpd-parser.wasm +0 -0
- package/dist/rx-player.js +43758 -45493
- package/dist/rx-player.min.js +1 -1
- package/jest.config.js +1 -22
- package/package.json +22 -23
- package/scripts/build/constants.d.ts +1 -23
- package/scripts/build/generate_build.js +1 -1
- package/scripts/check_nodejs_import_compatibility.js +1 -1
- package/scripts/update-version +1 -4
- package/sonar-project.properties +1 -1
- package/src/compat/event_listeners.ts +8 -8
- package/src/compat/global_scope.ts +2 -0
- package/src/core/adaptive/__tests__/buffer_based_chooser.test.ts +3 -3
- package/src/core/adaptive/adaptive_representation_selector.ts +27 -9
- package/src/core/adaptive/buffer_based_chooser.ts +1 -1
- package/src/core/adaptive/network_analyzer.ts +5 -4
- package/src/core/api/public_api.ts +2 -2
- package/src/core/api/track_management/track_dispatcher.ts +2 -1
- package/src/core/decrypt/__tests__/__global__/server_certificate.test.ts +1 -1
- package/src/core/fetchers/cdn_prioritizer.ts +1 -1
- package/src/experimental/features/__tests__/index.test.ts +19 -0
- package/src/experimental/features/index.ts +1 -0
- package/src/features/list/__tests__/index.test.ts +49 -0
- package/src/index.ts +28 -3
- package/src/transports/smooth/segment_loader.ts +4 -4
- package/src/typings/globals.d.ts +0 -42
- package/src/utils/request/fetch.ts +1 -1
- package/src/utils/request/xhr.ts +1 -1
- package/tsconfig.json +1 -1
- package/tsconfig.modules.json +3 -3
- package/dist/_esm5.processed/features/initialize_features.d.ts +0 -19
- package/dist/_esm5.processed/features/initialize_features.js +0 -108
- package/src/features/__tests__/initialize_features.test.ts +0 -657
- package/src/features/initialize_features.ts +0 -129
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Copyright 2015 CANAL+ Group
|
|
3
4
|
*
|
|
@@ -13,29 +14,15 @@
|
|
|
13
14
|
* See the License for the specific language governing permissions and
|
|
14
15
|
* limitations under the License.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
-
var extendStatics = function (d, b) {
|
|
18
|
-
extendStatics = Object.setPrototypeOf ||
|
|
19
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
20
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
21
|
-
return extendStatics(d, b);
|
|
22
|
-
};
|
|
23
|
-
return function (d, b) {
|
|
24
|
-
if (typeof b !== "function" && b !== null)
|
|
25
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
26
|
-
extendStatics(d, b);
|
|
27
|
-
function __() { this.constructor = d; }
|
|
28
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
29
|
-
};
|
|
30
|
-
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
18
|
/**
|
|
32
19
|
* /!\ This file is feature-switchable.
|
|
33
20
|
* It always should be imported through the `features` object.
|
|
34
21
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
const compat_1 = require("../../../compat");
|
|
23
|
+
const event_emitter_1 = require("../../../utils/event_emitter");
|
|
24
|
+
const is_null_or_undefined_1 = require("../../../utils/is_null_or_undefined");
|
|
25
|
+
const languages_1 = require("../../../utils/languages");
|
|
39
26
|
/**
|
|
40
27
|
* Check if track array is different from an other one
|
|
41
28
|
* @param {Array.<Object>} oldTrackArray
|
|
@@ -47,7 +34,7 @@ function areTrackArraysDifferent(oldTrackArray, newTrackArray) {
|
|
|
47
34
|
if (newTrackArray.length !== oldTrackArray.length) {
|
|
48
35
|
return true;
|
|
49
36
|
}
|
|
50
|
-
for (
|
|
37
|
+
for (let i = 0; i < newTrackArray.length; i++) {
|
|
51
38
|
if (newTrackArray[i].nativeTrack !== ((_a = oldTrackArray[i]) === null || _a === void 0 ? void 0 : _a.nativeTrack)) {
|
|
52
39
|
return true;
|
|
53
40
|
}
|
|
@@ -61,25 +48,28 @@ function areTrackArraysDifferent(oldTrackArray, newTrackArray) {
|
|
|
61
48
|
*/
|
|
62
49
|
function createAudioTracks(audioTracks) {
|
|
63
50
|
var _a;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
for (
|
|
67
|
-
|
|
68
|
-
|
|
51
|
+
const newAudioTracks = [];
|
|
52
|
+
const languagesOccurences = {};
|
|
53
|
+
for (let i = 0; i < audioTracks.length; i++) {
|
|
54
|
+
const audioTrack = audioTracks[i];
|
|
55
|
+
const language = audioTrack.language === "" ? "nolang" :
|
|
69
56
|
audioTrack.language;
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
const occurences = (_a = languagesOccurences[language]) !== null && _a !== void 0 ? _a : 1;
|
|
58
|
+
const id = "gen_audio_" +
|
|
72
59
|
language +
|
|
73
60
|
"_" +
|
|
74
61
|
occurences.toString();
|
|
75
62
|
languagesOccurences[language] = occurences + 1;
|
|
76
|
-
|
|
63
|
+
const track = { language: audioTrack.language,
|
|
64
|
+
id,
|
|
65
|
+
normalized: (0, languages_1.default)(audioTrack.language),
|
|
77
66
|
audioDescription: audioTrack.kind === "descriptions" ||
|
|
78
67
|
// Safari seem to prefer the non-standard singular
|
|
79
68
|
// version, funnily enough
|
|
80
69
|
audioTrack.kind === "description",
|
|
81
70
|
representations: [] };
|
|
82
|
-
newAudioTracks.push({ track
|
|
71
|
+
newAudioTracks.push({ track,
|
|
72
|
+
nativeTrack: audioTrack });
|
|
83
73
|
}
|
|
84
74
|
return newAudioTracks;
|
|
85
75
|
}
|
|
@@ -90,14 +80,14 @@ function createAudioTracks(audioTracks) {
|
|
|
90
80
|
*/
|
|
91
81
|
function createTextTracks(textTracks) {
|
|
92
82
|
var _a;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
for (
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
const newTextTracks = [];
|
|
84
|
+
const languagesOccurences = {};
|
|
85
|
+
for (let i = 0; i < textTracks.length; i++) {
|
|
86
|
+
const textTrack = textTracks[i];
|
|
87
|
+
const language = textTrack.language === "" ? "nolang" :
|
|
98
88
|
textTrack.language;
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
const occurences = (_a = languagesOccurences[language]) !== null && _a !== void 0 ? _a : 1;
|
|
90
|
+
const id = "gen_text_" +
|
|
101
91
|
language +
|
|
102
92
|
"_" +
|
|
103
93
|
occurences.toString();
|
|
@@ -106,12 +96,17 @@ function createTextTracks(textTracks) {
|
|
|
106
96
|
// subtitles track by setting the `kind` attribute to `"forced"`.
|
|
107
97
|
// As of now (2023-04-04), this is not standard.
|
|
108
98
|
// @see https://github.com/whatwg/html/issues/4472
|
|
109
|
-
|
|
99
|
+
const forced = textTrack.kind === "forced" ?
|
|
110
100
|
true :
|
|
111
101
|
undefined;
|
|
112
|
-
|
|
102
|
+
const track = { language: textTrack.language,
|
|
103
|
+
forced,
|
|
104
|
+
label: textTrack.label,
|
|
105
|
+
id,
|
|
106
|
+
normalized: (0, languages_1.default)(textTrack.language),
|
|
113
107
|
closedCaption: textTrack.kind === "captions" };
|
|
114
|
-
newTextTracks.push({ track
|
|
108
|
+
newTextTracks.push({ track,
|
|
109
|
+
nativeTrack: textTrack });
|
|
115
110
|
}
|
|
116
111
|
return newTextTracks;
|
|
117
112
|
}
|
|
@@ -122,19 +117,20 @@ function createTextTracks(textTracks) {
|
|
|
122
117
|
*/
|
|
123
118
|
function createVideoTracks(videoTracks) {
|
|
124
119
|
var _a;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
for (
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
const newVideoTracks = [];
|
|
121
|
+
const languagesOccurences = {};
|
|
122
|
+
for (let i = 0; i < videoTracks.length; i++) {
|
|
123
|
+
const videoTrack = videoTracks[i];
|
|
124
|
+
const language = videoTrack.language === "" ? "nolang" :
|
|
130
125
|
videoTrack.language;
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
const occurences = (_a = languagesOccurences[language]) !== null && _a !== void 0 ? _a : 1;
|
|
127
|
+
const id = "gen_video_" +
|
|
133
128
|
language +
|
|
134
129
|
"_" +
|
|
135
130
|
occurences.toString();
|
|
136
131
|
languagesOccurences[language] = occurences + 1;
|
|
137
|
-
newVideoTracks.push({ track: { id
|
|
132
|
+
newVideoTracks.push({ track: { id,
|
|
133
|
+
representations: [] },
|
|
138
134
|
nativeTrack: videoTrack });
|
|
139
135
|
}
|
|
140
136
|
return newVideoTracks;
|
|
@@ -143,31 +139,29 @@ function createVideoTracks(videoTracks) {
|
|
|
143
139
|
* Manage video, audio and text tracks for current direct file content.
|
|
144
140
|
* @class MediaElementTracksStore
|
|
145
141
|
*/
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
function MediaElementTracksStore(mediaElement) {
|
|
142
|
+
class MediaElementTracksStore extends event_emitter_1.default {
|
|
143
|
+
constructor(mediaElement) {
|
|
149
144
|
var _a, _b, _c;
|
|
150
|
-
|
|
145
|
+
super();
|
|
151
146
|
// TODO In practice, the audio/video/text tracks API are not always implemented on
|
|
152
147
|
// the media element, although Typescript HTMLMediaElement types tend to mean
|
|
153
148
|
// that can't be undefined.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
149
|
+
this._nativeAudioTracks = mediaElement.audioTracks;
|
|
150
|
+
this._nativeVideoTracks = mediaElement.videoTracks;
|
|
151
|
+
this._nativeTextTracks = mediaElement.textTracks;
|
|
152
|
+
this._audioTracks =
|
|
153
|
+
this._nativeAudioTracks !== undefined ? createAudioTracks(this._nativeAudioTracks) :
|
|
159
154
|
[];
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
this._videoTracks =
|
|
156
|
+
this._nativeVideoTracks !== undefined ? createVideoTracks(this._nativeVideoTracks) :
|
|
162
157
|
[];
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
this._textTracks =
|
|
159
|
+
this._nativeTextTracks !== undefined ? createTextTracks(this._nativeTextTracks) :
|
|
165
160
|
[];
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return _this;
|
|
161
|
+
this._lastEmittedNativeAudioTrack = (_a = this._getCurrentAudioTrack()) === null || _a === void 0 ? void 0 : _a.nativeTrack;
|
|
162
|
+
this._lastEmittedNativeVideoTrack = (_b = this._getCurrentVideoTrack()) === null || _b === void 0 ? void 0 : _b.nativeTrack;
|
|
163
|
+
this._lastEmittedNativeTextTrack = (_c = this._getCurrentTextTrack()) === null || _c === void 0 ? void 0 : _c.nativeTrack;
|
|
164
|
+
this._handleNativeTracksCallbacks();
|
|
171
165
|
}
|
|
172
166
|
/**
|
|
173
167
|
* Update the currently active audio track by setting the wanted audio track's
|
|
@@ -175,9 +169,9 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
175
169
|
* Throws if the wanted audio track is not found.
|
|
176
170
|
* @param {string|number|undefined} id
|
|
177
171
|
*/
|
|
178
|
-
|
|
179
|
-
for (
|
|
180
|
-
|
|
172
|
+
setAudioTrackById(id) {
|
|
173
|
+
for (let i = 0; i < this._audioTracks.length; i++) {
|
|
174
|
+
const { track, nativeTrack } = this._audioTracks[i];
|
|
181
175
|
if (track.id === id) {
|
|
182
176
|
this._enableAudioTrackFromIndex(i);
|
|
183
177
|
this._audioTrackLockedOn = nativeTrack;
|
|
@@ -185,24 +179,24 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
185
179
|
}
|
|
186
180
|
}
|
|
187
181
|
throw new Error("Audio track not found.");
|
|
188
|
-
}
|
|
182
|
+
}
|
|
189
183
|
/**
|
|
190
184
|
* Disable the currently-active text track, if one.
|
|
191
185
|
*/
|
|
192
|
-
|
|
186
|
+
disableTextTrack() {
|
|
193
187
|
disableTextTracks(this._textTracks);
|
|
194
188
|
this._textTrackLockedOn = null;
|
|
195
|
-
}
|
|
189
|
+
}
|
|
196
190
|
/**
|
|
197
191
|
* Update the currently active text track by setting the wanted text track's
|
|
198
192
|
* ID property.
|
|
199
193
|
* Throws if the wanted text track is not found.
|
|
200
194
|
* @param {string|number|undefined} id
|
|
201
195
|
*/
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
for (
|
|
205
|
-
|
|
196
|
+
setTextTrackById(id) {
|
|
197
|
+
let hasSetTrack = false;
|
|
198
|
+
for (let i = 0; i < this._textTracks.length; i++) {
|
|
199
|
+
const { track, nativeTrack } = this._textTracks[i];
|
|
206
200
|
if (track.id === id) {
|
|
207
201
|
nativeTrack.mode = "showing";
|
|
208
202
|
hasSetTrack = true;
|
|
@@ -215,23 +209,23 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
215
209
|
if (!hasSetTrack) {
|
|
216
210
|
throw new Error("Text track not found.");
|
|
217
211
|
}
|
|
218
|
-
}
|
|
212
|
+
}
|
|
219
213
|
/**
|
|
220
214
|
* Disable the currently-active video track, if one.
|
|
221
215
|
*/
|
|
222
|
-
|
|
216
|
+
disableVideoTrack() {
|
|
223
217
|
disableVideoTracks(this._videoTracks);
|
|
224
218
|
this._videoTrackLockedOn = null;
|
|
225
|
-
}
|
|
219
|
+
}
|
|
226
220
|
/**
|
|
227
221
|
* Update the currently active video track by setting the wanted video track's
|
|
228
222
|
* ID property.
|
|
229
223
|
* Throws if the wanted video track is not found.
|
|
230
224
|
* @param {string|number|undefined} id
|
|
231
225
|
*/
|
|
232
|
-
|
|
233
|
-
for (
|
|
234
|
-
|
|
226
|
+
setVideoTrackById(id) {
|
|
227
|
+
for (let i = 0; i < this._videoTracks.length; i++) {
|
|
228
|
+
const { track, nativeTrack } = this._videoTracks[i];
|
|
235
229
|
if (track.id === id) {
|
|
236
230
|
nativeTrack.selected = true;
|
|
237
231
|
this._videoTrackLockedOn = nativeTrack;
|
|
@@ -239,50 +233,49 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
239
233
|
}
|
|
240
234
|
}
|
|
241
235
|
throw new Error("Video track not found.");
|
|
242
|
-
}
|
|
236
|
+
}
|
|
243
237
|
/**
|
|
244
238
|
* Returns the currently active audio track.
|
|
245
239
|
* Returns `null` if no audio track is active.
|
|
246
240
|
* Returns `undefined` if we cannot know which audio track is active.
|
|
247
241
|
* @returns {Object|null|undefined}
|
|
248
242
|
*/
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
return
|
|
243
|
+
getChosenAudioTrack() {
|
|
244
|
+
const currentAudioTrack = this._getCurrentAudioTrack();
|
|
245
|
+
return (0, is_null_or_undefined_1.default)(currentAudioTrack) ?
|
|
252
246
|
currentAudioTrack :
|
|
253
247
|
currentAudioTrack.track;
|
|
254
|
-
}
|
|
248
|
+
}
|
|
255
249
|
/**
|
|
256
250
|
* Returns the currently active text track.
|
|
257
251
|
* Returns `null` if no text track is active.
|
|
258
252
|
* Returns `undefined` if we cannot know which text track is active.
|
|
259
253
|
* @returns {Object|null|undefined}
|
|
260
254
|
*/
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
return
|
|
255
|
+
getChosenTextTrack() {
|
|
256
|
+
const currentTextTrack = this._getCurrentTextTrack();
|
|
257
|
+
return (0, is_null_or_undefined_1.default)(currentTextTrack) ?
|
|
264
258
|
currentTextTrack :
|
|
265
259
|
currentTextTrack.track;
|
|
266
|
-
}
|
|
260
|
+
}
|
|
267
261
|
/**
|
|
268
262
|
* Returns the currently active video track.
|
|
269
263
|
* Returns `null` if no video track is active.
|
|
270
264
|
* Returns `undefined` if we cannot know which video track is active.
|
|
271
265
|
* @returns {Object|null|undefined}
|
|
272
266
|
*/
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
return
|
|
267
|
+
getChosenVideoTrack() {
|
|
268
|
+
const currentVideoTrack = this._getCurrentVideoTrack();
|
|
269
|
+
return (0, is_null_or_undefined_1.default)(currentVideoTrack) ?
|
|
276
270
|
currentVideoTrack :
|
|
277
271
|
currentVideoTrack.track;
|
|
278
|
-
}
|
|
272
|
+
}
|
|
279
273
|
/**
|
|
280
274
|
* Returns a description of every available audio tracks.
|
|
281
275
|
* @returns {Array.<Object>}
|
|
282
276
|
*/
|
|
283
|
-
|
|
284
|
-
return this._audioTracks.map(
|
|
285
|
-
var track = _a.track, nativeTrack = _a.nativeTrack;
|
|
277
|
+
getAvailableAudioTracks() {
|
|
278
|
+
return this._audioTracks.map(({ track, nativeTrack }) => {
|
|
286
279
|
return { id: track.id,
|
|
287
280
|
language: track.language,
|
|
288
281
|
normalized: track.normalized,
|
|
@@ -290,14 +283,13 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
290
283
|
active: nativeTrack.enabled,
|
|
291
284
|
representations: track.representations };
|
|
292
285
|
});
|
|
293
|
-
}
|
|
286
|
+
}
|
|
294
287
|
/**
|
|
295
288
|
* Returns a description of every available text tracks.
|
|
296
289
|
* @returns {Array.<Object>}
|
|
297
290
|
*/
|
|
298
|
-
|
|
299
|
-
return this._textTracks.map(
|
|
300
|
-
var track = _a.track, nativeTrack = _a.nativeTrack;
|
|
291
|
+
getAvailableTextTracks() {
|
|
292
|
+
return this._textTracks.map(({ track, nativeTrack }) => {
|
|
301
293
|
return { id: track.id,
|
|
302
294
|
label: track.label,
|
|
303
295
|
forced: track.forced,
|
|
@@ -306,23 +298,22 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
306
298
|
closedCaption: track.closedCaption,
|
|
307
299
|
active: nativeTrack.mode === "showing" };
|
|
308
300
|
});
|
|
309
|
-
}
|
|
301
|
+
}
|
|
310
302
|
/**
|
|
311
303
|
* Returns a description of every available video tracks.
|
|
312
304
|
* @returns {Array.<Object>}
|
|
313
305
|
*/
|
|
314
|
-
|
|
315
|
-
return this._videoTracks.map(
|
|
316
|
-
var track = _a.track, nativeTrack = _a.nativeTrack;
|
|
306
|
+
getAvailableVideoTracks() {
|
|
307
|
+
return this._videoTracks.map(({ track, nativeTrack }) => {
|
|
317
308
|
return { id: track.id,
|
|
318
309
|
representations: track.representations,
|
|
319
310
|
active: nativeTrack.selected };
|
|
320
311
|
});
|
|
321
|
-
}
|
|
312
|
+
}
|
|
322
313
|
/**
|
|
323
314
|
* Free the resources used by the MediaElementTracksStore.
|
|
324
315
|
*/
|
|
325
|
-
|
|
316
|
+
dispose() {
|
|
326
317
|
if (this._nativeVideoTracks !== undefined) {
|
|
327
318
|
this._nativeVideoTracks.onchange = null;
|
|
328
319
|
this._nativeVideoTracks.onaddtrack = null;
|
|
@@ -339,92 +330,92 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
339
330
|
this._nativeTextTracks.onremovetrack = null;
|
|
340
331
|
}
|
|
341
332
|
this.removeEventListener();
|
|
342
|
-
}
|
|
333
|
+
}
|
|
343
334
|
/**
|
|
344
335
|
* Get information about the currently chosen audio track.
|
|
345
336
|
* `undefined` if we cannot know it.
|
|
346
337
|
* `null` if no audio track is chosen.
|
|
347
338
|
* @returns {Object|undefined|null}
|
|
348
339
|
*/
|
|
349
|
-
|
|
340
|
+
_getCurrentAudioTrack() {
|
|
350
341
|
if (this._nativeAudioTracks === undefined) {
|
|
351
342
|
return undefined;
|
|
352
343
|
}
|
|
353
|
-
for (
|
|
354
|
-
|
|
344
|
+
for (let i = 0; i < this._audioTracks.length; i++) {
|
|
345
|
+
const audioTrack = this._audioTracks[i];
|
|
355
346
|
if (audioTrack.nativeTrack.enabled) {
|
|
356
347
|
return audioTrack;
|
|
357
348
|
}
|
|
358
349
|
}
|
|
359
350
|
return null;
|
|
360
|
-
}
|
|
351
|
+
}
|
|
361
352
|
/**
|
|
362
353
|
* Get information about the currently chosen video track.
|
|
363
354
|
* `undefined` if we cannot know it.
|
|
364
355
|
* `null` if no video track is chosen.
|
|
365
356
|
* @returns {Object|undefined|null}
|
|
366
357
|
*/
|
|
367
|
-
|
|
358
|
+
_getCurrentVideoTrack() {
|
|
368
359
|
if (this._nativeVideoTracks === undefined) {
|
|
369
360
|
return undefined;
|
|
370
361
|
}
|
|
371
|
-
for (
|
|
372
|
-
|
|
362
|
+
for (let i = 0; i < this._videoTracks.length; i++) {
|
|
363
|
+
const videoTrack = this._videoTracks[i];
|
|
373
364
|
if (videoTrack.nativeTrack.selected) {
|
|
374
365
|
return videoTrack;
|
|
375
366
|
}
|
|
376
367
|
}
|
|
377
368
|
return null;
|
|
378
|
-
}
|
|
369
|
+
}
|
|
379
370
|
/**
|
|
380
371
|
* Get information about the currently chosen text track.
|
|
381
372
|
* `undefined` if we cannot know it.
|
|
382
373
|
* `null` if no text track is chosen.
|
|
383
374
|
* @returns {Object|undefined|null}
|
|
384
375
|
*/
|
|
385
|
-
|
|
376
|
+
_getCurrentTextTrack() {
|
|
386
377
|
if (this._nativeTextTracks === undefined) {
|
|
387
378
|
return undefined;
|
|
388
379
|
}
|
|
389
|
-
for (
|
|
390
|
-
|
|
380
|
+
for (let i = 0; i < this._textTracks.length; i++) {
|
|
381
|
+
const textTrack = this._textTracks[i];
|
|
391
382
|
if (textTrack.nativeTrack.mode === "showing") {
|
|
392
383
|
return textTrack;
|
|
393
384
|
}
|
|
394
385
|
}
|
|
395
386
|
return null;
|
|
396
|
-
}
|
|
387
|
+
}
|
|
397
388
|
/**
|
|
398
389
|
* Iterate over every available audio tracks on the media element and either:
|
|
399
390
|
* - if the last manually set audio track is found, set that one.
|
|
400
391
|
* - if we still do not find an optimal track, let the one chosen by default
|
|
401
392
|
*/
|
|
402
|
-
|
|
393
|
+
_setPreviouslyLockedAudioTrack() {
|
|
403
394
|
if (this._audioTrackLockedOn === undefined) {
|
|
404
395
|
return;
|
|
405
396
|
}
|
|
406
397
|
else if (this._audioTrackLockedOn === null) {
|
|
407
|
-
for (
|
|
408
|
-
|
|
398
|
+
for (let i = 0; i < this._audioTracks.length; i++) {
|
|
399
|
+
const { nativeTrack } = this._audioTracks[i];
|
|
409
400
|
nativeTrack.enabled = false;
|
|
410
401
|
}
|
|
411
402
|
}
|
|
412
403
|
else {
|
|
413
|
-
for (
|
|
414
|
-
|
|
404
|
+
for (let i = 0; i < this._audioTracks.length; i++) {
|
|
405
|
+
const { nativeTrack } = this._audioTracks[i];
|
|
415
406
|
if (nativeTrack === this._audioTrackLockedOn) {
|
|
416
407
|
this._enableAudioTrackFromIndex(i);
|
|
417
408
|
return;
|
|
418
409
|
}
|
|
419
410
|
}
|
|
420
411
|
}
|
|
421
|
-
}
|
|
412
|
+
}
|
|
422
413
|
/**
|
|
423
414
|
* Iterate over every available text tracks on the media element and either:
|
|
424
415
|
* - if the last manually set text track is found, set that one.
|
|
425
416
|
* - if we still do not find an optimal track, just disable it.
|
|
426
417
|
*/
|
|
427
|
-
|
|
418
|
+
_setPreviouslyLockedTextTrack() {
|
|
428
419
|
if (this._textTrackLockedOn === undefined) {
|
|
429
420
|
return;
|
|
430
421
|
}
|
|
@@ -433,8 +424,8 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
433
424
|
return;
|
|
434
425
|
}
|
|
435
426
|
else {
|
|
436
|
-
for (
|
|
437
|
-
|
|
427
|
+
for (let i = 0; i < this._textTracks.length; i++) {
|
|
428
|
+
const { nativeTrack } = this._textTracks[i];
|
|
438
429
|
if (nativeTrack === this._textTrackLockedOn) {
|
|
439
430
|
// disable the rest
|
|
440
431
|
disableAllTextTracksBut(this._textTracks, nativeTrack);
|
|
@@ -445,13 +436,13 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
445
436
|
}
|
|
446
437
|
}
|
|
447
438
|
}
|
|
448
|
-
}
|
|
439
|
+
}
|
|
449
440
|
/**
|
|
450
441
|
* Iterate over every available video tracks on the media element and either:
|
|
451
442
|
* - if the last manually set video track is found, set that one.
|
|
452
443
|
* - if we still do not find an optimal track, let the one chosen by default
|
|
453
444
|
*/
|
|
454
|
-
|
|
445
|
+
_setPreviouslyLockedVideoTrack() {
|
|
455
446
|
if (this._videoTrackLockedOn === undefined) {
|
|
456
447
|
return;
|
|
457
448
|
}
|
|
@@ -460,201 +451,196 @@ var MediaElementTracksStore = /** @class */ (function (_super) {
|
|
|
460
451
|
return;
|
|
461
452
|
}
|
|
462
453
|
else {
|
|
463
|
-
for (
|
|
464
|
-
|
|
454
|
+
for (let i = 0; i < this._videoTracks.length; i++) {
|
|
455
|
+
const { nativeTrack } = this._videoTracks[i];
|
|
465
456
|
if (nativeTrack === this._videoTrackLockedOn) {
|
|
466
457
|
nativeTrack.selected = true;
|
|
467
458
|
return;
|
|
468
459
|
}
|
|
469
460
|
}
|
|
470
461
|
}
|
|
471
|
-
}
|
|
462
|
+
}
|
|
472
463
|
/**
|
|
473
464
|
* Monitor native tracks add, remove and change callback and trigger the
|
|
474
465
|
* change events.
|
|
475
466
|
*/
|
|
476
|
-
|
|
477
|
-
var _this = this;
|
|
467
|
+
_handleNativeTracksCallbacks() {
|
|
478
468
|
if (this._nativeAudioTracks !== undefined) {
|
|
479
|
-
this._nativeAudioTracks.onaddtrack =
|
|
469
|
+
this._nativeAudioTracks.onaddtrack = () => {
|
|
480
470
|
var _a, _b;
|
|
481
|
-
if (
|
|
482
|
-
|
|
483
|
-
if (areTrackArraysDifferent(
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
if ((chosenAudioTrack === null || chosenAudioTrack === void 0 ? void 0 : chosenAudioTrack.nativeTrack) !==
|
|
489
|
-
|
|
490
|
-
|
|
471
|
+
if (this._nativeAudioTracks !== undefined) {
|
|
472
|
+
const newAudioTracks = createAudioTracks(this._nativeAudioTracks);
|
|
473
|
+
if (areTrackArraysDifferent(this._audioTracks, newAudioTracks)) {
|
|
474
|
+
this._audioTracks = newAudioTracks;
|
|
475
|
+
this._setPreviouslyLockedAudioTrack();
|
|
476
|
+
this.trigger("availableAudioTracksChange", this.getAvailableAudioTracks());
|
|
477
|
+
const chosenAudioTrack = this._getCurrentAudioTrack();
|
|
478
|
+
if ((chosenAudioTrack === null || chosenAudioTrack === void 0 ? void 0 : chosenAudioTrack.nativeTrack) !== this._lastEmittedNativeAudioTrack) {
|
|
479
|
+
this.trigger("audioTrackChange", (_a = chosenAudioTrack === null || chosenAudioTrack === void 0 ? void 0 : chosenAudioTrack.track) !== null && _a !== void 0 ? _a : null);
|
|
480
|
+
this._lastEmittedNativeAudioTrack = (_b = chosenAudioTrack === null || chosenAudioTrack === void 0 ? void 0 : chosenAudioTrack.nativeTrack) !== null && _b !== void 0 ? _b : null;
|
|
491
481
|
}
|
|
492
482
|
}
|
|
493
483
|
}
|
|
494
484
|
};
|
|
495
|
-
this._nativeAudioTracks.onremovetrack =
|
|
485
|
+
this._nativeAudioTracks.onremovetrack = () => {
|
|
496
486
|
var _a, _b;
|
|
497
|
-
if (
|
|
498
|
-
|
|
499
|
-
if (areTrackArraysDifferent(
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
if ((chosenAudioTrack === null || chosenAudioTrack === void 0 ? void 0 : chosenAudioTrack.nativeTrack) !==
|
|
504
|
-
|
|
505
|
-
|
|
487
|
+
if (this._nativeAudioTracks !== undefined) {
|
|
488
|
+
const newAudioTracks = createAudioTracks(this._nativeAudioTracks);
|
|
489
|
+
if (areTrackArraysDifferent(this._audioTracks, newAudioTracks)) {
|
|
490
|
+
this._audioTracks = newAudioTracks;
|
|
491
|
+
this.trigger("availableAudioTracksChange", this.getAvailableAudioTracks());
|
|
492
|
+
const chosenAudioTrack = this._getCurrentAudioTrack();
|
|
493
|
+
if ((chosenAudioTrack === null || chosenAudioTrack === void 0 ? void 0 : chosenAudioTrack.nativeTrack) !== this._lastEmittedNativeAudioTrack) {
|
|
494
|
+
this.trigger("audioTrackChange", (_a = chosenAudioTrack === null || chosenAudioTrack === void 0 ? void 0 : chosenAudioTrack.track) !== null && _a !== void 0 ? _a : null);
|
|
495
|
+
this._lastEmittedNativeAudioTrack = (_b = chosenAudioTrack === null || chosenAudioTrack === void 0 ? void 0 : chosenAudioTrack.nativeTrack) !== null && _b !== void 0 ? _b : null;
|
|
506
496
|
}
|
|
507
497
|
}
|
|
508
498
|
}
|
|
509
499
|
};
|
|
510
|
-
this._nativeAudioTracks.onchange =
|
|
511
|
-
if (
|
|
512
|
-
for (
|
|
513
|
-
|
|
500
|
+
this._nativeAudioTracks.onchange = () => {
|
|
501
|
+
if (this._audioTracks !== undefined) {
|
|
502
|
+
for (let i = 0; i < this._audioTracks.length; i++) {
|
|
503
|
+
const { track, nativeTrack } = this._audioTracks[i];
|
|
514
504
|
if (nativeTrack.enabled) {
|
|
515
|
-
if (nativeTrack !==
|
|
516
|
-
|
|
517
|
-
|
|
505
|
+
if (nativeTrack !== this._lastEmittedNativeAudioTrack) {
|
|
506
|
+
this.trigger("audioTrackChange", track);
|
|
507
|
+
this._lastEmittedNativeAudioTrack = nativeTrack;
|
|
518
508
|
}
|
|
519
509
|
return;
|
|
520
510
|
}
|
|
521
511
|
}
|
|
522
512
|
}
|
|
523
|
-
if (
|
|
524
|
-
|
|
525
|
-
|
|
513
|
+
if (this._lastEmittedNativeAudioTrack !== null) {
|
|
514
|
+
this.trigger("audioTrackChange", null);
|
|
515
|
+
this._lastEmittedNativeAudioTrack = null;
|
|
526
516
|
}
|
|
527
517
|
return;
|
|
528
518
|
};
|
|
529
519
|
}
|
|
530
520
|
if (this._nativeTextTracks !== undefined) {
|
|
531
|
-
this._nativeTextTracks.onaddtrack =
|
|
521
|
+
this._nativeTextTracks.onaddtrack = () => {
|
|
532
522
|
var _a, _b;
|
|
533
|
-
if (
|
|
534
|
-
|
|
535
|
-
if (areTrackArraysDifferent(
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
if ((chosenTextTrack === null || chosenTextTrack === void 0 ? void 0 : chosenTextTrack.nativeTrack) !==
|
|
541
|
-
|
|
542
|
-
|
|
523
|
+
if (this._nativeTextTracks !== undefined) {
|
|
524
|
+
const newTextTracks = createTextTracks(this._nativeTextTracks);
|
|
525
|
+
if (areTrackArraysDifferent(this._textTracks, newTextTracks)) {
|
|
526
|
+
this._textTracks = newTextTracks;
|
|
527
|
+
this._setPreviouslyLockedTextTrack();
|
|
528
|
+
this.trigger("availableTextTracksChange", this.getAvailableTextTracks());
|
|
529
|
+
const chosenTextTrack = this._getCurrentTextTrack();
|
|
530
|
+
if ((chosenTextTrack === null || chosenTextTrack === void 0 ? void 0 : chosenTextTrack.nativeTrack) !== this._lastEmittedNativeTextTrack) {
|
|
531
|
+
this.trigger("textTrackChange", (_a = chosenTextTrack === null || chosenTextTrack === void 0 ? void 0 : chosenTextTrack.track) !== null && _a !== void 0 ? _a : null);
|
|
532
|
+
this._lastEmittedNativeTextTrack = (_b = chosenTextTrack === null || chosenTextTrack === void 0 ? void 0 : chosenTextTrack.nativeTrack) !== null && _b !== void 0 ? _b : null;
|
|
543
533
|
}
|
|
544
534
|
}
|
|
545
535
|
}
|
|
546
536
|
};
|
|
547
|
-
this._nativeTextTracks.onremovetrack =
|
|
537
|
+
this._nativeTextTracks.onremovetrack = () => {
|
|
548
538
|
var _a, _b;
|
|
549
|
-
if (
|
|
550
|
-
|
|
551
|
-
if (areTrackArraysDifferent(
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
if ((chosenTextTrack === null || chosenTextTrack === void 0 ? void 0 : chosenTextTrack.nativeTrack) !==
|
|
557
|
-
|
|
558
|
-
|
|
539
|
+
if (this._nativeTextTracks !== undefined) {
|
|
540
|
+
const newTextTracks = createTextTracks(this._nativeTextTracks);
|
|
541
|
+
if (areTrackArraysDifferent(this._textTracks, newTextTracks)) {
|
|
542
|
+
this._textTracks = newTextTracks;
|
|
543
|
+
this._setPreviouslyLockedTextTrack();
|
|
544
|
+
this.trigger("availableTextTracksChange", this.getAvailableTextTracks());
|
|
545
|
+
const chosenTextTrack = this._getCurrentTextTrack();
|
|
546
|
+
if ((chosenTextTrack === null || chosenTextTrack === void 0 ? void 0 : chosenTextTrack.nativeTrack) !== this._lastEmittedNativeTextTrack) {
|
|
547
|
+
this.trigger("textTrackChange", (_a = chosenTextTrack === null || chosenTextTrack === void 0 ? void 0 : chosenTextTrack.track) !== null && _a !== void 0 ? _a : null);
|
|
548
|
+
this._lastEmittedNativeTextTrack = (_b = chosenTextTrack === null || chosenTextTrack === void 0 ? void 0 : chosenTextTrack.nativeTrack) !== null && _b !== void 0 ? _b : null;
|
|
559
549
|
}
|
|
560
550
|
}
|
|
561
551
|
}
|
|
562
552
|
};
|
|
563
|
-
this._nativeTextTracks.onchange =
|
|
564
|
-
if (
|
|
565
|
-
for (
|
|
566
|
-
|
|
553
|
+
this._nativeTextTracks.onchange = () => {
|
|
554
|
+
if (this._textTracks !== undefined) {
|
|
555
|
+
for (let i = 0; i < this._textTracks.length; i++) {
|
|
556
|
+
const { track, nativeTrack } = this._textTracks[i];
|
|
567
557
|
if (nativeTrack.mode === "showing") {
|
|
568
|
-
if (nativeTrack !==
|
|
569
|
-
|
|
570
|
-
|
|
558
|
+
if (nativeTrack !== this._lastEmittedNativeTextTrack) {
|
|
559
|
+
this.trigger("textTrackChange", track);
|
|
560
|
+
this._lastEmittedNativeTextTrack = nativeTrack;
|
|
571
561
|
}
|
|
572
562
|
return;
|
|
573
563
|
}
|
|
574
564
|
}
|
|
575
565
|
}
|
|
576
|
-
if (
|
|
577
|
-
|
|
578
|
-
|
|
566
|
+
if (this._lastEmittedNativeTextTrack !== null) {
|
|
567
|
+
this.trigger("textTrackChange", null);
|
|
568
|
+
this._lastEmittedNativeTextTrack = null;
|
|
579
569
|
}
|
|
580
570
|
return;
|
|
581
571
|
};
|
|
582
572
|
}
|
|
583
573
|
if (this._nativeVideoTracks !== undefined) {
|
|
584
|
-
this._nativeVideoTracks.onaddtrack =
|
|
574
|
+
this._nativeVideoTracks.onaddtrack = () => {
|
|
585
575
|
var _a, _b;
|
|
586
|
-
if (
|
|
587
|
-
|
|
588
|
-
if (areTrackArraysDifferent(
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
if ((chosenVideoTrack === null || chosenVideoTrack === void 0 ? void 0 : chosenVideoTrack.nativeTrack) !==
|
|
594
|
-
|
|
595
|
-
|
|
576
|
+
if (this._nativeVideoTracks !== undefined) {
|
|
577
|
+
const newVideoTracks = createVideoTracks(this._nativeVideoTracks);
|
|
578
|
+
if (areTrackArraysDifferent(this._videoTracks, newVideoTracks)) {
|
|
579
|
+
this._videoTracks = newVideoTracks;
|
|
580
|
+
this._setPreviouslyLockedVideoTrack();
|
|
581
|
+
this.trigger("availableVideoTracksChange", this.getAvailableVideoTracks());
|
|
582
|
+
const chosenVideoTrack = this._getCurrentVideoTrack();
|
|
583
|
+
if ((chosenVideoTrack === null || chosenVideoTrack === void 0 ? void 0 : chosenVideoTrack.nativeTrack) !== this._lastEmittedNativeVideoTrack) {
|
|
584
|
+
this.trigger("videoTrackChange", (_a = chosenVideoTrack === null || chosenVideoTrack === void 0 ? void 0 : chosenVideoTrack.track) !== null && _a !== void 0 ? _a : null);
|
|
585
|
+
this._lastEmittedNativeVideoTrack = (_b = chosenVideoTrack === null || chosenVideoTrack === void 0 ? void 0 : chosenVideoTrack.nativeTrack) !== null && _b !== void 0 ? _b : null;
|
|
596
586
|
}
|
|
597
587
|
}
|
|
598
588
|
}
|
|
599
589
|
};
|
|
600
|
-
this._nativeVideoTracks.onremovetrack =
|
|
590
|
+
this._nativeVideoTracks.onremovetrack = () => {
|
|
601
591
|
var _a, _b;
|
|
602
|
-
if (
|
|
603
|
-
|
|
604
|
-
if (areTrackArraysDifferent(
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
if ((chosenVideoTrack === null || chosenVideoTrack === void 0 ? void 0 : chosenVideoTrack.nativeTrack) !==
|
|
610
|
-
|
|
611
|
-
|
|
592
|
+
if (this._nativeVideoTracks !== undefined) {
|
|
593
|
+
const newVideoTracks = createVideoTracks(this._nativeVideoTracks);
|
|
594
|
+
if (areTrackArraysDifferent(this._videoTracks, newVideoTracks)) {
|
|
595
|
+
this._videoTracks = newVideoTracks;
|
|
596
|
+
this._setPreviouslyLockedVideoTrack();
|
|
597
|
+
this.trigger("availableVideoTracksChange", this.getAvailableVideoTracks());
|
|
598
|
+
const chosenVideoTrack = this._getCurrentVideoTrack();
|
|
599
|
+
if ((chosenVideoTrack === null || chosenVideoTrack === void 0 ? void 0 : chosenVideoTrack.nativeTrack) !== this._lastEmittedNativeVideoTrack) {
|
|
600
|
+
this.trigger("videoTrackChange", (_a = chosenVideoTrack === null || chosenVideoTrack === void 0 ? void 0 : chosenVideoTrack.track) !== null && _a !== void 0 ? _a : null);
|
|
601
|
+
this._lastEmittedNativeVideoTrack = (_b = chosenVideoTrack === null || chosenVideoTrack === void 0 ? void 0 : chosenVideoTrack.nativeTrack) !== null && _b !== void 0 ? _b : null;
|
|
612
602
|
}
|
|
613
603
|
}
|
|
614
604
|
}
|
|
615
605
|
};
|
|
616
|
-
this._nativeVideoTracks.onchange =
|
|
617
|
-
if (
|
|
618
|
-
for (
|
|
619
|
-
|
|
606
|
+
this._nativeVideoTracks.onchange = () => {
|
|
607
|
+
if (this._videoTracks !== undefined) {
|
|
608
|
+
for (let i = 0; i < this._videoTracks.length; i++) {
|
|
609
|
+
const { track, nativeTrack } = this._videoTracks[i];
|
|
620
610
|
if (nativeTrack.selected) {
|
|
621
|
-
if (nativeTrack !==
|
|
622
|
-
|
|
623
|
-
|
|
611
|
+
if (nativeTrack !== this._lastEmittedNativeVideoTrack) {
|
|
612
|
+
this.trigger("videoTrackChange", track);
|
|
613
|
+
this._lastEmittedNativeVideoTrack = nativeTrack;
|
|
624
614
|
}
|
|
625
615
|
return;
|
|
626
616
|
}
|
|
627
617
|
}
|
|
628
618
|
}
|
|
629
|
-
if (
|
|
630
|
-
|
|
631
|
-
|
|
619
|
+
if (this._lastEmittedNativeVideoTrack !== null) {
|
|
620
|
+
this.trigger("videoTrackChange", null);
|
|
621
|
+
this._lastEmittedNativeVideoTrack = null;
|
|
632
622
|
}
|
|
633
623
|
return;
|
|
634
624
|
};
|
|
635
625
|
}
|
|
636
|
-
}
|
|
626
|
+
}
|
|
637
627
|
/**
|
|
638
628
|
* Enable an audio track (and disable all others), based on its index in the
|
|
639
629
|
* `this._audioTracks` array.
|
|
640
630
|
* @param {number} index}
|
|
641
631
|
*/
|
|
642
|
-
|
|
643
|
-
enableAudioTrack(this._audioTracks.map(
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
};
|
|
648
|
-
return MediaElementTracksStore;
|
|
649
|
-
}(EventEmitter));
|
|
650
|
-
export default MediaElementTracksStore;
|
|
632
|
+
_enableAudioTrackFromIndex(index) {
|
|
633
|
+
(0, compat_1.enableAudioTrack)(this._audioTracks.map(({ nativeTrack }) => nativeTrack), index);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
exports.default = MediaElementTracksStore;
|
|
651
637
|
/**
|
|
652
638
|
* Disable all text track elements in the given array from showing.
|
|
653
639
|
* @param {Array.<Object>} textTracks
|
|
654
640
|
*/
|
|
655
641
|
function disableTextTracks(textTracks) {
|
|
656
|
-
for (
|
|
657
|
-
|
|
642
|
+
for (let i = 0; i < textTracks.length; i++) {
|
|
643
|
+
const { nativeTrack } = textTracks[i];
|
|
658
644
|
nativeTrack.mode = "disabled";
|
|
659
645
|
}
|
|
660
646
|
}
|
|
@@ -665,8 +651,8 @@ function disableTextTracks(textTracks) {
|
|
|
665
651
|
* @param {TextTrack} track
|
|
666
652
|
*/
|
|
667
653
|
function disableAllTextTracksBut(textTracks, track) {
|
|
668
|
-
for (
|
|
669
|
-
|
|
654
|
+
for (let i = 0; i < textTracks.length; i++) {
|
|
655
|
+
const { nativeTrack } = textTracks[i];
|
|
670
656
|
if (nativeTrack !== track &&
|
|
671
657
|
(nativeTrack.mode === "showing" || nativeTrack.mode === "hidden")) {
|
|
672
658
|
nativeTrack.mode = "disabled";
|
|
@@ -679,8 +665,8 @@ function disableAllTextTracksBut(textTracks, track) {
|
|
|
679
665
|
* @param {Array.<Object>} videoTracks
|
|
680
666
|
*/
|
|
681
667
|
function disableVideoTracks(videoTracks) {
|
|
682
|
-
for (
|
|
683
|
-
|
|
668
|
+
for (let i = 0; i < videoTracks.length; i++) {
|
|
669
|
+
const { nativeTrack } = videoTracks[i];
|
|
684
670
|
nativeTrack.selected = false;
|
|
685
671
|
}
|
|
686
672
|
}
|