rx-player 3.33.4-dev.2024083000 → 3.33.4
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/.prettierignore +1 -0
- package/.prettierrc +4 -0
- package/.vscode/settings.json +9 -0
- package/CHANGELOG.md +1662 -1076
- package/MAINTAINERS.md +9 -12
- package/README.md +111 -127
- package/VERSION +1 -1
- package/dist/_esm5.processed/compat/add_class_name.js +4 -3
- package/dist/_esm5.processed/compat/add_text_track.d.ts +1 -1
- package/dist/_esm5.processed/compat/add_text_track.js +4 -4
- package/dist/_esm5.processed/compat/browser_compatibility_types.d.ts +2 -1
- package/dist/_esm5.processed/compat/browser_compatibility_types.js +15 -10
- package/dist/_esm5.processed/compat/browser_detection.d.ts +3 -1
- package/dist/_esm5.processed/compat/browser_detection.js +18 -10
- package/dist/_esm5.processed/compat/can_reuse_media_keys.d.ts +4 -0
- package/dist/_esm5.processed/compat/can_reuse_media_keys.js +6 -2
- package/dist/_esm5.processed/compat/change_source_buffer_type.d.ts +1 -1
- package/dist/_esm5.processed/compat/eme/close_session.d.ts +1 -1
- package/dist/_esm5.processed/compat/eme/close_session.js +17 -13
- package/dist/_esm5.processed/compat/eme/custom_key_system_access.d.ts +1 -1
- package/dist/_esm5.processed/compat/eme/custom_media_keys/ie11_media_keys.d.ts +1 -1
- package/dist/_esm5.processed/compat/eme/custom_media_keys/ie11_media_keys.js +8 -9
- package/dist/_esm5.processed/compat/eme/custom_media_keys/index.d.ts +3 -2
- package/dist/_esm5.processed/compat/eme/custom_media_keys/index.js +1 -1
- package/dist/_esm5.processed/compat/eme/custom_media_keys/moz_media_keys_constructor.d.ts +1 -1
- package/dist/_esm5.processed/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +1 -1
- package/dist/_esm5.processed/compat/eme/custom_media_keys/old_webkit_media_keys.js +7 -9
- package/dist/_esm5.processed/compat/eme/custom_media_keys/types.d.ts +4 -1
- package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys.d.ts +2 -2
- package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys.js +6 -12
- package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys_constructor.d.ts +2 -1
- package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +3 -3
- package/dist/_esm5.processed/compat/eme/eme-api-implementation.d.ts +4 -4
- package/dist/_esm5.processed/compat/eme/eme-api-implementation.js +26 -11
- package/dist/_esm5.processed/compat/eme/generate_key_request.d.ts +1 -1
- package/dist/_esm5.processed/compat/eme/generate_key_request.js +17 -20
- package/dist/_esm5.processed/compat/eme/get_init_data.d.ts +3 -1
- package/dist/_esm5.processed/compat/eme/get_init_data.js +7 -9
- package/dist/_esm5.processed/compat/eme/get_uuid_kid_from_keystatus_kid.js +2 -3
- package/dist/_esm5.processed/compat/eme/get_webkit_fairplay_initdata.js +12 -13
- package/dist/_esm5.processed/compat/eme/index.d.ts +8 -5
- package/dist/_esm5.processed/compat/eme/index.js +1 -1
- package/dist/_esm5.processed/compat/eme/load_session.d.ts +1 -1
- package/dist/_esm5.processed/compat/enable_audio_track.d.ts +1 -1
- package/dist/_esm5.processed/compat/event_listeners.d.ts +26 -24
- package/dist/_esm5.processed/compat/event_listeners.js +14 -29
- package/dist/_esm5.processed/compat/fullscreen.d.ts +1 -1
- package/dist/_esm5.processed/compat/fullscreen.js +1 -1
- package/dist/_esm5.processed/compat/generate_init_data.js +3 -5
- package/dist/_esm5.processed/compat/index.d.ts +6 -3
- package/dist/_esm5.processed/compat/index.js +2 -2
- package/dist/_esm5.processed/compat/is_vtt_cue.d.ts +1 -1
- package/dist/_esm5.processed/compat/make_vtt_cue.d.ts +1 -1
- package/dist/_esm5.processed/compat/on_height_width_change.d.ts +2 -2
- package/dist/_esm5.processed/compat/on_height_width_change.js +3 -2
- package/dist/_esm5.processed/compat/patch_webkit_source_buffer.js +28 -29
- package/dist/_esm5.processed/compat/should_favour_custom_safari_EME.js +2 -2
- package/dist/_esm5.processed/compat/should_reload_media_source_on_decipherability_update.js +1 -2
- package/dist/_esm5.processed/config.d.ts +1 -1
- package/dist/_esm5.processed/config.js +0 -15
- package/dist/_esm5.processed/core/adaptive/adaptive_representation_selector.d.ts +7 -6
- package/dist/_esm5.processed/core/adaptive/adaptive_representation_selector.js +45 -22
- package/dist/_esm5.processed/core/adaptive/buffer_based_chooser.d.ts +1 -1
- package/dist/_esm5.processed/core/adaptive/buffer_based_chooser.js +11 -10
- package/dist/_esm5.processed/core/adaptive/guess_based_chooser.d.ts +4 -4
- package/dist/_esm5.processed/core/adaptive/guess_based_chooser.js +7 -6
- package/dist/_esm5.processed/core/adaptive/index.d.ts +3 -2
- package/dist/_esm5.processed/core/adaptive/network_analyzer.d.ts +4 -4
- package/dist/_esm5.processed/core/adaptive/network_analyzer.js +43 -38
- package/dist/_esm5.processed/core/adaptive/utils/bandwidth_estimator.js +1 -1
- package/dist/_esm5.processed/core/adaptive/utils/ewma.js +1 -2
- package/dist/_esm5.processed/core/adaptive/utils/filter_by_bitrate.d.ts +1 -1
- package/dist/_esm5.processed/core/adaptive/utils/filter_by_width.d.ts +1 -1
- package/dist/_esm5.processed/core/adaptive/utils/filter_by_width.js +3 -6
- package/dist/_esm5.processed/core/adaptive/utils/get_buffer_levels.js +7 -4
- package/dist/_esm5.processed/core/adaptive/utils/last_estimate_storage.d.ts +1 -1
- package/dist/_esm5.processed/core/adaptive/utils/pending_requests_store.d.ts +2 -1
- package/dist/_esm5.processed/core/adaptive/utils/representation_score_calculator.d.ts +1 -1
- package/dist/_esm5.processed/core/adaptive/utils/representation_score_calculator.js +8 -5
- package/dist/_esm5.processed/core/adaptive/utils/select_optimal_representation.d.ts +1 -1
- package/dist/_esm5.processed/core/adaptive/utils/select_optimal_representation.js +5 -3
- package/dist/_esm5.processed/core/api/debug/buffer_graph.d.ts +1 -1
- package/dist/_esm5.processed/core/api/debug/buffer_graph.js +3 -8
- package/dist/_esm5.processed/core/api/debug/buffer_size_graph.js +1 -2
- package/dist/_esm5.processed/core/api/debug/modules/general_info.d.ts +2 -2
- package/dist/_esm5.processed/core/api/debug/modules/general_info.js +17 -13
- package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_content.d.ts +3 -3
- package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_content.js +4 -2
- package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_size.d.ts +2 -2
- package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_size.js +1 -1
- package/dist/_esm5.processed/core/api/debug/render.d.ts +2 -2
- package/dist/_esm5.processed/core/api/debug/utils.d.ts +5 -5
- package/dist/_esm5.processed/core/api/index.d.ts +1 -1
- package/dist/_esm5.processed/core/api/option_utils.d.ts +3 -3
- package/dist/_esm5.processed/core/api/option_utils.js +85 -48
- package/dist/_esm5.processed/core/api/playback_observer.d.ts +16 -18
- package/dist/_esm5.processed/core/api/playback_observer.js +65 -42
- package/dist/_esm5.processed/core/api/public_api.d.ts +10 -9
- package/dist/_esm5.processed/core/api/public_api.js +103 -94
- package/dist/_esm5.processed/core/api/tracks_management/media_element_track_choice_manager.d.ts +1 -1
- package/dist/_esm5.processed/core/api/tracks_management/media_element_track_choice_manager.js +25 -14
- package/dist/_esm5.processed/core/api/tracks_management/track_choice_manager.d.ts +3 -3
- package/dist/_esm5.processed/core/api/tracks_management/track_choice_manager.js +72 -80
- package/dist/_esm5.processed/core/api/utils.d.ts +5 -5
- package/dist/_esm5.processed/core/api/utils.js +5 -8
- package/dist/_esm5.processed/core/decrypt/__tests__/__global__/utils.d.ts +12 -54
- package/dist/_esm5.processed/core/decrypt/__tests__/__global__/utils.js +55 -66
- package/dist/_esm5.processed/core/decrypt/attach_media_keys.d.ts +10 -5
- package/dist/_esm5.processed/core/decrypt/attach_media_keys.js +16 -8
- package/dist/_esm5.processed/core/decrypt/content_decryptor.d.ts +11 -2
- package/dist/_esm5.processed/core/decrypt/content_decryptor.js +136 -65
- package/dist/_esm5.processed/core/decrypt/create_or_load_session.d.ts +5 -4
- package/dist/_esm5.processed/core/decrypt/create_or_load_session.js +18 -7
- package/dist/_esm5.processed/core/decrypt/create_session.d.ts +5 -4
- package/dist/_esm5.processed/core/decrypt/create_session.js +6 -12
- package/dist/_esm5.processed/core/decrypt/dispose_decryption_resources.js +1 -2
- package/dist/_esm5.processed/core/decrypt/find_key_system.d.ts +13 -3
- package/dist/_esm5.processed/core/decrypt/find_key_system.js +45 -22
- package/dist/_esm5.processed/core/decrypt/get_key_system_configuration.js +1 -2
- package/dist/_esm5.processed/core/decrypt/get_media_keys.d.ts +9 -4
- package/dist/_esm5.processed/core/decrypt/get_media_keys.js +17 -6
- package/dist/_esm5.processed/core/decrypt/init_media_keys.d.ts +3 -3
- package/dist/_esm5.processed/core/decrypt/session_events_listener.d.ts +2 -2
- package/dist/_esm5.processed/core/decrypt/session_events_listener.js +12 -16
- package/dist/_esm5.processed/core/decrypt/set_server_certificate.d.ts +3 -3
- package/dist/_esm5.processed/core/decrypt/set_server_certificate.js +6 -7
- package/dist/_esm5.processed/core/decrypt/types.d.ts +11 -5
- package/dist/_esm5.processed/core/decrypt/utils/are_init_values_compatible.js +20 -12
- package/dist/_esm5.processed/core/decrypt/utils/check_key_statuses.d.ts +2 -2
- package/dist/_esm5.processed/core/decrypt/utils/check_key_statuses.js +5 -4
- package/dist/_esm5.processed/core/decrypt/utils/clean_old_loaded_sessions.d.ts +1 -1
- package/dist/_esm5.processed/core/decrypt/utils/clean_old_stored_persistent_info.d.ts +1 -1
- package/dist/_esm5.processed/core/decrypt/utils/init_data_values_container.d.ts +1 -1
- package/dist/_esm5.processed/core/decrypt/utils/init_data_values_container.js +16 -9
- package/dist/_esm5.processed/core/decrypt/utils/is_session_usable.d.ts +1 -1
- package/dist/_esm5.processed/core/decrypt/utils/is_session_usable.js +1 -2
- package/dist/_esm5.processed/core/decrypt/utils/key_session_record.d.ts +1 -1
- package/dist/_esm5.processed/core/decrypt/utils/key_session_record.js +1 -2
- package/dist/_esm5.processed/core/decrypt/utils/loaded_sessions_store.d.ts +11 -13
- package/dist/_esm5.processed/core/decrypt/utils/loaded_sessions_store.js +13 -13
- package/dist/_esm5.processed/core/decrypt/utils/media_keys_infos_store.d.ts +8 -3
- package/dist/_esm5.processed/core/decrypt/utils/media_keys_infos_store.js +1 -2
- package/dist/_esm5.processed/core/decrypt/utils/persistent_sessions_store.d.ts +3 -3
- package/dist/_esm5.processed/core/decrypt/utils/persistent_sessions_store.js +27 -16
- package/dist/_esm5.processed/core/decrypt/utils/serializable_bytes.js +1 -1
- package/dist/_esm5.processed/core/decrypt/utils/server_certificate_store.d.ts +1 -1
- package/dist/_esm5.processed/core/decrypt/utils/server_certificate_store.js +19 -12
- package/dist/_esm5.processed/core/fetchers/cdn_prioritizer.d.ts +2 -2
- package/dist/_esm5.processed/core/fetchers/cdn_prioritizer.js +5 -6
- package/dist/_esm5.processed/core/fetchers/index.d.ts +6 -3
- package/dist/_esm5.processed/core/fetchers/index.js +1 -1
- package/dist/_esm5.processed/core/fetchers/manifest/index.d.ts +3 -2
- package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.d.ts +2 -2
- package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.js +68 -61
- package/dist/_esm5.processed/core/fetchers/segment/index.d.ts +4 -3
- package/dist/_esm5.processed/core/fetchers/segment/prioritized_segment_fetcher.d.ts +4 -3
- package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.d.ts +9 -8
- package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.js +41 -29
- package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher_creator.d.ts +5 -5
- package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher_creator.js +2 -3
- package/dist/_esm5.processed/core/fetchers/segment/task_prioritizer.d.ts +1 -1
- package/dist/_esm5.processed/core/fetchers/segment/task_prioritizer.js +19 -18
- package/dist/_esm5.processed/core/fetchers/utils/error_selector.d.ts +1 -1
- package/dist/_esm5.processed/core/fetchers/utils/error_selector.js +1 -1
- package/dist/_esm5.processed/core/fetchers/utils/schedule_request.d.ts +3 -3
- package/dist/_esm5.processed/core/fetchers/utils/schedule_request.js +25 -25
- package/dist/_esm5.processed/core/init/directfile_content_initializer.d.ts +4 -4
- package/dist/_esm5.processed/core/init/directfile_content_initializer.js +21 -17
- package/dist/_esm5.processed/core/init/index.d.ts +2 -1
- package/dist/_esm5.processed/core/init/index.js +1 -1
- package/dist/_esm5.processed/core/init/media_source_content_initializer.d.ts +9 -9
- package/dist/_esm5.processed/core/init/media_source_content_initializer.js +64 -32
- package/dist/_esm5.processed/core/init/types.d.ts +10 -12
- package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.d.ts +6 -5
- package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.js +20 -19
- package/dist/_esm5.processed/core/init/utils/create_media_source.d.ts +1 -1
- package/dist/_esm5.processed/core/init/utils/create_media_source.js +2 -3
- package/dist/_esm5.processed/core/init/utils/create_stream_playback_observer.d.ts +6 -6
- package/dist/_esm5.processed/core/init/utils/create_stream_playback_observer.js +5 -3
- package/dist/_esm5.processed/core/init/utils/end_of_stream.d.ts +1 -1
- package/dist/_esm5.processed/core/init/utils/get_initial_time.d.ts +1 -1
- package/dist/_esm5.processed/core/init/utils/get_initial_time.js +12 -15
- package/dist/_esm5.processed/core/init/utils/get_loaded_reference.d.ts +3 -3
- package/dist/_esm5.processed/core/init/utils/get_loaded_reference.js +1 -2
- package/dist/_esm5.processed/core/init/utils/initial_seek_and_play.d.ts +9 -9
- package/dist/_esm5.processed/core/init/utils/initial_seek_and_play.js +39 -3
- package/dist/_esm5.processed/core/init/utils/initialize_content_decryption.d.ts +9 -8
- package/dist/_esm5.processed/core/init/utils/initialize_content_decryption.js +12 -9
- package/dist/_esm5.processed/core/init/utils/media_source_duration_updater.js +10 -7
- package/dist/_esm5.processed/core/init/utils/rebuffering_controller.d.ts +7 -6
- package/dist/_esm5.processed/core/init/utils/rebuffering_controller.js +24 -24
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/are_same_stream_events.js +1 -3
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/index.d.ts +1 -1
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts +2 -2
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +14 -6
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/stream_events_emitter.d.ts +3 -3
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/stream_events_emitter.js +12 -19
- package/dist/_esm5.processed/core/init/utils/stream_events_emitter/types.d.ts +1 -1
- package/dist/_esm5.processed/core/init/utils/throw_on_media_error.d.ts +1 -1
- package/dist/_esm5.processed/core/init/utils/throw_on_media_error.js +11 -6
- package/dist/_esm5.processed/core/segment_buffers/garbage_collector.d.ts +6 -6
- package/dist/_esm5.processed/core/segment_buffers/garbage_collector.js +12 -13
- package/dist/_esm5.processed/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.d.ts +3 -2
- package/dist/_esm5.processed/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.js +6 -9
- package/dist/_esm5.processed/core/segment_buffers/implementations/image/image_segment_buffer.d.ts +3 -2
- package/dist/_esm5.processed/core/segment_buffers/implementations/image/image_segment_buffer.js +1 -1
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/html_text_segment_buffer.d.ts +2 -1
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/html_text_segment_buffer.js +7 -7
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/text_track_cues_store.d.ts +1 -1
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/text_track_cues_store.js +4 -4
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/update_proportional_elements.js +1 -2
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/utils.d.ts +1 -1
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/utils.js +2 -6
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/native_text_segment_buffer.d.ts +2 -1
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/native_text_segment_buffer.js +2 -2
- package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/parsers.d.ts +1 -1
- package/dist/_esm5.processed/core/segment_buffers/implementations/types.d.ts +5 -7
- package/dist/_esm5.processed/core/segment_buffers/implementations/utils/manual_time_ranges.js +1 -1
- package/dist/_esm5.processed/core/segment_buffers/index.d.ts +8 -4
- package/dist/_esm5.processed/core/segment_buffers/index.js +2 -2
- package/dist/_esm5.processed/core/segment_buffers/inventory/buffered_history.d.ts +1 -1
- package/dist/_esm5.processed/core/segment_buffers/inventory/index.d.ts +6 -4
- package/dist/_esm5.processed/core/segment_buffers/inventory/segment_inventory.d.ts +4 -4
- package/dist/_esm5.processed/core/segment_buffers/inventory/segment_inventory.js +63 -54
- package/dist/_esm5.processed/core/segment_buffers/inventory/types.d.ts +1 -1
- package/dist/_esm5.processed/core/segment_buffers/segment_buffers_store.d.ts +2 -2
- package/dist/_esm5.processed/core/segment_buffers/segment_buffers_store.js +17 -23
- package/dist/_esm5.processed/core/stream/adaptation/adaptation_stream.d.ts +3 -3
- package/dist/_esm5.processed/core/stream/adaptation/adaptation_stream.js +49 -22
- package/dist/_esm5.processed/core/stream/adaptation/types.d.ts +8 -7
- package/dist/_esm5.processed/core/stream/adaptation/utils/create_representation_estimator.d.ts +7 -6
- package/dist/_esm5.processed/core/stream/adaptation/utils/create_representation_estimator.js +2 -1
- package/dist/_esm5.processed/core/stream/index.d.ts +6 -5
- package/dist/_esm5.processed/core/stream/orchestrator/get_time_ranges_for_content.d.ts +3 -3
- package/dist/_esm5.processed/core/stream/orchestrator/get_time_ranges_for_content.js +2 -2
- package/dist/_esm5.processed/core/stream/orchestrator/index.d.ts +3 -2
- package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.d.ts +9 -7
- package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.js +47 -34
- package/dist/_esm5.processed/core/stream/period/period_stream.d.ts +3 -3
- package/dist/_esm5.processed/core/stream/period/period_stream.js +49 -16
- package/dist/_esm5.processed/core/stream/period/types.d.ts +15 -12
- package/dist/_esm5.processed/core/stream/period/utils/get_adaptation_switch_strategy.d.ts +9 -9
- package/dist/_esm5.processed/core/stream/period/utils/get_adaptation_switch_strategy.js +26 -25
- package/dist/_esm5.processed/core/stream/representation/representation_stream.d.ts +3 -3
- package/dist/_esm5.processed/core/stream/representation/representation_stream.js +47 -23
- package/dist/_esm5.processed/core/stream/representation/types.d.ts +9 -8
- package/dist/_esm5.processed/core/stream/representation/utils/append_segment_to_buffer.d.ts +4 -4
- package/dist/_esm5.processed/core/stream/representation/utils/append_segment_to_buffer.js +10 -7
- package/dist/_esm5.processed/core/stream/representation/utils/check_for_discontinuity.d.ts +4 -3
- package/dist/_esm5.processed/core/stream/representation/utils/check_for_discontinuity.js +16 -18
- package/dist/_esm5.processed/core/stream/representation/utils/downloading_queue.d.ts +7 -6
- package/dist/_esm5.processed/core/stream/representation/utils/downloading_queue.js +11 -11
- package/dist/_esm5.processed/core/stream/representation/utils/force_garbage_collection.d.ts +2 -2
- package/dist/_esm5.processed/core/stream/representation/utils/force_garbage_collection.js +6 -8
- package/dist/_esm5.processed/core/stream/representation/utils/get_buffer_status.d.ts +5 -4
- package/dist/_esm5.processed/core/stream/representation/utils/get_buffer_status.js +40 -19
- package/dist/_esm5.processed/core/stream/representation/utils/get_needed_segments.d.ts +4 -3
- package/dist/_esm5.processed/core/stream/representation/utils/get_needed_segments.js +27 -28
- package/dist/_esm5.processed/core/stream/representation/utils/push_init_segment.d.ts +6 -5
- package/dist/_esm5.processed/core/stream/representation/utils/push_init_segment.js +7 -5
- package/dist/_esm5.processed/core/stream/representation/utils/push_media_segment.d.ts +8 -7
- package/dist/_esm5.processed/core/stream/representation/utils/push_media_segment.js +13 -10
- package/dist/_esm5.processed/default_config.js +20 -16
- package/dist/_esm5.processed/errors/encrypted_media_error.d.ts +2 -2
- package/dist/_esm5.processed/errors/encrypted_media_error.js +1 -1
- package/dist/_esm5.processed/errors/error_codes.d.ts +1 -1
- package/dist/_esm5.processed/errors/error_codes.js +1 -1
- package/dist/_esm5.processed/errors/format_error.d.ts +2 -2
- package/dist/_esm5.processed/errors/format_error.js +1 -2
- package/dist/_esm5.processed/errors/index.d.ts +6 -3
- package/dist/_esm5.processed/errors/index.js +2 -2
- package/dist/_esm5.processed/errors/is_known_error.d.ts +1 -1
- package/dist/_esm5.processed/errors/is_known_error.js +2 -2
- package/dist/_esm5.processed/errors/media_error.d.ts +3 -3
- package/dist/_esm5.processed/errors/media_error.js +4 -7
- package/dist/_esm5.processed/errors/network_error.d.ts +2 -2
- package/dist/_esm5.processed/errors/network_error.js +3 -3
- package/dist/_esm5.processed/errors/other_error.d.ts +1 -1
- package/dist/_esm5.processed/errors/other_error.js +1 -1
- package/dist/_esm5.processed/errors/request_error.d.ts +1 -1
- package/dist/_esm5.processed/experimental/features/dash_wasm.d.ts +2 -2
- package/dist/_esm5.processed/experimental/features/debug_element.d.ts +1 -1
- package/dist/_esm5.processed/experimental/features/local.d.ts +1 -1
- package/dist/_esm5.processed/experimental/features/metaplaylist.d.ts +1 -1
- package/dist/_esm5.processed/experimental/index.d.ts +1 -1
- package/dist/_esm5.processed/experimental/index.js +1 -1
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/features/dash.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/features/metaplaylist.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/index.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/index.js +2 -2
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/load_and_push_segment.d.ts +3 -3
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/load_and_push_segment.js +7 -3
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +1 -2
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +2 -2
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +2 -2
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/types.d.ts +3 -2
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts +2 -2
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +12 -18
- package/dist/_esm5.processed/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +13 -23
- package/dist/_esm5.processed/experimental/tools/createMetaplaylist/index.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/createMetaplaylist/index.js +8 -7
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/index.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/index.js +9 -13
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.d.ts +4 -3
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.js +5 -3
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/capabilities.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/capabilities.js +10 -47
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.d.ts +2 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +8 -5
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.d.ts +2 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +21 -13
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.d.ts +2 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +22 -18
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +4 -7
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/index.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts +2 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +3 -5
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/format.js +4 -10
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.d.ts +2 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +2 -3
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts +2 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +2 -3
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/types.d.ts +2 -2
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/utils.d.ts +1 -1
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/utils.js +6 -6
- package/dist/_esm5.processed/experimental/tools/parseBIFThumbnails.js +5 -4
- package/dist/_esm5.processed/features/add_features.d.ts +1 -1
- package/dist/_esm5.processed/features/features_object.d.ts +1 -1
- package/dist/_esm5.processed/features/features_object.js +4 -3
- package/dist/_esm5.processed/features/index.d.ts +3 -2
- package/dist/_esm5.processed/features/index.js +1 -1
- package/dist/_esm5.processed/features/list/bif_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/dash.d.ts +1 -1
- package/dist/_esm5.processed/features/list/directfile.d.ts +1 -1
- package/dist/_esm5.processed/features/list/eme.d.ts +1 -1
- package/dist/_esm5.processed/features/list/html_sami_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/html_srt_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/html_text_buffer.d.ts +1 -1
- package/dist/_esm5.processed/features/list/html_ttml_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/html_vtt_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/image_buffer.d.ts +1 -1
- package/dist/_esm5.processed/features/list/native_sami_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/native_srt_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/native_text_buffer.d.ts +1 -1
- package/dist/_esm5.processed/features/list/native_ttml_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/native_vtt_parser.d.ts +1 -1
- package/dist/_esm5.processed/features/list/smooth.d.ts +1 -1
- package/dist/_esm5.processed/features/types.d.ts +11 -11
- package/dist/_esm5.processed/manifest/adaptation.d.ts +3 -3
- package/dist/_esm5.processed/manifest/adaptation.js +24 -14
- package/dist/_esm5.processed/manifest/index.d.ts +9 -5
- package/dist/_esm5.processed/manifest/index.js +4 -8
- package/dist/_esm5.processed/manifest/manifest.d.ts +8 -7
- package/dist/_esm5.processed/manifest/manifest.js +37 -33
- package/dist/_esm5.processed/manifest/period.d.ts +4 -4
- package/dist/_esm5.processed/manifest/period.js +7 -14
- package/dist/_esm5.processed/manifest/representation.d.ts +4 -4
- package/dist/_esm5.processed/manifest/representation.js +5 -5
- package/dist/_esm5.processed/manifest/representation_index/index.d.ts +3 -2
- package/dist/_esm5.processed/manifest/representation_index/index.js +1 -1
- package/dist/_esm5.processed/manifest/representation_index/static.d.ts +1 -1
- package/dist/_esm5.processed/manifest/representation_index/static.js +6 -2
- package/dist/_esm5.processed/manifest/representation_index/types.d.ts +6 -5
- package/dist/_esm5.processed/manifest/update_period_in_place.d.ts +3 -3
- package/dist/_esm5.processed/manifest/update_period_in_place.js +9 -9
- package/dist/_esm5.processed/manifest/update_periods.d.ts +2 -2
- package/dist/_esm5.processed/manifest/update_periods.js +6 -3
- package/dist/_esm5.processed/manifest/utils.d.ts +4 -4
- package/dist/_esm5.processed/manifest/utils.js +6 -4
- package/dist/_esm5.processed/parsers/containers/isobmff/create_box.d.ts +1 -1
- package/dist/_esm5.processed/parsers/containers/isobmff/create_box.js +5 -4
- package/dist/_esm5.processed/parsers/containers/isobmff/drm/playready.js +2 -3
- package/dist/_esm5.processed/parsers/containers/isobmff/get_box.js +3 -5
- package/dist/_esm5.processed/parsers/containers/isobmff/index.d.ts +5 -4
- package/dist/_esm5.processed/parsers/containers/isobmff/index.js +4 -4
- package/dist/_esm5.processed/parsers/containers/isobmff/read.d.ts +1 -1
- package/dist/_esm5.processed/parsers/containers/isobmff/read.js +9 -9
- package/dist/_esm5.processed/parsers/containers/isobmff/take_pssh_out.js +3 -4
- package/dist/_esm5.processed/parsers/containers/isobmff/utils.js +51 -41
- package/dist/_esm5.processed/parsers/containers/matroska/index.d.ts +2 -1
- package/dist/_esm5.processed/parsers/containers/matroska/index.js +1 -1
- package/dist/_esm5.processed/parsers/containers/matroska/utils.js +29 -16
- package/dist/_esm5.processed/parsers/images/bif.js +15 -5
- package/dist/_esm5.processed/parsers/manifest/dash/common/attach_trickmode_track.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -3
- package/dist/_esm5.processed/parsers/manifest/dash/common/flatten_overlapping_periods.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/flatten_overlapping_periods.js +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_hdr_information.js +4 -12
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_http_utc-timing_url.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_http_utc-timing_url.js +4 -5
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_minimum_and_maximum_positions.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_minimum_and_maximum_positions.js +5 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_periods_time_infos.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/get_periods_time_infos.js +5 -6
- package/dist/_esm5.processed/parsers/manifest/dash/common/index.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.d.ts +4 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.js +34 -28
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_init_segment.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_init_segment.js +7 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_segments_from_timeline.d.ts +4 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +15 -11
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/index.d.ts +10 -5
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.js +30 -18
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.d.ts +3 -3
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.js +56 -55
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +2 -6
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +11 -15
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/convert_element_to_index_segment.js +12 -9
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +29 -19
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/index.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +6 -6
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +73 -59
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/tokens.js +2 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/infer_adaptation_type.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/manifest_bounds_calculator.js +7 -8
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.d.ts +4 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.js +52 -50
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_availability_start_time.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.d.ts +6 -6
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.js +52 -31
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.d.ts +4 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.js +41 -30
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.d.ts +4 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.js +1 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.d.ts +4 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.js +63 -64
- package/dist/_esm5.processed/parsers/manifest/dash/common/resolve_base_urls.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/resolve_base_urls.js +4 -2
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.js +73 -37
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/BaseURL.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/BaseURL.js +1 -2
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/ContentComponent.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/ContentProtection.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/EventStream.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/EventStream.js +13 -7
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Initialization.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Initialization.js +5 -3
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/MPD.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/MPD.js +44 -27
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Period.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Period.js +14 -8
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Representation.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Representation.js +36 -18
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.js +36 -18
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentList.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.js +17 -8
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentTimeline.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.js +9 -5
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/utils.d.ts +8 -26
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/utils.js +6 -12
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/parse_from_document.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/js-parser/parse_from_document.js +9 -4
- package/dist/_esm5.processed/parsers/manifest/dash/parsers_types.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/index.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +29 -16
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +22 -35
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/BaseURL.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/ContentComponent.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/ContentProtection.js +3 -1
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/EventStream.js +2 -4
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Label.d.ts +3 -0
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Label.js +9 -0
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/MPD.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/MPD.js +5 -5
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Period.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Period.js +9 -6
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Representation.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +8 -16
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Scheme.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentBase.js +5 -10
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentList.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentTemplate.js +11 -18
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/SegmentUrl.js +2 -4
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/XLink.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/XLink.js +5 -5
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/root.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/root.js +5 -6
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/parsers_stack.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/parsers_stack.js +1 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/types.d.ts +2 -1
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/utils.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/utils.js +2 -4
- package/dist/_esm5.processed/parsers/manifest/local/index.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/local/parse_local_manifest.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/local/parse_local_manifest.js +25 -16
- package/dist/_esm5.processed/parsers/manifest/local/representation_index.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/local/representation_index.js +5 -10
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/index.d.ts +3 -2
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/metaplaylist_parser.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/metaplaylist_parser.js +33 -29
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.js +9 -7
- package/dist/_esm5.processed/parsers/manifest/smooth/create_parser.d.ts +3 -3
- package/dist/_esm5.processed/parsers/manifest/smooth/create_parser.js +136 -109
- package/dist/_esm5.processed/parsers/manifest/smooth/get_codecs.js +3 -3
- package/dist/_esm5.processed/parsers/manifest/smooth/index.d.ts +4 -2
- package/dist/_esm5.processed/parsers/manifest/smooth/index.js +1 -1
- package/dist/_esm5.processed/parsers/manifest/smooth/parse_C_nodes.js +6 -6
- package/dist/_esm5.processed/parsers/manifest/smooth/parse_protection_node.js +12 -8
- package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.js +48 -53
- package/dist/_esm5.processed/parsers/manifest/smooth/utils/add_segment_infos.js +10 -7
- package/dist/_esm5.processed/parsers/manifest/smooth/utils/tokens.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/smooth/utils/tokens.js +2 -3
- package/dist/_esm5.processed/parsers/manifest/types.d.ts +2 -2
- package/dist/_esm5.processed/parsers/manifest/utils/check_manifest_ids.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/utils/clear_timeline_from_position.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/utils/clear_timeline_from_position.js +9 -6
- package/dist/_esm5.processed/parsers/manifest/utils/get_first_time_from_adaptation.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/utils/get_first_time_from_adaptation.js +5 -4
- package/dist/_esm5.processed/parsers/manifest/utils/get_last_time_from_adaptation.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/utils/get_last_time_from_adaptation.js +5 -4
- package/dist/_esm5.processed/parsers/manifest/utils/get_maximum_positions.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/utils/get_maximum_positions.js +10 -16
- package/dist/_esm5.processed/parsers/manifest/utils/get_minimum_position.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/utils/get_minimum_position.js +4 -10
- package/dist/_esm5.processed/parsers/manifest/utils/index_helpers.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/utils/index_helpers.js +4 -5
- package/dist/_esm5.processed/parsers/manifest/utils/update_segment_timeline.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/utils/update_segment_timeline.js +18 -18
- package/dist/_esm5.processed/parsers/texttracks/index.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/sami/html.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/sami/html.js +15 -15
- package/dist/_esm5.processed/parsers/texttracks/sami/native.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/sami/native.js +7 -14
- package/dist/_esm5.processed/parsers/texttracks/srt/html.js +6 -6
- package/dist/_esm5.processed/parsers/texttracks/srt/native.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/srt/native.js +1 -7
- package/dist/_esm5.processed/parsers/texttracks/srt/parse_cue.js +4 -8
- package/dist/_esm5.processed/parsers/texttracks/ttml/get_parameters.js +4 -8
- package/dist/_esm5.processed/parsers/texttracks/ttml/get_time_delimiters.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/ttml/get_time_delimiters.js +6 -8
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_default_ttml_paragraph_style.js +2 -2
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_extent.js +2 -6
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_font_size.js +3 -4
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_origin.js +2 -6
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_padding.js +2 -6
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/create_element.d.ts +2 -2
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/create_element.js +22 -21
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/generate_css_test_outline.js +2 -2
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/parse_cue.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/parse_cue.js +5 -3
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/parse_ttml_to_div.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/ttml/html/ttml_color_to_css_color.js +34 -19
- package/dist/_esm5.processed/parsers/texttracks/ttml/native/parse_cue.d.ts +2 -2
- package/dist/_esm5.processed/parsers/texttracks/ttml/native/parse_cue.js +9 -10
- package/dist/_esm5.processed/parsers/texttracks/ttml/native/parse_ttml_to_vtt.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/ttml/parse_ttml.d.ts +3 -3
- package/dist/_esm5.processed/parsers/texttracks/ttml/parse_ttml.js +28 -16
- package/dist/_esm5.processed/parsers/texttracks/ttml/resolve_styles_inheritance.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/ttml/time_parsing.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/ttml/time_parsing.js +2 -2
- package/dist/_esm5.processed/parsers/texttracks/types.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/get_cue_blocks.js +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/get_style_blocks.js +2 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/convert_payload_to_html.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_default_style_elements.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_style_attribute.js +6 -12
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_styled_element.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/create_styled_element.js +7 -8
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/index.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/parse_style_block.js +4 -4
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/parse_webvtt_to_div.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/to_html.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/html/to_html.js +4 -10
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/parse_vtt_to_cues.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/parse_vtt_to_cues.js +2 -6
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/set_settings_on_cue.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/to_native_cue.d.ts +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/native/to_native_cue.js +1 -1
- package/dist/_esm5.processed/parsers/texttracks/webvtt/parse_cue_block.js +2 -4
- package/dist/_esm5.processed/parsers/texttracks/webvtt/parse_timestamp.js +1 -2
- package/dist/_esm5.processed/parsers/texttracks/webvtt/utils.js +6 -6
- package/dist/_esm5.processed/public_types.d.ts +13 -11
- package/dist/_esm5.processed/tools/TextTrackRenderer/index.d.ts +3 -2
- package/dist/_esm5.processed/tools/TextTrackRenderer/text_track_renderer.d.ts +2 -2
- package/dist/_esm5.processed/tools/TextTrackRenderer/text_track_renderer.js +15 -10
- package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.d.ts +1 -1
- package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.js +2 -3
- package/dist/_esm5.processed/transports/dash/construct_segment_url.d.ts +2 -2
- package/dist/_esm5.processed/transports/dash/construct_segment_url.js +5 -3
- package/dist/_esm5.processed/transports/dash/extract_complete_chunks.js +2 -2
- package/dist/_esm5.processed/transports/dash/get_events_out_of_emsgs.d.ts +2 -2
- package/dist/_esm5.processed/transports/dash/get_events_out_of_emsgs.js +9 -10
- package/dist/_esm5.processed/transports/dash/image_pipelines.d.ts +3 -3
- package/dist/_esm5.processed/transports/dash/image_pipelines.js +32 -19
- package/dist/_esm5.processed/transports/dash/init_segment_loader.d.ts +3 -3
- package/dist/_esm5.processed/transports/dash/init_segment_loader.js +46 -22
- package/dist/_esm5.processed/transports/dash/low_latency_segment_loader.d.ts +2 -2
- package/dist/_esm5.processed/transports/dash/low_latency_segment_loader.js +13 -9
- package/dist/_esm5.processed/transports/dash/manifest_parser.d.ts +2 -2
- package/dist/_esm5.processed/transports/dash/manifest_parser.js +35 -22
- package/dist/_esm5.processed/transports/dash/pipelines.d.ts +1 -1
- package/dist/_esm5.processed/transports/dash/pipelines.js +11 -15
- package/dist/_esm5.processed/transports/dash/segment_loader.d.ts +4 -4
- package/dist/_esm5.processed/transports/dash/segment_loader.js +30 -21
- package/dist/_esm5.processed/transports/dash/segment_parser.d.ts +2 -2
- package/dist/_esm5.processed/transports/dash/segment_parser.js +47 -21
- package/dist/_esm5.processed/transports/dash/text_loader.d.ts +2 -2
- package/dist/_esm5.processed/transports/dash/text_loader.js +19 -19
- package/dist/_esm5.processed/transports/dash/text_parser.d.ts +2 -2
- package/dist/_esm5.processed/transports/dash/text_parser.js +45 -24
- package/dist/_esm5.processed/transports/local/pipelines.d.ts +1 -1
- package/dist/_esm5.processed/transports/local/pipelines.js +7 -8
- package/dist/_esm5.processed/transports/local/segment_loader.d.ts +3 -3
- package/dist/_esm5.processed/transports/local/segment_loader.js +14 -6
- package/dist/_esm5.processed/transports/local/segment_parser.d.ts +1 -1
- package/dist/_esm5.processed/transports/local/segment_parser.js +31 -13
- package/dist/_esm5.processed/transports/local/text_parser.d.ts +1 -1
- package/dist/_esm5.processed/transports/local/text_parser.js +44 -19
- package/dist/_esm5.processed/transports/metaplaylist/manifest_loader.d.ts +4 -4
- package/dist/_esm5.processed/transports/metaplaylist/manifest_loader.js +9 -5
- package/dist/_esm5.processed/transports/metaplaylist/pipelines.d.ts +1 -1
- package/dist/_esm5.processed/transports/metaplaylist/pipelines.js +25 -18
- package/dist/_esm5.processed/transports/smooth/extract_timings_infos.d.ts +2 -2
- package/dist/_esm5.processed/transports/smooth/extract_timings_infos.js +16 -15
- package/dist/_esm5.processed/transports/smooth/isobmff/create_audio_init_segment.js +3 -3
- package/dist/_esm5.processed/transports/smooth/isobmff/create_boxes.js +14 -32
- package/dist/_esm5.processed/transports/smooth/isobmff/create_init_segment.js +2 -2
- package/dist/_esm5.processed/transports/smooth/isobmff/create_traf_box.js +2 -2
- package/dist/_esm5.processed/transports/smooth/isobmff/get_aaces_header.js +4 -16
- package/dist/_esm5.processed/transports/smooth/isobmff/index.d.ts +4 -2
- package/dist/_esm5.processed/transports/smooth/isobmff/parse_tfrf.js +2 -2
- package/dist/_esm5.processed/transports/smooth/isobmff/parse_tfxd.js +1 -1
- package/dist/_esm5.processed/transports/smooth/isobmff/patch_segment.js +11 -10
- package/dist/_esm5.processed/transports/smooth/pipelines.d.ts +1 -1
- package/dist/_esm5.processed/transports/smooth/pipelines.js +121 -79
- package/dist/_esm5.processed/transports/smooth/segment_loader.d.ts +3 -3
- package/dist/_esm5.processed/transports/smooth/segment_loader.js +53 -27
- package/dist/_esm5.processed/transports/smooth/utils.d.ts +2 -2
- package/dist/_esm5.processed/transports/smooth/utils.js +7 -5
- package/dist/_esm5.processed/transports/types.d.ts +11 -25
- package/dist/_esm5.processed/transports/utils/byte_range.js +1 -2
- package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.d.ts +3 -3
- package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.js +13 -7
- package/dist/_esm5.processed/transports/utils/check_isobmff_integrity.js +3 -3
- package/dist/_esm5.processed/transports/utils/find_complete_box.js +3 -2
- package/dist/_esm5.processed/transports/utils/generate_manifest_loader.d.ts +3 -3
- package/dist/_esm5.processed/transports/utils/generate_manifest_loader.js +18 -6
- package/dist/_esm5.processed/transports/utils/get_isobmff_timing_infos.d.ts +2 -2
- package/dist/_esm5.processed/transports/utils/get_isobmff_timing_infos.js +12 -11
- package/dist/_esm5.processed/transports/utils/infer_segment_container.d.ts +1 -1
- package/dist/_esm5.processed/transports/utils/infer_segment_container.js +1 -3
- package/dist/_esm5.processed/transports/utils/parse_text_track.d.ts +4 -4
- package/dist/_esm5.processed/transports/utils/parse_text_track.js +9 -6
- package/dist/_esm5.processed/utils/are_codecs_compatible.js +5 -1
- package/dist/_esm5.processed/utils/array_includes.js +2 -6
- package/dist/_esm5.processed/utils/assert.js +3 -4
- package/dist/_esm5.processed/utils/base64.js +87 -29
- package/dist/_esm5.processed/utils/byte_parsing.js +60 -56
- package/dist/_esm5.processed/utils/cancellable_sleep.d.ts +1 -1
- package/dist/_esm5.processed/utils/create_cancellable_promise.d.ts +1 -1
- package/dist/_esm5.processed/utils/deep_merge.js +4 -4
- package/dist/_esm5.processed/utils/event_emitter.d.ts +1 -1
- package/dist/_esm5.processed/utils/get_fuzzed_delay.js +1 -1
- package/dist/_esm5.processed/utils/hash_buffer.js +1 -1
- package/dist/_esm5.processed/utils/initialization_segment_cache.d.ts +2 -2
- package/dist/_esm5.processed/utils/languages/index.d.ts +4 -2
- package/dist/_esm5.processed/utils/languages/index.js +2 -2
- package/dist/_esm5.processed/utils/languages/normalize.d.ts +2 -1
- package/dist/_esm5.processed/utils/languages/normalize.js +5 -3
- package/dist/_esm5.processed/utils/logger.js +7 -14
- package/dist/_esm5.processed/utils/object_assign.js +5 -5
- package/dist/_esm5.processed/utils/object_values.d.ts +1 -1
- package/dist/_esm5.processed/utils/object_values.js +2 -3
- package/dist/_esm5.processed/utils/ranges.d.ts +2 -1
- package/dist/_esm5.processed/utils/ranges.js +19 -23
- package/dist/_esm5.processed/utils/reference.d.ts +3 -3
- package/dist/_esm5.processed/utils/reference.js +1 -3
- package/dist/_esm5.processed/utils/request/fetch.d.ts +1 -1
- package/dist/_esm5.processed/utils/request/fetch.js +34 -23
- package/dist/_esm5.processed/utils/request/index.d.ts +6 -3
- package/dist/_esm5.processed/utils/request/index.js +2 -2
- package/dist/_esm5.processed/utils/request/xhr.d.ts +1 -1
- package/dist/_esm5.processed/utils/request/xhr.js +28 -17
- package/dist/_esm5.processed/utils/retry_promise_with_backoff.d.ts +2 -2
- package/dist/_esm5.processed/utils/slice_uint8array.js +3 -3
- package/dist/_esm5.processed/utils/starts_with.js +3 -3
- package/dist/_esm5.processed/utils/string_parsing.js +16 -18
- package/dist/_esm5.processed/utils/task_canceller.js +1 -2
- package/dist/_esm5.processed/utils/uniq.d.ts +1 -1
- package/dist/_esm5.processed/utils/uniq.js +4 -3
- package/dist/_esm5.processed/utils/weak_map_memory.js +0 -1
- package/dist/_esm5.processed/utils/wrapInPromise.d.ts +1 -1
- package/dist/mpd-parser.wasm +0 -0
- package/dist/rx-player.js +345 -236
- package/dist/rx-player.min.js +1 -1
- package/experimental/features/index.d.ts-E +16 -0
- package/experimental/features/index.js-E +16 -0
- package/experimental/index.d.ts +1 -1
- package/experimental/index.d.ts-E +16 -0
- package/experimental/index.js +1 -1
- package/experimental/index.js-E +16 -0
- package/experimental/tools/VideoThumbnailLoader/index.d.ts-E +18 -0
- package/experimental/tools/VideoThumbnailLoader/index.js-E +18 -0
- package/experimental/tools/index.d.ts-E +16 -0
- package/experimental/tools/index.js-E +16 -0
- package/features/index.d.ts-E +16 -0
- package/features/index.js-E +16 -0
- package/logger/index.d.ts-E +17 -0
- package/logger/index.js-E +17 -0
- package/minimal/index.d.ts-E +17 -0
- package/minimal/index.js-E +17 -0
- package/package.json +29 -14
- package/tools/TextTrackRenderer.d.ts-E +18 -0
- package/tools/TextTrackRenderer.js-E +18 -0
- package/tools/index.d.ts-E +16 -0
- package/tools/index.js-E +16 -0
- package/tools/string-utils.d.ts-E +18 -0
- package/tools/string-utils.js-E +18 -0
- package/types/index.d.ts-E +16 -0
- package/types/index.js-E +15 -0
|
@@ -79,7 +79,19 @@ export default function createAdaptiveRepresentationSelector(options) {
|
|
|
79
79
|
limitWidth: (_e = throttlers.limitWidth[type]) !== null && _e !== void 0 ? _e : limitWidthDefaultRef,
|
|
80
80
|
throttleBitrate: (_g = (_f = throttlers.throttleBitrate[type]) !== null && _f !== void 0 ? _f : throttlers.throttle[type]) !== null && _g !== void 0 ? _g : throttleBitrateDefaultRef,
|
|
81
81
|
};
|
|
82
|
-
return getEstimateReference({
|
|
82
|
+
return getEstimateReference({
|
|
83
|
+
bandwidthEstimator: bandwidthEstimator,
|
|
84
|
+
context: context,
|
|
85
|
+
currentRepresentation: currentRepresentation,
|
|
86
|
+
filters: filters,
|
|
87
|
+
initialBitrate: initialBitrate,
|
|
88
|
+
manualBitrate: manualBitrate,
|
|
89
|
+
minAutoBitrate: minAutoBitrate,
|
|
90
|
+
maxAutoBitrate: maxAutoBitrate,
|
|
91
|
+
playbackObserver: playbackObserver,
|
|
92
|
+
representations: representations,
|
|
93
|
+
lowLatencyMode: lowLatencyMode,
|
|
94
|
+
}, stopAllEstimates);
|
|
83
95
|
};
|
|
84
96
|
/**
|
|
85
97
|
* Returns interface allowing to estimate network throughtput for a given type.
|
|
@@ -131,7 +143,9 @@ function getEstimateReference(_a, stopAllEstimates) {
|
|
|
131
143
|
requestBegin: onRequestBegin,
|
|
132
144
|
requestProgress: onRequestProgress,
|
|
133
145
|
requestEnd: onRequestEnd,
|
|
134
|
-
addedSegment: function (val) {
|
|
146
|
+
addedSegment: function (val) {
|
|
147
|
+
onAddedSegment(val);
|
|
148
|
+
},
|
|
135
149
|
};
|
|
136
150
|
/**
|
|
137
151
|
* `TaskCanceller` allowing to stop producing estimate.
|
|
@@ -142,7 +156,9 @@ function getEstimateReference(_a, stopAllEstimates) {
|
|
|
142
156
|
currentEstimatesCanceller.linkToSignal(stopAllEstimates);
|
|
143
157
|
// Create `SharedReference` on which estimates will be emitted.
|
|
144
158
|
var estimateRef = createEstimateReference(representationsRef.getValue(), currentEstimatesCanceller.signal);
|
|
145
|
-
representationsRef.onUpdate(restartEstimatesProductionFromCurrentConditions, {
|
|
159
|
+
representationsRef.onUpdate(restartEstimatesProductionFromCurrentConditions, {
|
|
160
|
+
clearSignal: stopAllEstimates,
|
|
161
|
+
});
|
|
146
162
|
return { estimates: estimateRef, callbacks: callbacks };
|
|
147
163
|
function createEstimateReference(representations, innerCancellationSignal) {
|
|
148
164
|
if (representations.length === 0) {
|
|
@@ -157,11 +173,13 @@ function getEstimateReference(_a, stopAllEstimates) {
|
|
|
157
173
|
}
|
|
158
174
|
if (representations.length === 1) {
|
|
159
175
|
// There's only a single Representation. Just choose it.
|
|
160
|
-
return new SharedReference({
|
|
176
|
+
return new SharedReference({
|
|
177
|
+
bitrate: undefined,
|
|
161
178
|
representation: representations[0],
|
|
162
179
|
manual: false,
|
|
163
180
|
urgent: true,
|
|
164
|
-
knownStableBitrate: undefined
|
|
181
|
+
knownStableBitrate: undefined,
|
|
182
|
+
});
|
|
165
183
|
}
|
|
166
184
|
/** If true, Representation estimates based on the buffer health might be used. */
|
|
167
185
|
var allowBufferBasedEstimates = false;
|
|
@@ -236,14 +254,12 @@ function getEstimateReference(_a, stopAllEstimates) {
|
|
|
236
254
|
var maxAutoBitrateVal = maxAutoBitrate.getValue();
|
|
237
255
|
var filteredReps = getFilteredRepresentations(representations, widthLimit, bitrateThrottle);
|
|
238
256
|
var requests = requestsStore.getRequests();
|
|
239
|
-
var _a = networkAnalyzer
|
|
240
|
-
.getBandwidthEstimate(lastPlaybackObservation, bandwidthEstimator, currentRepresentationVal, requests, prevEstimate.bandwidth), bandwidthEstimate = _a.bandwidthEstimate, bitrateChosen = _a.bitrateChosen;
|
|
257
|
+
var _a = networkAnalyzer.getBandwidthEstimate(lastPlaybackObservation, bandwidthEstimator, currentRepresentationVal, requests, prevEstimate.bandwidth), bandwidthEstimate = _a.bandwidthEstimate, bitrateChosen = _a.bitrateChosen;
|
|
241
258
|
var stableRepresentation = scoreCalculator.getLastStableRepresentation();
|
|
242
|
-
var knownStableBitrate = stableRepresentation === null
|
|
243
|
-
undefined
|
|
244
|
-
stableRepresentation.bitrate /
|
|
245
|
-
lastPlaybackObservation.speed :
|
|
246
|
-
1);
|
|
259
|
+
var knownStableBitrate = stableRepresentation === null
|
|
260
|
+
? undefined
|
|
261
|
+
: stableRepresentation.bitrate /
|
|
262
|
+
(lastPlaybackObservation.speed > 0 ? lastPlaybackObservation.speed : 1);
|
|
247
263
|
var _b = config.getCurrent(), ABR_ENTER_BUFFER_BASED_ALGO = _b.ABR_ENTER_BUFFER_BASED_ALGO, ABR_EXIT_BUFFER_BASED_ALGO = _b.ABR_EXIT_BUFFER_BASED_ALGO;
|
|
248
264
|
if (allowBufferBasedEstimates && bufferGap <= ABR_EXIT_BUFFER_BASED_ALGO) {
|
|
249
265
|
allowBufferBasedEstimates = false;
|
|
@@ -303,34 +319,42 @@ function getEstimateReference(_a, stopAllEstimates) {
|
|
|
303
319
|
currentRepresentationVal !== null &&
|
|
304
320
|
context.manifest.isDynamic &&
|
|
305
321
|
maximumPosition - position.last < 40) {
|
|
306
|
-
chosenRepFromGuessMode = guessBasedChooser
|
|
307
|
-
.getGuess(representations, lastPlaybackObservation, currentRepresentationVal, currentBestBitrate, requests);
|
|
322
|
+
chosenRepFromGuessMode = guessBasedChooser.getGuess(representations, lastPlaybackObservation, currentRepresentationVal, currentBestBitrate, requests);
|
|
308
323
|
}
|
|
309
324
|
if (chosenRepFromGuessMode !== null &&
|
|
310
325
|
chosenRepFromGuessMode.bitrate > currentBestBitrate) {
|
|
311
326
|
log.debug("ABR: Choosing representation with guess-based estimation.", chosenRepFromGuessMode.bitrate, chosenRepFromGuessMode.id);
|
|
312
327
|
prevEstimate.update(chosenRepFromGuessMode, bandwidthEstimate, 2 /* ABRAlgorithmType.GuessBased */);
|
|
313
|
-
return {
|
|
328
|
+
return {
|
|
329
|
+
bitrate: bandwidthEstimate,
|
|
314
330
|
representation: chosenRepFromGuessMode,
|
|
315
331
|
urgent: currentRepresentationVal === null ||
|
|
316
332
|
chosenRepFromGuessMode.bitrate < currentRepresentationVal.bitrate,
|
|
317
|
-
manual: false,
|
|
333
|
+
manual: false,
|
|
334
|
+
knownStableBitrate: knownStableBitrate,
|
|
335
|
+
};
|
|
318
336
|
}
|
|
319
337
|
else if (chosenRepFromBufferSize !== null) {
|
|
320
338
|
log.debug("ABR: Choosing representation with buffer-based estimation.", chosenRepFromBufferSize.bitrate, chosenRepFromBufferSize.id);
|
|
321
339
|
prevEstimate.update(chosenRepFromBufferSize, bandwidthEstimate, 0 /* ABRAlgorithmType.BufferBased */);
|
|
322
|
-
return {
|
|
340
|
+
return {
|
|
341
|
+
bitrate: bandwidthEstimate,
|
|
323
342
|
representation: chosenRepFromBufferSize,
|
|
324
343
|
urgent: networkAnalyzer.isUrgent(chosenRepFromBufferSize.bitrate, currentRepresentationVal, requests, lastPlaybackObservation),
|
|
325
|
-
manual: false,
|
|
344
|
+
manual: false,
|
|
345
|
+
knownStableBitrate: knownStableBitrate,
|
|
346
|
+
};
|
|
326
347
|
}
|
|
327
348
|
else {
|
|
328
349
|
log.debug("ABR: Choosing representation with bandwidth estimation.", chosenRepFromBandwidth.bitrate, chosenRepFromBandwidth.id);
|
|
329
350
|
prevEstimate.update(chosenRepFromBandwidth, bandwidthEstimate, 1 /* ABRAlgorithmType.BandwidthBased */);
|
|
330
|
-
return {
|
|
351
|
+
return {
|
|
352
|
+
bitrate: bandwidthEstimate,
|
|
331
353
|
representation: chosenRepFromBandwidth,
|
|
332
354
|
urgent: networkAnalyzer.isUrgent(chosenRepFromBandwidth.bitrate, currentRepresentationVal, requests, lastPlaybackObservation),
|
|
333
|
-
manual: false,
|
|
355
|
+
manual: false,
|
|
356
|
+
knownStableBitrate: knownStableBitrate,
|
|
357
|
+
};
|
|
334
358
|
}
|
|
335
359
|
}
|
|
336
360
|
}
|
|
@@ -346,8 +370,7 @@ function getEstimateReference(_a, stopAllEstimates) {
|
|
|
346
370
|
var newRef = createEstimateReference(representations, currentEstimatesCanceller.signal);
|
|
347
371
|
newRef.onUpdate(function onNewEstimate(newEstimate) {
|
|
348
372
|
estimateRef.setValue(newEstimate);
|
|
349
|
-
}, { clearSignal: currentEstimatesCanceller.signal,
|
|
350
|
-
emitCurrentValue: true });
|
|
373
|
+
}, { clearSignal: currentEstimatesCanceller.signal, emitCurrentValue: true });
|
|
351
374
|
}
|
|
352
375
|
/**
|
|
353
376
|
* Callback to call when new metrics are available
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { IRepresentationMaintainabilityScore } from "./utils/representation_score_calculator";
|
|
16
|
+
import type { IRepresentationMaintainabilityScore } from "./utils/representation_score_calculator";
|
|
17
17
|
/**
|
|
18
18
|
* Choose a bitrate based on the currently available buffer.
|
|
19
19
|
*
|
|
@@ -82,7 +82,8 @@ var BufferBasedChooser = /** @class */ (function () {
|
|
|
82
82
|
this._bitrates = bitrates;
|
|
83
83
|
this._lastUnsuitableQualityTimestamp = undefined;
|
|
84
84
|
this._blockRaiseDelay = MINIMUM_BLOCK_RAISE_DELAY;
|
|
85
|
-
log.debug("ABR: Steps for buffer based chooser.", this._levelsMap
|
|
85
|
+
log.debug("ABR: Steps for buffer based chooser.", this._levelsMap
|
|
86
|
+
.map(function (l, i) { return "bufferLevel: ".concat(l, ", bitrate: ").concat(bitrates[i]); })
|
|
86
87
|
.join(" ,"));
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
@@ -115,18 +116,17 @@ var BufferBasedChooser = /** @class */ (function () {
|
|
|
115
116
|
}
|
|
116
117
|
var scaledScore;
|
|
117
118
|
if (currentScore !== undefined) {
|
|
118
|
-
scaledScore = speed === 0 ? currentScore.score :
|
|
119
|
+
scaledScore = speed === 0 ? currentScore.score : currentScore.score / speed;
|
|
119
120
|
}
|
|
120
|
-
var actualBufferGap = isFinite(bufferGap) ?
|
|
121
|
-
bufferGap :
|
|
122
|
-
0;
|
|
121
|
+
var actualBufferGap = isFinite(bufferGap) ? bufferGap : 0;
|
|
123
122
|
var now = performance.now();
|
|
124
123
|
if (actualBufferGap < bufferLevels[currentBitrateIndex] ||
|
|
125
|
-
(scaledScore !== undefined &&
|
|
124
|
+
(scaledScore !== undefined &&
|
|
125
|
+
scaledScore < 1 &&
|
|
126
126
|
(currentScore === null || currentScore === void 0 ? void 0 : currentScore.confidenceLevel) === 1 /* ScoreConfidenceLevel.HIGH */)) {
|
|
127
|
-
var timeSincePrev = this._lastUnsuitableQualityTimestamp === undefined
|
|
128
|
-
-1
|
|
129
|
-
now - this._lastUnsuitableQualityTimestamp;
|
|
127
|
+
var timeSincePrev = this._lastUnsuitableQualityTimestamp === undefined
|
|
128
|
+
? -1
|
|
129
|
+
: now - this._lastUnsuitableQualityTimestamp;
|
|
130
130
|
if (timeSincePrev < this._blockRaiseDelay + STABILITY_CHECK_DELAY) {
|
|
131
131
|
var newDelay = this._blockRaiseDelay + RAISE_BLOCKING_DELAY_INCREMENT;
|
|
132
132
|
this._blockRaiseDelay = Math.min(newDelay, MAXIMUM_BLOCK_RAISE_DELAY);
|
|
@@ -152,7 +152,8 @@ var BufferBasedChooser = /** @class */ (function () {
|
|
|
152
152
|
}
|
|
153
153
|
if ((this._lastUnsuitableQualityTimestamp !== undefined &&
|
|
154
154
|
now - this._lastUnsuitableQualityTimestamp < this._blockRaiseDelay) ||
|
|
155
|
-
scaledScore === undefined ||
|
|
155
|
+
scaledScore === undefined ||
|
|
156
|
+
scaledScore < 1.15 ||
|
|
156
157
|
(currentScore === null || currentScore === void 0 ? void 0 : currentScore.confidenceLevel) !== 1 /* ScoreConfidenceLevel.HIGH */) {
|
|
157
158
|
this._currentEstimate = currentBitrate;
|
|
158
159
|
return;
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Representation } from "../../manifest";
|
|
17
|
-
import LastEstimateStorage from "./utils/last_estimate_storage";
|
|
18
|
-
import { IRequestInfo } from "./utils/pending_requests_store";
|
|
19
|
-
import RepresentationScoreCalculator from "./utils/representation_score_calculator";
|
|
16
|
+
import type { Representation } from "../../manifest";
|
|
17
|
+
import type LastEstimateStorage from "./utils/last_estimate_storage";
|
|
18
|
+
import type { IRequestInfo } from "./utils/pending_requests_store";
|
|
19
|
+
import type RepresentationScoreCalculator from "./utils/representation_score_calculator";
|
|
20
20
|
/**
|
|
21
21
|
* Estimate which Representation should be played based on risky "guesses".
|
|
22
22
|
*
|
|
@@ -103,8 +103,8 @@ var GuessBasedChooser = /** @class */ (function () {
|
|
|
103
103
|
if (shouldStopGuess) {
|
|
104
104
|
// Block guesses for a time
|
|
105
105
|
this._consecutiveWrongGuesses++;
|
|
106
|
-
this._blockGuessesUntil =
|
|
107
|
-
Math.min(this._consecutiveWrongGuesses * 15000, 120000);
|
|
106
|
+
this._blockGuessesUntil =
|
|
107
|
+
performance.now() + Math.min(this._consecutiveWrongGuesses * 15000, 120000);
|
|
108
108
|
return getPreviousRepresentation(representations, currentRepresentation);
|
|
109
109
|
}
|
|
110
110
|
else if (scoreData === undefined) {
|
|
@@ -128,10 +128,11 @@ var GuessBasedChooser = /** @class */ (function () {
|
|
|
128
128
|
*/
|
|
129
129
|
GuessBasedChooser.prototype._canGuessHigher = function (bufferGap, speed, _a) {
|
|
130
130
|
var score = _a.score, confidenceLevel = _a.confidenceLevel;
|
|
131
|
-
return isFinite(bufferGap) &&
|
|
131
|
+
return (isFinite(bufferGap) &&
|
|
132
|
+
bufferGap >= 2.5 &&
|
|
132
133
|
performance.now() > this._blockGuessesUntil &&
|
|
133
134
|
confidenceLevel === 1 /* ScoreConfidenceLevel.HIGH */ &&
|
|
134
|
-
score / speed > 1.01;
|
|
135
|
+
score / speed > 1.01);
|
|
135
136
|
};
|
|
136
137
|
/**
|
|
137
138
|
* Returns `true` if the pending guess of `lastGuess` seems to not
|
|
@@ -179,9 +180,9 @@ var GuessBasedChooser = /** @class */ (function () {
|
|
|
179
180
|
scoreData.score > 1.5) {
|
|
180
181
|
return true;
|
|
181
182
|
}
|
|
182
|
-
return incomingBestBitrate >= lastGuess.bitrate &&
|
|
183
|
+
return (incomingBestBitrate >= lastGuess.bitrate &&
|
|
183
184
|
(this._lastMaintanableBitrate === null ||
|
|
184
|
-
this._lastMaintanableBitrate < lastGuess.bitrate);
|
|
185
|
+
this._lastMaintanableBitrate < lastGuess.bitrate));
|
|
185
186
|
};
|
|
186
187
|
return GuessBasedChooser;
|
|
187
188
|
}());
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import
|
|
16
|
+
import type { IABREstimate, IAdaptiveRepresentationSelectorArguments, IAddedSegmentCallbackPayload, IMetricsCallbackPayload, IRepresentationEstimator, IRepresentationEstimatorCallbacks, IRepresentationEstimatorPlaybackObservation, IRepresentationEstimatorThrottlers as IABRThrottlers, IRequestBeginCallbackPayload, IRequestEndCallbackPayload, IRequestProgressCallbackPayload } from "./adaptive_representation_selector";
|
|
17
|
+
import AdaptiveRepresentationSelector from "./adaptive_representation_selector";
|
|
17
18
|
export default AdaptiveRepresentationSelector;
|
|
18
|
-
export { IAdaptiveRepresentationSelectorArguments, IABRThrottlers, IRepresentationEstimator, IAddedSegmentCallbackPayload, IABREstimate, IMetricsCallbackPayload, IRepresentationEstimatorCallbacks, IRepresentationEstimatorPlaybackObservation, IRequestBeginCallbackPayload, IRequestProgressCallbackPayload, IRequestEndCallbackPayload, };
|
|
19
|
+
export type { IAdaptiveRepresentationSelectorArguments, IABRThrottlers, IRepresentationEstimator, IAddedSegmentCallbackPayload, IABREstimate, IMetricsCallbackPayload, IRepresentationEstimatorCallbacks, IRepresentationEstimatorPlaybackObservation, IRequestBeginCallbackPayload, IRequestProgressCallbackPayload, IRequestEndCallbackPayload, };
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Representation } from "../../manifest";
|
|
17
|
-
import { IRepresentationEstimatorPlaybackObservation } from "./adaptive_representation_selector";
|
|
18
|
-
import BandwidthEstimator from "./utils/bandwidth_estimator";
|
|
19
|
-
import { IRequestInfo } from "./utils/pending_requests_store";
|
|
16
|
+
import type { Representation } from "../../manifest";
|
|
17
|
+
import type { IRepresentationEstimatorPlaybackObservation } from "./adaptive_representation_selector";
|
|
18
|
+
import type BandwidthEstimator from "./utils/bandwidth_estimator";
|
|
19
|
+
import type { IRequestInfo } from "./utils/pending_requests_store";
|
|
20
20
|
/** Object describing the current playback conditions. */
|
|
21
21
|
type IPlaybackConditionsInfo = Pick<IRepresentationEstimatorPlaybackObservation, "bufferGap" | "position" | "speed" | "duration">;
|
|
22
22
|
/**
|
|
@@ -44,7 +44,8 @@ function getConcernedRequests(requests, neededPosition) {
|
|
|
44
44
|
break;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
if (nextSegmentIndex < 0) {
|
|
47
|
+
if (nextSegmentIndex < 0) {
|
|
48
|
+
// Not found
|
|
48
49
|
return [];
|
|
49
50
|
}
|
|
50
51
|
var nextRequest = requests[nextSegmentIndex];
|
|
@@ -69,7 +70,8 @@ function getConcernedRequests(requests, neededPosition) {
|
|
|
69
70
|
* @returns {number|undefined}
|
|
70
71
|
*/
|
|
71
72
|
export function estimateRequestBandwidth(request) {
|
|
72
|
-
if (request.progress.length < 5) {
|
|
73
|
+
if (request.progress.length < 5) {
|
|
74
|
+
// threshold from which we can consider
|
|
73
75
|
// progress events reliably
|
|
74
76
|
return undefined;
|
|
75
77
|
}
|
|
@@ -116,11 +118,11 @@ function estimateStarvationModeBitrate(pendingRequests, playbackInfo, currentRep
|
|
|
116
118
|
return undefined;
|
|
117
119
|
}
|
|
118
120
|
var bufferGap = playbackInfo.bufferGap, speed = playbackInfo.speed, position = playbackInfo.position;
|
|
119
|
-
var realBufferGap = isFinite(bufferGap) ? bufferGap :
|
|
120
|
-
0;
|
|
121
|
+
var realBufferGap = isFinite(bufferGap) ? bufferGap : 0;
|
|
121
122
|
var nextNeededPosition = position.last + realBufferGap;
|
|
122
123
|
var concernedRequests = getConcernedRequests(pendingRequests, nextNeededPosition);
|
|
123
|
-
if (concernedRequests.length !== 1) {
|
|
124
|
+
if (concernedRequests.length !== 1) {
|
|
125
|
+
// 0 == no request
|
|
124
126
|
// 2+ == too complicated to calculate
|
|
125
127
|
return undefined;
|
|
126
128
|
}
|
|
@@ -132,9 +134,9 @@ function estimateStarvationModeBitrate(pendingRequests, playbackInfo, currentRep
|
|
|
132
134
|
if (now - concernedRequest.requestTimestamp < minimumRequestTime) {
|
|
133
135
|
return undefined;
|
|
134
136
|
}
|
|
135
|
-
var lastProgressEvent = concernedRequest.progress.length > 0
|
|
136
|
-
concernedRequest.progress[concernedRequest.progress.length - 1]
|
|
137
|
-
undefined;
|
|
137
|
+
var lastProgressEvent = concernedRequest.progress.length > 0
|
|
138
|
+
? concernedRequest.progress[concernedRequest.progress.length - 1]
|
|
139
|
+
: undefined;
|
|
138
140
|
// first, try to do a quick estimate from progress events
|
|
139
141
|
var bandwidthEstimate = estimateRequestBandwidth(concernedRequest);
|
|
140
142
|
if (lastProgressEvent !== undefined && bandwidthEstimate !== undefined) {
|
|
@@ -142,8 +144,7 @@ function estimateStarvationModeBitrate(pendingRequests, playbackInfo, currentRep
|
|
|
142
144
|
// if the remaining time does seem reliable
|
|
143
145
|
if ((now - lastProgressEvent.timestamp) / 1000 <= remainingTime) {
|
|
144
146
|
// Calculate estimated time spent rebuffering if we continue doing that request.
|
|
145
|
-
var expectedRebufferingTime = remainingTime -
|
|
146
|
-
(realBufferGap / speed);
|
|
147
|
+
var expectedRebufferingTime = remainingTime - realBufferGap / speed;
|
|
147
148
|
if (expectedRebufferingTime > 2500) {
|
|
148
149
|
return bandwidthEstimate;
|
|
149
150
|
}
|
|
@@ -154,16 +155,14 @@ function estimateStarvationModeBitrate(pendingRequests, playbackInfo, currentRep
|
|
|
154
155
|
}
|
|
155
156
|
var chunkDuration = concernedRequest.content.segment.duration;
|
|
156
157
|
var requestElapsedTime = (now - concernedRequest.requestTimestamp) / 1000;
|
|
157
|
-
var reasonableElapsedTime = requestElapsedTime <=
|
|
158
|
-
((chunkDuration * 1.5 + 2) / speed);
|
|
158
|
+
var reasonableElapsedTime = requestElapsedTime <= (chunkDuration * 1.5 + 2) / speed;
|
|
159
159
|
if (currentRepresentation == null || reasonableElapsedTime) {
|
|
160
160
|
return undefined;
|
|
161
161
|
}
|
|
162
162
|
// calculate a reduced bitrate from the current one
|
|
163
163
|
var factor = chunkDuration / requestElapsedTime;
|
|
164
164
|
var reducedBitrate = currentRepresentation.bitrate * Math.min(0.7, factor);
|
|
165
|
-
if (lastEstimatedBitrate === undefined ||
|
|
166
|
-
reducedBitrate < lastEstimatedBitrate) {
|
|
165
|
+
if (lastEstimatedBitrate === undefined || reducedBitrate < lastEstimatedBitrate) {
|
|
167
166
|
return reducedBitrate;
|
|
168
167
|
}
|
|
169
168
|
}
|
|
@@ -184,32 +183,30 @@ function shouldDirectlySwitchToLowBitrate(playbackInfo, requests, lowLatencyMode
|
|
|
184
183
|
// TODO only when playing close to the live edge?
|
|
185
184
|
return true;
|
|
186
185
|
}
|
|
187
|
-
var realBufferGap = isFinite(playbackInfo.bufferGap) ? playbackInfo.bufferGap :
|
|
188
|
-
0;
|
|
186
|
+
var realBufferGap = isFinite(playbackInfo.bufferGap) ? playbackInfo.bufferGap : 0;
|
|
189
187
|
var nextNeededPosition = playbackInfo.position.last + realBufferGap;
|
|
190
188
|
var nextRequest = arrayFind(requests, function (_a) {
|
|
191
189
|
var content = _a.content;
|
|
192
190
|
return content.segment.duration > 0 &&
|
|
193
|
-
|
|
191
|
+
content.segment.time + content.segment.duration > nextNeededPosition;
|
|
194
192
|
});
|
|
195
193
|
if (nextRequest === undefined) {
|
|
196
194
|
return true;
|
|
197
195
|
}
|
|
198
196
|
var now = performance.now();
|
|
199
|
-
var lastProgressEvent = nextRequest.progress.length > 0
|
|
200
|
-
nextRequest.progress[nextRequest.progress.length - 1]
|
|
201
|
-
undefined;
|
|
197
|
+
var lastProgressEvent = nextRequest.progress.length > 0
|
|
198
|
+
? nextRequest.progress[nextRequest.progress.length - 1]
|
|
199
|
+
: undefined;
|
|
202
200
|
// first, try to do a quick estimate from progress events
|
|
203
201
|
var bandwidthEstimate = estimateRequestBandwidth(nextRequest);
|
|
204
202
|
if (lastProgressEvent === undefined || bandwidthEstimate === undefined) {
|
|
205
203
|
return true;
|
|
206
204
|
}
|
|
207
205
|
var remainingTime = estimateRemainingTime(lastProgressEvent, bandwidthEstimate);
|
|
208
|
-
if ((now - lastProgressEvent.timestamp) / 1000 >
|
|
206
|
+
if ((now - lastProgressEvent.timestamp) / 1000 > remainingTime * 1.2) {
|
|
209
207
|
return true;
|
|
210
208
|
}
|
|
211
|
-
var expectedRebufferingTime = remainingTime -
|
|
212
|
-
(realBufferGap / playbackInfo.speed);
|
|
209
|
+
var expectedRebufferingTime = remainingTime - realBufferGap / playbackInfo.speed;
|
|
213
210
|
return expectedRebufferingTime > -1.5;
|
|
214
211
|
}
|
|
215
212
|
/**
|
|
@@ -224,16 +221,20 @@ var NetworkAnalyzer = /** @class */ (function () {
|
|
|
224
221
|
this._inStarvationMode = false;
|
|
225
222
|
this._lowLatencyMode = lowLatencyMode;
|
|
226
223
|
if (lowLatencyMode) {
|
|
227
|
-
this._config = {
|
|
224
|
+
this._config = {
|
|
225
|
+
starvationGap: ABR_STARVATION_GAP.LOW_LATENCY,
|
|
228
226
|
outOfStarvationGap: OUT_OF_STARVATION_GAP.LOW_LATENCY,
|
|
229
227
|
starvationBitrateFactor: ABR_STARVATION_FACTOR.LOW_LATENCY,
|
|
230
|
-
regularBitrateFactor: ABR_REGULAR_FACTOR.LOW_LATENCY
|
|
228
|
+
regularBitrateFactor: ABR_REGULAR_FACTOR.LOW_LATENCY,
|
|
229
|
+
};
|
|
231
230
|
}
|
|
232
231
|
else {
|
|
233
|
-
this._config = {
|
|
232
|
+
this._config = {
|
|
233
|
+
starvationGap: ABR_STARVATION_GAP.DEFAULT,
|
|
234
234
|
outOfStarvationGap: OUT_OF_STARVATION_GAP.DEFAULT,
|
|
235
235
|
starvationBitrateFactor: ABR_STARVATION_FACTOR.DEFAULT,
|
|
236
|
-
regularBitrateFactor: ABR_REGULAR_FACTOR.DEFAULT
|
|
236
|
+
regularBitrateFactor: ABR_REGULAR_FACTOR.DEFAULT,
|
|
237
|
+
};
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
240
|
/**
|
|
@@ -257,8 +258,7 @@ var NetworkAnalyzer = /** @class */ (function () {
|
|
|
257
258
|
var bandwidthEstimate;
|
|
258
259
|
var localConf = this._config;
|
|
259
260
|
var bufferGap = playbackInfo.bufferGap, position = playbackInfo.position, duration = playbackInfo.duration;
|
|
260
|
-
var realBufferGap = isFinite(bufferGap) ? bufferGap :
|
|
261
|
-
0;
|
|
261
|
+
var realBufferGap = isFinite(bufferGap) ? bufferGap : 0;
|
|
262
262
|
var ABR_STARVATION_DURATION_DELTA = config.getCurrent().ABR_STARVATION_DURATION_DELTA;
|
|
263
263
|
// check if should get in/out of starvation mode
|
|
264
264
|
if (isNaN(duration) ||
|
|
@@ -285,23 +285,28 @@ var NetworkAnalyzer = /** @class */ (function () {
|
|
|
285
285
|
if (bandwidthEstimate != null) {
|
|
286
286
|
log.info("ABR: starvation mode emergency estimate:", bandwidthEstimate);
|
|
287
287
|
bandwidthEstimator.reset();
|
|
288
|
-
newBitrateCeil =
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
newBitrateCeil =
|
|
289
|
+
currentRepresentation == null
|
|
290
|
+
? bandwidthEstimate
|
|
291
|
+
: Math.min(bandwidthEstimate, currentRepresentation.bitrate);
|
|
291
292
|
}
|
|
292
293
|
}
|
|
293
294
|
// if newBitrateCeil is not yet defined, do the normal estimation
|
|
294
295
|
if (newBitrateCeil == null) {
|
|
295
296
|
bandwidthEstimate = bandwidthEstimator.getEstimate();
|
|
296
297
|
if (bandwidthEstimate != null) {
|
|
297
|
-
newBitrateCeil =
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
newBitrateCeil =
|
|
299
|
+
bandwidthEstimate *
|
|
300
|
+
(this._inStarvationMode
|
|
301
|
+
? localConf.starvationBitrateFactor
|
|
302
|
+
: localConf.regularBitrateFactor);
|
|
300
303
|
}
|
|
301
304
|
else if (lastEstimatedBitrate != null) {
|
|
302
|
-
newBitrateCeil =
|
|
303
|
-
|
|
304
|
-
|
|
305
|
+
newBitrateCeil =
|
|
306
|
+
lastEstimatedBitrate *
|
|
307
|
+
(this._inStarvationMode
|
|
308
|
+
? localConf.starvationBitrateFactor
|
|
309
|
+
: localConf.regularBitrateFactor);
|
|
305
310
|
}
|
|
306
311
|
else {
|
|
307
312
|
newBitrateCeil = this._initialBitrate;
|
|
@@ -39,7 +39,7 @@ var BandwidthEstimator = /** @class */ (function () {
|
|
|
39
39
|
if (numberOfBytes < ABR_MINIMUM_CHUNK_SIZE) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
var bandwidth = numberOfBytes * 8000 / durationInMs;
|
|
42
|
+
var bandwidth = (numberOfBytes * 8000) / durationInMs;
|
|
43
43
|
var weight = durationInMs / 1000;
|
|
44
44
|
this._bytesSampled += numberOfBytes;
|
|
45
45
|
this._fastEWMA.addSample(weight, bandwidth);
|
|
@@ -33,8 +33,7 @@ var EWMA = /** @class */ (function () {
|
|
|
33
33
|
*/
|
|
34
34
|
EWMA.prototype.addSample = function (weight, value) {
|
|
35
35
|
var adjAlpha = Math.pow(this._alpha, weight);
|
|
36
|
-
var newEstimate = value * (1 - adjAlpha) +
|
|
37
|
-
adjAlpha * this._lastEstimate;
|
|
36
|
+
var newEstimate = value * (1 - adjAlpha) + adjAlpha * this._lastEstimate;
|
|
38
37
|
if (!isNaN(newEstimate)) {
|
|
39
38
|
this._lastEstimate = newEstimate;
|
|
40
39
|
this._totalWeight += weight;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Representation } from "../../../manifest";
|
|
16
|
+
import type { Representation } from "../../../manifest";
|
|
17
17
|
/**
|
|
18
18
|
* Get only representations lower or equal to a given bitrate.
|
|
19
19
|
* If no representation is lower than the given bitrate, returns an array containing
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Representation } from "../../../manifest";
|
|
16
|
+
import type { Representation } from "../../../manifest";
|
|
17
17
|
/**
|
|
18
18
|
* Filter representations based on their width:
|
|
19
19
|
* - the highest width considered will be the one linked to the first
|
|
@@ -27,16 +27,13 @@ export default function filterByWidth(representations, width) {
|
|
|
27
27
|
.slice() // clone
|
|
28
28
|
.sort(function (a, b) { var _a, _b; return ((_a = a.width) !== null && _a !== void 0 ? _a : 0) - ((_b = b.width) !== null && _b !== void 0 ? _b : 0); });
|
|
29
29
|
var repWithMaxWidth = arrayFind(sortedRepsByWidth, function (representation) {
|
|
30
|
-
return typeof representation.width === "number" &&
|
|
31
|
-
representation.width >= width;
|
|
30
|
+
return typeof representation.width === "number" && representation.width >= width;
|
|
32
31
|
});
|
|
33
32
|
if (repWithMaxWidth === undefined) {
|
|
34
33
|
return representations;
|
|
35
34
|
}
|
|
36
|
-
var maxWidth = typeof repWithMaxWidth.width === "number" ? repWithMaxWidth.width :
|
|
37
|
-
0;
|
|
35
|
+
var maxWidth = typeof repWithMaxWidth.width === "number" ? repWithMaxWidth.width : 0;
|
|
38
36
|
return representations.filter(function (representation) {
|
|
39
|
-
return typeof representation.width === "number" ? representation.width <= maxWidth :
|
|
40
|
-
true;
|
|
37
|
+
return typeof representation.width === "number" ? representation.width <= maxWidth : true;
|
|
41
38
|
});
|
|
42
39
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
export default function getBufferLevels(bitrates) {
|
|
25
25
|
var logs = bitrates.map(function (b) { return Math.log(b / bitrates[0]); });
|
|
26
26
|
var utilities = logs.map(function (l) { return l - logs[0] + 1; }); // normalize
|
|
27
|
-
var gp = (utilities[utilities.length - 1] - 1) / (
|
|
27
|
+
var gp = (utilities[utilities.length - 1] - 1) / (bitrates.length * 2 + 10);
|
|
28
28
|
var Vp = 1 / gp;
|
|
29
29
|
return bitrates.map(function (_, i) { return minBufferLevelForBitrate(i); });
|
|
30
30
|
/**
|
|
@@ -40,8 +40,11 @@ export default function getBufferLevels(bitrates) {
|
|
|
40
40
|
if (bitrates[boundedIndex] === bitrates[boundedIndex - 1]) {
|
|
41
41
|
return minBufferLevelForBitrate(index - 1);
|
|
42
42
|
}
|
|
43
|
-
return Vp *
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
return (Vp *
|
|
44
|
+
(gp +
|
|
45
|
+
(bitrates[boundedIndex] * utilities[boundedIndex - 1] -
|
|
46
|
+
bitrates[boundedIndex - 1] * utilities[boundedIndex]) /
|
|
47
|
+
(bitrates[boundedIndex] - bitrates[boundedIndex - 1])) +
|
|
48
|
+
4);
|
|
46
49
|
}
|
|
47
50
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Representation } from "../../../manifest";
|
|
16
|
+
import type { Representation } from "../../../manifest";
|
|
17
17
|
/** Stores the last estimate made by the `RepresentationEstimator`. */
|
|
18
18
|
export default class LastEstimateStorage {
|
|
19
19
|
/**
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import
|
|
16
|
+
import type { Adaptation, ISegment, Period, Representation } from "../../../manifest";
|
|
17
|
+
import type Manifest from "../../../manifest";
|
|
17
18
|
/**
|
|
18
19
|
* Store information about pending requests, like information about:
|
|
19
20
|
* - for which segments they are
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Representation } from "../../../manifest";
|
|
16
|
+
import type { Representation } from "../../../manifest";
|
|
17
17
|
/**
|
|
18
18
|
* Object representing a maintainability score as calculated by the
|
|
19
19
|
* `RepresentationScoreCalculator`.
|
|
@@ -70,9 +70,12 @@ var RepresentationScoreCalculator = /** @class */ (function () {
|
|
|
70
70
|
else {
|
|
71
71
|
currentEWMA = new EWMA(5);
|
|
72
72
|
currentEWMA.addSample(requestDuration, ratio);
|
|
73
|
-
this._currentRepresentationData = {
|
|
73
|
+
this._currentRepresentationData = {
|
|
74
|
+
representation: representation,
|
|
75
|
+
ewma: currentEWMA,
|
|
74
76
|
loadedDuration: segmentDuration,
|
|
75
|
-
loadedSegments: 0
|
|
77
|
+
loadedSegments: 0,
|
|
78
|
+
};
|
|
76
79
|
}
|
|
77
80
|
if (currentEWMA.getEstimate() > 1 &&
|
|
78
81
|
this._lastRepresentationWithGoodScore !== representation) {
|
|
@@ -93,9 +96,9 @@ var RepresentationScoreCalculator = /** @class */ (function () {
|
|
|
93
96
|
}
|
|
94
97
|
var _a = this._currentRepresentationData, ewma = _a.ewma, loadedSegments = _a.loadedSegments, loadedDuration = _a.loadedDuration;
|
|
95
98
|
var estimate = ewma.getEstimate();
|
|
96
|
-
var confidenceLevel = loadedSegments >= 5 &&
|
|
97
|
-
|
|
98
|
-
0 /* ScoreConfidenceLevel.LOW */;
|
|
99
|
+
var confidenceLevel = loadedSegments >= 5 && loadedDuration >= 10
|
|
100
|
+
? 1 /* ScoreConfidenceLevel.HIGH */
|
|
101
|
+
: 0 /* ScoreConfidenceLevel.LOW */;
|
|
99
102
|
return { score: estimate, confidenceLevel: confidenceLevel };
|
|
100
103
|
};
|
|
101
104
|
/**
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Representation } from "../../../manifest";
|
|
16
|
+
import type { Representation } from "../../../manifest";
|
|
17
17
|
/**
|
|
18
18
|
* From the given array of Representations (sorted by bitrate order ascending),
|
|
19
19
|
* returns the one corresponding to the given optimal, minimum and maximum
|
|
@@ -31,9 +31,11 @@ import arrayFindIndex from "../../../utils/array_find_index";
|
|
|
31
31
|
* @returns {Representation|undefined}
|
|
32
32
|
*/
|
|
33
33
|
export default function selectOptimalRepresentation(representations, optimalBitrate, minBitrate, maxBitrate) {
|
|
34
|
-
var wantedBitrate = optimalBitrate <= minBitrate
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
var wantedBitrate = optimalBitrate <= minBitrate
|
|
35
|
+
? minBitrate
|
|
36
|
+
: optimalBitrate >= maxBitrate
|
|
37
|
+
? maxBitrate
|
|
38
|
+
: optimalBitrate;
|
|
37
39
|
var firstIndexTooHigh = arrayFindIndex(representations, function (representation) { return representation.bitrate > wantedBitrate; });
|
|
38
40
|
if (firstIndexTooHigh === -1) {
|
|
39
41
|
return representations[representations.length - 1];
|