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
|
@@ -74,7 +74,7 @@ import isNullOrUndefined from "../../../utils/is_null_or_undefined";
|
|
|
74
74
|
import noop from "../../../utils/noop";
|
|
75
75
|
import TaskCanceller from "../../../utils/task_canceller";
|
|
76
76
|
import errorSelector from "../utils/error_selector";
|
|
77
|
-
import { scheduleRequestPromise
|
|
77
|
+
import { scheduleRequestPromise } from "../utils/schedule_request";
|
|
78
78
|
/**
|
|
79
79
|
* Class allowing to facilitate the task of loading and parsing a Manifest, as
|
|
80
80
|
* well as automatically refreshing it.
|
|
@@ -137,8 +137,7 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
137
137
|
manifestProm = this.parse(initialManifest, { previousManifest: null, unsafeMode: false }, undefined);
|
|
138
138
|
}
|
|
139
139
|
else {
|
|
140
|
-
manifestProm = this._fetchManifest(undefined)
|
|
141
|
-
.then(function (val) {
|
|
140
|
+
manifestProm = this._fetchManifest(undefined).then(function (val) {
|
|
142
141
|
return val.parse({ previousManifest: null, unsafeMode: false });
|
|
143
142
|
});
|
|
144
143
|
}
|
|
@@ -206,13 +205,15 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
206
205
|
*/
|
|
207
206
|
function callLoaderWithRetries(manifestUrl) {
|
|
208
207
|
var loadManifest = pipelines.loadManifest;
|
|
209
|
-
var requestTimeout = isNullOrUndefined(settings.requestTimeout)
|
|
210
|
-
config.getCurrent().DEFAULT_REQUEST_TIMEOUT
|
|
211
|
-
settings.requestTimeout;
|
|
208
|
+
var requestTimeout = isNullOrUndefined(settings.requestTimeout)
|
|
209
|
+
? config.getCurrent().DEFAULT_REQUEST_TIMEOUT
|
|
210
|
+
: settings.requestTimeout;
|
|
212
211
|
if (requestTimeout < 0) {
|
|
213
212
|
requestTimeout = undefined;
|
|
214
213
|
}
|
|
215
|
-
var callLoader = function () {
|
|
214
|
+
var callLoader = function () {
|
|
215
|
+
return loadManifest(manifestUrl, { timeout: requestTimeout }, cancelSignal);
|
|
216
|
+
};
|
|
216
217
|
return scheduleRequestPromise(callLoader, backoffSettings, cancelSignal);
|
|
217
218
|
}
|
|
218
219
|
var cancelSignal, settings, pipelines, requestUrl, backoffSettings, loadingPromise, response_1, err_1;
|
|
@@ -228,9 +229,9 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
228
229
|
backoffSettings = this._getBackoffSetting(function (err) {
|
|
229
230
|
_this.trigger("warning", errorSelector(err));
|
|
230
231
|
});
|
|
231
|
-
loadingPromise = pipelines.resolveManifestUrl === undefined
|
|
232
|
-
callLoaderWithRetries(requestUrl)
|
|
233
|
-
callResolverWithRetries(requestUrl).then(callLoaderWithRetries);
|
|
232
|
+
loadingPromise = pipelines.resolveManifestUrl === undefined
|
|
233
|
+
? callLoaderWithRetries(requestUrl)
|
|
234
|
+
: callResolverWithRetries(requestUrl).then(callLoaderWithRetries);
|
|
234
235
|
_b.label = 1;
|
|
235
236
|
case 1:
|
|
236
237
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -263,9 +264,7 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
263
264
|
* @returns {Promise}
|
|
264
265
|
*/
|
|
265
266
|
ManifestFetcher.prototype.parse = function (manifest, parserOptions, originalUrl) {
|
|
266
|
-
return this._parseLoadedManifest({ responseData: manifest,
|
|
267
|
-
size: undefined,
|
|
268
|
-
requestDuration: undefined }, parserOptions, originalUrl);
|
|
267
|
+
return this._parseLoadedManifest({ responseData: manifest, size: undefined, requestDuration: undefined }, parserOptions, originalUrl);
|
|
269
268
|
};
|
|
270
269
|
/**
|
|
271
270
|
* Parse a Manifest.
|
|
@@ -345,9 +344,12 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
345
344
|
_this.trigger("warning", errorSelector(err));
|
|
346
345
|
});
|
|
347
346
|
originalUrl = requestUrl !== null && requestUrl !== void 0 ? requestUrl : (_a = this._manifestUrls) === null || _a === void 0 ? void 0 : _a[0];
|
|
348
|
-
opts = {
|
|
347
|
+
opts = {
|
|
348
|
+
externalClockOffset: parserOptions.externalClockOffset,
|
|
349
349
|
unsafeMode: parserOptions.unsafeMode,
|
|
350
|
-
previousManifest: parserOptions.previousManifest,
|
|
350
|
+
previousManifest: parserOptions.previousManifest,
|
|
351
|
+
originalUrl: originalUrl,
|
|
352
|
+
};
|
|
351
353
|
_b.label = 1;
|
|
352
354
|
case 1:
|
|
353
355
|
_b.trys.push([1, 5, , 6]);
|
|
@@ -380,10 +382,12 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
380
382
|
ManifestFetcher.prototype._getBackoffSetting = function (onRetry) {
|
|
381
383
|
var _a = config.getCurrent(), DEFAULT_MAX_MANIFEST_REQUEST_RETRY = _a.DEFAULT_MAX_MANIFEST_REQUEST_RETRY, DEFAULT_MAX_REQUESTS_RETRY_ON_OFFLINE = _a.DEFAULT_MAX_REQUESTS_RETRY_ON_OFFLINE, INITIAL_BACKOFF_DELAY_BASE = _a.INITIAL_BACKOFF_DELAY_BASE, MAX_BACKOFF_DELAY_BASE = _a.MAX_BACKOFF_DELAY_BASE;
|
|
382
384
|
var _b = this._settings, lowLatencyMode = _b.lowLatencyMode, ogRegular = _b.maxRetryRegular, ogOffline = _b.maxRetryOffline;
|
|
383
|
-
var baseDelay = lowLatencyMode
|
|
384
|
-
INITIAL_BACKOFF_DELAY_BASE.
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
var baseDelay = lowLatencyMode
|
|
386
|
+
? INITIAL_BACKOFF_DELAY_BASE.LOW_LATENCY
|
|
387
|
+
: INITIAL_BACKOFF_DELAY_BASE.REGULAR;
|
|
388
|
+
var maxDelay = lowLatencyMode
|
|
389
|
+
? MAX_BACKOFF_DELAY_BASE.LOW_LATENCY
|
|
390
|
+
: MAX_BACKOFF_DELAY_BASE.REGULAR;
|
|
387
391
|
var maxRetryRegular = ogRegular !== null && ogRegular !== void 0 ? ogRegular : DEFAULT_MAX_MANIFEST_REQUEST_RETRY;
|
|
388
392
|
var maxRetryOffline = ogOffline !== null && ogOffline !== void 0 ? ogOffline : DEFAULT_MAX_REQUESTS_RETRY_ON_OFFLINE;
|
|
389
393
|
return { onRetry: onRetry, baseDelay: baseDelay, maxDelay: maxDelay, maxRetryRegular: maxRetryRegular, maxRetryOffline: maxRetryOffline };
|
|
@@ -402,9 +406,7 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
402
406
|
* Total time taken to fully update the last Manifest, in milliseconds.
|
|
403
407
|
* Note: this time also includes possible requests done by the parsers.
|
|
404
408
|
*/
|
|
405
|
-
var totalUpdateTime = parsingTime !== undefined ?
|
|
406
|
-
parsingTime + (updatingTime !== null && updatingTime !== void 0 ? updatingTime : 0) :
|
|
407
|
-
undefined;
|
|
409
|
+
var totalUpdateTime = parsingTime !== undefined ? parsingTime + (updatingTime !== null && updatingTime !== void 0 ? updatingTime : 0) : undefined;
|
|
408
410
|
/**
|
|
409
411
|
* "unsafeMode" is a mode where we unlock advanced Manifest parsing
|
|
410
412
|
* optimizations with the added risk to lose some information.
|
|
@@ -413,18 +415,15 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
413
415
|
* Only perform parsing in `unsafeMode` when the last full parsing took a
|
|
414
416
|
* lot of time and do not go higher than the maximum consecutive time.
|
|
415
417
|
*/
|
|
416
|
-
var unsafeModeEnabled = this._consecutiveUnsafeMode > 0
|
|
417
|
-
this._consecutiveUnsafeMode < MAX_CONSECUTIVE_MANIFEST_PARSING_IN_UNSAFE_MODE
|
|
418
|
-
totalUpdateTime !== undefined
|
|
419
|
-
|
|
420
|
-
false;
|
|
418
|
+
var unsafeModeEnabled = this._consecutiveUnsafeMode > 0
|
|
419
|
+
? this._consecutiveUnsafeMode < MAX_CONSECUTIVE_MANIFEST_PARSING_IN_UNSAFE_MODE
|
|
420
|
+
: totalUpdateTime !== undefined
|
|
421
|
+
? totalUpdateTime >= MIN_MANIFEST_PARSING_TIME_TO_ENTER_UNSAFE_MODE
|
|
422
|
+
: false;
|
|
421
423
|
/** Time elapsed since the beginning of the Manifest request, in milliseconds. */
|
|
422
|
-
var timeSinceRequest = sendingTime === undefined ?
|
|
423
|
-
0 :
|
|
424
|
-
performance.now() - sendingTime;
|
|
424
|
+
var timeSinceRequest = sendingTime === undefined ? 0 : performance.now() - sendingTime;
|
|
425
425
|
/** Minimum update delay we should not go below, in milliseconds. */
|
|
426
|
-
var minInterval = Math.max(this._settings.minimumManifestUpdateInterval -
|
|
427
|
-
timeSinceRequest, 0);
|
|
426
|
+
var minInterval = Math.max(this._settings.minimumManifestUpdateInterval - timeSinceRequest, 0);
|
|
428
427
|
/**
|
|
429
428
|
* Multiple refresh trigger are scheduled here, but only the first one should
|
|
430
429
|
* be effectively considered.
|
|
@@ -438,14 +437,14 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
438
437
|
var unsafeMode = canUseUnsafeMode && unsafeModeEnabled;
|
|
439
438
|
// The value allows to set a delay relatively to the last Manifest refresh
|
|
440
439
|
// (to avoid asking for it too often).
|
|
441
|
-
var timeSinceLastRefresh = sendingTime === undefined ?
|
|
442
|
-
|
|
443
|
-
performance.now() - sendingTime;
|
|
444
|
-
var _minInterval = Math.max(_this._settings.minimumManifestUpdateInterval -
|
|
445
|
-
timeSinceLastRefresh, 0);
|
|
440
|
+
var timeSinceLastRefresh = sendingTime === undefined ? 0 : performance.now() - sendingTime;
|
|
441
|
+
var _minInterval = Math.max(_this._settings.minimumManifestUpdateInterval - timeSinceLastRefresh, 0);
|
|
446
442
|
var timeoutId = setTimeout(function () {
|
|
447
443
|
nextRefreshCanceller.cancel();
|
|
448
|
-
_this._triggerNextManifestRefresh(manifest, {
|
|
444
|
+
_this._triggerNextManifestRefresh(manifest, {
|
|
445
|
+
enablePartialRefresh: enablePartialRefresh,
|
|
446
|
+
unsafeMode: unsafeMode,
|
|
447
|
+
});
|
|
449
448
|
}, Math.max((delay !== null && delay !== void 0 ? delay : 0) - timeSinceLastRefresh, _minInterval));
|
|
450
449
|
nextRefreshCanceller.signal.register(function () {
|
|
451
450
|
clearTimeout(timeoutId);
|
|
@@ -457,8 +456,10 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
457
456
|
var _a;
|
|
458
457
|
(_a = manifest.expired) === null || _a === void 0 ? void 0 : _a.then(function () {
|
|
459
458
|
nextRefreshCanceller.cancel();
|
|
460
|
-
_this._triggerNextManifestRefresh(manifest, {
|
|
461
|
-
|
|
459
|
+
_this._triggerNextManifestRefresh(manifest, {
|
|
460
|
+
enablePartialRefresh: false,
|
|
461
|
+
unsafeMode: unsafeModeEnabled,
|
|
462
|
+
});
|
|
462
463
|
}, noop /* `expired` should not reject */);
|
|
463
464
|
}, minInterval);
|
|
464
465
|
nextRefreshCanceller.signal.register(function () {
|
|
@@ -511,8 +512,10 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
511
512
|
}
|
|
512
513
|
var timeoutId_2 = setTimeout(function () {
|
|
513
514
|
nextRefreshCanceller.cancel();
|
|
514
|
-
_this._triggerNextManifestRefresh(manifest, {
|
|
515
|
-
|
|
515
|
+
_this._triggerNextManifestRefresh(manifest, {
|
|
516
|
+
enablePartialRefresh: false,
|
|
517
|
+
unsafeMode: unsafeModeEnabled,
|
|
518
|
+
});
|
|
516
519
|
}, Math.max(actualRefreshInterval, minInterval));
|
|
517
520
|
nextRefreshCanceller.signal.register(function () {
|
|
518
521
|
clearTimeout(timeoutId_2);
|
|
@@ -539,18 +542,19 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
539
542
|
}
|
|
540
543
|
else {
|
|
541
544
|
fullRefresh = !enablePartialRefresh || manifestUpdateUrl === undefined;
|
|
542
|
-
refreshURL = fullRefresh ? manifest.getUrl() :
|
|
543
|
-
manifestUpdateUrl;
|
|
545
|
+
refreshURL = fullRefresh ? manifest.getUrl() : manifestUpdateUrl;
|
|
544
546
|
}
|
|
545
547
|
var externalClockOffset = manifest.clockOffset;
|
|
546
548
|
if (unsafeMode) {
|
|
547
549
|
this._consecutiveUnsafeMode += 1;
|
|
548
|
-
log.info(
|
|
549
|
-
String(this._consecutiveUnsafeMode) +
|
|
550
|
+
log.info('Init: Refreshing the Manifest in "unsafeMode" for the ' +
|
|
551
|
+
String(this._consecutiveUnsafeMode) +
|
|
552
|
+
" consecutive time.");
|
|
550
553
|
}
|
|
551
554
|
else if (this._consecutiveUnsafeMode > 0) {
|
|
552
|
-
log.info(
|
|
553
|
-
String(this._consecutiveUnsafeMode) +
|
|
555
|
+
log.info('Init: Not parsing the Manifest in "unsafeMode" anymore after ' +
|
|
556
|
+
String(this._consecutiveUnsafeMode) +
|
|
557
|
+
" consecutive times.");
|
|
554
558
|
this._consecutiveUnsafeMode = 0;
|
|
555
559
|
}
|
|
556
560
|
if (this._isRefreshPending) {
|
|
@@ -558,7 +562,9 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
558
562
|
}
|
|
559
563
|
this._isRefreshPending = true;
|
|
560
564
|
this._fetchManifest(refreshURL)
|
|
561
|
-
.then(function (res) {
|
|
565
|
+
.then(function (res) {
|
|
566
|
+
return res.parse({ externalClockOffset: externalClockOffset, previousManifest: manifest, unsafeMode: unsafeMode });
|
|
567
|
+
})
|
|
562
568
|
.then(function (res) {
|
|
563
569
|
_this._isRefreshPending = false;
|
|
564
570
|
var newManifest = res.manifest, newSendingTime = res.sendingTime, parsingTime = res.parsingTime;
|
|
@@ -571,24 +577,21 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
571
577
|
manifest.update(newManifest);
|
|
572
578
|
}
|
|
573
579
|
catch (e) {
|
|
574
|
-
var message = e instanceof Error ? e.message :
|
|
575
|
-
"unknown error";
|
|
580
|
+
var message = e instanceof Error ? e.message : "unknown error";
|
|
576
581
|
log.warn("MUS: Attempt to update Manifest failed: ".concat(message), "Re-downloading the Manifest fully");
|
|
577
582
|
var FAILED_PARTIAL_UPDATE_MANIFEST_REFRESH_DELAY = config.getCurrent().FAILED_PARTIAL_UPDATE_MANIFEST_REFRESH_DELAY;
|
|
578
583
|
// The value allows to set a delay relatively to the last Manifest refresh
|
|
579
584
|
// (to avoid asking for it too often).
|
|
580
|
-
var timeSinceLastRefresh = newSendingTime === undefined ?
|
|
581
|
-
|
|
582
|
-
performance.now() - newSendingTime;
|
|
583
|
-
var _minInterval = Math.max(_this._settings.minimumManifestUpdateInterval -
|
|
584
|
-
timeSinceLastRefresh, 0);
|
|
585
|
+
var timeSinceLastRefresh = newSendingTime === undefined ? 0 : performance.now() - newSendingTime;
|
|
586
|
+
var _minInterval = Math.max(_this._settings.minimumManifestUpdateInterval - timeSinceLastRefresh, 0);
|
|
585
587
|
var unregisterCanceller_1 = noop;
|
|
586
588
|
var timeoutId_3 = setTimeout(function () {
|
|
587
589
|
unregisterCanceller_1();
|
|
588
|
-
_this._triggerNextManifestRefresh(manifest, {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
590
|
+
_this._triggerNextManifestRefresh(manifest, {
|
|
591
|
+
enablePartialRefresh: false,
|
|
592
|
+
unsafeMode: false,
|
|
593
|
+
});
|
|
594
|
+
}, Math.max(FAILED_PARTIAL_UPDATE_MANIFEST_REFRESH_DELAY - timeSinceLastRefresh, _minInterval));
|
|
592
595
|
unregisterCanceller_1 = _this._canceller.signal.register(function () {
|
|
593
596
|
clearTimeout(timeoutId_3);
|
|
594
597
|
});
|
|
@@ -596,7 +599,11 @@ var ManifestFetcher = /** @class */ (function (_super) {
|
|
|
596
599
|
}
|
|
597
600
|
}
|
|
598
601
|
var updatingTime = performance.now() - updateTimeStart;
|
|
599
|
-
_this._recursivelyRefreshManifest(manifest, {
|
|
602
|
+
_this._recursivelyRefreshManifest(manifest, {
|
|
603
|
+
sendingTime: newSendingTime,
|
|
604
|
+
parsingTime: parsingTime,
|
|
605
|
+
updatingTime: updatingTime,
|
|
606
|
+
});
|
|
600
607
|
})
|
|
601
608
|
.catch(function (err) {
|
|
602
609
|
_this._isRefreshPending = false;
|
|
@@ -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 { IPrioritizedSegmentFetcher } from "./prioritized_segment_fetcher";
|
|
17
|
-
import
|
|
16
|
+
import type { IPrioritizedSegmentFetcher } from "./prioritized_segment_fetcher";
|
|
17
|
+
import type { ISegmentFetcherCreatorBackoffOptions } from "./segment_fetcher_creator";
|
|
18
|
+
import SegmentFetcherCreator from "./segment_fetcher_creator";
|
|
18
19
|
export default SegmentFetcherCreator;
|
|
19
|
-
export { IPrioritizedSegmentFetcher, ISegmentFetcherCreatorBackoffOptions
|
|
20
|
+
export type { IPrioritizedSegmentFetcher, ISegmentFetcherCreatorBackoffOptions };
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { CancellationSignal } from "../../../utils/task_canceller";
|
|
17
|
-
import { ISegmentFetcher, ISegmentFetcherCallbacks, ISegmentLoaderContent } from "./segment_fetcher";
|
|
18
|
-
import
|
|
16
|
+
import type { CancellationSignal } from "../../../utils/task_canceller";
|
|
17
|
+
import type { ISegmentFetcher, ISegmentFetcherCallbacks, ISegmentLoaderContent } from "./segment_fetcher";
|
|
18
|
+
import type { ITaskPrioritizerCallbacks } from "./task_prioritizer";
|
|
19
|
+
import type TaskPrioritizer from "./task_prioritizer";
|
|
19
20
|
/**
|
|
20
21
|
* This function basically put in relation:
|
|
21
22
|
* - an `ISegmentFetcher`, which will be used to perform the segment requests
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
16
|
+
import type { Adaptation, ISegment, Period, Representation } from "../../../manifest";
|
|
17
|
+
import type Manifest from "../../../manifest";
|
|
18
|
+
import type { IPlayerError } from "../../../public_types";
|
|
19
|
+
import type { ISegmentParserParsedInitChunk, ISegmentParserParsedMediaChunk, ISegmentPipeline } from "../../../transports";
|
|
20
|
+
import type { CancellationSignal } from "../../../utils/task_canceller";
|
|
21
|
+
import type { IMetricsCallbackPayload, IRequestBeginCallbackPayload, IRequestEndCallbackPayload, IRequestProgressCallbackPayload } from "../../adaptive";
|
|
22
|
+
import type { IBufferType } from "../../segment_buffers";
|
|
23
|
+
import type CdnPrioritizer from "../cdn_prioritizer";
|
|
23
24
|
/**
|
|
24
25
|
* Create an `ISegmentFetcher` object which will allow to easily fetch and parse
|
|
25
26
|
* segments.
|
|
@@ -146,7 +147,7 @@ export interface ISegmentFetcherOptions {
|
|
|
146
147
|
* @param {Object}
|
|
147
148
|
* @returns {Object}
|
|
148
149
|
*/
|
|
149
|
-
export declare function getSegmentFetcherOptions(bufferType: string, { maxRetryRegular, maxRetryOffline, lowLatencyMode, requestTimeout }: {
|
|
150
|
+
export declare function getSegmentFetcherOptions(bufferType: string, { maxRetryRegular, maxRetryOffline, lowLatencyMode, requestTimeout, }: {
|
|
150
151
|
maxRetryRegular?: number | undefined;
|
|
151
152
|
maxRetryOffline?: number | undefined;
|
|
152
153
|
requestTimeout?: number | undefined;
|
|
@@ -52,13 +52,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
52
52
|
import config from "../../../config";
|
|
53
53
|
import { formatError } from "../../../errors";
|
|
54
54
|
import log from "../../../log";
|
|
55
|
-
import { getLoggableSegmentId
|
|
55
|
+
import { getLoggableSegmentId } from "../../../manifest";
|
|
56
56
|
import arrayIncludes from "../../../utils/array_includes";
|
|
57
57
|
import idGenerator from "../../../utils/id_generator";
|
|
58
58
|
import InitializationSegmentCache from "../../../utils/initialization_segment_cache";
|
|
59
59
|
import isNullOrUndefined from "../../../utils/is_null_or_undefined";
|
|
60
60
|
import objectAssign from "../../../utils/object_assign";
|
|
61
|
-
import { CancellationError
|
|
61
|
+
import { CancellationError } from "../../../utils/task_canceller";
|
|
62
62
|
import errorSelector from "../utils/error_selector";
|
|
63
63
|
import { scheduleRequestWithCdns } from "../utils/schedule_request";
|
|
64
64
|
/** Allows to generate a unique identifies for each request. */
|
|
@@ -89,17 +89,16 @@ var generateRequestID = idGenerator();
|
|
|
89
89
|
*/
|
|
90
90
|
export default function createSegmentFetcher(bufferType, pipeline, cdnPrioritizer, lifecycleCallbacks, options) {
|
|
91
91
|
var requestOptions = {
|
|
92
|
-
timeout: options.requestTimeout < 0 ? undefined :
|
|
93
|
-
options.requestTimeout,
|
|
92
|
+
timeout: options.requestTimeout < 0 ? undefined : options.requestTimeout,
|
|
94
93
|
};
|
|
95
94
|
/**
|
|
96
95
|
* Cache audio and video initialization segments.
|
|
97
96
|
* This allows to avoid doing too many requests for what are usually very
|
|
98
97
|
* small files.
|
|
99
98
|
*/
|
|
100
|
-
var cache = arrayIncludes(["audio", "video"], bufferType)
|
|
101
|
-
new InitializationSegmentCache()
|
|
102
|
-
undefined;
|
|
99
|
+
var cache = arrayIncludes(["audio", "video"], bufferType)
|
|
100
|
+
? new InitializationSegmentCache()
|
|
101
|
+
: undefined;
|
|
103
102
|
var loadSegment = pipeline.loadSegment, parseSegment = pipeline.parseSegment;
|
|
104
103
|
/**
|
|
105
104
|
* Fetch a specific segment.
|
|
@@ -141,20 +140,23 @@ export default function createSegmentFetcher(bufferType, pipeline, cdnPrioritize
|
|
|
141
140
|
try {
|
|
142
141
|
var parsed = parseSegment(loaded, content, initTimescale);
|
|
143
142
|
if (!parsedChunks[parsedChunkId]) {
|
|
144
|
-
segmentDurationAcc =
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
segmentDurationAcc =
|
|
144
|
+
segmentDurationAcc !== undefined &&
|
|
145
|
+
parsed.segmentType === "media" &&
|
|
146
|
+
parsed.chunkInfos !== null &&
|
|
147
|
+
parsed.chunkInfos.duration !== undefined
|
|
148
|
+
? segmentDurationAcc + parsed.chunkInfos.duration
|
|
149
|
+
: undefined;
|
|
150
150
|
parsedChunks[parsedChunkId] = true;
|
|
151
151
|
sendNetworkMetricsIfAvailable();
|
|
152
152
|
}
|
|
153
153
|
return parsed;
|
|
154
154
|
}
|
|
155
155
|
catch (error) {
|
|
156
|
-
throw formatError(error, {
|
|
157
|
-
|
|
156
|
+
throw formatError(error, {
|
|
157
|
+
defaultCode: "PIPELINE_PARSE_ERROR",
|
|
158
|
+
defaultReason: "Unknown parsing error",
|
|
159
|
+
});
|
|
158
160
|
}
|
|
159
161
|
};
|
|
160
162
|
}
|
|
@@ -210,11 +212,13 @@ export default function createSegmentFetcher(bufferType, pipeline, cdnPrioritize
|
|
|
210
212
|
return; // request already termminated
|
|
211
213
|
}
|
|
212
214
|
if (info.totalSize !== undefined && info.size < info.totalSize) {
|
|
213
|
-
(_a = lifecycleCallbacks.onProgress) === null || _a === void 0 ? void 0 : _a.call(lifecycleCallbacks, {
|
|
215
|
+
(_a = lifecycleCallbacks.onProgress) === null || _a === void 0 ? void 0 : _a.call(lifecycleCallbacks, {
|
|
216
|
+
duration: info.duration,
|
|
214
217
|
size: info.size,
|
|
215
218
|
totalSize: info.totalSize,
|
|
216
219
|
timestamp: performance.now(),
|
|
217
|
-
id: requestId
|
|
220
|
+
id: requestId,
|
|
221
|
+
});
|
|
218
222
|
}
|
|
219
223
|
},
|
|
220
224
|
/**
|
|
@@ -227,16 +231,18 @@ export default function createSegmentFetcher(bufferType, pipeline, cdnPrioritize
|
|
|
227
231
|
fetcherCallbacks.onChunk(generateParserFunction(chunkData, true));
|
|
228
232
|
},
|
|
229
233
|
};
|
|
230
|
-
cached = cache !== undefined ? cache.get(content) :
|
|
231
|
-
null;
|
|
234
|
+
cached = cache !== undefined ? cache.get(content) : null;
|
|
232
235
|
if (cached !== null) {
|
|
233
236
|
log.debug("SF: Found wanted segment in cache", segmentIdString);
|
|
234
237
|
fetcherCallbacks.onChunk(generateParserFunction(cached, false));
|
|
235
238
|
return [2 /*return*/, Promise.resolve()];
|
|
236
239
|
}
|
|
237
240
|
log.debug("SF: Beginning request", segmentIdString);
|
|
238
|
-
(_a = lifecycleCallbacks.onRequestBegin) === null || _a === void 0 ? void 0 : _a.call(lifecycleCallbacks, {
|
|
239
|
-
|
|
241
|
+
(_a = lifecycleCallbacks.onRequestBegin) === null || _a === void 0 ? void 0 : _a.call(lifecycleCallbacks, {
|
|
242
|
+
requestTimestamp: performance.now(),
|
|
243
|
+
id: requestId,
|
|
244
|
+
content: content,
|
|
245
|
+
});
|
|
240
246
|
cancellationSignal.register(onCancellation);
|
|
241
247
|
_d.label = 1;
|
|
242
248
|
case 1:
|
|
@@ -296,13 +302,19 @@ export default function createSegmentFetcher(bufferType, pipeline, cdnPrioritize
|
|
|
296
302
|
export function getSegmentFetcherOptions(bufferType, _a) {
|
|
297
303
|
var maxRetryRegular = _a.maxRetryRegular, maxRetryOffline = _a.maxRetryOffline, lowLatencyMode = _a.lowLatencyMode, requestTimeout = _a.requestTimeout;
|
|
298
304
|
var _b = config.getCurrent(), DEFAULT_MAX_REQUESTS_RETRY_ON_ERROR = _b.DEFAULT_MAX_REQUESTS_RETRY_ON_ERROR, DEFAULT_REQUEST_TIMEOUT = _b.DEFAULT_REQUEST_TIMEOUT, DEFAULT_MAX_REQUESTS_RETRY_ON_OFFLINE = _b.DEFAULT_MAX_REQUESTS_RETRY_ON_OFFLINE, INITIAL_BACKOFF_DELAY_BASE = _b.INITIAL_BACKOFF_DELAY_BASE, MAX_BACKOFF_DELAY_BASE = _b.MAX_BACKOFF_DELAY_BASE;
|
|
299
|
-
return {
|
|
300
|
-
|
|
305
|
+
return {
|
|
306
|
+
maxRetryRegular: bufferType === "image"
|
|
307
|
+
? 0
|
|
308
|
+
: (maxRetryRegular !== null && maxRetryRegular !== void 0 ? maxRetryRegular : DEFAULT_MAX_REQUESTS_RETRY_ON_ERROR),
|
|
301
309
|
maxRetryOffline: maxRetryOffline !== null && maxRetryOffline !== void 0 ? maxRetryOffline : DEFAULT_MAX_REQUESTS_RETRY_ON_OFFLINE,
|
|
302
|
-
baseDelay: lowLatencyMode
|
|
303
|
-
INITIAL_BACKOFF_DELAY_BASE.
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
310
|
+
baseDelay: lowLatencyMode
|
|
311
|
+
? INITIAL_BACKOFF_DELAY_BASE.LOW_LATENCY
|
|
312
|
+
: INITIAL_BACKOFF_DELAY_BASE.REGULAR,
|
|
313
|
+
maxDelay: lowLatencyMode
|
|
314
|
+
? MAX_BACKOFF_DELAY_BASE.LOW_LATENCY
|
|
315
|
+
: MAX_BACKOFF_DELAY_BASE.REGULAR,
|
|
316
|
+
requestTimeout: isNullOrUndefined(requestTimeout)
|
|
317
|
+
? DEFAULT_REQUEST_TIMEOUT
|
|
318
|
+
: requestTimeout,
|
|
319
|
+
};
|
|
308
320
|
}
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ITransportPipelines } from "../../../transports";
|
|
17
|
-
import { CancellationSignal } from "../../../utils/task_canceller";
|
|
18
|
-
import { IBufferType } from "../../segment_buffers";
|
|
19
|
-
import { IPrioritizedSegmentFetcher } from "./prioritized_segment_fetcher";
|
|
20
|
-
import { ISegmentFetcherLifecycleCallbacks } from "./segment_fetcher";
|
|
16
|
+
import type { ITransportPipelines } from "../../../transports";
|
|
17
|
+
import type { CancellationSignal } from "../../../utils/task_canceller";
|
|
18
|
+
import type { IBufferType } from "../../segment_buffers";
|
|
19
|
+
import type { IPrioritizedSegmentFetcher } from "./prioritized_segment_fetcher";
|
|
20
|
+
import type { ISegmentFetcherLifecycleCallbacks } from "./segment_fetcher";
|
|
21
21
|
/**
|
|
22
22
|
* Interact with the transport pipelines to download segments with the right
|
|
23
23
|
* priority.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import config from "../../../config";
|
|
17
17
|
import CdnPrioritizer from "../cdn_prioritizer";
|
|
18
18
|
import applyPrioritizerToSegmentFetcher from "./prioritized_segment_fetcher";
|
|
19
|
-
import createSegmentFetcher, { getSegmentFetcherOptions
|
|
19
|
+
import createSegmentFetcher, { getSegmentFetcherOptions } from "./segment_fetcher";
|
|
20
20
|
import TaskPrioritizer from "./task_prioritizer";
|
|
21
21
|
/**
|
|
22
22
|
* Interact with the transport pipelines to download segments with the right
|
|
@@ -33,8 +33,7 @@ var SegmentFetcherCreator = /** @class */ (function () {
|
|
|
33
33
|
var _a = config.getCurrent(), MIN_CANCELABLE_PRIORITY = _a.MIN_CANCELABLE_PRIORITY, MAX_HIGH_PRIORITY_LEVEL = _a.MAX_HIGH_PRIORITY_LEVEL;
|
|
34
34
|
this._transport = transport;
|
|
35
35
|
this._prioritizer = new TaskPrioritizer({
|
|
36
|
-
prioritySteps: { high: MAX_HIGH_PRIORITY_LEVEL,
|
|
37
|
-
low: MIN_CANCELABLE_PRIORITY },
|
|
36
|
+
prioritySteps: { high: MAX_HIGH_PRIORITY_LEVEL, low: MIN_CANCELABLE_PRIORITY },
|
|
38
37
|
});
|
|
39
38
|
this._cdnPrioritizer = cdnPrioritizer;
|
|
40
39
|
this._backoffOptions = options;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import log from "../../../log";
|
|
2
2
|
import arrayFindIndex from "../../../utils/array_find_index";
|
|
3
3
|
import createCancellablePromise from "../../../utils/create_cancellable_promise";
|
|
4
|
-
import TaskCanceller, { CancellationError
|
|
4
|
+
import TaskCanceller, { CancellationError } from "../../../utils/task_canceller";
|
|
5
5
|
var TaskPrioritizer = /** @class */ (function () {
|
|
6
6
|
/**
|
|
7
7
|
* @param {Options} prioritizerOptions
|
|
@@ -70,11 +70,13 @@ var TaskPrioritizer = /** @class */ (function () {
|
|
|
70
70
|
callbacks.beforeInterrupted();
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
_this._minPendingPriority =
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
_this._minPendingPriority =
|
|
74
|
+
_this._minPendingPriority === null
|
|
75
|
+
? newTask.priority
|
|
76
|
+
: Math.min(_this._minPendingPriority, newTask.priority);
|
|
76
77
|
_this._pendingTasks.push(newTask);
|
|
77
|
-
newTask
|
|
78
|
+
newTask
|
|
79
|
+
.taskFn(interrupter.signal)
|
|
78
80
|
.then(onResolve)
|
|
79
81
|
.catch(function (err) {
|
|
80
82
|
if (!cancelSignal.isCancelled() &&
|
|
@@ -144,7 +146,8 @@ var TaskPrioritizer = /** @class */ (function () {
|
|
|
144
146
|
*/
|
|
145
147
|
TaskPrioritizer.prototype.updatePriority = function (promise, priority) {
|
|
146
148
|
var waitingQueueIndex = _findTaskIndex(promise, this._waitingQueue);
|
|
147
|
-
if (waitingQueueIndex >= 0) {
|
|
149
|
+
if (waitingQueueIndex >= 0) {
|
|
150
|
+
// If it was still waiting for its turn
|
|
148
151
|
var waitingQueueElt = this._waitingQueue[waitingQueueIndex];
|
|
149
152
|
if (waitingQueueElt.priority === priority) {
|
|
150
153
|
return;
|
|
@@ -189,7 +192,8 @@ var TaskPrioritizer = /** @class */ (function () {
|
|
|
189
192
|
if (this._minPendingPriority === null || priority < this._minPendingPriority) {
|
|
190
193
|
this._minPendingPriority = priority;
|
|
191
194
|
}
|
|
192
|
-
else if (this._minPendingPriority === prevPriority) {
|
|
195
|
+
else if (this._minPendingPriority === prevPriority) {
|
|
196
|
+
// was highest priority
|
|
193
197
|
if (this._pendingTasks.length === 1) {
|
|
194
198
|
this._minPendingPriority = priority;
|
|
195
199
|
}
|
|
@@ -214,18 +218,16 @@ var TaskPrioritizer = /** @class */ (function () {
|
|
|
214
218
|
*/
|
|
215
219
|
TaskPrioritizer.prototype._loopThroughWaitingQueue = function () {
|
|
216
220
|
var minWaitingPriority = this._waitingQueue.reduce(function (acc, elt) {
|
|
217
|
-
return acc === null || acc > elt.priority ? elt.priority :
|
|
218
|
-
acc;
|
|
221
|
+
return acc === null || acc > elt.priority ? elt.priority : acc;
|
|
219
222
|
}, null);
|
|
220
223
|
if (minWaitingPriority === null ||
|
|
221
|
-
(this._minPendingPriority !== null &&
|
|
222
|
-
this._minPendingPriority < minWaitingPriority)) {
|
|
224
|
+
(this._minPendingPriority !== null && this._minPendingPriority < minWaitingPriority)) {
|
|
223
225
|
return;
|
|
224
226
|
}
|
|
225
227
|
for (var i = 0; i < this._waitingQueue.length; i++) {
|
|
226
|
-
var priorityToCheck = this._minPendingPriority === null
|
|
227
|
-
minWaitingPriority
|
|
228
|
-
Math.min(this._minPendingPriority, minWaitingPriority);
|
|
228
|
+
var priorityToCheck = this._minPendingPriority === null
|
|
229
|
+
? minWaitingPriority
|
|
230
|
+
: Math.min(this._minPendingPriority, minWaitingPriority);
|
|
229
231
|
var elt = this._waitingQueue[i];
|
|
230
232
|
if (elt.priority <= priorityToCheck) {
|
|
231
233
|
this._findAndRunWaitingQueueTask(i);
|
|
@@ -294,8 +296,7 @@ var TaskPrioritizer = /** @class */ (function () {
|
|
|
294
296
|
* @returns {boolean}
|
|
295
297
|
*/
|
|
296
298
|
TaskPrioritizer.prototype._canBeStartedNow = function (task) {
|
|
297
|
-
return this._minPendingPriority === null ||
|
|
298
|
-
task.priority <= this._minPendingPriority;
|
|
299
|
+
return this._minPendingPriority === null || task.priority <= this._minPendingPriority;
|
|
299
300
|
};
|
|
300
301
|
/**
|
|
301
302
|
* Returns `true` if any running task is considered "high priority".
|
|
@@ -303,8 +304,8 @@ var TaskPrioritizer = /** @class */ (function () {
|
|
|
303
304
|
* @returns {boolean}
|
|
304
305
|
*/
|
|
305
306
|
TaskPrioritizer.prototype._isRunningHighPriorityTasks = function () {
|
|
306
|
-
return this._minPendingPriority !== null &&
|
|
307
|
-
this._minPendingPriority <= this._prioritySteps.high;
|
|
307
|
+
return (this._minPendingPriority !== null &&
|
|
308
|
+
this._minPendingPriority <= this._prioritySteps.high);
|
|
308
309
|
};
|
|
309
310
|
return TaskPrioritizer;
|
|
310
311
|
}());
|
|
@@ -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 { IPlayerError } from "../../../public_types";
|
|
16
|
+
import type { IPlayerError } from "../../../public_types";
|
|
17
17
|
/**
|
|
18
18
|
* Generate a new error from the infos given.
|
|
19
19
|
* @param {string} code
|
|
@@ -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 { formatError, NetworkError, RequestError
|
|
16
|
+
import { formatError, NetworkError, RequestError } from "../../../errors";
|
|
17
17
|
/**
|
|
18
18
|
* Generate a new error from the infos given.
|
|
19
19
|
* @param {string} code
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ICdnMetadata } from "../../../parsers/manifest";
|
|
17
|
-
import { CancellationSignal } from "../../../utils/task_canceller";
|
|
18
|
-
import CdnPrioritizer from "../cdn_prioritizer";
|
|
16
|
+
import type { ICdnMetadata } from "../../../parsers/manifest";
|
|
17
|
+
import type { CancellationSignal } from "../../../utils/task_canceller";
|
|
18
|
+
import type CdnPrioritizer from "../cdn_prioritizer";
|
|
19
19
|
/** Settings to give to the backoff functions to configure their behavior. */
|
|
20
20
|
export interface IBackoffSettings {
|
|
21
21
|
/**
|