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
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import RxPlayer from "../core/api";
|
|
17
|
-
import MediaElementTrackChoiceManager from "../core/api/tracks_management/media_element_track_choice_manager";
|
|
16
|
+
import type RxPlayer from "../core/api";
|
|
17
|
+
import type MediaElementTrackChoiceManager from "../core/api/tracks_management/media_element_track_choice_manager";
|
|
18
18
|
import type ContentDecryptor from "../core/decrypt";
|
|
19
|
-
import DirectFileContentInitializer from "../core/init/directfile_content_initializer";
|
|
20
|
-
import MediaSourceContentInitializer from "../core/init/media_source_content_initializer";
|
|
21
|
-
import { SegmentBuffer } from "../core/segment_buffers";
|
|
22
|
-
import { IDashParserResponse, IMPDParserArguments } from "../parsers/manifest/dash/parsers_types";
|
|
23
|
-
import DashWasmParser from "../parsers/manifest/dash/wasm-parser";
|
|
24
|
-
import { IHTMLTextTracksParserFn, INativeTextTracksParserFn } from "../parsers/texttracks";
|
|
25
|
-
import { ITransportFunction } from "../transports";
|
|
26
|
-
import { CancellationSignal } from "../utils/task_canceller";
|
|
19
|
+
import type DirectFileContentInitializer from "../core/init/directfile_content_initializer";
|
|
20
|
+
import type MediaSourceContentInitializer from "../core/init/media_source_content_initializer";
|
|
21
|
+
import type { SegmentBuffer } from "../core/segment_buffers";
|
|
22
|
+
import type { IDashParserResponse, IMPDParserArguments } from "../parsers/manifest/dash/parsers_types";
|
|
23
|
+
import type DashWasmParser from "../parsers/manifest/dash/wasm-parser";
|
|
24
|
+
import type { IHTMLTextTracksParserFn, INativeTextTracksParserFn } from "../parsers/texttracks";
|
|
25
|
+
import type { ITransportFunction } from "../transports";
|
|
26
|
+
import type { CancellationSignal } from "../utils/task_canceller";
|
|
27
27
|
/**
|
|
28
28
|
* Function allowing to implement a text track rendered by displaying them
|
|
29
29
|
* through "regular" (e.g. div, span etc.) HTML elements.
|
|
@@ -65,7 +65,7 @@ interface IBifObject {
|
|
|
65
65
|
thumbs: IBifThumbnail[];
|
|
66
66
|
}
|
|
67
67
|
export type IImageBuffer = new () => SegmentBuffer;
|
|
68
|
-
export type IImageParser = (
|
|
68
|
+
export type IImageParser = (buffer: Uint8Array) => IBifObject;
|
|
69
69
|
export type IDashJsParser = (document: Document, args: IMPDParserArguments) => IDashParserResponse<string>;
|
|
70
70
|
/**
|
|
71
71
|
* Function implementing the optional RxPlayer debug UI element.
|
|
@@ -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 { IParsedAdaptation } from "../parsers/manifest";
|
|
17
|
-
import { IAudioTrack, IRepresentationFilter, ITextTrack, IVideoTrack } from "../public_types";
|
|
16
|
+
import type { IParsedAdaptation } from "../parsers/manifest";
|
|
17
|
+
import type { IAudioTrack, IRepresentationFilter, ITextTrack, IVideoTrack } from "../public_types";
|
|
18
18
|
import Representation from "./representation";
|
|
19
|
-
import { IAdaptationType } from "./types";
|
|
19
|
+
import type { IAdaptationType } from "./types";
|
|
20
20
|
/** List in an array every possible value for the Adaptation's `type` property. */
|
|
21
21
|
export declare const SUPPORTED_ADAPTATIONS_TYPE: IAdaptationType[];
|
|
22
22
|
/**
|
|
@@ -20,10 +20,12 @@ import normalizeLanguage from "../utils/languages";
|
|
|
20
20
|
import uniq from "../utils/uniq";
|
|
21
21
|
import Representation from "./representation";
|
|
22
22
|
/** List in an array every possible value for the Adaptation's `type` property. */
|
|
23
|
-
export var SUPPORTED_ADAPTATIONS_TYPE = [
|
|
23
|
+
export var SUPPORTED_ADAPTATIONS_TYPE = [
|
|
24
|
+
"audio",
|
|
24
25
|
"video",
|
|
25
26
|
"text",
|
|
26
|
-
"image"
|
|
27
|
+
"image",
|
|
28
|
+
];
|
|
27
29
|
/**
|
|
28
30
|
* Normalized Adaptation structure.
|
|
29
31
|
* An `Adaptation` describes a single `Track`. For example a specific audio
|
|
@@ -69,23 +71,26 @@ var Adaptation = /** @class */ (function () {
|
|
|
69
71
|
if (parsedAdaptation.label !== undefined) {
|
|
70
72
|
this.label = parsedAdaptation.label;
|
|
71
73
|
}
|
|
72
|
-
if (trickModeTracks !== undefined &&
|
|
73
|
-
trickModeTracks.length > 0) {
|
|
74
|
+
if (trickModeTracks !== undefined && trickModeTracks.length > 0) {
|
|
74
75
|
this.trickModeTracks = trickModeTracks.map(function (track) { return new Adaptation(track); });
|
|
75
76
|
}
|
|
76
77
|
var argsRepresentations = parsedAdaptation.representations;
|
|
77
78
|
var representations = [];
|
|
78
79
|
var isSupported = false;
|
|
79
80
|
for (var i = 0; i < argsRepresentations.length; i++) {
|
|
80
|
-
var representation = new Representation(argsRepresentations[i], {
|
|
81
|
+
var representation = new Representation(argsRepresentations[i], {
|
|
82
|
+
type: this.type,
|
|
83
|
+
});
|
|
81
84
|
var shouldAdd = isNullOrUndefined(representationFilter) ||
|
|
82
|
-
representationFilter(representation, {
|
|
85
|
+
representationFilter(representation, {
|
|
86
|
+
bufferType: this.type,
|
|
83
87
|
language: this.language,
|
|
84
88
|
normalizedLanguage: this.normalizedLanguage,
|
|
85
89
|
isClosedCaption: this.isClosedCaption,
|
|
86
90
|
isDub: this.isDub,
|
|
87
91
|
isAudioDescription: this.isAudioDescription,
|
|
88
|
-
isSignInterpreted: this.isSignInterpreted
|
|
92
|
+
isSignInterpreted: this.isSignInterpreted,
|
|
93
|
+
});
|
|
89
94
|
if (shouldAdd) {
|
|
90
95
|
representations.push(representation);
|
|
91
96
|
if (!isSupported && representation.isSupported) {
|
|
@@ -176,17 +181,22 @@ var Adaptation = /** @class */ (function () {
|
|
|
176
181
|
* @returns {Object}
|
|
177
182
|
*/
|
|
178
183
|
Adaptation.prototype.toVideoTrack = function () {
|
|
179
|
-
var trickModeTracks = this.trickModeTracks !== undefined
|
|
180
|
-
this.trickModeTracks.map(function (trickModeAdaptation) {
|
|
181
|
-
var representations = trickModeAdaptation.representations
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
var trickModeTracks = this.trickModeTracks !== undefined
|
|
185
|
+
? this.trickModeTracks.map(function (trickModeAdaptation) {
|
|
186
|
+
var representations = trickModeAdaptation.representations.map(function (r) {
|
|
187
|
+
return r.toVideoRepresentation();
|
|
188
|
+
});
|
|
189
|
+
var trickMode = {
|
|
190
|
+
id: trickModeAdaptation.id,
|
|
191
|
+
representations: representations,
|
|
192
|
+
isTrickModeTrack: true,
|
|
193
|
+
};
|
|
184
194
|
if (trickModeAdaptation.isSignInterpreted === true) {
|
|
185
195
|
trickMode.signInterpreted = true;
|
|
186
196
|
}
|
|
187
197
|
return trickMode;
|
|
188
|
-
})
|
|
189
|
-
undefined;
|
|
198
|
+
})
|
|
199
|
+
: undefined;
|
|
190
200
|
var videoTrack = {
|
|
191
201
|
id: this.id,
|
|
192
202
|
representations: this.representations.map(function (r) { return r.toVideoRepresentation(); }),
|
|
@@ -14,12 +14,16 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import Adaptation, { SUPPORTED_ADAPTATIONS_TYPE } from "./adaptation";
|
|
17
|
-
import
|
|
17
|
+
import type { IDecipherabilityUpdateElement, IManifestParsingOptions, ISupplementaryImageTrack, ISupplementaryTextTrack } from "./manifest";
|
|
18
|
+
import Manifest from "./manifest";
|
|
18
19
|
import Period from "./period";
|
|
19
20
|
import Representation from "./representation";
|
|
20
|
-
import { IBaseContentInfos, IMetaPlaylistPrivateInfos, IRepresentationIndex, ISegment
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import type { IBaseContentInfos, IMetaPlaylistPrivateInfos, IRepresentationIndex, ISegment } from "./representation_index";
|
|
22
|
+
import { StaticRepresentationIndex } from "./representation_index";
|
|
23
|
+
import type { IAdaptationType } from "./types";
|
|
24
|
+
import type { IBufferedChunkInfos } from "./utils";
|
|
25
|
+
import { areSameContent, getLoggableSegmentId } from "./utils";
|
|
23
26
|
export default Manifest;
|
|
24
27
|
export * from "./types";
|
|
25
|
-
export {
|
|
28
|
+
export type { IBufferedChunkInfos, IAdaptationType, IBaseContentInfos, IDecipherabilityUpdateElement, IManifestParsingOptions, IMetaPlaylistPrivateInfos, IRepresentationIndex, ISegment, ISupplementaryImageTrack, ISupplementaryTextTrack, };
|
|
29
|
+
export { areSameContent, getLoggableSegmentId, Period, Adaptation, Representation, StaticRepresentationIndex, SUPPORTED_ADAPTATIONS_TYPE, };
|
|
@@ -13,16 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import Adaptation, { SUPPORTED_ADAPTATIONS_TYPE
|
|
16
|
+
import Adaptation, { SUPPORTED_ADAPTATIONS_TYPE } from "./adaptation";
|
|
17
17
|
import Manifest from "./manifest";
|
|
18
18
|
import Period from "./period";
|
|
19
19
|
import Representation from "./representation";
|
|
20
|
-
import { StaticRepresentationIndex
|
|
21
|
-
import { areSameContent, getLoggableSegmentId
|
|
20
|
+
import { StaticRepresentationIndex } from "./representation_index";
|
|
21
|
+
import { areSameContent, getLoggableSegmentId } from "./utils";
|
|
22
22
|
export default Manifest;
|
|
23
23
|
export * from "./types";
|
|
24
|
-
export {
|
|
25
|
-
// utils
|
|
26
|
-
areSameContent, getLoggableSegmentId,
|
|
27
|
-
// classes
|
|
28
|
-
Period, Adaptation, Representation, StaticRepresentationIndex, SUPPORTED_ADAPTATIONS_TYPE, };
|
|
24
|
+
export { areSameContent, getLoggableSegmentId, Period, Adaptation, Representation, StaticRepresentationIndex, SUPPORTED_ADAPTATIONS_TYPE, };
|
|
@@ -13,14 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { IParsedManifest } from "../parsers/manifest";
|
|
17
|
-
import { IPlayerError, IRepresentationFilter } from "../public_types";
|
|
16
|
+
import type { IParsedManifest } from "../parsers/manifest";
|
|
17
|
+
import type { IPlayerError, IRepresentationFilter } from "../public_types";
|
|
18
18
|
import EventEmitter from "../utils/event_emitter";
|
|
19
19
|
import Adaptation from "./adaptation";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
20
|
+
import type { IManifestAdaptations } from "./period";
|
|
21
|
+
import Period from "./period";
|
|
22
|
+
import type Representation from "./representation";
|
|
23
|
+
import type { IAdaptationType } from "./types";
|
|
24
|
+
import type { IPeriodsUpdateResult } from "./update_periods";
|
|
24
25
|
/**
|
|
25
26
|
* Interface a manually-added supplementary image track should respect.
|
|
26
27
|
* @deprecated
|
|
@@ -314,4 +315,4 @@ export default class Manifest extends EventEmitter<IManifestEvents> {
|
|
|
314
315
|
*/
|
|
315
316
|
private _performUpdate;
|
|
316
317
|
}
|
|
317
|
-
export { IManifestParsingOptions, ISupplementaryImageTrack, ISupplementaryTextTrack, };
|
|
318
|
+
export type { IManifestParsingOptions, ISupplementaryImageTrack, ISupplementaryTextTrack, };
|
|
@@ -38,8 +38,8 @@ import warnOnce from "../utils/warn_once";
|
|
|
38
38
|
import Adaptation from "./adaptation";
|
|
39
39
|
import Period from "./period";
|
|
40
40
|
import { StaticRepresentationIndex } from "./representation_index";
|
|
41
|
-
import { MANIFEST_UPDATE_TYPE
|
|
42
|
-
import { replacePeriods, updatePeriods
|
|
41
|
+
import { MANIFEST_UPDATE_TYPE } from "./types";
|
|
42
|
+
import { replacePeriods, updatePeriods } from "./update_periods";
|
|
43
43
|
var generateSupplementaryTrackID = idGenerator();
|
|
44
44
|
var generateNewManifestId = idGenerator();
|
|
45
45
|
/**
|
|
@@ -81,26 +81,26 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
81
81
|
_this.expired = (_a = parsedManifest.expired) !== null && _a !== void 0 ? _a : null;
|
|
82
82
|
_this.transport = parsedManifest.transportType;
|
|
83
83
|
_this.clockOffset = parsedManifest.clockOffset;
|
|
84
|
-
_this.periods = parsedManifest.periods
|
|
84
|
+
_this.periods = parsedManifest.periods
|
|
85
|
+
.map(function (parsedPeriod) {
|
|
85
86
|
var _a;
|
|
86
87
|
var period = new Period(parsedPeriod, representationFilter);
|
|
87
88
|
(_a = _this.contentWarnings).push.apply(_a, period.contentWarnings);
|
|
88
89
|
return period;
|
|
89
|
-
})
|
|
90
|
+
})
|
|
91
|
+
.sort(function (a, b) { return a.start - b.start; });
|
|
90
92
|
/**
|
|
91
93
|
* @deprecated It is here to ensure compatibility with the way the
|
|
92
94
|
* v3.x.x manages adaptations at the Manifest level
|
|
93
95
|
*/
|
|
94
96
|
/* eslint-disable import/no-deprecated */
|
|
95
|
-
_this.adaptations = _this.periods[0] === undefined ? {} :
|
|
96
|
-
_this.periods[0].adaptations;
|
|
97
|
+
_this.adaptations = _this.periods[0] === undefined ? {} : _this.periods[0].adaptations;
|
|
97
98
|
/* eslint-enable import/no-deprecated */
|
|
98
99
|
_this._timeBounds = parsedManifest.timeBounds;
|
|
99
100
|
_this.isDynamic = parsedManifest.isDynamic;
|
|
100
101
|
_this.isLive = parsedManifest.isLive;
|
|
101
102
|
_this.isLastPeriodKnown = parsedManifest.isLastPeriodKnown;
|
|
102
|
-
_this.uris = parsedManifest.uris === undefined ? [] :
|
|
103
|
-
parsedManifest.uris;
|
|
103
|
+
_this.uris = parsedManifest.uris === undefined ? [] : parsedManifest.uris;
|
|
104
104
|
_this.updateUrl = manifestUpdateUrl;
|
|
105
105
|
_this.lifetime = parsedManifest.lifetime;
|
|
106
106
|
_this.clockOffset = parsedManifest.clockOffset;
|
|
@@ -167,8 +167,7 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
167
167
|
var nextPeriod = arrayFind(this.periods, function (_period) {
|
|
168
168
|
return _period.end === undefined || endOfPeriod < _period.end;
|
|
169
169
|
});
|
|
170
|
-
return nextPeriod === undefined ? null :
|
|
171
|
-
nextPeriod;
|
|
170
|
+
return nextPeriod === undefined ? null : nextPeriod;
|
|
172
171
|
};
|
|
173
172
|
/**
|
|
174
173
|
* Returns the most important URL from which the Manifest can be refreshed.
|
|
@@ -298,8 +297,7 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
298
297
|
return [];
|
|
299
298
|
}
|
|
300
299
|
var adaptationsForType = firstPeriod.adaptations[adaptationType];
|
|
301
|
-
return adaptationsForType === undefined ? [] :
|
|
302
|
-
adaptationsForType;
|
|
300
|
+
return adaptationsForType === undefined ? [] : adaptationsForType;
|
|
303
301
|
};
|
|
304
302
|
/**
|
|
305
303
|
* @deprecated only returns adaptations for the first period
|
|
@@ -332,17 +330,21 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
332
330
|
var indexOfFilename = getFilenameIndexInUrl(url);
|
|
333
331
|
var cdnUrl = url.substring(0, indexOfFilename);
|
|
334
332
|
var filename = url.substring(indexOfFilename);
|
|
335
|
-
var newAdaptation = new Adaptation({
|
|
333
|
+
var newAdaptation = new Adaptation({
|
|
334
|
+
id: adaptationID,
|
|
336
335
|
type: "image",
|
|
337
|
-
representations: [
|
|
336
|
+
representations: [
|
|
337
|
+
{
|
|
338
338
|
bitrate: 0,
|
|
339
339
|
cdnMetadata: [{ baseUrl: cdnUrl }],
|
|
340
340
|
id: representationID,
|
|
341
341
|
mimeType: mimeType,
|
|
342
342
|
index: new StaticRepresentationIndex({
|
|
343
343
|
media: filename,
|
|
344
|
-
})
|
|
345
|
-
}
|
|
344
|
+
}),
|
|
345
|
+
},
|
|
346
|
+
],
|
|
347
|
+
}, { isManuallyAdded: true });
|
|
346
348
|
if (newAdaptation.representations.length > 0 && !newAdaptation.isSupported) {
|
|
347
349
|
var error = new MediaError("MANIFEST_INCOMPATIBLE_CODECS_ERROR", "An Adaptation contains only incompatible codecs.", { adaptation: newAdaptation });
|
|
348
350
|
_this.contentWarnings.push(error);
|
|
@@ -352,8 +354,9 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
352
354
|
if (newImageTracks.length > 0 && this.periods.length > 0) {
|
|
353
355
|
var adaptations = this.periods[0].adaptations;
|
|
354
356
|
adaptations.image =
|
|
355
|
-
adaptations.image != null
|
|
356
|
-
newImageTracks
|
|
357
|
+
adaptations.image != null
|
|
358
|
+
? adaptations.image.concat(newImageTracks)
|
|
359
|
+
: newImageTracks;
|
|
357
360
|
}
|
|
358
361
|
};
|
|
359
362
|
/**
|
|
@@ -363,9 +366,7 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
363
366
|
*/
|
|
364
367
|
Manifest.prototype._addSupplementaryTextAdaptations = function (
|
|
365
368
|
/* eslint-disable import/no-deprecated */
|
|
366
|
-
textTracks
|
|
367
|
-
/* eslint-enable import/no-deprecated */
|
|
368
|
-
) {
|
|
369
|
+
textTracks) {
|
|
369
370
|
var _this = this;
|
|
370
371
|
var _textTracks = Array.isArray(textTracks) ? textTracks : [textTracks];
|
|
371
372
|
var newTextAdaptations = _textTracks.reduce(function (allSubs, _a) {
|
|
@@ -374,18 +375,20 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
374
375
|
languages = _a.languages,
|
|
375
376
|
/* eslint-enable import/no-deprecated */
|
|
376
377
|
closedCaption = _a.closedCaption;
|
|
377
|
-
var langsToMapOn = language != null ? [language] :
|
|
378
|
-
languages != null ? languages :
|
|
379
|
-
[];
|
|
378
|
+
var langsToMapOn = language != null ? [language] : languages != null ? languages : [];
|
|
380
379
|
var indexOfFilename = getFilenameIndexInUrl(url);
|
|
381
380
|
var cdnUrl = url.substring(0, indexOfFilename);
|
|
382
381
|
var filename = url.substring(indexOfFilename);
|
|
383
382
|
return allSubs.concat(langsToMapOn.map(function (_language) {
|
|
384
383
|
var adaptationID = "gen-text-ada-" + generateSupplementaryTrackID();
|
|
385
384
|
var representationID = "gen-text-rep-" + generateSupplementaryTrackID();
|
|
386
|
-
var newAdaptation = new Adaptation({
|
|
385
|
+
var newAdaptation = new Adaptation({
|
|
386
|
+
id: adaptationID,
|
|
387
387
|
type: "text",
|
|
388
|
-
language: _language,
|
|
388
|
+
language: _language,
|
|
389
|
+
closedCaption: closedCaption,
|
|
390
|
+
representations: [
|
|
391
|
+
{
|
|
389
392
|
bitrate: 0,
|
|
390
393
|
cdnMetadata: [{ baseUrl: cdnUrl }],
|
|
391
394
|
id: representationID,
|
|
@@ -393,8 +396,10 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
393
396
|
codecs: codecs,
|
|
394
397
|
index: new StaticRepresentationIndex({
|
|
395
398
|
media: filename,
|
|
396
|
-
})
|
|
397
|
-
}
|
|
399
|
+
}),
|
|
400
|
+
},
|
|
401
|
+
],
|
|
402
|
+
}, { isManuallyAdded: true });
|
|
398
403
|
if (newAdaptation.representations.length > 0 && !newAdaptation.isSupported) {
|
|
399
404
|
var error = new MediaError("MANIFEST_INCOMPATIBLE_CODECS_ERROR", "An Adaptation contains only incompatible codecs.", { adaptation: newAdaptation });
|
|
400
405
|
_this.contentWarnings.push(error);
|
|
@@ -405,8 +410,9 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
405
410
|
if (newTextAdaptations.length > 0 && this.periods.length > 0) {
|
|
406
411
|
var adaptations = this.periods[0].adaptations;
|
|
407
412
|
adaptations.text =
|
|
408
|
-
adaptations.text != null
|
|
409
|
-
newTextAdaptations
|
|
413
|
+
adaptations.text != null
|
|
414
|
+
? adaptations.text.concat(newTextAdaptations)
|
|
415
|
+
: newTextAdaptations;
|
|
410
416
|
}
|
|
411
417
|
};
|
|
412
418
|
/**
|
|
@@ -448,9 +454,7 @@ var Manifest = /** @class */ (function (_super) {
|
|
|
448
454
|
}
|
|
449
455
|
// Re-set this.adaptations for retro-compatibility in v3.x.x
|
|
450
456
|
/* eslint-disable import/no-deprecated */
|
|
451
|
-
this.adaptations = this.periods[0] === undefined ?
|
|
452
|
-
{} :
|
|
453
|
-
this.periods[0].adaptations;
|
|
457
|
+
this.adaptations = this.periods[0] === undefined ? {} : this.periods[0].adaptations;
|
|
454
458
|
/* eslint-enable import/no-deprecated */
|
|
455
459
|
// Let's trigger events at the end, as those can trigger side-effects.
|
|
456
460
|
// We do not want the current Manifest object to be incomplete when those
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IManifestStreamEvent, IParsedPeriod } from "../parsers/manifest";
|
|
2
|
-
import { IPlayerError, IRepresentationFilter } from "../public_types";
|
|
1
|
+
import type { IManifestStreamEvent, IParsedPeriod } from "../parsers/manifest";
|
|
2
|
+
import type { IPlayerError, IRepresentationFilter } from "../public_types";
|
|
3
3
|
import Adaptation from "./adaptation";
|
|
4
|
-
import { IAdaptationType } from "./types";
|
|
4
|
+
import type { IAdaptationType } from "./types";
|
|
5
5
|
/** Structure listing every `Adaptation` in a Period. */
|
|
6
6
|
export type IManifestAdaptations = Partial<Record<IAdaptationType, Adaptation[]>>;
|
|
7
7
|
/**
|
|
@@ -38,7 +38,7 @@ export default class Period {
|
|
|
38
38
|
* @param {Object} args
|
|
39
39
|
* @param {function|undefined} [representationFilter]
|
|
40
40
|
*/
|
|
41
|
-
constructor(args: IParsedPeriod, representationFilter?: IRepresentationFilter
|
|
41
|
+
constructor(args: IParsedPeriod, representationFilter?: IRepresentationFilter);
|
|
42
42
|
/**
|
|
43
43
|
* Returns every `Adaptations` (or `tracks`) linked to that Period, in an
|
|
44
44
|
* Array.
|
|
@@ -32,8 +32,7 @@ var Period = /** @class */ (function () {
|
|
|
32
32
|
var _this = this;
|
|
33
33
|
this.contentWarnings = [];
|
|
34
34
|
this.id = args.id;
|
|
35
|
-
this.adaptations = Object.keys(args.adaptations)
|
|
36
|
-
.reduce(function (acc, type) {
|
|
35
|
+
this.adaptations = Object.keys(args.adaptations).reduce(function (acc, type) {
|
|
37
36
|
var adaptationsForType = args.adaptations[type];
|
|
38
37
|
if (adaptationsForType == null) {
|
|
39
38
|
return acc;
|
|
@@ -47,9 +46,7 @@ var Period = /** @class */ (function () {
|
|
|
47
46
|
}
|
|
48
47
|
return newAdaptation;
|
|
49
48
|
})
|
|
50
|
-
.filter(function (adaptation) {
|
|
51
|
-
return adaptation.representations.length > 0;
|
|
52
|
-
});
|
|
49
|
+
.filter(function (adaptation) { return adaptation.representations.length > 0; });
|
|
53
50
|
if (filteredAdaptations.every(function (adaptation) { return !adaptation.isSupported; }) &&
|
|
54
51
|
adaptationsForType.length > 0 &&
|
|
55
52
|
(type === "video" || type === "audio")) {
|
|
@@ -69,9 +66,7 @@ var Period = /** @class */ (function () {
|
|
|
69
66
|
if (this.duration != null && this.start != null) {
|
|
70
67
|
this.end = this.start + this.duration;
|
|
71
68
|
}
|
|
72
|
-
this.streamEvents = args.streamEvents === undefined ?
|
|
73
|
-
[] :
|
|
74
|
-
args.streamEvents;
|
|
69
|
+
this.streamEvents = args.streamEvents === undefined ? [] : args.streamEvents;
|
|
75
70
|
}
|
|
76
71
|
/**
|
|
77
72
|
* Returns every `Adaptations` (or `tracks`) linked to that Period, in an
|
|
@@ -82,8 +77,7 @@ var Period = /** @class */ (function () {
|
|
|
82
77
|
var adaptationsByType = this.adaptations;
|
|
83
78
|
return objectValues(adaptationsByType).reduce(
|
|
84
79
|
// Note: the second case cannot happen. TS is just being dumb here
|
|
85
|
-
function (acc, adaptations) { return adaptations != null ? acc.concat(adaptations) :
|
|
86
|
-
acc; }, []);
|
|
80
|
+
function (acc, adaptations) { return (adaptations != null ? acc.concat(adaptations) : acc); }, []);
|
|
87
81
|
};
|
|
88
82
|
/**
|
|
89
83
|
* Returns every `Adaptations` (or `tracks`) linked to that Period for a
|
|
@@ -93,8 +87,7 @@ var Period = /** @class */ (function () {
|
|
|
93
87
|
*/
|
|
94
88
|
Period.prototype.getAdaptationsForType = function (adaptationType) {
|
|
95
89
|
var adaptationsForType = this.adaptations[adaptationType];
|
|
96
|
-
return adaptationsForType == null ? [] :
|
|
97
|
-
adaptationsForType;
|
|
90
|
+
return adaptationsForType == null ? [] : adaptationsForType;
|
|
98
91
|
};
|
|
99
92
|
/**
|
|
100
93
|
* Returns the Adaptation linked to the given ID.
|
|
@@ -138,8 +131,8 @@ var Period = /** @class */ (function () {
|
|
|
138
131
|
if (time >= this.start && (this.end === undefined || time < this.end)) {
|
|
139
132
|
return true;
|
|
140
133
|
}
|
|
141
|
-
else if (time === this.end &&
|
|
142
|
-
nextPeriod.start > this.end)) {
|
|
134
|
+
else if (time === this.end &&
|
|
135
|
+
(nextPeriod === null || nextPeriod.start > this.end)) {
|
|
143
136
|
// The last possible timed position of a Period is ambiguous as it is
|
|
144
137
|
// frequently in common with the start of the next one: is it part of
|
|
145
138
|
// the current or of the next Period?
|
|
@@ -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 { ICdnMetadata, IContentProtections, IParsedRepresentation } from "../parsers/manifest";
|
|
17
|
-
import { IAudioRepresentation, IHDRInformation, IVideoRepresentation } from "../public_types";
|
|
18
|
-
import { IRepresentationIndex } from "./representation_index";
|
|
19
|
-
import { IAdaptationType } from "./types";
|
|
16
|
+
import type { ICdnMetadata, IContentProtections, IParsedRepresentation } from "../parsers/manifest";
|
|
17
|
+
import type { IAudioRepresentation, IHDRInformation, IVideoRepresentation } from "../public_types";
|
|
18
|
+
import type { IRepresentationIndex } from "./representation_index";
|
|
19
|
+
import type { IAdaptationType } from "./types";
|
|
20
20
|
/**
|
|
21
21
|
* Normalized Representation structure.
|
|
22
22
|
* @class Representation
|
|
@@ -186,9 +186,10 @@ var Representation = /** @class */ (function () {
|
|
|
186
186
|
Representation.prototype._addProtectionData = function (initDataType, keyId, data) {
|
|
187
187
|
var hasUpdatedProtectionData = false;
|
|
188
188
|
if (this.contentProtections === undefined) {
|
|
189
|
-
this.contentProtections = {
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
this.contentProtections = {
|
|
190
|
+
keyIds: keyId !== undefined ? [{ keyId: keyId }] : [],
|
|
191
|
+
initData: [{ type: initDataType, values: data }],
|
|
192
|
+
};
|
|
192
193
|
return true;
|
|
193
194
|
}
|
|
194
195
|
if (keyId !== undefined) {
|
|
@@ -240,8 +241,7 @@ var Representation = /** @class */ (function () {
|
|
|
240
241
|
}
|
|
241
242
|
// If we are here, this means that we didn't find the corresponding
|
|
242
243
|
// init data type in this.contentProtections.initData.
|
|
243
|
-
this.contentProtections.initData.push({ type: initDataType,
|
|
244
|
-
values: data });
|
|
244
|
+
this.contentProtections.initData.push({ type: initDataType, values: data });
|
|
245
245
|
return true;
|
|
246
246
|
};
|
|
247
247
|
/**
|
|
@@ -14,5 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import StaticRepresentationIndex from "./static";
|
|
17
|
-
import { IBaseContentInfos, IMetaPlaylistPrivateInfos, IRepresentationIndex, ISegment } from "./types";
|
|
18
|
-
export { IBaseContentInfos, IMetaPlaylistPrivateInfos, IRepresentationIndex, ISegment,
|
|
17
|
+
import type { IBaseContentInfos, IMetaPlaylistPrivateInfos, IRepresentationIndex, ISegment } from "./types";
|
|
18
|
+
export type { IBaseContentInfos, IMetaPlaylistPrivateInfos, IRepresentationIndex, ISegment, };
|
|
19
|
+
export { StaticRepresentationIndex };
|
|
@@ -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 { IRepresentationIndex, ISegment } from "./types";
|
|
16
|
+
import type { IRepresentationIndex, ISegment } from "./types";
|
|
17
17
|
export interface IStaticRepresentationIndexInfos {
|
|
18
18
|
media: string;
|
|
19
19
|
}
|
|
@@ -38,7 +38,9 @@ var StaticRepresentationIndex = /** @class */ (function () {
|
|
|
38
38
|
* @returns {Array.<Object>}
|
|
39
39
|
*/
|
|
40
40
|
StaticRepresentationIndex.prototype.getSegments = function () {
|
|
41
|
-
return [
|
|
41
|
+
return [
|
|
42
|
+
{
|
|
43
|
+
id: "0",
|
|
42
44
|
isInit: false,
|
|
43
45
|
number: 0,
|
|
44
46
|
url: this._url,
|
|
@@ -47,7 +49,9 @@ var StaticRepresentationIndex = /** @class */ (function () {
|
|
|
47
49
|
duration: Number.MAX_VALUE,
|
|
48
50
|
complete: true,
|
|
49
51
|
privateInfos: {},
|
|
50
|
-
timescale: 1
|
|
52
|
+
timescale: 1,
|
|
53
|
+
},
|
|
54
|
+
];
|
|
51
55
|
};
|
|
52
56
|
/**
|
|
53
57
|
* Returns first position in index.
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
16
|
+
import type { Adaptation, Period, Representation } from "../../manifest";
|
|
17
|
+
import type Manifest from "../../manifest";
|
|
18
|
+
import type { IEMSG } from "../../parsers/containers/isobmff";
|
|
19
|
+
import type { ILocalIndexSegment, ILocalManifestInitSegmentLoader, ILocalManifestSegmentLoader } from "../../parsers/manifest/local";
|
|
20
|
+
import type { IPlayerError } from "../../public_types";
|
|
20
21
|
/**
|
|
21
22
|
* Supplementary information specific to Smooth Initialization segments.
|
|
22
23
|
* Contains every information needed to generate an initialization segment.
|
|
@@ -116,7 +117,7 @@ export interface IPrivateInfos {
|
|
|
116
117
|
* Function allowing to know if a given emsg's event name has been
|
|
117
118
|
* explicitely authorized.
|
|
118
119
|
*/
|
|
119
|
-
isEMSGWhitelisted?: (
|
|
120
|
+
isEMSGWhitelisted?: (evt: IEMSG) => boolean;
|
|
120
121
|
}
|
|
121
122
|
/** Represent a single Segment from a Representation. */
|
|
122
123
|
export interface ISegment {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import Adaptation from "./adaptation";
|
|
17
|
-
import Period from "./period";
|
|
18
|
-
import Representation from "./representation";
|
|
16
|
+
import type Adaptation from "./adaptation";
|
|
17
|
+
import type Period from "./period";
|
|
18
|
+
import type Representation from "./representation";
|
|
19
19
|
import { MANIFEST_UPDATE_TYPE } from "./types";
|
|
20
20
|
/**
|
|
21
21
|
* Update oldPeriod attributes with the one from newPeriod (e.g. when updating
|
|
@@ -41,9 +41,7 @@ export default function updatePeriodInPlace(oldPeriod, newPeriod, updateType) {
|
|
|
41
41
|
var oldAdaptation = oldAdaptations[j];
|
|
42
42
|
var newAdaptationIdx = arrayFindIndex(newAdaptations, function (a) { return a.id === oldAdaptation.id; });
|
|
43
43
|
if (newAdaptationIdx === -1) {
|
|
44
|
-
log.warn(
|
|
45
|
-
oldAdaptations[j].id +
|
|
46
|
-
"\" not found when merging.");
|
|
44
|
+
log.warn('Manifest: Adaptation "' + oldAdaptations[j].id + '" not found when merging.');
|
|
47
45
|
var removed = oldAdaptations.splice(j, 1)[0];
|
|
48
46
|
j--;
|
|
49
47
|
res.removedAdaptations.push(removed);
|
|
@@ -53,14 +51,17 @@ export default function updatePeriodInPlace(oldPeriod, newPeriod, updateType) {
|
|
|
53
51
|
var updatedRepresentations = [];
|
|
54
52
|
var addedRepresentations = [];
|
|
55
53
|
var removedRepresentations = [];
|
|
56
|
-
res.updatedAdaptations.push({
|
|
54
|
+
res.updatedAdaptations.push({
|
|
55
|
+
adaptation: oldAdaptation,
|
|
56
|
+
updatedRepresentations: updatedRepresentations,
|
|
57
|
+
addedRepresentations: addedRepresentations,
|
|
58
|
+
removedRepresentations: removedRepresentations,
|
|
59
|
+
});
|
|
57
60
|
var oldRepresentations = oldAdaptation.representations;
|
|
58
61
|
var newRepresentations = newAdaptation.representations.slice();
|
|
59
62
|
var _loop_2 = function (k) {
|
|
60
63
|
var oldRepresentation = oldRepresentations[k];
|
|
61
|
-
var newRepresentationIdx = arrayFindIndex(newRepresentations, function (representation) {
|
|
62
|
-
return representation.id === oldRepresentation.id;
|
|
63
|
-
});
|
|
64
|
+
var newRepresentationIdx = arrayFindIndex(newRepresentations, function (representation) { return representation.id === oldRepresentation.id; });
|
|
64
65
|
if (newRepresentationIdx === -1) {
|
|
65
66
|
log.warn("Manifest: Representation \"".concat(oldRepresentations[k].id, "\" ") +
|
|
66
67
|
"not found when merging.");
|
|
@@ -101,8 +102,7 @@ export default function updatePeriodInPlace(oldPeriod, newPeriod, updateType) {
|
|
|
101
102
|
j = out_j_1;
|
|
102
103
|
}
|
|
103
104
|
if (newAdaptations.length > 0) {
|
|
104
|
-
log.warn("Manifest: ".concat(newAdaptations.length, " new Adaptations ") +
|
|
105
|
-
"found when merging.");
|
|
105
|
+
log.warn("Manifest: ".concat(newAdaptations.length, " new Adaptations ") + "found when merging.");
|
|
106
106
|
for (var _i = 0, newAdaptations_1 = newAdaptations; _i < newAdaptations_1.length; _i++) {
|
|
107
107
|
var adap = newAdaptations_1[_i];
|
|
108
108
|
var prevAdaps = oldPeriod.adaptations[adap.type];
|