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
|
@@ -17,7 +17,7 @@ import { NetworkError } from "../../../errors";
|
|
|
17
17
|
import log from "../../../log";
|
|
18
18
|
import assert from "../../../utils/assert";
|
|
19
19
|
import clearTimelineFromPosition from "../utils/clear_timeline_from_position";
|
|
20
|
-
import { checkDiscontinuity, getIndexSegmentEnd
|
|
20
|
+
import { checkDiscontinuity, getIndexSegmentEnd } from "../utils/index_helpers";
|
|
21
21
|
import updateSegmentTimeline from "../utils/update_segment_timeline";
|
|
22
22
|
import addSegmentInfos from "./utils/add_segment_infos";
|
|
23
23
|
import { replaceSegmentSmoothTokens } from "./utils/tokens";
|
|
@@ -29,8 +29,7 @@ import { replaceSegmentSmoothTokens } from "./utils/tokens";
|
|
|
29
29
|
*/
|
|
30
30
|
function getSegmentNumber(start, up, duration) {
|
|
31
31
|
var diff = up - start;
|
|
32
|
-
return diff > 0 ? Math.floor(diff / duration) :
|
|
33
|
-
0;
|
|
32
|
+
return diff > 0 ? Math.floor(diff / duration) : 0;
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
36
35
|
* Convert second-based start time and duration to the timescale of the
|
|
@@ -43,11 +42,8 @@ function getSegmentNumber(start, up, duration) {
|
|
|
43
42
|
* - to {Number}: timescaled timestamp of the end time (start time + duration)
|
|
44
43
|
*/
|
|
45
44
|
function normalizeRange(index, start, duration) {
|
|
46
|
-
var timescale = index.timescale === undefined ||
|
|
47
|
-
|
|
48
|
-
index.timescale;
|
|
49
|
-
return { up: start * timescale,
|
|
50
|
-
to: (start + duration) * timescale };
|
|
45
|
+
var timescale = index.timescale === undefined || index.timescale === 0 ? 1 : index.timescale;
|
|
46
|
+
return { up: start * timescale, to: (start + duration) * timescale };
|
|
51
47
|
}
|
|
52
48
|
/**
|
|
53
49
|
* Calculate the number of times a segment repeat based on the next segment.
|
|
@@ -63,8 +59,7 @@ function calculateRepeat(segment, nextSegment) {
|
|
|
63
59
|
// next MPD update.
|
|
64
60
|
// TODO Also for SMOOTH????
|
|
65
61
|
if (segment.duration != null && repeatCount < 0) {
|
|
66
|
-
var repeatEnd = nextSegment !== undefined ? nextSegment.start :
|
|
67
|
-
Infinity;
|
|
62
|
+
var repeatEnd = nextSegment !== undefined ? nextSegment.start : Infinity;
|
|
68
63
|
repeatCount = Math.ceil((repeatEnd - segment.start) / segment.duration) - 1;
|
|
69
64
|
}
|
|
70
65
|
return repeatCount;
|
|
@@ -84,19 +79,21 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
84
79
|
*/
|
|
85
80
|
function SmoothRepresentationIndex(index, options) {
|
|
86
81
|
var aggressiveMode = options.aggressiveMode, isLive = options.isLive, segmentPrivateInfos = options.segmentPrivateInfos, timeShiftBufferDepth = options.timeShiftBufferDepth;
|
|
87
|
-
var estimatedReceivedTime = options.manifestReceivedTime == null
|
|
88
|
-
performance.now()
|
|
89
|
-
options.manifestReceivedTime;
|
|
82
|
+
var estimatedReceivedTime = options.manifestReceivedTime == null
|
|
83
|
+
? performance.now()
|
|
84
|
+
: options.manifestReceivedTime;
|
|
90
85
|
this._index = index;
|
|
91
86
|
this._indexValidityTime = estimatedReceivedTime;
|
|
92
87
|
this._timeShiftBufferDepth = timeShiftBufferDepth;
|
|
93
|
-
this._initSegmentInfos = {
|
|
88
|
+
this._initSegmentInfos = {
|
|
89
|
+
bitsPerSample: segmentPrivateInfos.bitsPerSample,
|
|
94
90
|
channels: segmentPrivateInfos.channels,
|
|
95
91
|
codecPrivateData: segmentPrivateInfos.codecPrivateData,
|
|
96
92
|
packetSize: segmentPrivateInfos.packetSize,
|
|
97
93
|
samplingRate: segmentPrivateInfos.samplingRate,
|
|
98
94
|
timescale: index.timescale,
|
|
99
|
-
protection: segmentPrivateInfos.protection
|
|
95
|
+
protection: segmentPrivateInfos.protection,
|
|
96
|
+
};
|
|
100
97
|
this._isAggressiveMode = aggressiveMode;
|
|
101
98
|
this._isLive = isLive;
|
|
102
99
|
if (index.timeline.length !== 0) {
|
|
@@ -114,7 +111,8 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
114
111
|
* @returns {Object}
|
|
115
112
|
*/
|
|
116
113
|
SmoothRepresentationIndex.prototype.getInitSegment = function () {
|
|
117
|
-
return {
|
|
114
|
+
return {
|
|
115
|
+
id: "init",
|
|
118
116
|
isInit: true,
|
|
119
117
|
privateInfos: { smoothInitSegment: this._initSegmentInfos },
|
|
120
118
|
url: null,
|
|
@@ -122,7 +120,8 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
122
120
|
end: 0,
|
|
123
121
|
duration: 0,
|
|
124
122
|
timescale: 1,
|
|
125
|
-
complete: true
|
|
123
|
+
complete: true,
|
|
124
|
+
};
|
|
126
125
|
};
|
|
127
126
|
/**
|
|
128
127
|
* Generate a list of Segments for a particular period of time.
|
|
@@ -139,33 +138,33 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
139
138
|
var currentNumber;
|
|
140
139
|
var segments = [];
|
|
141
140
|
var timelineLength = timeline.length;
|
|
142
|
-
var maxPosition = this._scaledLiveGap == null
|
|
143
|
-
undefined
|
|
144
|
-
(
|
|
141
|
+
var maxPosition = this._scaledLiveGap == null
|
|
142
|
+
? undefined
|
|
143
|
+
: (performance.now() / 1000) * timescale - this._scaledLiveGap;
|
|
145
144
|
for (var i = 0; i < timelineLength; i++) {
|
|
146
145
|
var segmentRange = timeline[i];
|
|
147
146
|
var duration = segmentRange.duration, start = segmentRange.start;
|
|
148
147
|
var repeat = calculateRepeat(segmentRange, timeline[i + 1]);
|
|
149
148
|
var segmentNumberInCurrentRange = getSegmentNumber(start, up, duration);
|
|
150
149
|
var segmentTime = start + segmentNumberInCurrentRange * duration;
|
|
151
|
-
var timeToAddToCheckMaxPosition = isAggressive ? 0 :
|
|
152
|
-
duration;
|
|
150
|
+
var timeToAddToCheckMaxPosition = isAggressive ? 0 : duration;
|
|
153
151
|
while (segmentTime < to &&
|
|
154
152
|
segmentNumberInCurrentRange <= repeat &&
|
|
155
|
-
(maxPosition == null ||
|
|
156
|
-
(segmentTime + timeToAddToCheckMaxPosition) <= maxPosition)) {
|
|
153
|
+
(maxPosition == null || segmentTime + timeToAddToCheckMaxPosition <= maxPosition)) {
|
|
157
154
|
var time = segmentTime;
|
|
158
|
-
var number = currentNumber != null ?
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
var segment = { id: String(segmentTime),
|
|
155
|
+
var number = currentNumber != null ? currentNumber + segmentNumberInCurrentRange : undefined;
|
|
156
|
+
var segment = {
|
|
157
|
+
id: String(segmentTime),
|
|
162
158
|
isInit: false,
|
|
163
159
|
time: time / timescale,
|
|
164
160
|
end: (time + duration) / timescale,
|
|
165
161
|
duration: duration / timescale,
|
|
166
|
-
timescale: 1,
|
|
162
|
+
timescale: 1,
|
|
163
|
+
number: number,
|
|
164
|
+
url: replaceSegmentSmoothTokens(media, time),
|
|
167
165
|
complete: true,
|
|
168
|
-
privateInfos: { smoothMediaSegment: { time: time, duration: duration } }
|
|
166
|
+
privateInfos: { smoothMediaSegment: { time: time, duration: duration } },
|
|
167
|
+
};
|
|
169
168
|
segments.push(segment);
|
|
170
169
|
// update segment number and segment time for the next segment
|
|
171
170
|
segmentNumberInCurrentRange++;
|
|
@@ -199,8 +198,8 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
199
198
|
return false;
|
|
200
199
|
}
|
|
201
200
|
var repeat = lastSegmentInCurrentTimeline.repeatCount;
|
|
202
|
-
var endOfLastSegmentInCurrentTimeline = lastSegmentInCurrentTimeline.start +
|
|
203
|
-
lastSegmentInCurrentTimeline.duration;
|
|
201
|
+
var endOfLastSegmentInCurrentTimeline = lastSegmentInCurrentTimeline.start +
|
|
202
|
+
(repeat + 1) * lastSegmentInCurrentTimeline.duration;
|
|
204
203
|
if (to * timescale < endOfLastSegmentInCurrentTimeline) {
|
|
205
204
|
return false;
|
|
206
205
|
}
|
|
@@ -208,9 +207,8 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
208
207
|
return true;
|
|
209
208
|
}
|
|
210
209
|
// ----
|
|
211
|
-
var startOfLastSegmentInCurrentTimeline = lastSegmentInCurrentTimeline.start + repeat *
|
|
212
|
-
|
|
213
|
-
return (up * timescale) > startOfLastSegmentInCurrentTimeline;
|
|
210
|
+
var startOfLastSegmentInCurrentTimeline = lastSegmentInCurrentTimeline.start + repeat * lastSegmentInCurrentTimeline.duration;
|
|
211
|
+
return up * timescale > startOfLastSegmentInCurrentTimeline;
|
|
214
212
|
};
|
|
215
213
|
/**
|
|
216
214
|
* Returns first position available in the index.
|
|
@@ -240,9 +238,8 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
240
238
|
var timescaledNow = (performance.now() / 1000) * index.timescale;
|
|
241
239
|
var start = timelineElt.start, duration = timelineElt.duration, repeatCount = timelineElt.repeatCount;
|
|
242
240
|
for (var j = repeatCount; j >= 0; j--) {
|
|
243
|
-
var end = start +
|
|
244
|
-
var positionToReach = this._isAggressiveMode ? end - duration :
|
|
245
|
-
end;
|
|
241
|
+
var end = start + duration * (j + 1);
|
|
242
|
+
var positionToReach = this._isAggressiveMode ? end - duration : end;
|
|
246
243
|
if (positionToReach <= timescaledNow - this._scaledLiveGap) {
|
|
247
244
|
return end / index.timescale;
|
|
248
245
|
}
|
|
@@ -282,8 +279,7 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
282
279
|
if (lastAvailablePosition !== undefined && end < lastAvailablePosition) {
|
|
283
280
|
return false;
|
|
284
281
|
}
|
|
285
|
-
return end > ((_a = this.getFirstAvailablePosition()) !== null && _a !== void 0 ? _a : 0) ? undefined :
|
|
286
|
-
false;
|
|
282
|
+
return end > ((_a = this.getFirstAvailablePosition()) !== null && _a !== void 0 ? _a : 0) ? undefined : false;
|
|
287
283
|
};
|
|
288
284
|
/**
|
|
289
285
|
* Checks if `timeSec` is in a discontinuity.
|
|
@@ -321,10 +317,11 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
321
317
|
else if (tSegmentTime === segment.time) {
|
|
322
318
|
return true;
|
|
323
319
|
}
|
|
324
|
-
else {
|
|
320
|
+
else {
|
|
321
|
+
// tSegment.start < segment.time
|
|
325
322
|
if (tSegment.repeatCount >= 0 && tSegment.duration !== undefined) {
|
|
326
323
|
var timeDiff = tSegmentTime - tSegment.start;
|
|
327
|
-
var repeat =
|
|
324
|
+
var repeat = timeDiff / tSegment.duration - 1;
|
|
328
325
|
return repeat % 1 === 0 && repeat <= tSegment.repeatCount;
|
|
329
326
|
}
|
|
330
327
|
}
|
|
@@ -339,8 +336,7 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
339
336
|
if (!this._isLive) {
|
|
340
337
|
return false;
|
|
341
338
|
}
|
|
342
|
-
return error instanceof NetworkError &&
|
|
343
|
-
(error.isHttpError(404) || error.isHttpError(412));
|
|
339
|
+
return (error instanceof NetworkError && (error.isHttpError(404) || error.isHttpError(412)));
|
|
344
340
|
};
|
|
345
341
|
/**
|
|
346
342
|
* Replace this RepresentationIndex by a newly downloaded one.
|
|
@@ -371,11 +367,13 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
371
367
|
for (var i = 0; i < oldTimeline.length; i++) {
|
|
372
368
|
var oldTimelineRange = oldTimeline[i];
|
|
373
369
|
var oldEnd = getIndexSegmentEnd(oldTimelineRange, null);
|
|
374
|
-
if (oldEnd === newEnd) {
|
|
370
|
+
if (oldEnd === newEnd) {
|
|
371
|
+
// just add the supplementary segments
|
|
375
372
|
this._index.timeline = this._index.timeline.concat(oldTimeline.slice(i + 1));
|
|
376
373
|
return;
|
|
377
374
|
}
|
|
378
|
-
if (oldEnd > newEnd) {
|
|
375
|
+
if (oldEnd > newEnd) {
|
|
376
|
+
// adjust repeatCount + add supplementary segments
|
|
379
377
|
if (oldTimelineRange.duration !== lastNewTimelineElement.duration) {
|
|
380
378
|
return;
|
|
381
379
|
}
|
|
@@ -389,7 +387,7 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
389
387
|
if (rangeDuration < 0 || rangeDuration % oldTimelineRange.duration !== 0) {
|
|
390
388
|
return;
|
|
391
389
|
}
|
|
392
|
-
var repeatWithOld =
|
|
390
|
+
var repeatWithOld = rangeDuration / oldTimelineRange.duration - 1;
|
|
393
391
|
var relativeRepeat = oldTimelineRange.repeatCount - repeatWithOld;
|
|
394
392
|
if (relativeRepeat < 0) {
|
|
395
393
|
return;
|
|
@@ -455,13 +453,10 @@ var SmoothRepresentationIndex = /** @class */ (function () {
|
|
|
455
453
|
}
|
|
456
454
|
var index = this._index;
|
|
457
455
|
var timeShiftBufferDepth = this._timeShiftBufferDepth;
|
|
458
|
-
var timeSinceLastRealUpdate = (performance.now() -
|
|
459
|
-
|
|
460
|
-
var lastPositionEstimate = timeSinceLastRealUpdate +
|
|
461
|
-
this._initialScaledLastPosition / index.timescale;
|
|
456
|
+
var timeSinceLastRealUpdate = (performance.now() - this._indexValidityTime) / 1000;
|
|
457
|
+
var lastPositionEstimate = timeSinceLastRealUpdate + this._initialScaledLastPosition / index.timescale;
|
|
462
458
|
if (timeShiftBufferDepth != null) {
|
|
463
|
-
var minimumPosition = (lastPositionEstimate - timeShiftBufferDepth) *
|
|
464
|
-
index.timescale;
|
|
459
|
+
var minimumPosition = (lastPositionEstimate - timeShiftBufferDepth) * index.timescale;
|
|
465
460
|
clearTimelineFromPosition(index.timeline, minimumPosition);
|
|
466
461
|
}
|
|
467
462
|
};
|
|
@@ -27,11 +27,12 @@ export default function _addSegmentInfos(index, newSegment, currentSegment) {
|
|
|
27
27
|
var timeline = index.timeline, timescale = index.timescale;
|
|
28
28
|
var timelineLength = timeline.length;
|
|
29
29
|
var last = timeline[timelineLength - 1];
|
|
30
|
-
var scaledNewSegment = newSegment.timescale === timescale
|
|
31
|
-
{ time: newSegment.time,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
duration: (newSegment.duration / newSegment.timescale) * timescale
|
|
30
|
+
var scaledNewSegment = newSegment.timescale === timescale
|
|
31
|
+
? { time: newSegment.time, duration: newSegment.duration }
|
|
32
|
+
: {
|
|
33
|
+
time: (newSegment.time / newSegment.timescale) * timescale,
|
|
34
|
+
duration: (newSegment.duration / newSegment.timescale) * timescale,
|
|
35
|
+
};
|
|
35
36
|
// in some circumstances, the new segment information are only duration
|
|
36
37
|
// information that we could use to deduct the start of the next segment.
|
|
37
38
|
// This is the case where the new segment are associated to a current
|
|
@@ -50,9 +51,11 @@ export default function _addSegmentInfos(index, newSegment, currentSegment) {
|
|
|
50
51
|
last.repeatCount++;
|
|
51
52
|
}
|
|
52
53
|
else {
|
|
53
|
-
index.timeline.push({
|
|
54
|
+
index.timeline.push({
|
|
55
|
+
duration: scaledNewSegment.duration,
|
|
54
56
|
start: scaledNewSegment.time,
|
|
55
|
-
repeatCount: 0
|
|
57
|
+
repeatCount: 0,
|
|
58
|
+
});
|
|
56
59
|
}
|
|
57
60
|
return true;
|
|
58
61
|
}
|
|
@@ -25,4 +25,4 @@ declare function replaceRepresentationSmoothTokens(url: string, bitrate: string
|
|
|
25
25
|
* @returns {string}
|
|
26
26
|
*/
|
|
27
27
|
declare function replaceSegmentSmoothTokens(url: string, time: number): string;
|
|
28
|
-
export { replaceRepresentationSmoothTokens, replaceSegmentSmoothTokens
|
|
28
|
+
export { replaceRepresentationSmoothTokens, replaceSegmentSmoothTokens };
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
function replaceRepresentationSmoothTokens(url, bitrate, customAttributes) {
|
|
22
22
|
return url
|
|
23
23
|
.replace(/\{bitrate\}/g, String(bitrate))
|
|
24
|
-
.replace(/{CustomAttributes}/g, customAttributes.length > 0 ? customAttributes[0] :
|
|
25
|
-
"");
|
|
24
|
+
.replace(/{CustomAttributes}/g, customAttributes.length > 0 ? customAttributes[0] : "");
|
|
26
25
|
}
|
|
27
26
|
/**
|
|
28
27
|
* @param {string} url
|
|
@@ -32,4 +31,4 @@ function replaceRepresentationSmoothTokens(url, bitrate, customAttributes) {
|
|
|
32
31
|
function replaceSegmentSmoothTokens(url, time) {
|
|
33
32
|
return url.replace(/\{start time\}/g, String(time));
|
|
34
33
|
}
|
|
35
|
-
export { replaceRepresentationSmoothTokens, replaceSegmentSmoothTokens
|
|
34
|
+
export { replaceRepresentationSmoothTokens, replaceSegmentSmoothTokens };
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { IRepresentationIndex } from "../../manifest";
|
|
17
|
-
import { IHDRInformation } from "../../public_types";
|
|
16
|
+
import type { IRepresentationIndex } from "../../manifest";
|
|
17
|
+
import type { IHDRInformation } from "../../public_types";
|
|
18
18
|
export interface IManifestStreamEvent {
|
|
19
19
|
start: number;
|
|
20
20
|
end?: number | undefined;
|
|
@@ -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 { IParsedManifest } from "../types";
|
|
16
|
+
import type { IParsedManifest } from "../types";
|
|
17
17
|
/**
|
|
18
18
|
* Ensure that no two periods, adaptations from the same period and
|
|
19
19
|
* representations from the same adaptation, have the same ID.
|
|
@@ -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 { IIndexSegment } from "./index_helpers";
|
|
16
|
+
import type { IIndexSegment } from "./index_helpers";
|
|
17
17
|
/**
|
|
18
18
|
* Remove segments which starts before the given `firstAvailablePosition` from
|
|
19
19
|
* the timeline. `firstAvailablePosition` has to be time scaled.
|
|
@@ -34,28 +34,31 @@ export default function clearTimelineFromPosition(timeline, firstAvailablePositi
|
|
|
34
34
|
timeline.shift();
|
|
35
35
|
nbEltsRemoved += 1;
|
|
36
36
|
}
|
|
37
|
-
else {
|
|
37
|
+
else {
|
|
38
|
+
// we have a segment repetition
|
|
38
39
|
var nextElt = timeline[1];
|
|
39
40
|
if (nextElt !== undefined && nextElt.start <= firstAvailablePosition) {
|
|
40
41
|
timeline.shift();
|
|
41
42
|
nbEltsRemoved += 1;
|
|
42
43
|
}
|
|
43
|
-
else {
|
|
44
|
+
else {
|
|
45
|
+
// no next segment or next segment is available
|
|
44
46
|
if (firstElt.duration <= 0) {
|
|
45
47
|
return nbEltsRemoved;
|
|
46
48
|
}
|
|
47
49
|
var nextStart = firstElt.start + firstElt.duration;
|
|
48
50
|
var nextRepeat = 1;
|
|
49
|
-
while (nextStart < firstAvailablePosition &&
|
|
50
|
-
nextRepeat <= firstElt.repeatCount) {
|
|
51
|
+
while (nextStart < firstAvailablePosition && nextRepeat <= firstElt.repeatCount) {
|
|
51
52
|
nextStart += firstElt.duration;
|
|
52
53
|
nextRepeat++;
|
|
53
54
|
}
|
|
54
|
-
if (nextRepeat > firstElt.repeatCount) {
|
|
55
|
+
if (nextRepeat > firstElt.repeatCount) {
|
|
56
|
+
// every start is before
|
|
55
57
|
timeline.shift();
|
|
56
58
|
nbEltsRemoved = firstElt.repeatCount + 1;
|
|
57
59
|
}
|
|
58
|
-
else {
|
|
60
|
+
else {
|
|
61
|
+
// some repetitions start after and some before
|
|
59
62
|
var newRepeat = firstElt.repeatCount - nextRepeat;
|
|
60
63
|
firstElt.start = nextStart;
|
|
61
64
|
firstElt.repeatCount = newRepeat;
|
|
@@ -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 { IParsedAdaptation } from "../types";
|
|
16
|
+
import type { IParsedAdaptation } from "../types";
|
|
17
17
|
/**
|
|
18
18
|
* Returns "first time of reference" from the adaptation given, considering a
|
|
19
19
|
* dynamic content.
|
|
@@ -28,15 +28,16 @@ export default function getFirstPositionFromAdaptation(adaptation) {
|
|
|
28
28
|
var max = null;
|
|
29
29
|
for (var i = 0; i < representations.length; i++) {
|
|
30
30
|
var firstPosition = representations[i].index.getFirstAvailablePosition();
|
|
31
|
-
if (firstPosition === undefined) {
|
|
31
|
+
if (firstPosition === undefined) {
|
|
32
|
+
// we cannot tell
|
|
32
33
|
return undefined;
|
|
33
34
|
}
|
|
34
35
|
if (firstPosition !== null) {
|
|
35
|
-
max = max == null ? firstPosition :
|
|
36
|
-
Math.max(max, firstPosition);
|
|
36
|
+
max = max == null ? firstPosition : Math.max(max, firstPosition);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
if (max === null) {
|
|
39
|
+
if (max === null) {
|
|
40
|
+
// It means that all positions were null === no segments (yet?)
|
|
40
41
|
return null;
|
|
41
42
|
}
|
|
42
43
|
return max;
|
|
@@ -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 { IParsedAdaptation } from "../types";
|
|
16
|
+
import type { IParsedAdaptation } from "../types";
|
|
17
17
|
/**
|
|
18
18
|
* Returns "last time of reference" from the adaptation given, considering a
|
|
19
19
|
* dynamic content.
|
|
@@ -30,15 +30,16 @@ export default function getLastPositionFromAdaptation(adaptation) {
|
|
|
30
30
|
var min = null;
|
|
31
31
|
for (var i = 0; i < representations.length; i++) {
|
|
32
32
|
var lastPosition = representations[i].index.getLastAvailablePosition();
|
|
33
|
-
if (lastPosition === undefined) {
|
|
33
|
+
if (lastPosition === undefined) {
|
|
34
|
+
// we cannot tell
|
|
34
35
|
return undefined;
|
|
35
36
|
}
|
|
36
37
|
if (lastPosition !== null) {
|
|
37
|
-
min = min == null ? lastPosition :
|
|
38
|
-
Math.min(min, lastPosition);
|
|
38
|
+
min = min == null ? lastPosition : Math.min(min, lastPosition);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
if (min === null) {
|
|
41
|
+
if (min === null) {
|
|
42
|
+
// It means that all positions were null === no segments (yet?)
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
45
|
return min;
|
|
@@ -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 { IParsedPeriod } from "../types";
|
|
16
|
+
import type { IParsedPeriod } from "../types";
|
|
17
17
|
/**
|
|
18
18
|
* @param {Object} manifest
|
|
19
19
|
* @returns {number | undefined}
|
|
@@ -22,12 +22,8 @@ import getLastPositionFromAdaptation from "./get_last_time_from_adaptation";
|
|
|
22
22
|
export default function getMaximumPosition(periods) {
|
|
23
23
|
for (var i = periods.length - 1; i >= 0; i--) {
|
|
24
24
|
var periodAdaptations = periods[i].adaptations;
|
|
25
|
-
var firstAudioAdaptationFromPeriod = periodAdaptations.audio === undefined ?
|
|
26
|
-
|
|
27
|
-
periodAdaptations.audio[0];
|
|
28
|
-
var firstVideoAdaptationFromPeriod = periodAdaptations.video === undefined ?
|
|
29
|
-
undefined :
|
|
30
|
-
periodAdaptations.video[0];
|
|
25
|
+
var firstAudioAdaptationFromPeriod = periodAdaptations.audio === undefined ? undefined : periodAdaptations.audio[0];
|
|
26
|
+
var firstVideoAdaptationFromPeriod = periodAdaptations.video === undefined ? undefined : periodAdaptations.video[0];
|
|
31
27
|
if (firstAudioAdaptationFromPeriod !== undefined ||
|
|
32
28
|
firstVideoAdaptationFromPeriod !== undefined) {
|
|
33
29
|
// null == no segment
|
|
@@ -47,24 +43,22 @@ export default function getMaximumPosition(periods) {
|
|
|
47
43
|
}
|
|
48
44
|
maximumVideoPosition = lastPosition;
|
|
49
45
|
}
|
|
50
|
-
if ((firstAudioAdaptationFromPeriod !== undefined &&
|
|
51
|
-
|
|
52
|
-
(firstVideoAdaptationFromPeriod !== undefined &&
|
|
53
|
-
maximumVideoPosition === null)) {
|
|
46
|
+
if ((firstAudioAdaptationFromPeriod !== undefined && maximumAudioPosition === null) ||
|
|
47
|
+
(firstVideoAdaptationFromPeriod !== undefined && maximumVideoPosition === null)) {
|
|
54
48
|
log.info("Parser utils: found Period with no segment. ", "Going to previous one to calculate last position");
|
|
55
49
|
return { safe: undefined, unsafe: undefined };
|
|
56
50
|
}
|
|
57
51
|
if (maximumVideoPosition !== null) {
|
|
58
52
|
if (maximumAudioPosition !== null) {
|
|
59
|
-
return {
|
|
60
|
-
|
|
53
|
+
return {
|
|
54
|
+
safe: Math.min(maximumAudioPosition, maximumVideoPosition),
|
|
55
|
+
unsafe: Math.max(maximumAudioPosition, maximumVideoPosition),
|
|
56
|
+
};
|
|
61
57
|
}
|
|
62
|
-
return { safe: maximumVideoPosition,
|
|
63
|
-
unsafe: maximumVideoPosition };
|
|
58
|
+
return { safe: maximumVideoPosition, unsafe: maximumVideoPosition };
|
|
64
59
|
}
|
|
65
60
|
if (maximumAudioPosition !== null) {
|
|
66
|
-
return { safe: maximumAudioPosition,
|
|
67
|
-
unsafe: maximumAudioPosition };
|
|
61
|
+
return { safe: maximumAudioPosition, unsafe: maximumAudioPosition };
|
|
68
62
|
}
|
|
69
63
|
}
|
|
70
64
|
}
|
|
@@ -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 { IParsedPeriod } from "../types";
|
|
16
|
+
import type { IParsedPeriod } from "../types";
|
|
17
17
|
/**
|
|
18
18
|
* @param {Object} manifest
|
|
19
19
|
* @returns {number | undefined}
|
|
@@ -22,12 +22,8 @@ import getFirstPositionFromAdaptation from "./get_first_time_from_adaptation";
|
|
|
22
22
|
export default function getMinimumPosition(periods) {
|
|
23
23
|
for (var i = 0; i <= periods.length - 1; i++) {
|
|
24
24
|
var periodAdaptations = periods[i].adaptations;
|
|
25
|
-
var firstAudioAdaptationFromPeriod = periodAdaptations.audio === undefined ?
|
|
26
|
-
|
|
27
|
-
periodAdaptations.audio[0];
|
|
28
|
-
var firstVideoAdaptationFromPeriod = periodAdaptations.video === undefined ?
|
|
29
|
-
undefined :
|
|
30
|
-
periodAdaptations.video[0];
|
|
25
|
+
var firstAudioAdaptationFromPeriod = periodAdaptations.audio === undefined ? undefined : periodAdaptations.audio[0];
|
|
26
|
+
var firstVideoAdaptationFromPeriod = periodAdaptations.video === undefined ? undefined : periodAdaptations.video[0];
|
|
31
27
|
if (firstAudioAdaptationFromPeriod !== undefined ||
|
|
32
28
|
firstVideoAdaptationFromPeriod !== undefined) {
|
|
33
29
|
// null == no segment
|
|
@@ -47,10 +43,8 @@ export default function getMinimumPosition(periods) {
|
|
|
47
43
|
}
|
|
48
44
|
minimumVideoPosition = firstPosition;
|
|
49
45
|
}
|
|
50
|
-
if ((firstAudioAdaptationFromPeriod !== undefined &&
|
|
51
|
-
|
|
52
|
-
(firstVideoAdaptationFromPeriod !== undefined &&
|
|
53
|
-
minimumVideoPosition === null)) {
|
|
46
|
+
if ((firstAudioAdaptationFromPeriod !== undefined && minimumAudioPosition === null) ||
|
|
47
|
+
(firstVideoAdaptationFromPeriod !== undefined && minimumVideoPosition === null)) {
|
|
54
48
|
log.info("Parser utils: found Period with no segment. ", "Going to next one to calculate first position");
|
|
55
49
|
return undefined;
|
|
56
50
|
}
|
|
@@ -35,7 +35,7 @@ export interface IIndexSegment {
|
|
|
35
35
|
* @param {number|undefined} maxPosition
|
|
36
36
|
* @returns {Number}
|
|
37
37
|
*/
|
|
38
|
-
export declare function calculateRepeat(element: IIndexSegment, nextElement?: IIndexSegment | null
|
|
38
|
+
export declare function calculateRepeat(element: IIndexSegment, nextElement?: IIndexSegment | null, maxPosition?: number): number;
|
|
39
39
|
/**
|
|
40
40
|
* Returns end of the segment given, in index time.
|
|
41
41
|
* @param {Object} segment
|
|
@@ -89,8 +89,7 @@ export function fromIndexTime(time, indexOptions) {
|
|
|
89
89
|
* - to {Number}: timescaled timestamp of the end time (start time + duration)
|
|
90
90
|
*/
|
|
91
91
|
export function getTimescaledRange(start, duration, timescale) {
|
|
92
|
-
return [start * timescale,
|
|
93
|
-
(start + duration) * timescale];
|
|
92
|
+
return [start * timescale, (start + duration) * timescale];
|
|
94
93
|
}
|
|
95
94
|
/**
|
|
96
95
|
* Get index of the last segment in the timeline starting before/at the given
|
|
@@ -141,7 +140,7 @@ export function checkDiscontinuity(index, timeSec, maxPosition) {
|
|
|
141
140
|
}
|
|
142
141
|
var nextStart = nextTimelineItem.start;
|
|
143
142
|
var segmentEnd = getIndexSegmentEnd(timelineItem, nextTimelineItem, maxPosition);
|
|
144
|
-
return scaledTime >= segmentEnd &&
|
|
145
|
-
|
|
146
|
-
null;
|
|
143
|
+
return scaledTime >= segmentEnd && scaledTime < nextStart
|
|
144
|
+
? fromIndexTime(nextStart, index)
|
|
145
|
+
: null;
|
|
147
146
|
}
|
|
@@ -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 { IIndexSegment } from "./index_helpers";
|
|
16
|
+
import type { IIndexSegment } from "./index_helpers";
|
|
17
17
|
/**
|
|
18
18
|
* Update a complete array of segments in a given timeline with a [generally]
|
|
19
19
|
* smaller but [generally] newer set of segments.
|