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
|
@@ -52,40 +52,36 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
52
52
|
function TimelineRepresentationIndex(index, context) {
|
|
53
53
|
var _a, _b, _c;
|
|
54
54
|
if (!TimelineRepresentationIndex.isTimelineIndexArgument(index)) {
|
|
55
|
-
throw new Error("The given index is not compatible with a " +
|
|
56
|
-
"TimelineRepresentationIndex.");
|
|
55
|
+
throw new Error("The given index is not compatible with a " + "TimelineRepresentationIndex.");
|
|
57
56
|
}
|
|
58
57
|
var availabilityTimeComplete = context.availabilityTimeComplete, availabilityTimeOffset = context.availabilityTimeOffset, manifestBoundsCalculator = context.manifestBoundsCalculator, isDynamic = context.isDynamic, isLastPeriod = context.isLastPeriod, representationId = context.representationId, representationBitrate = context.representationBitrate, periodStart = context.periodStart, periodEnd = context.periodEnd, isEMSGWhitelisted = context.isEMSGWhitelisted;
|
|
59
58
|
var timescale = (_a = index.timescale) !== null && _a !== void 0 ? _a : 1;
|
|
60
|
-
var presentationTimeOffset = index.presentationTimeOffset != null ?
|
|
61
|
-
index.presentationTimeOffset :
|
|
62
|
-
0;
|
|
59
|
+
var presentationTimeOffset = index.presentationTimeOffset != null ? index.presentationTimeOffset : 0;
|
|
63
60
|
var scaledStart = periodStart * timescale;
|
|
64
61
|
var indexTimeOffset = presentationTimeOffset - scaledStart;
|
|
65
62
|
this._manifestBoundsCalculator = manifestBoundsCalculator;
|
|
66
63
|
this._isEMSGWhitelisted = isEMSGWhitelisted;
|
|
67
64
|
this._isLastPeriod = isLastPeriod;
|
|
68
|
-
this._lastUpdate =
|
|
69
|
-
performance.now() :
|
|
70
|
-
context.receivedTime;
|
|
65
|
+
this._lastUpdate =
|
|
66
|
+
context.receivedTime == null ? performance.now() : context.receivedTime;
|
|
71
67
|
this._unsafelyBaseOnPreviousIndex = null;
|
|
72
68
|
if (context.unsafelyBaseOnPreviousRepresentation !== null &&
|
|
73
|
-
context.unsafelyBaseOnPreviousRepresentation.index
|
|
74
|
-
|
|
69
|
+
context.unsafelyBaseOnPreviousRepresentation.index instanceof
|
|
70
|
+
TimelineRepresentationIndex) {
|
|
75
71
|
// avoid too much nested references, to keep memory down
|
|
76
|
-
context.unsafelyBaseOnPreviousRepresentation
|
|
77
|
-
|
|
78
|
-
this._unsafelyBaseOnPreviousIndex =
|
|
79
|
-
.unsafelyBaseOnPreviousRepresentation.index;
|
|
72
|
+
context.unsafelyBaseOnPreviousRepresentation.index._unsafelyBaseOnPreviousIndex =
|
|
73
|
+
null;
|
|
74
|
+
this._unsafelyBaseOnPreviousIndex =
|
|
75
|
+
context.unsafelyBaseOnPreviousRepresentation.index;
|
|
80
76
|
}
|
|
81
77
|
this._isDynamic = isDynamic;
|
|
82
78
|
this._parseTimeline = (_b = index.timelineParser) !== null && _b !== void 0 ? _b : null;
|
|
83
|
-
var initializationUrl = ((_c = index.initialization) === null || _c === void 0 ? void 0 : _c.media) === undefined
|
|
84
|
-
null
|
|
85
|
-
constructRepresentationUrl(index.initialization.media, representationId, representationBitrate);
|
|
86
|
-
var segmentUrlTemplate = index.media === undefined
|
|
87
|
-
null
|
|
88
|
-
constructRepresentationUrl(index.media, representationId, representationBitrate);
|
|
79
|
+
var initializationUrl = ((_c = index.initialization) === null || _c === void 0 ? void 0 : _c.media) === undefined
|
|
80
|
+
? null
|
|
81
|
+
: constructRepresentationUrl(index.initialization.media, representationId, representationBitrate);
|
|
82
|
+
var segmentUrlTemplate = index.media === undefined
|
|
83
|
+
? null
|
|
84
|
+
: constructRepresentationUrl(index.media, representationId, representationBitrate);
|
|
89
85
|
var actualAvailabilityTimeOffset;
|
|
90
86
|
// Technically, it seems (although it is not clear) that an MPD may contain
|
|
91
87
|
// future segments and it's the job of a player to not request segments later
|
|
@@ -96,29 +92,35 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
96
92
|
// So as a compromise, if nothing in the MPD indicates that future segments
|
|
97
93
|
// may be announced (see code below), we will act as if ALL segments in this
|
|
98
94
|
// TimelineRepresentationIndex are requestable
|
|
99
|
-
if (availabilityTimeOffset === undefined &&
|
|
100
|
-
availabilityTimeComplete === undefined) {
|
|
95
|
+
if (availabilityTimeOffset === undefined && availabilityTimeComplete === undefined) {
|
|
101
96
|
actualAvailabilityTimeOffset = Infinity; // Meaning: we can request
|
|
102
97
|
// everything in the index
|
|
103
98
|
}
|
|
104
99
|
else {
|
|
105
100
|
actualAvailabilityTimeOffset = availabilityTimeOffset !== null && availabilityTimeOffset !== void 0 ? availabilityTimeOffset : 0;
|
|
106
101
|
}
|
|
107
|
-
this._index = {
|
|
102
|
+
this._index = {
|
|
103
|
+
availabilityTimeComplete: availabilityTimeComplete !== null && availabilityTimeComplete !== void 0 ? availabilityTimeComplete : true,
|
|
108
104
|
availabilityTimeOffset: actualAvailabilityTimeOffset,
|
|
109
|
-
indexRange: index.indexRange,
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
indexRange: index.indexRange,
|
|
106
|
+
indexTimeOffset: indexTimeOffset,
|
|
107
|
+
initialization: index.initialization == null
|
|
108
|
+
? undefined
|
|
109
|
+
: {
|
|
112
110
|
url: initializationUrl,
|
|
113
111
|
range: index.initialization.range,
|
|
114
|
-
},
|
|
112
|
+
},
|
|
113
|
+
segmentUrlTemplate: segmentUrlTemplate,
|
|
114
|
+
startNumber: index.startNumber,
|
|
115
115
|
endNumber: index.endNumber,
|
|
116
|
-
timeline: index.timeline === undefined
|
|
117
|
-
null
|
|
118
|
-
updateTimelineFromEndNumber(index.timeline, index.startNumber, index.endNumber),
|
|
116
|
+
timeline: index.timeline === undefined
|
|
117
|
+
? null
|
|
118
|
+
: updateTimelineFromEndNumber(index.timeline, index.startNumber, index.endNumber),
|
|
119
|
+
timescale: timescale,
|
|
120
|
+
};
|
|
119
121
|
this._scaledPeriodStart = toIndexTime(periodStart, this._index);
|
|
120
|
-
this._scaledPeriodEnd =
|
|
121
|
-
toIndexTime(periodEnd, this._index);
|
|
122
|
+
this._scaledPeriodEnd =
|
|
123
|
+
periodEnd === undefined ? undefined : toIndexTime(periodEnd, this._index);
|
|
122
124
|
}
|
|
123
125
|
/**
|
|
124
126
|
* Construct init Segment.
|
|
@@ -161,8 +163,9 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
161
163
|
this._index.timeline = this._getTimeline();
|
|
162
164
|
}
|
|
163
165
|
var timeline = this._index.timeline;
|
|
164
|
-
return timeline.length === 0
|
|
165
|
-
|
|
166
|
+
return timeline.length === 0
|
|
167
|
+
? null
|
|
168
|
+
: fromIndexTime(Math.max(this._scaledPeriodStart, timeline[0].start), this._index);
|
|
166
169
|
};
|
|
167
170
|
/**
|
|
168
171
|
* Returns the ending time, in seconds, of the last segment currently
|
|
@@ -236,7 +239,8 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
236
239
|
if (lastReqSegInfo !== null) {
|
|
237
240
|
var lastReqSegmentEnd = Math.min(lastReqSegInfo.end, (_a = this._scaledPeriodEnd) !== null && _a !== void 0 ? _a : Infinity);
|
|
238
241
|
var roundedReqSegmentEnd = lastReqSegmentEnd + segmentTimeRounding;
|
|
239
|
-
if (roundedReqSegmentEnd >=
|
|
242
|
+
if (roundedReqSegmentEnd >=
|
|
243
|
+
Math.min(scaledWantedEnd, (_b = this._scaledPeriodEnd) !== null && _b !== void 0 ? _b : Infinity)) {
|
|
240
244
|
return false; // everything up to that point is already requestable
|
|
241
245
|
}
|
|
242
246
|
}
|
|
@@ -259,13 +263,13 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
259
263
|
return false;
|
|
260
264
|
}
|
|
261
265
|
if (this._scaledPeriodEnd === undefined) {
|
|
262
|
-
return
|
|
263
|
-
undefined
|
|
264
|
-
false; // Before the current Period
|
|
266
|
+
return scaledWantedEnd + segmentTimeRounding > this._scaledPeriodStart
|
|
267
|
+
? undefined // There may be future segments at this point
|
|
268
|
+
: false; // Before the current Period
|
|
265
269
|
}
|
|
266
270
|
// `true` if within the boundaries of this Period. `false` otherwise.
|
|
267
|
-
return (scaledWantedStart - segmentTimeRounding
|
|
268
|
-
|
|
271
|
+
return (scaledWantedStart - segmentTimeRounding < this._scaledPeriodEnd &&
|
|
272
|
+
scaledWantedEnd + segmentTimeRounding > this._scaledPeriodStart);
|
|
269
273
|
};
|
|
270
274
|
/**
|
|
271
275
|
* Returns true if a Segment returned by this index is still considered
|
|
@@ -302,8 +306,11 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
302
306
|
timeline = this._getTimeline();
|
|
303
307
|
this._index.timeline = timeline;
|
|
304
308
|
}
|
|
305
|
-
return checkDiscontinuity({
|
|
306
|
-
|
|
309
|
+
return checkDiscontinuity({
|
|
310
|
+
timeline: timeline,
|
|
311
|
+
timescale: this._index.timescale,
|
|
312
|
+
indexTimeOffset: this._index.indexTimeOffset,
|
|
313
|
+
}, time, this._scaledPeriodEnd);
|
|
307
314
|
};
|
|
308
315
|
/**
|
|
309
316
|
* @param {Error} error
|
|
@@ -313,8 +320,7 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
313
320
|
if (!this._isDynamic) {
|
|
314
321
|
return false;
|
|
315
322
|
}
|
|
316
|
-
return error instanceof NetworkError &&
|
|
317
|
-
error.isHttpError(404);
|
|
323
|
+
return error instanceof NetworkError && error.isHttpError(404);
|
|
318
324
|
};
|
|
319
325
|
/**
|
|
320
326
|
* Replace this RepresentationIndex with one from a new version of the
|
|
@@ -417,7 +423,7 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
417
423
|
var lastSegmentEnd = getIndexSegmentEnd(lastSegment, null, this._scaledPeriodEnd);
|
|
418
424
|
// We're awaiting future segments only if the current end is before the end
|
|
419
425
|
// of the Period
|
|
420
|
-
return
|
|
426
|
+
return lastSegmentEnd + segmentTimeRounding < this._scaledPeriodEnd;
|
|
421
427
|
};
|
|
422
428
|
/**
|
|
423
429
|
* @returns {Boolean}
|
|
@@ -432,8 +438,7 @@ var TimelineRepresentationIndex = /** @class */ (function () {
|
|
|
432
438
|
* @returns {boolean}
|
|
433
439
|
*/
|
|
434
440
|
TimelineRepresentationIndex.isTimelineIndexArgument = function (index) {
|
|
435
|
-
return typeof index.timelineParser === "function" ||
|
|
436
|
-
Array.isArray(index.timeline);
|
|
441
|
+
return typeof index.timelineParser === "function" || Array.isArray(index.timeline);
|
|
437
442
|
};
|
|
438
443
|
/**
|
|
439
444
|
* Clean-up timeline to remove segment information which should not be
|
|
@@ -579,14 +584,15 @@ export function isSegmentStillAvailable(segment, index, manifestBoundsCalculator
|
|
|
579
584
|
if (tSegment.range === undefined) {
|
|
580
585
|
return segment.range === undefined;
|
|
581
586
|
}
|
|
582
|
-
return segment.range != null &&
|
|
587
|
+
return (segment.range != null &&
|
|
583
588
|
tSegment.range[0] === segment.range[0] &&
|
|
584
|
-
tSegment.range[1] === segment.range[1];
|
|
589
|
+
tSegment.range[1] === segment.range[1]);
|
|
585
590
|
}
|
|
586
|
-
else {
|
|
591
|
+
else {
|
|
592
|
+
// tSegment.start < segment.time
|
|
587
593
|
if (tSegment.repeatCount >= 0 && tSegment.duration !== undefined) {
|
|
588
594
|
var timeDiff = tSegmentTime - tSegment.start;
|
|
589
|
-
var repeat =
|
|
595
|
+
var repeat = timeDiff / tSegment.duration - 1;
|
|
590
596
|
return repeat % 1 === 0 && repeat <= lastReqSegInfo.newRepeatCount;
|
|
591
597
|
}
|
|
592
598
|
}
|
|
@@ -611,19 +617,23 @@ export function getLastRequestableSegmentInfo(index, manifestBoundsCalculator, s
|
|
|
611
617
|
// availabilityTimeOffset to Infinity == Everything is requestable in the timeline.
|
|
612
618
|
var lastIndex = index.timeline.length - 1;
|
|
613
619
|
var lastElem = index.timeline[lastIndex];
|
|
614
|
-
return {
|
|
620
|
+
return {
|
|
621
|
+
isLastOfTimeline: true,
|
|
615
622
|
timelineIdx: lastIndex,
|
|
616
623
|
newRepeatCount: lastElem.repeatCount,
|
|
617
|
-
end: getIndexSegmentEnd(lastElem, null, scaledPeriodEnd)
|
|
624
|
+
end: getIndexSegmentEnd(lastElem, null, scaledPeriodEnd),
|
|
625
|
+
};
|
|
618
626
|
}
|
|
619
627
|
var adjustedMaxSeconds = manifestBoundsCalculator.getEstimatedMaximumPosition(index.availabilityTimeOffset);
|
|
620
628
|
if (adjustedMaxSeconds === undefined) {
|
|
621
629
|
var lastIndex = index.timeline.length - 1;
|
|
622
630
|
var lastElem = index.timeline[lastIndex];
|
|
623
|
-
return {
|
|
631
|
+
return {
|
|
632
|
+
isLastOfTimeline: true,
|
|
624
633
|
timelineIdx: lastIndex,
|
|
625
634
|
newRepeatCount: lastElem.repeatCount,
|
|
626
|
-
end: getIndexSegmentEnd(lastElem, null, scaledPeriodEnd)
|
|
635
|
+
end: getIndexSegmentEnd(lastElem, null, scaledPeriodEnd),
|
|
636
|
+
};
|
|
627
637
|
}
|
|
628
638
|
for (var i = index.timeline.length - 1; i >= index.timeline.length; i--) {
|
|
629
639
|
var element = index.timeline[i];
|
|
@@ -631,10 +641,12 @@ export function getLastRequestableSegmentInfo(index, manifestBoundsCalculator, s
|
|
|
631
641
|
if (fromIndexTime(endOfFirstOccurence, index) <= adjustedMaxSeconds) {
|
|
632
642
|
var endTime = getIndexSegmentEnd(element, index.timeline[i + 1], scaledPeriodEnd);
|
|
633
643
|
if (fromIndexTime(endTime, index) <= adjustedMaxSeconds) {
|
|
634
|
-
return {
|
|
644
|
+
return {
|
|
645
|
+
isLastOfTimeline: i === index.timeline.length - 1,
|
|
635
646
|
timelineIdx: i,
|
|
636
647
|
newRepeatCount: element.repeatCount,
|
|
637
|
-
end: endOfFirstOccurence
|
|
648
|
+
end: endOfFirstOccurence,
|
|
649
|
+
};
|
|
638
650
|
}
|
|
639
651
|
else {
|
|
640
652
|
// We have to find the right repeatCount
|
|
@@ -642,10 +654,12 @@ export function getLastRequestableSegmentInfo(index, manifestBoundsCalculator, s
|
|
|
642
654
|
var diffToSegStart = maxIndexTime - element.start;
|
|
643
655
|
var nbOfSegs = Math.floor(diffToSegStart / element.duration);
|
|
644
656
|
assert(nbOfSegs >= 1);
|
|
645
|
-
return {
|
|
657
|
+
return {
|
|
658
|
+
isLastOfTimeline: false,
|
|
646
659
|
timelineIdx: i,
|
|
647
660
|
newRepeatCount: nbOfSegs - 1,
|
|
648
|
-
end: element.start + nbOfSegs * element.duration
|
|
661
|
+
end: element.start + nbOfSegs * element.duration,
|
|
662
|
+
};
|
|
649
663
|
}
|
|
650
664
|
}
|
|
651
665
|
}
|
|
@@ -34,8 +34,7 @@ function padLeftWithZeros(n, l) {
|
|
|
34
34
|
*/
|
|
35
35
|
function processFormatedToken(replacer) {
|
|
36
36
|
return function (_match, _format, widthStr) {
|
|
37
|
-
var width = isNonEmptyString(widthStr) ? parseInt(widthStr, 10) :
|
|
38
|
-
1;
|
|
37
|
+
var width = isNonEmptyString(widthStr) ? parseInt(widthStr, 10) : 1;
|
|
39
38
|
return padLeftWithZeros(String(replacer), width);
|
|
40
39
|
};
|
|
41
40
|
}
|
|
@@ -64,8 +63,7 @@ export function replaceRepresentationDASHTokens(path, id, bitrate) {
|
|
|
64
63
|
return path
|
|
65
64
|
.replace(/\$\$/g, "$")
|
|
66
65
|
.replace(/\$RepresentationID\$/g, String(id))
|
|
67
|
-
.replace(/\$Bandwidth(\%0(\d+)d)?\$/g, processFormatedToken(bitrate === undefined ? 0 :
|
|
68
|
-
bitrate));
|
|
66
|
+
.replace(/\$Bandwidth(\%0(\d+)d)?\$/g, processFormatedToken(bitrate === undefined ? 0 : bitrate));
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
/**
|
|
@@ -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 { IRepresentationIntermediateRepresentation } from "../node_parser_types";
|
|
16
|
+
import type { IRepresentationIntermediateRepresentation } from "../node_parser_types";
|
|
17
17
|
/** Different "type" a parsed Adaptation can be. */
|
|
18
18
|
type IAdaptationType = "audio" | "video" | "text" | "image";
|
|
19
19
|
/** Structure of a parsed "scheme-like" element in the MPD. */
|
|
@@ -29,10 +29,10 @@ var ManifestBoundsCalculator = /** @class */ (function () {
|
|
|
29
29
|
*/
|
|
30
30
|
function ManifestBoundsCalculator(args) {
|
|
31
31
|
this._isDynamic = args.isDynamic;
|
|
32
|
-
this._timeShiftBufferDepth =
|
|
33
|
-
args.timeShiftBufferDepth === undefined
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
this._timeShiftBufferDepth =
|
|
33
|
+
!args.isDynamic || args.timeShiftBufferDepth === undefined
|
|
34
|
+
? null
|
|
35
|
+
: args.timeShiftBufferDepth;
|
|
36
36
|
this._serverTimestampOffset = args.serverTimestampOffset;
|
|
37
37
|
this._availabilityStartTime = args.availabilityStartTime;
|
|
38
38
|
}
|
|
@@ -102,8 +102,8 @@ var ManifestBoundsCalculator = /** @class */ (function () {
|
|
|
102
102
|
if (!this._isDynamic || this._serverTimestampOffset === undefined) {
|
|
103
103
|
return undefined;
|
|
104
104
|
}
|
|
105
|
-
return (performance.now() + this._serverTimestampOffset) / 1000 -
|
|
106
|
-
this._availabilityStartTime;
|
|
105
|
+
return ((performance.now() + this._serverTimestampOffset) / 1000 -
|
|
106
|
+
this._availabilityStartTime);
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
109
|
* Produce a rough estimate of the ending time of the last requestable segment
|
|
@@ -125,8 +125,7 @@ var ManifestBoundsCalculator = /** @class */ (function () {
|
|
|
125
125
|
return liveEdge + availabilityTimeOffset;
|
|
126
126
|
}
|
|
127
127
|
else if (this._positionTime !== undefined && this._lastPosition !== undefined) {
|
|
128
|
-
return Math.max(
|
|
129
|
-
(performance.now() / 1000), 0);
|
|
128
|
+
return Math.max(this._lastPosition - this._positionTime + performance.now() / 1000, 0);
|
|
130
129
|
}
|
|
131
130
|
return this._lastPosition;
|
|
132
131
|
};
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Period } from "../../../../manifest";
|
|
17
|
-
import { IParsedAdaptations } from "../../types";
|
|
18
|
-
import { IAdaptationSetIntermediateRepresentation, ISegmentTemplateIntermediateRepresentation } from "../node_parser_types";
|
|
19
|
-
import { IRepresentationContext } from "./parse_representations";
|
|
16
|
+
import type { Period } from "../../../../manifest";
|
|
17
|
+
import type { IParsedAdaptations } from "../../types";
|
|
18
|
+
import type { IAdaptationSetIntermediateRepresentation, ISegmentTemplateIntermediateRepresentation } from "../node_parser_types";
|
|
19
|
+
import type { IRepresentationContext } from "./parse_representations";
|
|
20
20
|
/**
|
|
21
21
|
* Process AdaptationSets intermediate representations to return under its final
|
|
22
22
|
* form.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import log from "../../../../log";
|
|
17
|
-
import { SUPPORTED_ADAPTATIONS_TYPE
|
|
17
|
+
import { SUPPORTED_ADAPTATIONS_TYPE } from "../../../../manifest";
|
|
18
18
|
import arrayFind from "../../../../utils/array_find";
|
|
19
19
|
import arrayFindIndex from "../../../../utils/array_find_index";
|
|
20
20
|
import arrayIncludes from "../../../../utils/array_includes";
|
|
@@ -35,10 +35,10 @@ function isVisuallyImpaired(accessibility) {
|
|
|
35
35
|
if (accessibility === undefined) {
|
|
36
36
|
return false;
|
|
37
37
|
}
|
|
38
|
-
var isVisuallyImpairedAudioDvbDash =
|
|
39
|
-
accessibility.value === "1"
|
|
40
|
-
var isVisuallyImpairedDashIf =
|
|
41
|
-
accessibility.value === "description"
|
|
38
|
+
var isVisuallyImpairedAudioDvbDash = accessibility.schemeIdUri === "urn:tva:metadata:cs:AudioPurposeCS:2007" &&
|
|
39
|
+
accessibility.value === "1";
|
|
40
|
+
var isVisuallyImpairedDashIf = accessibility.schemeIdUri === "urn:mpeg:dash:role:2011" &&
|
|
41
|
+
accessibility.value === "description";
|
|
42
42
|
return isVisuallyImpairedAudioDvbDash || isVisuallyImpairedDashIf;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -52,8 +52,8 @@ function isVisuallyImpaired(accessibility) {
|
|
|
52
52
|
function isCaptionning(accessibilities, roles) {
|
|
53
53
|
if (accessibilities !== undefined) {
|
|
54
54
|
var hasDvbClosedCaptionSignaling = accessibilities.some(function (accessibility) {
|
|
55
|
-
return
|
|
56
|
-
accessibility.value === "2"
|
|
55
|
+
return accessibility.schemeIdUri === "urn:tva:metadata:cs:AudioPurposeCS:2007" &&
|
|
56
|
+
accessibility.value === "2";
|
|
57
57
|
});
|
|
58
58
|
if (hasDvbClosedCaptionSignaling) {
|
|
59
59
|
return true;
|
|
@@ -61,8 +61,7 @@ function isCaptionning(accessibilities, roles) {
|
|
|
61
61
|
}
|
|
62
62
|
if (roles !== undefined) {
|
|
63
63
|
var hasDashCaptionSinaling = roles.some(function (role) {
|
|
64
|
-
return
|
|
65
|
-
role.value === "caption");
|
|
64
|
+
return role.schemeIdUri === "urn:mpeg:dash:role:2011" && role.value === "caption";
|
|
66
65
|
});
|
|
67
66
|
if (hasDashCaptionSinaling) {
|
|
68
67
|
return true;
|
|
@@ -141,7 +140,8 @@ function getAdaptationSetSwitchingIDs(adaptation) {
|
|
|
141
140
|
if (supplementalProperty.schemeIdUri ===
|
|
142
141
|
"urn:mpeg:dash:adaptation-set-switching:2016" &&
|
|
143
142
|
supplementalProperty.value != null) {
|
|
144
|
-
return supplementalProperty.value
|
|
143
|
+
return supplementalProperty.value
|
|
144
|
+
.split(",")
|
|
145
145
|
.map(function (id) { return id.trim(); })
|
|
146
146
|
.filter(function (id) { return id; });
|
|
147
147
|
}
|
|
@@ -160,10 +160,7 @@ function getAdaptationSetSwitchingIDs(adaptation) {
|
|
|
160
160
|
*/
|
|
161
161
|
export default function parseAdaptationSets(adaptationsIR, context) {
|
|
162
162
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
163
|
-
var parsedAdaptations = { video: [],
|
|
164
|
-
audio: [],
|
|
165
|
-
text: [],
|
|
166
|
-
image: [] };
|
|
163
|
+
var parsedAdaptations = { video: [], audio: [], text: [], image: [] };
|
|
167
164
|
var trickModeAdaptations = [];
|
|
168
165
|
var adaptationSwitchingInfos = {};
|
|
169
166
|
var parsedAdaptationsIDs = [];
|
|
@@ -179,18 +176,13 @@ export default function parseAdaptationSets(adaptationsIR, context) {
|
|
|
179
176
|
var availabilityTimeOffset = void 0;
|
|
180
177
|
if (adaptation.attributes.availabilityTimeOffset !== undefined ||
|
|
181
178
|
context.availabilityTimeOffset !== undefined) {
|
|
182
|
-
availabilityTimeOffset =
|
|
183
|
-
((
|
|
179
|
+
availabilityTimeOffset =
|
|
180
|
+
((_b = adaptation.attributes.availabilityTimeOffset) !== null && _b !== void 0 ? _b : 0) +
|
|
181
|
+
((_c = context.availabilityTimeOffset) !== null && _c !== void 0 ? _c : 0);
|
|
184
182
|
}
|
|
185
183
|
var adaptationMimeType = adaptation.attributes.mimeType;
|
|
186
184
|
var adaptationCodecs = adaptation.attributes.codecs;
|
|
187
|
-
var type = inferAdaptationType(representationsIR, isNonEmptyString(adaptationMimeType) ?
|
|
188
|
-
adaptationMimeType :
|
|
189
|
-
null, isNonEmptyString(adaptationCodecs) ?
|
|
190
|
-
adaptationCodecs :
|
|
191
|
-
null, adaptationChildren.roles != null ?
|
|
192
|
-
adaptationChildren.roles :
|
|
193
|
-
null);
|
|
185
|
+
var type = inferAdaptationType(representationsIR, isNonEmptyString(adaptationMimeType) ? adaptationMimeType : null, isNonEmptyString(adaptationCodecs) ? adaptationCodecs : null, adaptationChildren.roles != null ? adaptationChildren.roles : null);
|
|
194
186
|
if (type === undefined) {
|
|
195
187
|
continue;
|
|
196
188
|
}
|
|
@@ -218,16 +210,16 @@ export default function parseAdaptationSets(adaptationsIR, context) {
|
|
|
218
210
|
start: context.start,
|
|
219
211
|
unsafelyBaseOnPreviousAdaptation: null,
|
|
220
212
|
};
|
|
221
|
-
var trickModeProperty = Array.isArray(essentialProperties)
|
|
222
|
-
arrayFind(essentialProperties, function (scheme) {
|
|
213
|
+
var trickModeProperty = Array.isArray(essentialProperties)
|
|
214
|
+
? arrayFind(essentialProperties, function (scheme) {
|
|
223
215
|
return scheme.schemeIdUri === "http://dashif.org/guidelines/trickmode";
|
|
224
|
-
})
|
|
216
|
+
})
|
|
217
|
+
: undefined;
|
|
225
218
|
var trickModeAttachedAdaptationIds = (_e = trickModeProperty === null || trickModeProperty === void 0 ? void 0 : trickModeProperty.value) === null || _e === void 0 ? void 0 : _e.split(" ");
|
|
226
219
|
var isTrickModeTrack = trickModeAttachedAdaptationIds !== undefined;
|
|
227
220
|
var accessibilities = adaptationChildren.accessibilities;
|
|
228
221
|
var isDub = void 0;
|
|
229
|
-
if (roles !== undefined &&
|
|
230
|
-
roles.some(function (role) { return role.value === "dub"; })) {
|
|
222
|
+
if (roles !== undefined && roles.some(function (role) { return role.value === "dub"; })) {
|
|
231
223
|
isDub = true;
|
|
232
224
|
}
|
|
233
225
|
var isClosedCaption = void 0;
|
|
@@ -240,8 +232,7 @@ export default function parseAdaptationSets(adaptationsIR, context) {
|
|
|
240
232
|
var isForcedSubtitle = void 0;
|
|
241
233
|
if (type === "text" &&
|
|
242
234
|
roles !== undefined &&
|
|
243
|
-
roles.some(function (role) { return role.value === "forced-subtitle" ||
|
|
244
|
-
role.value === "forced_subtitle"; })) {
|
|
235
|
+
roles.some(function (role) { return role.value === "forced-subtitle" || role.value === "forced_subtitle"; })) {
|
|
245
236
|
isForcedSubtitle = true;
|
|
246
237
|
}
|
|
247
238
|
var isAudioDescription = void 0;
|
|
@@ -258,17 +249,29 @@ export default function parseAdaptationSets(adaptationsIR, context) {
|
|
|
258
249
|
else if (accessibilities !== undefined) {
|
|
259
250
|
isSignInterpreted = accessibilities.some(hasSignLanguageInterpretation);
|
|
260
251
|
}
|
|
261
|
-
var adaptationID = getAdaptationID(adaptation, {
|
|
252
|
+
var adaptationID = getAdaptationID(adaptation, {
|
|
253
|
+
isAudioDescription: isAudioDescription,
|
|
254
|
+
isForcedSubtitle: isForcedSubtitle,
|
|
255
|
+
isClosedCaption: isClosedCaption,
|
|
256
|
+
isSignInterpreted: isSignInterpreted,
|
|
257
|
+
isTrickModeTrack: isTrickModeTrack,
|
|
258
|
+
type: type,
|
|
259
|
+
});
|
|
262
260
|
// Avoid duplicate IDs
|
|
263
261
|
while (arrayIncludes(parsedAdaptationsIDs, adaptationID)) {
|
|
264
262
|
adaptationID += "-dup";
|
|
265
263
|
}
|
|
266
264
|
var newID = adaptationID;
|
|
267
265
|
parsedAdaptationsIDs.push(adaptationID);
|
|
268
|
-
reprCtxt.unsafelyBaseOnPreviousAdaptation =
|
|
269
|
-
.unsafelyBaseOnPreviousPeriod) === null || _f === void 0 ? void 0 : _f.getAdaptation(adaptationID)) !== null && _g !== void 0 ? _g : null;
|
|
266
|
+
reprCtxt.unsafelyBaseOnPreviousAdaptation =
|
|
267
|
+
(_g = (_f = context.unsafelyBaseOnPreviousPeriod) === null || _f === void 0 ? void 0 : _f.getAdaptation(adaptationID)) !== null && _g !== void 0 ? _g : null;
|
|
270
268
|
var representations = parseRepresentations(representationsIR, adaptation, reprCtxt);
|
|
271
|
-
var parsedAdaptationSet = {
|
|
269
|
+
var parsedAdaptationSet = {
|
|
270
|
+
id: adaptationID,
|
|
271
|
+
representations: representations,
|
|
272
|
+
type: type,
|
|
273
|
+
isTrickModeTrack: isTrickModeTrack,
|
|
274
|
+
};
|
|
272
275
|
if (adaptation.attributes.language != null) {
|
|
273
276
|
parsedAdaptationSet.language = adaptation.attributes.language;
|
|
274
277
|
}
|
|
@@ -291,7 +294,10 @@ export default function parseAdaptationSets(adaptationsIR, context) {
|
|
|
291
294
|
parsedAdaptationSet.label = label;
|
|
292
295
|
}
|
|
293
296
|
if (trickModeAttachedAdaptationIds !== undefined) {
|
|
294
|
-
trickModeAdaptations.push({
|
|
297
|
+
trickModeAdaptations.push({
|
|
298
|
+
adaptation: parsedAdaptationSet,
|
|
299
|
+
trickModeAttachedAdaptationIds: trickModeAttachedAdaptationIds,
|
|
300
|
+
});
|
|
295
301
|
}
|
|
296
302
|
else {
|
|
297
303
|
// look if we have to merge this into another Adaptation
|
|
@@ -305,17 +311,14 @@ export default function parseAdaptationSets(adaptationsIR, context) {
|
|
|
305
311
|
mergedIntoIdx = arrayFindIndex(parsedAdaptations[type], function (a) { return a[0].id === id; });
|
|
306
312
|
var mergedInto = parsedAdaptations[type][mergedIntoIdx];
|
|
307
313
|
if (mergedInto !== undefined &&
|
|
308
|
-
mergedInto[0].audioDescription ===
|
|
309
|
-
|
|
310
|
-
mergedInto[0].closedCaption ===
|
|
311
|
-
parsedAdaptationSet.closedCaption &&
|
|
314
|
+
mergedInto[0].audioDescription === parsedAdaptationSet.audioDescription &&
|
|
315
|
+
mergedInto[0].closedCaption === parsedAdaptationSet.closedCaption &&
|
|
312
316
|
mergedInto[0].language === parsedAdaptationSet.language) {
|
|
313
|
-
log.info(
|
|
317
|
+
log.info('DASH Parser: merging "switchable" AdaptationSets', originalID, id);
|
|
314
318
|
(_h = mergedInto[0].representations).push.apply(_h, parsedAdaptationSet.representations);
|
|
315
319
|
mergedInto[1] = {
|
|
316
320
|
priority: Math.max(priority, mergedInto[1].priority),
|
|
317
|
-
isMainAdaptation: isMainAdaptation ||
|
|
318
|
-
mergedInto[1].isMainAdaptation,
|
|
321
|
+
isMainAdaptation: isMainAdaptation || mergedInto[1].isMainAdaptation,
|
|
319
322
|
indexInMpd: Math.min(adaptationIdx, mergedInto[1].indexInMpd),
|
|
320
323
|
};
|
|
321
324
|
return "break";
|
|
@@ -329,21 +332,21 @@ export default function parseAdaptationSets(adaptationsIR, context) {
|
|
|
329
332
|
break;
|
|
330
333
|
}
|
|
331
334
|
if (mergedIntoIdx < 0) {
|
|
332
|
-
parsedAdaptations[type].push([
|
|
333
|
-
|
|
335
|
+
parsedAdaptations[type].push([
|
|
336
|
+
parsedAdaptationSet,
|
|
337
|
+
{ priority: priority, isMainAdaptation: isMainAdaptation, indexInMpd: adaptationIdx },
|
|
338
|
+
]);
|
|
334
339
|
}
|
|
335
340
|
}
|
|
336
341
|
if (originalID != null && adaptationSwitchingInfos[originalID] == null) {
|
|
337
342
|
adaptationSwitchingInfos[originalID] = { newID: newID, adaptationSetSwitchingIDs: adaptationSetSwitchingIDs };
|
|
338
343
|
}
|
|
339
344
|
}
|
|
340
|
-
var adaptationsPerType = SUPPORTED_ADAPTATIONS_TYPE
|
|
341
|
-
.reduce(function (acc, adaptationType) {
|
|
345
|
+
var adaptationsPerType = SUPPORTED_ADAPTATIONS_TYPE.reduce(function (acc, adaptationType) {
|
|
342
346
|
var adaptationsParsedForType = parsedAdaptations[adaptationType];
|
|
343
347
|
if (adaptationsParsedForType.length > 0) {
|
|
344
348
|
adaptationsParsedForType.sort(compareAdaptations);
|
|
345
|
-
acc[adaptationType] = adaptationsParsedForType
|
|
346
|
-
.map(function (_a) {
|
|
349
|
+
acc[adaptationType] = adaptationsParsedForType.map(function (_a) {
|
|
347
350
|
var parsedAdaptation = _a[0];
|
|
348
351
|
return parsedAdaptation;
|
|
349
352
|
});
|
|
@@ -368,8 +371,7 @@ function compareAdaptations(a, b) {
|
|
|
368
371
|
return priorityDiff;
|
|
369
372
|
}
|
|
370
373
|
if (a[1].isMainAdaptation !== b[1].isMainAdaptation) {
|
|
371
|
-
return a[1].isMainAdaptation ? -1 :
|
|
372
|
-
1;
|
|
374
|
+
return a[1].isMainAdaptation ? -1 : 1;
|
|
373
375
|
}
|
|
374
376
|
return a[1].indexInMpd - b[1].indexInMpd;
|
|
375
377
|
}
|
package/dist/_esm5.processed/parsers/manifest/dash/common/parse_availability_start_time.d.ts
CHANGED
|
@@ -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 { IMPDAttributes } from "../node_parser_types";
|
|
16
|
+
import type { IMPDAttributes } from "../node_parser_types";
|
|
17
17
|
/**
|
|
18
18
|
* Returns the base time of the Manifest.
|
|
19
19
|
* @param {Object} rootAttributes
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import Manifest from "../../../../manifest";
|
|
17
|
-
import { IParsedManifest } from "../../types";
|
|
18
|
-
import { IMPDIntermediateRepresentation, IPeriodIntermediateRepresentation } from "../node_parser_types";
|
|
19
|
-
import { IResponseData } from "../parsers_types";
|
|
20
|
-
import { IXLinkInfos } from "./parse_periods";
|
|
16
|
+
import type Manifest from "../../../../manifest";
|
|
17
|
+
import type { IParsedManifest } from "../../types";
|
|
18
|
+
import type { IMPDIntermediateRepresentation, IPeriodIntermediateRepresentation } from "../node_parser_types";
|
|
19
|
+
import type { IResponseData } from "../parsers_types";
|
|
20
|
+
import type { IXLinkInfos } from "./parse_periods";
|
|
21
21
|
/** Possible options for `parseMPD`. */
|
|
22
22
|
export interface IMPDParserArguments {
|
|
23
23
|
/** Whether we should request new segments even if they are not yet finished. */
|
|
@@ -94,4 +94,4 @@ export type IIrParserResponse = IIrParserResponseNeedsClock | IIrParserResponseN
|
|
|
94
94
|
* @param {Array.<Object>} warnings
|
|
95
95
|
* @returns {Object}
|
|
96
96
|
*/
|
|
97
|
-
export default function parseMpdIr(mpdIR: IMPDIntermediateRepresentation, args: IMPDParserArguments, warnings: Error[], hasLoadedClock?: boolean
|
|
97
|
+
export default function parseMpdIr(mpdIR: IMPDIntermediateRepresentation, args: IMPDParserArguments, warnings: Error[], hasLoadedClock?: boolean, xlinkInfos?: IXLinkInfos): IIrParserResponse;
|