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
|
@@ -66,7 +66,7 @@ import Manifest from "../../manifest";
|
|
|
66
66
|
import { getMDAT } from "../../parsers/containers/isobmff";
|
|
67
67
|
import createSmoothManifestParser, { SmoothRepresentationIndex, } from "../../parsers/manifest/smooth";
|
|
68
68
|
import request from "../../utils/request";
|
|
69
|
-
import { strToUtf8, utf8ToStr
|
|
69
|
+
import { strToUtf8, utf8ToStr } from "../../utils/string_parsing";
|
|
70
70
|
import warnOnce from "../../utils/warn_once";
|
|
71
71
|
import checkISOBMFFIntegrity from "../utils/check_isobmff_integrity";
|
|
72
72
|
import generateManifestLoader from "../utils/generate_manifest_loader";
|
|
@@ -110,9 +110,11 @@ export default function (transportOptions) {
|
|
|
110
110
|
if (WSX_REG.test(url)) {
|
|
111
111
|
warnOnce("Giving WSX URL to loadVideo is deprecated." +
|
|
112
112
|
" You should only give Manifest URLs.");
|
|
113
|
-
resolving = request({
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
resolving = request({
|
|
114
|
+
url: replaceToken(url, ""),
|
|
115
|
+
responseType: "document",
|
|
116
|
+
cancelSignal: cancelSignal,
|
|
117
|
+
}).then(function (value) {
|
|
116
118
|
var extractedURL = extractISML(value.responseData);
|
|
117
119
|
if (extractedURL === null || extractedURL.length === 0) {
|
|
118
120
|
throw new Error("Invalid ISML");
|
|
@@ -124,18 +126,16 @@ export default function (transportOptions) {
|
|
|
124
126
|
resolving = Promise.resolve(url);
|
|
125
127
|
}
|
|
126
128
|
var token = extractToken(url);
|
|
127
|
-
return resolving.then(function (_url) {
|
|
128
|
-
return replaceToken(resolveManifest(_url), token);
|
|
129
|
-
});
|
|
129
|
+
return resolving.then(function (_url) { return replaceToken(resolveManifest(_url), token); });
|
|
130
130
|
},
|
|
131
131
|
loadManifest: manifestLoader,
|
|
132
132
|
parseManifest: function (manifestData, parserOptions) {
|
|
133
133
|
var _a;
|
|
134
134
|
var url = (_a = manifestData.url) !== null && _a !== void 0 ? _a : parserOptions.originalUrl;
|
|
135
135
|
var manifestReceivedTime = manifestData.receivedTime, responseData = manifestData.responseData;
|
|
136
|
-
var documentData = typeof responseData === "string"
|
|
137
|
-
new DOMParser().parseFromString(responseData, "text/xml")
|
|
138
|
-
responseData; // TODO find a way to check if Document?
|
|
136
|
+
var documentData = typeof responseData === "string"
|
|
137
|
+
? new DOMParser().parseFromString(responseData, "text/xml")
|
|
138
|
+
: responseData; // TODO find a way to check if Document?
|
|
139
139
|
var parserResult = smoothManifestParser(documentData, url, manifestReceivedTime);
|
|
140
140
|
var manifest = new Manifest(parserResult, {
|
|
141
141
|
representationFilter: transportOptions.representationFilter,
|
|
@@ -169,35 +169,40 @@ export default function (transportOptions) {
|
|
|
169
169
|
var data = loadedSegment.data, isChunked = loadedSegment.isChunked;
|
|
170
170
|
if (data === null) {
|
|
171
171
|
if (segment.isInit) {
|
|
172
|
-
return {
|
|
172
|
+
return {
|
|
173
|
+
segmentType: "init",
|
|
173
174
|
initializationData: null,
|
|
174
175
|
initializationDataSize: 0,
|
|
175
176
|
protectionDataUpdate: false,
|
|
176
|
-
initTimescale: undefined
|
|
177
|
+
initTimescale: undefined,
|
|
178
|
+
};
|
|
177
179
|
}
|
|
178
|
-
return {
|
|
180
|
+
return {
|
|
181
|
+
segmentType: "media",
|
|
179
182
|
chunkData: null,
|
|
180
183
|
chunkInfos: null,
|
|
181
184
|
chunkOffset: 0,
|
|
182
185
|
chunkSize: 0,
|
|
183
186
|
protectionDataUpdate: false,
|
|
184
|
-
appendWindow: [undefined, undefined]
|
|
187
|
+
appendWindow: [undefined, undefined],
|
|
188
|
+
};
|
|
185
189
|
}
|
|
186
|
-
var responseBuffer = data instanceof Uint8Array ? data :
|
|
187
|
-
new Uint8Array(data);
|
|
190
|
+
var responseBuffer = data instanceof Uint8Array ? data : new Uint8Array(data);
|
|
188
191
|
if (segment.isInit) {
|
|
189
192
|
var timescale = (_b = (_a = segment.privateInfos) === null || _a === void 0 ? void 0 : _a.smoothInitSegment) === null || _b === void 0 ? void 0 : _b.timescale;
|
|
190
|
-
return {
|
|
193
|
+
return {
|
|
194
|
+
segmentType: "init",
|
|
191
195
|
initializationData: data,
|
|
192
196
|
initializationDataSize: data.byteLength,
|
|
193
197
|
// smooth init segments are crafted by hand.
|
|
194
198
|
// Their timescale is the one from the manifest.
|
|
195
199
|
initTimescale: timescale,
|
|
196
|
-
protectionDataUpdate: false
|
|
200
|
+
protectionDataUpdate: false,
|
|
201
|
+
};
|
|
197
202
|
}
|
|
198
|
-
var timingInfos = initTimescale !== undefined
|
|
199
|
-
extractTimingsInfos(responseBuffer, isChunked, initTimescale, segment, manifest.isLive)
|
|
200
|
-
null;
|
|
203
|
+
var timingInfos = initTimescale !== undefined
|
|
204
|
+
? extractTimingsInfos(responseBuffer, isChunked, initTimescale, segment, manifest.isLive)
|
|
205
|
+
: null;
|
|
201
206
|
if (timingInfos === null ||
|
|
202
207
|
timingInfos.chunkInfos === null ||
|
|
203
208
|
timingInfos.scaledSegmentTime === undefined) {
|
|
@@ -208,10 +213,15 @@ export default function (transportOptions) {
|
|
|
208
213
|
if (nextSegments.length > 0) {
|
|
209
214
|
addNextSegments(adaptation, nextSegments, segment);
|
|
210
215
|
}
|
|
211
|
-
return {
|
|
216
|
+
return {
|
|
217
|
+
segmentType: "media",
|
|
218
|
+
chunkData: chunkData,
|
|
219
|
+
chunkInfos: chunkInfos,
|
|
220
|
+
chunkOffset: 0,
|
|
212
221
|
chunkSize: chunkData.length,
|
|
213
222
|
protectionDataUpdate: false,
|
|
214
|
-
appendWindow: [undefined, undefined]
|
|
223
|
+
appendWindow: [undefined, undefined],
|
|
224
|
+
};
|
|
215
225
|
},
|
|
216
226
|
};
|
|
217
227
|
var textTrackPipeline = {
|
|
@@ -219,28 +229,35 @@ export default function (transportOptions) {
|
|
|
219
229
|
var segment = content.segment, representation = content.representation;
|
|
220
230
|
var url = constructSegmentUrl(wantedCdn, segment);
|
|
221
231
|
if (segment.isInit || url === null) {
|
|
222
|
-
return Promise.resolve({ resultType: "segment-created",
|
|
223
|
-
resultData: null });
|
|
232
|
+
return Promise.resolve({ resultType: "segment-created", resultData: null });
|
|
224
233
|
}
|
|
225
234
|
var isMP4 = isMP4EmbeddedTrack(representation);
|
|
226
235
|
if (!isMP4) {
|
|
227
|
-
return request({
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
236
|
+
return request({
|
|
237
|
+
url: url,
|
|
238
|
+
responseType: "text",
|
|
239
|
+
timeout: loaderOptions.timeout,
|
|
240
|
+
cancelSignal: cancelSignal,
|
|
241
|
+
onProgress: callbacks.onProgress,
|
|
242
|
+
}).then(function (data) { return ({ resultType: "segment-loaded", resultData: data }); });
|
|
231
243
|
}
|
|
232
244
|
else {
|
|
233
|
-
return request({
|
|
234
|
-
|
|
235
|
-
|
|
245
|
+
return request({
|
|
246
|
+
url: url,
|
|
247
|
+
responseType: "arraybuffer",
|
|
248
|
+
timeout: loaderOptions.timeout,
|
|
249
|
+
cancelSignal: cancelSignal,
|
|
250
|
+
onProgress: callbacks.onProgress,
|
|
251
|
+
}).then(function (data) {
|
|
236
252
|
if (transportOptions.checkMediaSegmentIntegrity !== true) {
|
|
237
|
-
return { resultType: "segment-loaded",
|
|
238
|
-
resultData: data };
|
|
253
|
+
return { resultType: "segment-loaded", resultData: data };
|
|
239
254
|
}
|
|
240
255
|
var dataU8 = new Uint8Array(data.responseData);
|
|
241
256
|
checkISOBMFFIntegrity(dataU8, content.segment.isInit);
|
|
242
|
-
return {
|
|
243
|
-
|
|
257
|
+
return {
|
|
258
|
+
resultType: "segment-loaded",
|
|
259
|
+
resultData: __assign(__assign({}, data), { responseData: dataU8 }),
|
|
260
|
+
};
|
|
244
261
|
});
|
|
245
262
|
}
|
|
246
263
|
},
|
|
@@ -252,21 +269,26 @@ export default function (transportOptions) {
|
|
|
252
269
|
var _b = representation.mimeType, mimeType = _b === void 0 ? "" : _b, _c = representation.codec, codec = _c === void 0 ? "" : _c;
|
|
253
270
|
var data = loadedSegment.data, isChunked = loadedSegment.isChunked;
|
|
254
271
|
var chunkSize;
|
|
255
|
-
if (segment.isInit) {
|
|
256
|
-
|
|
272
|
+
if (segment.isInit) {
|
|
273
|
+
// text init segment has no use in HSS
|
|
274
|
+
return {
|
|
275
|
+
segmentType: "init",
|
|
257
276
|
initializationData: null,
|
|
258
277
|
initializationDataSize: 0,
|
|
259
278
|
protectionDataUpdate: false,
|
|
260
|
-
initTimescale: undefined
|
|
279
|
+
initTimescale: undefined,
|
|
280
|
+
};
|
|
261
281
|
}
|
|
262
282
|
if (data === null) {
|
|
263
|
-
return {
|
|
283
|
+
return {
|
|
284
|
+
segmentType: "media",
|
|
264
285
|
chunkData: null,
|
|
265
286
|
chunkInfos: null,
|
|
266
287
|
chunkOffset: 0,
|
|
267
288
|
chunkSize: 0,
|
|
268
289
|
protectionDataUpdate: false,
|
|
269
|
-
appendWindow: [undefined, undefined]
|
|
290
|
+
appendWindow: [undefined, undefined],
|
|
291
|
+
};
|
|
270
292
|
}
|
|
271
293
|
var nextSegments;
|
|
272
294
|
var chunkInfos = null;
|
|
@@ -280,13 +302,12 @@ export default function (transportOptions) {
|
|
|
280
302
|
chunkBytes = strToUtf8(data);
|
|
281
303
|
}
|
|
282
304
|
else {
|
|
283
|
-
chunkBytes = data instanceof Uint8Array ? data :
|
|
284
|
-
new Uint8Array(data);
|
|
305
|
+
chunkBytes = data instanceof Uint8Array ? data : new Uint8Array(data);
|
|
285
306
|
}
|
|
286
307
|
chunkSize = chunkBytes.length;
|
|
287
|
-
var timingInfos = initTimescale !== undefined
|
|
288
|
-
extractTimingsInfos(chunkBytes, isChunked, initTimescale, segment, manifest.isLive)
|
|
289
|
-
null;
|
|
308
|
+
var timingInfos = initTimescale !== undefined
|
|
309
|
+
? extractTimingsInfos(chunkBytes, isChunked, initTimescale, segment, manifest.isLive)
|
|
310
|
+
: null;
|
|
290
311
|
nextSegments = timingInfos === null || timingInfos === void 0 ? void 0 : timingInfos.nextSegments;
|
|
291
312
|
chunkInfos = (_a = timingInfos === null || timingInfos === void 0 ? void 0 : timingInfos.chunkInfos) !== null && _a !== void 0 ? _a : null;
|
|
292
313
|
if (chunkInfos === null) {
|
|
@@ -300,13 +321,15 @@ export default function (transportOptions) {
|
|
|
300
321
|
}
|
|
301
322
|
else {
|
|
302
323
|
segmentStart = chunkInfos.time;
|
|
303
|
-
segmentEnd =
|
|
304
|
-
chunkInfos.
|
|
305
|
-
|
|
324
|
+
segmentEnd =
|
|
325
|
+
chunkInfos.duration !== undefined
|
|
326
|
+
? chunkInfos.time + chunkInfos.duration
|
|
327
|
+
: segment.end;
|
|
306
328
|
}
|
|
307
329
|
var lcCodec = codec.toLowerCase();
|
|
308
330
|
if (mimeType === "application/ttml+xml+mp4" ||
|
|
309
331
|
lcCodec === "stpp" ||
|
|
332
|
+
lcCodec === "stpp.ttml" ||
|
|
310
333
|
lcCodec === "stpp.ttml.im1t") {
|
|
311
334
|
_sdType = "ttml";
|
|
312
335
|
}
|
|
@@ -317,16 +340,15 @@ export default function (transportOptions) {
|
|
|
317
340
|
throw new Error("could not find a text-track parser for the type ".concat(mimeType));
|
|
318
341
|
}
|
|
319
342
|
var mdat = getMDAT(chunkBytes);
|
|
320
|
-
_sdData = mdat === null ? "" :
|
|
321
|
-
utf8ToStr(mdat);
|
|
343
|
+
_sdData = mdat === null ? "" : utf8ToStr(mdat);
|
|
322
344
|
}
|
|
323
|
-
else {
|
|
345
|
+
else {
|
|
346
|
+
// not MP4
|
|
324
347
|
segmentStart = segment.time;
|
|
325
348
|
segmentEnd = segment.end;
|
|
326
349
|
var chunkString = void 0;
|
|
327
350
|
if (typeof data !== "string") {
|
|
328
|
-
var bytesData = data instanceof Uint8Array ? data :
|
|
329
|
-
new Uint8Array(data);
|
|
351
|
+
var bytesData = data instanceof Uint8Array ? data : new Uint8Array(data);
|
|
330
352
|
chunkSize = bytesData.length;
|
|
331
353
|
chunkString = utf8ToStr(bytesData);
|
|
332
354
|
}
|
|
@@ -356,17 +378,25 @@ export default function (transportOptions) {
|
|
|
356
378
|
}
|
|
357
379
|
_sdData = chunkString;
|
|
358
380
|
}
|
|
359
|
-
if (chunkInfos !== null &&
|
|
360
|
-
Array.isArray(nextSegments) && nextSegments.length > 0) {
|
|
381
|
+
if (chunkInfos !== null && Array.isArray(nextSegments) && nextSegments.length > 0) {
|
|
361
382
|
addNextSegments(adaptation, nextSegments, segment);
|
|
362
383
|
}
|
|
363
384
|
var chunkOffset = segmentStart !== null && segmentStart !== void 0 ? segmentStart : 0;
|
|
364
|
-
return {
|
|
365
|
-
|
|
385
|
+
return {
|
|
386
|
+
segmentType: "media",
|
|
387
|
+
chunkData: {
|
|
388
|
+
type: _sdType,
|
|
366
389
|
data: _sdData,
|
|
367
390
|
start: segmentStart,
|
|
368
|
-
end: segmentEnd,
|
|
369
|
-
|
|
391
|
+
end: segmentEnd,
|
|
392
|
+
language: language,
|
|
393
|
+
},
|
|
394
|
+
chunkSize: chunkSize,
|
|
395
|
+
chunkInfos: chunkInfos,
|
|
396
|
+
chunkOffset: chunkOffset,
|
|
397
|
+
protectionDataUpdate: false,
|
|
398
|
+
appendWindow: [undefined, undefined],
|
|
399
|
+
};
|
|
370
400
|
},
|
|
371
401
|
};
|
|
372
402
|
var imageTrackPipeline = {
|
|
@@ -380,61 +410,73 @@ export default function (transportOptions) {
|
|
|
380
410
|
url = constructSegmentUrl(wantedCdn, segment);
|
|
381
411
|
if (segment.isInit || url === null) {
|
|
382
412
|
// image do not need an init segment. Passthrough directly to the parser
|
|
383
|
-
return [2 /*return*/, { resultType: "segment-created",
|
|
384
|
-
resultData: null }];
|
|
413
|
+
return [2 /*return*/, { resultType: "segment-created", resultData: null }];
|
|
385
414
|
}
|
|
386
|
-
return [4 /*yield*/, request({
|
|
415
|
+
return [4 /*yield*/, request({
|
|
416
|
+
url: url,
|
|
417
|
+
responseType: "arraybuffer",
|
|
387
418
|
timeout: loaderOptions.timeout,
|
|
388
|
-
onProgress: callbacks.onProgress,
|
|
419
|
+
onProgress: callbacks.onProgress,
|
|
420
|
+
cancelSignal: cancelSignal,
|
|
421
|
+
})];
|
|
389
422
|
case 1:
|
|
390
423
|
data = _a.sent();
|
|
391
|
-
return [2 /*return*/, { resultType: "segment-loaded",
|
|
392
|
-
resultData: data }];
|
|
424
|
+
return [2 /*return*/, { resultType: "segment-loaded", resultData: data }];
|
|
393
425
|
}
|
|
394
426
|
});
|
|
395
427
|
});
|
|
396
428
|
},
|
|
397
429
|
parseSegment: function (loadedSegment, content, _initTimescale) {
|
|
398
430
|
var data = loadedSegment.data, isChunked = loadedSegment.isChunked;
|
|
399
|
-
if (content.segment.isInit) {
|
|
400
|
-
|
|
431
|
+
if (content.segment.isInit) {
|
|
432
|
+
// image init segment has no use
|
|
433
|
+
return {
|
|
434
|
+
segmentType: "init",
|
|
401
435
|
initializationData: null,
|
|
402
436
|
initializationDataSize: 0,
|
|
403
437
|
protectionDataUpdate: false,
|
|
404
|
-
initTimescale: undefined
|
|
438
|
+
initTimescale: undefined,
|
|
439
|
+
};
|
|
405
440
|
}
|
|
406
441
|
if (isChunked) {
|
|
407
442
|
throw new Error("Image data should not be downloaded in chunks");
|
|
408
443
|
}
|
|
409
444
|
// TODO image Parsing should be more on the buffer side, no?
|
|
410
445
|
if (data === null || features.imageParser === null) {
|
|
411
|
-
return {
|
|
446
|
+
return {
|
|
447
|
+
segmentType: "media",
|
|
412
448
|
chunkData: null,
|
|
413
449
|
chunkInfos: null,
|
|
414
450
|
chunkOffset: 0,
|
|
415
451
|
chunkSize: 0,
|
|
416
452
|
protectionDataUpdate: false,
|
|
417
|
-
appendWindow: [undefined, undefined]
|
|
453
|
+
appendWindow: [undefined, undefined],
|
|
454
|
+
};
|
|
418
455
|
}
|
|
419
456
|
var bifObject = features.imageParser(new Uint8Array(data));
|
|
420
457
|
var thumbsData = bifObject.thumbs;
|
|
421
|
-
return {
|
|
422
|
-
|
|
458
|
+
return {
|
|
459
|
+
segmentType: "media",
|
|
460
|
+
chunkData: {
|
|
461
|
+
data: thumbsData,
|
|
423
462
|
start: 0,
|
|
424
463
|
end: Number.MAX_VALUE,
|
|
425
464
|
timescale: 1,
|
|
426
|
-
type: "bif"
|
|
427
|
-
|
|
428
|
-
|
|
465
|
+
type: "bif",
|
|
466
|
+
},
|
|
467
|
+
chunkInfos: { time: 0, duration: Number.MAX_VALUE },
|
|
429
468
|
chunkSize: undefined,
|
|
430
469
|
chunkOffset: 0,
|
|
431
470
|
protectionDataUpdate: false,
|
|
432
|
-
appendWindow: [undefined, undefined]
|
|
471
|
+
appendWindow: [undefined, undefined],
|
|
472
|
+
};
|
|
433
473
|
},
|
|
434
474
|
};
|
|
435
|
-
return {
|
|
475
|
+
return {
|
|
476
|
+
manifest: manifestPipeline,
|
|
436
477
|
audio: audioVideoPipeline,
|
|
437
478
|
video: audioVideoPipeline,
|
|
438
479
|
text: textTrackPipeline,
|
|
439
|
-
image: imageTrackPipeline
|
|
480
|
+
image: imageTrackPipeline,
|
|
481
|
+
};
|
|
440
482
|
}
|
|
@@ -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 { ISegmentLoader as ICustomSegmentLoader } from "../../public_types";
|
|
17
|
-
import { CancellationSignal } from "../../utils/task_canceller";
|
|
18
|
-
import { ISegmentContext, ISegmentLoaderCallbacks, ISegmentLoaderOptions, ISegmentLoaderResultSegmentCreated, ISegmentLoaderResultSegmentLoaded } from "../types";
|
|
16
|
+
import type { ISegmentLoader as ICustomSegmentLoader } from "../../public_types";
|
|
17
|
+
import type { CancellationSignal } from "../../utils/task_canceller";
|
|
18
|
+
import type { ISegmentContext, ISegmentLoaderCallbacks, ISegmentLoaderOptions, ISegmentLoaderResultSegmentCreated, ISegmentLoaderResultSegmentLoaded } from "../types";
|
|
19
19
|
/**
|
|
20
20
|
* Defines the url for the request, load the right loader (custom/default
|
|
21
21
|
* one).
|
|
@@ -29,7 +29,7 @@ import assert from "../../utils/assert";
|
|
|
29
29
|
import request from "../../utils/request";
|
|
30
30
|
import byteRange from "../utils/byte_range";
|
|
31
31
|
import checkISOBMFFIntegrity from "../utils/check_isobmff_integrity";
|
|
32
|
-
import { createAudioInitSegment, createVideoInitSegment
|
|
32
|
+
import { createAudioInitSegment, createVideoInitSegment } from "./isobmff";
|
|
33
33
|
import { isMP4EmbeddedTrack } from "./utils";
|
|
34
34
|
/**
|
|
35
35
|
* Segment loader triggered if there was no custom-defined one in the API.
|
|
@@ -47,17 +47,24 @@ function regularSegmentLoader(url, content, callbacks, loaderOptions, cancelSign
|
|
|
47
47
|
if (Array.isArray(range)) {
|
|
48
48
|
headers = { Range: byteRange(range) };
|
|
49
49
|
}
|
|
50
|
-
return request({
|
|
51
|
-
|
|
50
|
+
return request({
|
|
51
|
+
url: url,
|
|
52
|
+
responseType: "arraybuffer",
|
|
53
|
+
headers: headers,
|
|
54
|
+
timeout: loaderOptions.timeout,
|
|
55
|
+
cancelSignal: cancelSignal,
|
|
56
|
+
onProgress: callbacks.onProgress,
|
|
57
|
+
}).then(function (data) {
|
|
52
58
|
var isMP4 = isMP4EmbeddedTrack(content.representation);
|
|
53
59
|
if (!isMP4 || checkMediaSegmentIntegrity !== true) {
|
|
54
|
-
return { resultType: "segment-loaded",
|
|
55
|
-
resultData: data };
|
|
60
|
+
return { resultType: "segment-loaded", resultData: data };
|
|
56
61
|
}
|
|
57
62
|
var dataU8 = new Uint8Array(data.responseData);
|
|
58
63
|
checkISOBMFFIntegrity(dataU8, content.segment.isInit);
|
|
59
|
-
return {
|
|
60
|
-
|
|
64
|
+
return {
|
|
65
|
+
resultType: "segment-loaded",
|
|
66
|
+
resultData: __assign(__assign({}, data), { responseData: dataU8 }),
|
|
67
|
+
};
|
|
61
68
|
});
|
|
62
69
|
}
|
|
63
70
|
/**
|
|
@@ -75,8 +82,7 @@ var generateSegmentLoader = function (_a) {
|
|
|
75
82
|
}
|
|
76
83
|
var smoothInitPrivateInfos = segment.privateInfos.smoothInitSegment;
|
|
77
84
|
var responseData = void 0;
|
|
78
|
-
var codecPrivateData = smoothInitPrivateInfos.codecPrivateData, timescale = smoothInitPrivateInfos.timescale, _a = smoothInitPrivateInfos.protection, protection = _a === void 0 ? { keyId: undefined,
|
|
79
|
-
keySystems: undefined } : _a;
|
|
85
|
+
var codecPrivateData = smoothInitPrivateInfos.codecPrivateData, timescale = smoothInitPrivateInfos.timescale, _a = smoothInitPrivateInfos.protection, protection = _a === void 0 ? { keyId: undefined, keySystems: undefined } : _a;
|
|
80
86
|
if (codecPrivateData === undefined) {
|
|
81
87
|
throw new Error("Smooth: no codec private data.");
|
|
82
88
|
}
|
|
@@ -98,16 +104,28 @@ var generateSegmentLoader = function (_a) {
|
|
|
98
104
|
}
|
|
99
105
|
responseData = new Uint8Array(0);
|
|
100
106
|
}
|
|
101
|
-
return Promise.resolve({
|
|
102
|
-
|
|
107
|
+
return Promise.resolve({
|
|
108
|
+
resultType: "segment-created",
|
|
109
|
+
resultData: responseData,
|
|
110
|
+
});
|
|
103
111
|
}
|
|
104
112
|
else if (url === null) {
|
|
105
|
-
return Promise.resolve({
|
|
106
|
-
|
|
113
|
+
return Promise.resolve({
|
|
114
|
+
resultType: "segment-created",
|
|
115
|
+
resultData: null,
|
|
116
|
+
});
|
|
107
117
|
}
|
|
108
118
|
else {
|
|
109
|
-
var args_1 = {
|
|
110
|
-
|
|
119
|
+
var args_1 = {
|
|
120
|
+
adaptation: adaptation,
|
|
121
|
+
manifest: manifest,
|
|
122
|
+
period: period,
|
|
123
|
+
representation: representation,
|
|
124
|
+
segment: segment,
|
|
125
|
+
transport: "smooth",
|
|
126
|
+
timeout: loaderOptions.timeout,
|
|
127
|
+
url: url,
|
|
128
|
+
};
|
|
111
129
|
if (typeof customSegmentLoader !== "function") {
|
|
112
130
|
return regularSegmentLoader(url, content, callbacks, loaderOptions, cancelSignal, checkMediaSegmentIntegrity);
|
|
113
131
|
}
|
|
@@ -126,18 +144,25 @@ var generateSegmentLoader = function (_a) {
|
|
|
126
144
|
cancelSignal.deregister(abortCustomLoader);
|
|
127
145
|
var isMP4 = isMP4EmbeddedTrack(content.representation);
|
|
128
146
|
if (!isMP4 || checkMediaSegmentIntegrity !== true) {
|
|
129
|
-
res({
|
|
130
|
-
|
|
147
|
+
res({
|
|
148
|
+
resultType: "segment-loaded",
|
|
149
|
+
resultData: {
|
|
150
|
+
responseData: _args.data,
|
|
131
151
|
size: _args.size,
|
|
132
|
-
requestDuration: _args.duration
|
|
152
|
+
requestDuration: _args.duration,
|
|
153
|
+
},
|
|
154
|
+
});
|
|
133
155
|
}
|
|
134
|
-
var dataU8 = _args.data instanceof Uint8Array ? _args.data :
|
|
135
|
-
new Uint8Array(_args.data);
|
|
156
|
+
var dataU8 = _args.data instanceof Uint8Array ? _args.data : new Uint8Array(_args.data);
|
|
136
157
|
checkISOBMFFIntegrity(dataU8, content.segment.isInit);
|
|
137
|
-
res({
|
|
138
|
-
|
|
158
|
+
res({
|
|
159
|
+
resultType: "segment-loaded",
|
|
160
|
+
resultData: {
|
|
161
|
+
responseData: dataU8,
|
|
139
162
|
size: _args.size,
|
|
140
|
-
requestDuration: _args.duration
|
|
163
|
+
requestDuration: _args.duration,
|
|
164
|
+
},
|
|
165
|
+
});
|
|
141
166
|
};
|
|
142
167
|
/**
|
|
143
168
|
* Callback triggered when the custom segment loader fails
|
|
@@ -161,9 +186,11 @@ var generateSegmentLoader = function (_a) {
|
|
|
161
186
|
if (hasFinished || cancelSignal.isCancelled()) {
|
|
162
187
|
return;
|
|
163
188
|
}
|
|
164
|
-
callbacks.onProgress({
|
|
189
|
+
callbacks.onProgress({
|
|
190
|
+
duration: _args.duration,
|
|
165
191
|
size: _args.size,
|
|
166
|
-
totalSize: _args.totalSize
|
|
192
|
+
totalSize: _args.totalSize,
|
|
193
|
+
});
|
|
167
194
|
};
|
|
168
195
|
var fallback = function () {
|
|
169
196
|
if (hasFinished || cancelSignal.isCancelled()) {
|
|
@@ -171,8 +198,7 @@ var generateSegmentLoader = function (_a) {
|
|
|
171
198
|
}
|
|
172
199
|
hasFinished = true;
|
|
173
200
|
cancelSignal.deregister(abortCustomLoader);
|
|
174
|
-
regularSegmentLoader(url, content, callbacks, loaderOptions, cancelSignal, checkMediaSegmentIntegrity)
|
|
175
|
-
.then(res, rej);
|
|
201
|
+
regularSegmentLoader(url, content, callbacks, loaderOptions, cancelSignal, checkMediaSegmentIntegrity).then(res, rej);
|
|
176
202
|
};
|
|
177
203
|
var customCallbacks = { reject: reject, resolve: resolve, fallback: fallback, progress: progress };
|
|
178
204
|
var abort = customSegmentLoader(args_1, customCallbacks);
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ISegment, Representation } from "../../manifest";
|
|
17
|
-
import { ICdnMetadata } from "../../parsers/manifest";
|
|
16
|
+
import type { ISegment, Representation } from "../../manifest";
|
|
17
|
+
import type { ICdnMetadata } from "../../parsers/manifest";
|
|
18
18
|
/**
|
|
19
19
|
* TODO Remove this logic completely from the player
|
|
20
20
|
* @param {Document} doc
|
|
@@ -75,12 +75,14 @@ function resolveManifest(url) {
|
|
|
75
75
|
* @returns {Boolean}
|
|
76
76
|
*/
|
|
77
77
|
function isMP4EmbeddedTrack(representation) {
|
|
78
|
-
return typeof representation.mimeType === "string" &&
|
|
79
|
-
representation.mimeType.indexOf("mp4") >= 0;
|
|
78
|
+
return (typeof representation.mimeType === "string" &&
|
|
79
|
+
representation.mimeType.indexOf("mp4") >= 0);
|
|
80
80
|
}
|
|
81
81
|
function constructSegmentUrl(wantedCdn, segment) {
|
|
82
|
-
return wantedCdn === null
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
return wantedCdn === null
|
|
83
|
+
? null
|
|
84
|
+
: segment.url === null
|
|
85
|
+
? wantedCdn.baseUrl
|
|
86
|
+
: resolveURL(wantedCdn.baseUrl, segment.url);
|
|
85
87
|
}
|
|
86
88
|
export { constructSegmentUrl, extractISML, extractToken, isMP4EmbeddedTrack, replaceToken, resolveManifest, };
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { IInbandEvent } from "../core/stream";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
16
|
+
import type { IInbandEvent } from "../core/stream";
|
|
17
|
+
import type { Adaptation, ISegment, ISupplementaryImageTrack, ISupplementaryTextTrack, Period, Representation } from "../manifest";
|
|
18
|
+
import type Manifest from "../manifest";
|
|
19
|
+
import type { ICdnMetadata } from "../parsers/manifest";
|
|
20
|
+
import type { IBifThumbnail, ILoadedManifestFormat, IManifestLoader, IRepresentationFilter, ISegmentLoader as ICustomSegmentLoader, IServerSyncInfos } from "../public_types";
|
|
21
|
+
import type { CancellationSignal } from "../utils/task_canceller";
|
|
22
|
+
import type TaskCanceller from "../utils/task_canceller";
|
|
21
23
|
/**
|
|
22
24
|
* Interface returned by any transport implementation.
|
|
23
25
|
* @param {Object} options - Options allowing to configure the transport's
|
|
@@ -230,20 +232,7 @@ content: ISegmentContext,
|
|
|
230
232
|
*
|
|
231
233
|
* This value can be useful when parsing the loaded segment's data.
|
|
232
234
|
*/
|
|
233
|
-
initTimescale: number | undefined) =>
|
|
234
|
-
/**
|
|
235
|
-
* The parsed data.
|
|
236
|
-
*
|
|
237
|
-
* Can be of two types:
|
|
238
|
-
* - `ISegmentParserParsedInitChunk`: When the parsed chunk was part of an
|
|
239
|
-
* initialization segment.
|
|
240
|
-
* Such segments only serve to initialize the decoder and do not contain
|
|
241
|
-
* any decodable media data.
|
|
242
|
-
* - `ISegmentParserParsedMediaChunk`: When the parsed chunk was part of a
|
|
243
|
-
* media segment.
|
|
244
|
-
* Such segments generally contain decodable media data.
|
|
245
|
-
*/
|
|
246
|
-
ISegmentParserParsedInitChunk<TParsedSegmentDataFormat> | ISegmentParserParsedMediaChunk<TParsedSegmentDataFormat>;
|
|
235
|
+
initTimescale: number | undefined) => ISegmentParserParsedInitChunk<TParsedSegmentDataFormat> | ISegmentParserParsedMediaChunk<TParsedSegmentDataFormat>;
|
|
247
236
|
export interface IManifestParserOptions {
|
|
248
237
|
/**
|
|
249
238
|
* If set, offset to add to `performance.now()` to obtain the current
|
|
@@ -377,7 +366,7 @@ export interface IImageTrackSegmentData {
|
|
|
377
366
|
timescale: number;
|
|
378
367
|
type: string;
|
|
379
368
|
}
|
|
380
|
-
export type IManifestParserRequest1 = (
|
|
369
|
+
export type IManifestParserRequest1 = (
|
|
381
370
|
/**
|
|
382
371
|
* Cancellation signal which will allow to cancel the request if the
|
|
383
372
|
* Manifest is not needed anymore.
|
|
@@ -386,7 +375,7 @@ export type IManifestParserRequest1 = ((
|
|
|
386
375
|
* HTTP request) and the Promise returned should reject immediately after with
|
|
387
376
|
* a `CancellationError`.
|
|
388
377
|
*/
|
|
389
|
-
cancelSignal: CancellationSignal) => Promise<IRequestedData<Document | string
|
|
378
|
+
cancelSignal: CancellationSignal) => Promise<IRequestedData<Document | string>>;
|
|
390
379
|
export type IManifestParserRequest = (
|
|
391
380
|
/**
|
|
392
381
|
* Cancellation signal which will allow to cancel the request if the
|
|
@@ -614,10 +603,7 @@ export interface ISegmentParserParsedMediaChunk<DataType> {
|
|
|
614
603
|
* before and after that time will be ignored).
|
|
615
604
|
* `undefined` when their is no such limitation.
|
|
616
605
|
*/
|
|
617
|
-
appendWindow: [
|
|
618
|
-
number | undefined,
|
|
619
|
-
number | undefined
|
|
620
|
-
];
|
|
606
|
+
appendWindow: [number | undefined, number | undefined];
|
|
621
607
|
/**
|
|
622
608
|
* If set and not empty, then "events" have been encountered in this parsed
|
|
623
609
|
* chunks.
|
|
@@ -20,6 +20,5 @@
|
|
|
20
20
|
*/
|
|
21
21
|
export default function byteRange(_a) {
|
|
22
22
|
var start = _a[0], end = _a[1];
|
|
23
|
-
return end === Infinity ? "bytes=".concat(start, "-") :
|
|
24
|
-
"bytes=".concat(start, "-").concat(end);
|
|
23
|
+
return end === Infinity ? "bytes=".concat(start, "-") : "bytes=".concat(start, "-").concat(end);
|
|
25
24
|
}
|