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 config from "../../../../../config";
|
|
|
17
17
|
import assert from "../../../../../utils/assert";
|
|
18
18
|
import isNullOrUndefined from "../../../../../utils/is_null_or_undefined";
|
|
19
19
|
import getInitSegment from "./get_init_segment";
|
|
20
|
-
import { createDashUrlDetokenizer, constructRepresentationUrl
|
|
20
|
+
import { createDashUrlDetokenizer, constructRepresentationUrl } from "./tokens";
|
|
21
21
|
import { getSegmentTimeRoundingError } from "./utils";
|
|
22
22
|
/**
|
|
23
23
|
* IRepresentationIndex implementation for DASH' SegmentTemplate without a
|
|
@@ -35,31 +35,35 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
35
35
|
var timescale = (_a = index.timescale) !== null && _a !== void 0 ? _a : 1;
|
|
36
36
|
this._availabilityTimeOffset = availabilityTimeOffset;
|
|
37
37
|
this._manifestBoundsCalculator = manifestBoundsCalculator;
|
|
38
|
-
var presentationTimeOffset = index.presentationTimeOffset != null ?
|
|
39
|
-
index.presentationTimeOffset :
|
|
40
|
-
0;
|
|
38
|
+
var presentationTimeOffset = index.presentationTimeOffset != null ? index.presentationTimeOffset : 0;
|
|
41
39
|
var scaledStart = periodStart * timescale;
|
|
42
40
|
var indexTimeOffset = presentationTimeOffset - scaledStart;
|
|
43
41
|
if (index.duration === undefined) {
|
|
44
42
|
throw new Error("Invalid SegmentTemplate: no duration");
|
|
45
43
|
}
|
|
46
|
-
var initializationUrl = ((_b = index.initialization) === null || _b === void 0 ? void 0 : _b.media) === undefined
|
|
47
|
-
null
|
|
48
|
-
constructRepresentationUrl(index.initialization.media, representationId, representationBitrate);
|
|
49
|
-
var segmentUrlTemplate = index.media === undefined
|
|
50
|
-
null
|
|
51
|
-
constructRepresentationUrl(index.media, representationId, representationBitrate);
|
|
52
|
-
this._index = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
var initializationUrl = ((_b = index.initialization) === null || _b === void 0 ? void 0 : _b.media) === undefined
|
|
45
|
+
? null
|
|
46
|
+
: constructRepresentationUrl(index.initialization.media, representationId, representationBitrate);
|
|
47
|
+
var segmentUrlTemplate = index.media === undefined
|
|
48
|
+
? null
|
|
49
|
+
: constructRepresentationUrl(index.media, representationId, representationBitrate);
|
|
50
|
+
this._index = {
|
|
51
|
+
duration: index.duration,
|
|
52
|
+
timescale: timescale,
|
|
53
|
+
indexRange: index.indexRange,
|
|
54
|
+
indexTimeOffset: indexTimeOffset,
|
|
55
|
+
initialization: index.initialization == null
|
|
56
|
+
? undefined
|
|
57
|
+
: { url: initializationUrl, range: index.initialization.range },
|
|
58
|
+
url: segmentUrlTemplate,
|
|
59
|
+
presentationTimeOffset: presentationTimeOffset,
|
|
60
|
+
startNumber: index.startNumber,
|
|
61
|
+
endNumber: index.endNumber,
|
|
62
|
+
};
|
|
58
63
|
this._isDynamic = isDynamic;
|
|
59
64
|
this._periodStart = periodStart;
|
|
60
|
-
this._scaledRelativePeriodEnd =
|
|
61
|
-
undefined :
|
|
62
|
-
(periodEnd - periodStart) * timescale;
|
|
65
|
+
this._scaledRelativePeriodEnd =
|
|
66
|
+
periodEnd === undefined ? undefined : (periodEnd - periodStart) * timescale;
|
|
63
67
|
this._isEMSGWhitelisted = isEMSGWhitelisted;
|
|
64
68
|
}
|
|
65
69
|
/**
|
|
@@ -90,7 +94,7 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
90
94
|
}
|
|
91
95
|
var startPosition = Math.max(firstSegmentStart, upFromPeriodStart);
|
|
92
96
|
var lastWantedStartPosition = Math.min(lastSegmentStart, toFromPeriodStart);
|
|
93
|
-
if (
|
|
97
|
+
if (lastWantedStartPosition + duration <= startPosition) {
|
|
94
98
|
return [];
|
|
95
99
|
}
|
|
96
100
|
var segments = [];
|
|
@@ -105,16 +109,14 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
105
109
|
if (endNumber !== undefined && realNumber > endNumber) {
|
|
106
110
|
return segments;
|
|
107
111
|
}
|
|
108
|
-
var realDuration = scaledEnd != null &&
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
duration;
|
|
112
|
+
var realDuration = scaledEnd != null && timeFromPeriodStart + duration > scaledEnd
|
|
113
|
+
? scaledEnd - timeFromPeriodStart
|
|
114
|
+
: duration;
|
|
112
115
|
var realTime = timeFromPeriodStart + scaledStart;
|
|
113
116
|
var manifestTime = timeFromPeriodStart + this._index.presentationTimeOffset;
|
|
114
|
-
var detokenizedURL = url === null ?
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
var args = { id: String(realNumber),
|
|
117
|
+
var detokenizedURL = url === null ? null : createDashUrlDetokenizer(manifestTime, realNumber)(url);
|
|
118
|
+
var args = {
|
|
119
|
+
id: String(realNumber),
|
|
118
120
|
number: realNumber,
|
|
119
121
|
time: realTime / timescale,
|
|
120
122
|
end: (realTime + realDuration) / timescale,
|
|
@@ -127,7 +129,8 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
127
129
|
complete: true,
|
|
128
130
|
privateInfos: {
|
|
129
131
|
isEMSGWhitelisted: this._isEMSGWhitelisted,
|
|
130
|
-
}
|
|
132
|
+
},
|
|
133
|
+
};
|
|
131
134
|
segments.push(args);
|
|
132
135
|
numberIndexedToZero++;
|
|
133
136
|
}
|
|
@@ -142,7 +145,7 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
142
145
|
if (firstSegmentStart == null) {
|
|
143
146
|
return firstSegmentStart; // return undefined or null
|
|
144
147
|
}
|
|
145
|
-
return
|
|
148
|
+
return firstSegmentStart / this._index.timescale + this._periodStart;
|
|
146
149
|
};
|
|
147
150
|
/**
|
|
148
151
|
* Returns last possible position in the index, in seconds.
|
|
@@ -158,7 +161,7 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
158
161
|
}
|
|
159
162
|
var scaledRelativeIndexEnd = this._estimateRelativeScaledEnd();
|
|
160
163
|
var lastSegmentEnd = Math.min(lastSegmentStart + this._index.duration, scaledRelativeIndexEnd !== null && scaledRelativeIndexEnd !== void 0 ? scaledRelativeIndexEnd : Infinity);
|
|
161
|
-
return
|
|
164
|
+
return lastSegmentEnd / this._index.timescale + this._periodStart;
|
|
162
165
|
};
|
|
163
166
|
/**
|
|
164
167
|
* Returns the absolute end in seconds this RepresentationIndex can reach once
|
|
@@ -174,8 +177,7 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
174
177
|
return undefined;
|
|
175
178
|
}
|
|
176
179
|
var timescale = this._index.timescale;
|
|
177
|
-
var absoluteScaledIndexEnd =
|
|
178
|
-
this._periodStart * timescale);
|
|
180
|
+
var absoluteScaledIndexEnd = scaledRelativeIndexEnd + this._periodStart * timescale;
|
|
179
181
|
return absoluteScaledIndexEnd / timescale;
|
|
180
182
|
};
|
|
181
183
|
/**
|
|
@@ -198,24 +200,24 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
198
200
|
var timescale = this._index.timescale;
|
|
199
201
|
var segmentTimeRounding = getSegmentTimeRoundingError(timescale);
|
|
200
202
|
var scaledPeriodStart = this._periodStart * timescale;
|
|
201
|
-
var scaledRelativeStart =
|
|
202
|
-
var scaledRelativeEnd =
|
|
203
|
+
var scaledRelativeStart = start * timescale - scaledPeriodStart;
|
|
204
|
+
var scaledRelativeEnd = end * timescale - scaledPeriodStart;
|
|
203
205
|
var lastSegmentStart = this._getLastSegmentStart();
|
|
204
206
|
if (isNullOrUndefined(lastSegmentStart)) {
|
|
205
207
|
var relativeScaledIndexEnd_1 = this._estimateRelativeScaledEnd();
|
|
206
208
|
if (relativeScaledIndexEnd_1 === undefined) {
|
|
207
209
|
return scaledRelativeEnd + segmentTimeRounding >= 0;
|
|
208
210
|
}
|
|
209
|
-
return scaledRelativeEnd + segmentTimeRounding >= 0 &&
|
|
210
|
-
scaledRelativeStart < relativeScaledIndexEnd_1 - segmentTimeRounding;
|
|
211
|
+
return (scaledRelativeEnd + segmentTimeRounding >= 0 &&
|
|
212
|
+
scaledRelativeStart < relativeScaledIndexEnd_1 - segmentTimeRounding);
|
|
211
213
|
}
|
|
212
214
|
var lastSegmentEnd = lastSegmentStart + this._index.duration;
|
|
213
215
|
var relativeScaledIndexEnd = this._estimateRelativeScaledEnd();
|
|
214
216
|
if (relativeScaledIndexEnd === undefined) {
|
|
215
217
|
return scaledRelativeEnd > lastSegmentEnd - segmentTimeRounding;
|
|
216
218
|
}
|
|
217
|
-
return scaledRelativeEnd > lastSegmentEnd - segmentTimeRounding &&
|
|
218
|
-
scaledRelativeStart < relativeScaledIndexEnd - segmentTimeRounding;
|
|
219
|
+
return (scaledRelativeEnd > lastSegmentEnd - segmentTimeRounding &&
|
|
220
|
+
scaledRelativeStart < relativeScaledIndexEnd - segmentTimeRounding);
|
|
219
221
|
};
|
|
220
222
|
/**
|
|
221
223
|
* Returns true if, based on the arguments, the index should be refreshed.
|
|
@@ -248,9 +250,9 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
248
250
|
if (segmentsForTime.length === 0) {
|
|
249
251
|
return false;
|
|
250
252
|
}
|
|
251
|
-
return segmentsForTime[0].time === segment.time &&
|
|
253
|
+
return (segmentsForTime[0].time === segment.time &&
|
|
252
254
|
segmentsForTime[0].end === segment.end &&
|
|
253
|
-
segmentsForTime[0].number === segment.number;
|
|
255
|
+
segmentsForTime[0].number === segment.number);
|
|
254
256
|
};
|
|
255
257
|
/**
|
|
256
258
|
* SegmentTemplate without a SegmentTimeline should not be updated.
|
|
@@ -283,7 +285,7 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
283
285
|
}
|
|
284
286
|
var lastSegmentEnd = lastSegmentStart + this._index.duration;
|
|
285
287
|
var segmentTimeRounding = getSegmentTimeRoundingError(timescale);
|
|
286
|
-
return
|
|
288
|
+
return lastSegmentEnd + segmentTimeRounding < scaledRelativeIndexEnd;
|
|
287
289
|
};
|
|
288
290
|
/**
|
|
289
291
|
* @returns {Boolean}
|
|
@@ -337,9 +339,9 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
337
339
|
if (firstPosition === undefined) {
|
|
338
340
|
return undefined;
|
|
339
341
|
}
|
|
340
|
-
var segmentTime = firstPosition > this._periodStart
|
|
341
|
-
(firstPosition - this._periodStart) * timescale
|
|
342
|
-
0;
|
|
342
|
+
var segmentTime = firstPosition > this._periodStart
|
|
343
|
+
? (firstPosition - this._periodStart) * timescale
|
|
344
|
+
: 0;
|
|
343
345
|
var numberIndexedToZero = Math.floor(segmentTime / duration);
|
|
344
346
|
return numberIndexedToZero * duration;
|
|
345
347
|
};
|
|
@@ -356,16 +358,15 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
356
358
|
var liveEdge = this._manifestBoundsCalculator.getEstimatedLiveEdge();
|
|
357
359
|
if (liveEdge !== undefined &&
|
|
358
360
|
this._scaledRelativePeriodEnd !== undefined &&
|
|
359
|
-
this._scaledRelativePeriodEnd <
|
|
360
|
-
this._index.timescale)
|
|
361
|
+
this._scaledRelativePeriodEnd <
|
|
362
|
+
liveEdge - this._periodStart * this._index.timescale) {
|
|
361
363
|
var numberOfSegments = Math.ceil(this._scaledRelativePeriodEnd / duration);
|
|
362
|
-
if (endNumber !== undefined &&
|
|
364
|
+
if (endNumber !== undefined && endNumber - startNumber + 1 < numberOfSegments) {
|
|
363
365
|
numberOfSegments = endNumber - startNumber + 1;
|
|
364
366
|
}
|
|
365
367
|
return (numberOfSegments - 1) * duration;
|
|
366
368
|
}
|
|
367
|
-
var lastPosition = this._manifestBoundsCalculator
|
|
368
|
-
.getEstimatedMaximumPosition((_a = this._availabilityTimeOffset) !== null && _a !== void 0 ? _a : 0);
|
|
369
|
+
var lastPosition = this._manifestBoundsCalculator.getEstimatedMaximumPosition((_a = this._availabilityTimeOffset) !== null && _a !== void 0 ? _a : 0);
|
|
369
370
|
if (lastPosition === undefined) {
|
|
370
371
|
return undefined;
|
|
371
372
|
}
|
|
@@ -380,17 +381,17 @@ var TemplateRepresentationIndex = /** @class */ (function () {
|
|
|
380
381
|
}
|
|
381
382
|
var numberOfSegmentsAvailable = Math.floor(scaledLastPosition / duration);
|
|
382
383
|
if (endNumber !== undefined &&
|
|
383
|
-
|
|
384
|
+
endNumber - startNumber + 1 < numberOfSegmentsAvailable) {
|
|
384
385
|
numberOfSegmentsAvailable = endNumber - startNumber + 1;
|
|
385
386
|
}
|
|
386
|
-
return numberOfSegmentsAvailable <= 0
|
|
387
|
-
null
|
|
388
|
-
(numberOfSegmentsAvailable - 1) * duration;
|
|
387
|
+
return numberOfSegmentsAvailable <= 0
|
|
388
|
+
? null
|
|
389
|
+
: (numberOfSegmentsAvailable - 1) * duration;
|
|
389
390
|
}
|
|
390
391
|
else {
|
|
391
392
|
var maximumTime = (_b = this._scaledRelativePeriodEnd) !== null && _b !== void 0 ? _b : 0;
|
|
392
393
|
var numberOfSegments = Math.ceil(maximumTime / duration);
|
|
393
|
-
if (endNumber !== undefined &&
|
|
394
|
+
if (endNumber !== undefined && endNumber - startNumber + 1 < numberOfSegments) {
|
|
394
395
|
numberOfSegments = endNumber - startNumber + 1;
|
|
395
396
|
}
|
|
396
397
|
var regularLastSegmentStart = (numberOfSegments - 1) * duration;
|
|
@@ -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 "../../../../utils/index_helpers";
|
|
16
|
+
import type { IIndexSegment } from "../../../../utils/index_helpers";
|
|
17
17
|
/**
|
|
18
18
|
* Allows to generate the "timeline" for the "Timeline" RepresentationIndex.
|
|
19
19
|
* Call this function when the timeline is unknown.
|
|
@@ -32,12 +32,8 @@ export default function constructTimelineFromElements(elements) {
|
|
|
32
32
|
var timeline = [];
|
|
33
33
|
for (var i = 0; i < initialTimeline.length; i++) {
|
|
34
34
|
var item = initialTimeline[i];
|
|
35
|
-
var previousItem = timeline[timeline.length - 1] === undefined ?
|
|
36
|
-
|
|
37
|
-
timeline[timeline.length - 1];
|
|
38
|
-
var nextItem = initialTimeline[i + 1] === undefined ?
|
|
39
|
-
null :
|
|
40
|
-
initialTimeline[i + 1];
|
|
35
|
+
var previousItem = timeline[timeline.length - 1] === undefined ? null : timeline[timeline.length - 1];
|
|
36
|
+
var nextItem = initialTimeline[i + 1] === undefined ? null : initialTimeline[i + 1];
|
|
41
37
|
var timelineElement = convertElementsToIndexSegment(item, previousItem, nextItem);
|
|
42
38
|
if (timelineElement !== null) {
|
|
43
39
|
timeline.push(timelineElement);
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { IIndexSegment } from "../../../../utils/index_helpers";
|
|
16
|
+
import type { IIndexSegment } from "../../../../utils/index_helpers";
|
|
17
17
|
export default function constructTimelineFromPreviousTimeline(newElements: HTMLCollection, prevTimeline: IIndexSegment[]): IIndexSegment[];
|
|
@@ -23,7 +23,7 @@ export default function constructTimelineFromPreviousTimeline(newElements, prevT
|
|
|
23
23
|
// Find first index in both timeline where a common segment is found.
|
|
24
24
|
var commonStartInfo = findFirstCommonStartTime(prevTimeline, newElements);
|
|
25
25
|
if (commonStartInfo === null) {
|
|
26
|
-
log.warn(
|
|
26
|
+
log.warn('DASH: Cannot perform "based" update. Common segment not found.');
|
|
27
27
|
return constructTimelineFromElements(newElements);
|
|
28
28
|
}
|
|
29
29
|
var prevSegmentsIdx = commonStartInfo.prevSegmentsIdx, newElementsIdx = commonStartInfo.newElementsIdx, repeatNumberInPrevSegments = commonStartInfo.repeatNumberInPrevSegments, repeatNumberInNewElements = commonStartInfo.repeatNumberInNewElements;
|
|
@@ -31,29 +31,27 @@ export default function constructTimelineFromPreviousTimeline(newElements, prevT
|
|
|
31
31
|
var numberCommonEltGuess = prevTimeline.length - prevSegmentsIdx;
|
|
32
32
|
var lastCommonEltNewEltsIdx = numberCommonEltGuess + newElementsIdx - 1;
|
|
33
33
|
if (lastCommonEltNewEltsIdx >= newElements.length) {
|
|
34
|
-
log.info(
|
|
34
|
+
log.info('DASH: Cannot perform "based" update. New timeline too short');
|
|
35
35
|
return constructTimelineFromElements(newElements);
|
|
36
36
|
}
|
|
37
37
|
// Remove elements which are not available anymore
|
|
38
38
|
var newTimeline = prevTimeline.slice(prevSegmentsIdx);
|
|
39
39
|
if (repeatNumberInPrevSegments > 0) {
|
|
40
40
|
var commonEltInOldTimeline = newTimeline[0];
|
|
41
|
-
commonEltInOldTimeline.start +=
|
|
42
|
-
repeatNumberInPrevSegments;
|
|
41
|
+
commonEltInOldTimeline.start +=
|
|
42
|
+
commonEltInOldTimeline.duration * repeatNumberInPrevSegments;
|
|
43
43
|
newTimeline[0].repeatCount -= repeatNumberInPrevSegments;
|
|
44
44
|
}
|
|
45
45
|
if (repeatNumberInNewElements > 0 && newElementsIdx !== 0) {
|
|
46
|
-
log.info(
|
|
47
|
-
"The new timeline has a different form.");
|
|
46
|
+
log.info('DASH: Cannot perform "based" update. ' + "The new timeline has a different form.");
|
|
48
47
|
return constructTimelineFromElements(newElements);
|
|
49
48
|
}
|
|
50
49
|
var prevLastElement = newTimeline[newTimeline.length - 1];
|
|
51
50
|
var newCommonElt = parseSElement(newElements[lastCommonEltNewEltsIdx]);
|
|
52
|
-
var newRepeatCountOffseted = ((_a = newCommonElt.repeatCount) !== null && _a !== void 0 ? _a : 0) -
|
|
53
|
-
repeatNumberInNewElements;
|
|
51
|
+
var newRepeatCountOffseted = ((_a = newCommonElt.repeatCount) !== null && _a !== void 0 ? _a : 0) - repeatNumberInNewElements;
|
|
54
52
|
if (newCommonElt.duration !== prevLastElement.duration ||
|
|
55
53
|
prevLastElement.repeatCount > newRepeatCountOffseted) {
|
|
56
|
-
log.info(
|
|
54
|
+
log.info('DASH: Cannot perform "based" update. ' +
|
|
57
55
|
"The new timeline has a different form at the beginning.");
|
|
58
56
|
return constructTimelineFromElements(newElements);
|
|
59
57
|
}
|
|
@@ -68,12 +66,10 @@ export default function constructTimelineFromPreviousTimeline(newElements, prevT
|
|
|
68
66
|
}
|
|
69
67
|
for (var i = 0; i < items.length; i++) {
|
|
70
68
|
var item = items[i];
|
|
71
|
-
var previousItem = newEltsToPush[newEltsToPush.length - 1] === undefined
|
|
72
|
-
prevLastElement
|
|
73
|
-
newEltsToPush[newEltsToPush.length - 1];
|
|
74
|
-
var nextItem = items[i + 1] === undefined ?
|
|
75
|
-
null :
|
|
76
|
-
items[i + 1];
|
|
69
|
+
var previousItem = newEltsToPush[newEltsToPush.length - 1] === undefined
|
|
70
|
+
? prevLastElement
|
|
71
|
+
: newEltsToPush[newEltsToPush.length - 1];
|
|
72
|
+
var nextItem = items[i + 1] === undefined ? null : items[i + 1];
|
|
77
73
|
var timelineElement = convertElementToIndexSegment(item, previousItem, nextItem);
|
|
78
74
|
if (timelineElement !== null) {
|
|
79
75
|
newEltsToPush.push(timelineElement);
|
|
@@ -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 "../../../../utils/index_helpers";
|
|
16
|
+
import type { IIndexSegment } from "../../../../utils/index_helpers";
|
|
17
17
|
/**
|
|
18
18
|
* Translate parsed `S` node into Segment compatible with this index:
|
|
19
19
|
* Find out the start, repeatCount and duration of each of these.
|
|
@@ -36,21 +36,24 @@ export default function convertElementsToIndexSegment(item, previousItem, nextIt
|
|
|
36
36
|
start = 0;
|
|
37
37
|
}
|
|
38
38
|
else if (!isNullOrUndefined(previousItem.duration)) {
|
|
39
|
-
start = previousItem.start +
|
|
40
|
-
(previousItem.duration * (previousItem.repeatCount + 1));
|
|
39
|
+
start = previousItem.start + previousItem.duration * (previousItem.repeatCount + 1);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
if ((duration === undefined || isNaN(duration)) &&
|
|
44
|
-
nextItem !== null &&
|
|
45
|
-
start !== undefined &&
|
|
43
|
+
nextItem !== null &&
|
|
44
|
+
nextItem.start !== undefined &&
|
|
45
|
+
!isNaN(nextItem.start) &&
|
|
46
|
+
start !== undefined &&
|
|
47
|
+
!isNaN(start)) {
|
|
46
48
|
duration = nextItem.start - start;
|
|
47
49
|
}
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
+
if (start !== undefined &&
|
|
51
|
+
!isNaN(start) &&
|
|
52
|
+
duration !== undefined &&
|
|
53
|
+
!isNaN(duration) &&
|
|
50
54
|
(repeatCount === undefined || !isNaN(repeatCount))) {
|
|
51
|
-
return { start: start, duration: duration, repeatCount: repeatCount === undefined ? 0 :
|
|
52
|
-
repeatCount };
|
|
55
|
+
return { start: start, duration: duration, repeatCount: repeatCount === undefined ? 0 : repeatCount };
|
|
53
56
|
}
|
|
54
|
-
log.warn(
|
|
57
|
+
log.warn('DASH: A "S" Element could not have been parsed.');
|
|
55
58
|
return null;
|
|
56
59
|
}
|
|
@@ -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 "../../../../utils/index_helpers";
|
|
16
|
+
import type { IIndexSegment } from "../../../../utils/index_helpers";
|
|
17
17
|
/**
|
|
18
18
|
* By comparing two timelines for the same content at different points in time,
|
|
19
19
|
* retrieve the index in both timelines of the first segment having the same
|
|
@@ -28,16 +28,17 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
|
|
|
28
28
|
}
|
|
29
29
|
var prevInitialStart = prevTimeline[0].start;
|
|
30
30
|
var newFirstTAttr = newElements[0].getAttribute("t");
|
|
31
|
-
var newInitialStart = newFirstTAttr === null ? null :
|
|
32
|
-
parseInt(newFirstTAttr, 10);
|
|
31
|
+
var newInitialStart = newFirstTAttr === null ? null : parseInt(newFirstTAttr, 10);
|
|
33
32
|
if (newInitialStart === null || Number.isNaN(newInitialStart)) {
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
36
35
|
if (prevInitialStart === newInitialStart) {
|
|
37
|
-
return {
|
|
36
|
+
return {
|
|
37
|
+
prevSegmentsIdx: 0,
|
|
38
38
|
newElementsIdx: 0,
|
|
39
39
|
repeatNumberInPrevSegments: 0,
|
|
40
|
-
repeatNumberInNewElements: 0
|
|
40
|
+
repeatNumberInNewElements: 0,
|
|
41
|
+
};
|
|
41
42
|
}
|
|
42
43
|
else if (prevInitialStart < newInitialStart) {
|
|
43
44
|
var prevElt = prevTimeline[0];
|
|
@@ -48,9 +49,12 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
|
|
|
48
49
|
if (diff % prevElt.duration === 0 &&
|
|
49
50
|
diff / prevElt.duration <= prevElt.repeatCount) {
|
|
50
51
|
var repeatNumberInPrevSegments = diff / prevElt.duration;
|
|
51
|
-
return {
|
|
52
|
+
return {
|
|
53
|
+
repeatNumberInPrevSegments: repeatNumberInPrevSegments,
|
|
54
|
+
prevSegmentsIdx: prevElementIndex,
|
|
52
55
|
newElementsIdx: 0,
|
|
53
|
-
repeatNumberInNewElements: 0
|
|
56
|
+
repeatNumberInNewElements: 0,
|
|
57
|
+
};
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
prevElementIndex++;
|
|
@@ -59,10 +63,12 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
|
|
|
59
63
|
}
|
|
60
64
|
prevElt = prevTimeline[prevElementIndex];
|
|
61
65
|
if (prevElt.start === newInitialStart) {
|
|
62
|
-
return {
|
|
66
|
+
return {
|
|
67
|
+
prevSegmentsIdx: prevElementIndex,
|
|
63
68
|
newElementsIdx: 0,
|
|
64
69
|
repeatNumberInPrevSegments: 0,
|
|
65
|
-
repeatNumberInNewElements: 0
|
|
70
|
+
repeatNumberInNewElements: 0,
|
|
71
|
+
};
|
|
66
72
|
}
|
|
67
73
|
else if (prevElt.start > newInitialStart) {
|
|
68
74
|
return null;
|
|
@@ -75,24 +81,26 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
|
|
|
75
81
|
var currentTimeOffset = newInitialStart;
|
|
76
82
|
while (true) {
|
|
77
83
|
var dAttr = newElt.getAttribute("d");
|
|
78
|
-
var duration = dAttr === null ? null :
|
|
79
|
-
parseInt(dAttr, 10);
|
|
84
|
+
var duration = dAttr === null ? null : parseInt(dAttr, 10);
|
|
80
85
|
if (duration === null || Number.isNaN(duration)) {
|
|
81
86
|
return null;
|
|
82
87
|
}
|
|
83
88
|
var rAttr = newElt.getAttribute("r");
|
|
84
|
-
var repeatCount = rAttr === null ? null :
|
|
85
|
-
parseInt(rAttr, 10);
|
|
89
|
+
var repeatCount = rAttr === null ? null : parseInt(rAttr, 10);
|
|
86
90
|
if (repeatCount !== null) {
|
|
87
91
|
if (Number.isNaN(repeatCount) || repeatCount < 0) {
|
|
88
92
|
return null;
|
|
89
93
|
}
|
|
90
94
|
if (repeatCount > 0) {
|
|
91
95
|
var diff = prevInitialStart - currentTimeOffset;
|
|
92
|
-
if (diff % duration === 0 &&
|
|
93
|
-
diff / duration <= repeatCount) {
|
|
96
|
+
if (diff % duration === 0 && diff / duration <= repeatCount) {
|
|
94
97
|
var repeatNumberInNewElements = diff / duration;
|
|
95
|
-
return {
|
|
98
|
+
return {
|
|
99
|
+
repeatNumberInPrevSegments: 0,
|
|
100
|
+
repeatNumberInNewElements: repeatNumberInNewElements,
|
|
101
|
+
prevSegmentsIdx: 0,
|
|
102
|
+
newElementsIdx: newElementsIdx,
|
|
103
|
+
};
|
|
96
104
|
}
|
|
97
105
|
}
|
|
98
106
|
currentTimeOffset += duration * (repeatCount + 1);
|
|
@@ -106,8 +114,7 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
|
|
|
106
114
|
}
|
|
107
115
|
newElt = newElements[newElementsIdx];
|
|
108
116
|
var tAttr = newElt.getAttribute("t");
|
|
109
|
-
var time = tAttr === null ? null :
|
|
110
|
-
parseInt(tAttr, 10);
|
|
117
|
+
var time = tAttr === null ? null : parseInt(tAttr, 10);
|
|
111
118
|
if (time !== null) {
|
|
112
119
|
if (Number.isNaN(time)) {
|
|
113
120
|
return null;
|
|
@@ -115,9 +122,12 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
|
|
|
115
122
|
currentTimeOffset = time;
|
|
116
123
|
}
|
|
117
124
|
if (currentTimeOffset === prevInitialStart) {
|
|
118
|
-
return {
|
|
125
|
+
return {
|
|
126
|
+
newElementsIdx: newElementsIdx,
|
|
127
|
+
prevSegmentsIdx: 0,
|
|
119
128
|
repeatNumberInPrevSegments: 0,
|
|
120
|
-
repeatNumberInNewElements: 0
|
|
129
|
+
repeatNumberInNewElements: 0,
|
|
130
|
+
};
|
|
121
131
|
}
|
|
122
132
|
else if (currentTimeOffset > newInitialStart) {
|
|
123
133
|
return null;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import
|
|
16
|
+
import type { ITimelineIndexContextArgument } from "./timeline_representation_index";
|
|
17
|
+
import TimelineRepresentationIndex from "./timeline_representation_index";
|
|
17
18
|
export default TimelineRepresentationIndex;
|
|
18
|
-
export { ITimelineIndexContextArgument };
|
|
19
|
+
export type { ITimelineIndexContextArgument };
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { IRepresentationIndex, ISegment, Representation } from "../../../../../../manifest";
|
|
17
|
-
import { IPlayerError } from "../../../../../../public_types";
|
|
18
|
-
import { IEMSG } from "../../../../../containers/isobmff";
|
|
19
|
-
import { IIndexSegment } from "../../../../utils/index_helpers";
|
|
20
|
-
import { ISegmentTimelineElement } from "../../../node_parser_types";
|
|
21
|
-
import ManifestBoundsCalculator from "../../manifest_bounds_calculator";
|
|
16
|
+
import type { IRepresentationIndex, ISegment, Representation } from "../../../../../../manifest";
|
|
17
|
+
import type { IPlayerError } from "../../../../../../public_types";
|
|
18
|
+
import type { IEMSG } from "../../../../../containers/isobmff";
|
|
19
|
+
import type { IIndexSegment } from "../../../../utils/index_helpers";
|
|
20
|
+
import type { ISegmentTimelineElement } from "../../../node_parser_types";
|
|
21
|
+
import type ManifestBoundsCalculator from "../../manifest_bounds_calculator";
|
|
22
22
|
/**
|
|
23
23
|
* Index property defined for a SegmentTimeline RepresentationIndex
|
|
24
24
|
* This object contains every property needed to generate an ISegment for a
|