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,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 Period from "./period";
|
|
17
|
-
import { IUpdatedPeriodResult } from "./update_period_in_place";
|
|
16
|
+
import type Period from "./period";
|
|
17
|
+
import type { IUpdatedPeriodResult } from "./update_period_in_place";
|
|
18
18
|
/**
|
|
19
19
|
* Update old periods by adding new periods and removing
|
|
20
20
|
* not available ones.
|
|
@@ -118,8 +118,10 @@ export function updatePeriods(oldPeriods, newPeriods) {
|
|
|
118
118
|
}
|
|
119
119
|
// The first updated Period can only be a partial part
|
|
120
120
|
var updateRes = updatePeriodInPlace(oldPeriods[indexOfNewFirstPeriod], newPeriods[0], MANIFEST_UPDATE_TYPE.Partial);
|
|
121
|
-
res.updatedPeriods.push({
|
|
122
|
-
|
|
121
|
+
res.updatedPeriods.push({
|
|
122
|
+
period: oldPeriods[indexOfNewFirstPeriod],
|
|
123
|
+
result: updateRes,
|
|
124
|
+
});
|
|
123
125
|
// Search each consecutive elements of `newPeriods` - after the initial one already
|
|
124
126
|
// processed - in `oldPeriods`, removing and adding unfound Periods in the process
|
|
125
127
|
var prevIndexOfNewPeriod = indexOfNewFirstPeriod + 1;
|
|
@@ -132,7 +134,8 @@ export function updatePeriods(oldPeriods, newPeriods) {
|
|
|
132
134
|
break; // end the loop
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
|
-
if (indexOfNewPeriod < 0) {
|
|
137
|
+
if (indexOfNewPeriod < 0) {
|
|
138
|
+
// Next element of `newPeriods` not found: insert it
|
|
136
139
|
var toRemoveUntil = -1;
|
|
137
140
|
for (var j = prevIndexOfNewPeriod; j < oldPeriods.length; j++) {
|
|
138
141
|
if (newPeriod.start < oldPeriods[j].start) {
|
|
@@ -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 Adaptation from "./adaptation";
|
|
17
|
-
import Period from "./period";
|
|
18
|
-
import Representation from "./representation";
|
|
19
|
-
import { ISegment } from "./representation_index";
|
|
16
|
+
import type Adaptation from "./adaptation";
|
|
17
|
+
import type Period from "./period";
|
|
18
|
+
import type Representation from "./representation";
|
|
19
|
+
import type { ISegment } from "./representation_index";
|
|
20
20
|
/** All information needed to identify a given segment. */
|
|
21
21
|
export interface IBufferedChunkInfos {
|
|
22
22
|
adaptation: Adaptation;
|
|
@@ -34,9 +34,11 @@ export function getLoggableSegmentId(content) {
|
|
|
34
34
|
return "";
|
|
35
35
|
}
|
|
36
36
|
var period = content.period, adaptation = content.adaptation, representation = content.representation, segment = content.segment;
|
|
37
|
-
return "".concat(adaptation.type, " P: ").concat(period.id, " A: ").concat(adaptation.id, " ") +
|
|
37
|
+
return ("".concat(adaptation.type, " P: ").concat(period.id, " A: ").concat(adaptation.id, " ") +
|
|
38
38
|
"R: ".concat(representation.id, " S: ") +
|
|
39
|
-
(segment.isInit
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
(segment.isInit
|
|
40
|
+
? "init"
|
|
41
|
+
: segment.complete
|
|
42
|
+
? "".concat(segment.time, "-").concat(segment.duration)
|
|
43
|
+
: "".concat(segment.time)));
|
|
42
44
|
}
|
|
@@ -27,4 +27,4 @@ declare function createBox(name: string, buff: Uint8Array): Uint8Array;
|
|
|
27
27
|
* @returns {Uint8Array}
|
|
28
28
|
*/
|
|
29
29
|
declare function createBoxWithChildren(name: string, children: Uint8Array[]): Uint8Array;
|
|
30
|
-
export { createBox, createBoxWithChildren
|
|
30
|
+
export { createBox, createBoxWithChildren };
|
|
@@ -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 { concat, itobe4, itobe8
|
|
16
|
+
import { concat, itobe4, itobe8 } from "../../../utils/byte_parsing";
|
|
17
17
|
import { strToUtf8 } from "../../../utils/string_parsing";
|
|
18
18
|
import { MAX_32_BIT_INT } from "./constants";
|
|
19
19
|
/**
|
|
@@ -50,8 +50,9 @@ function boxName(str) {
|
|
|
50
50
|
*/
|
|
51
51
|
function createBox(name, buff) {
|
|
52
52
|
var len = buff.length + 8;
|
|
53
|
-
return len <= MAX_32_BIT_INT
|
|
54
|
-
concat(itobe4(
|
|
53
|
+
return len <= MAX_32_BIT_INT
|
|
54
|
+
? concat(itobe4(len), boxName(name), buff)
|
|
55
|
+
: concat(itobe4(1), boxName(name), itobe8(len + 8), buff);
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* @param {string} name
|
|
@@ -61,4 +62,4 @@ function createBox(name, buff) {
|
|
|
61
62
|
function createBoxWithChildren(name, children) {
|
|
62
63
|
return createBox(name, concat.apply(void 0, children));
|
|
63
64
|
}
|
|
64
|
-
export { createBox, createBoxWithChildren
|
|
65
|
+
export { createBox, createBoxWithChildren };
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { base64ToBytes } from "../../../../utils/base64";
|
|
17
17
|
import { le2toi } from "../../../../utils/byte_parsing";
|
|
18
|
-
import { bytesToHex, guidToUuid, utf16LEToStr
|
|
18
|
+
import { bytesToHex, guidToUuid, utf16LEToStr } from "../../../../utils/string_parsing";
|
|
19
19
|
/**
|
|
20
20
|
* Parse PlayReady privateData to get its Hexa-coded KeyID.
|
|
21
21
|
* @param {Uint8Array} privateData
|
|
@@ -29,8 +29,7 @@ export function getPlayReadyKIDFromPrivateData(data) {
|
|
|
29
29
|
if (kidElement === null) {
|
|
30
30
|
throw new Error("Cannot parse PlayReady private data: invalid XML");
|
|
31
31
|
}
|
|
32
|
-
var b64guidKid = kidElement.textContent === null ? "" :
|
|
33
|
-
kidElement.textContent;
|
|
32
|
+
var b64guidKid = kidElement.textContent === null ? "" : kidElement.textContent;
|
|
34
33
|
var uuidKid = guidToUuid(base64ToBytes(b64guidKid));
|
|
35
34
|
return bytesToHex(uuidKid).toLowerCase();
|
|
36
35
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import log from "../../../log";
|
|
17
17
|
import assert from "../../../utils/assert";
|
|
18
|
-
import { be4toi, be8toi
|
|
18
|
+
import { be4toi, be8toi } from "../../../utils/byte_parsing";
|
|
19
19
|
/**
|
|
20
20
|
* From a given buffer representing ISOBMFF data, browses inner boxes in
|
|
21
21
|
* `childNames`, each element being a child box of the one before it.
|
|
@@ -46,8 +46,7 @@ function getChildBox(buf, childNames) {
|
|
|
46
46
|
*/
|
|
47
47
|
function getBoxContent(buf, boxName) {
|
|
48
48
|
var offsets = getBoxOffsets(buf, boxName);
|
|
49
|
-
return offsets !== null ? buf.subarray(offsets[1], offsets[2]) :
|
|
50
|
-
null;
|
|
49
|
+
return offsets !== null ? buf.subarray(offsets[1], offsets[2]) : null;
|
|
51
50
|
}
|
|
52
51
|
/**
|
|
53
52
|
* Reads the whole ISOBMFF and returns the content of all boxes with the given
|
|
@@ -81,8 +80,7 @@ function getBoxesContent(buf, boxName) {
|
|
|
81
80
|
*/
|
|
82
81
|
function getBox(buf, boxName) {
|
|
83
82
|
var offsets = getBoxOffsets(buf, boxName);
|
|
84
|
-
return offsets !== null ? buf.subarray(offsets[0], offsets[2]) :
|
|
85
|
-
null;
|
|
83
|
+
return offsets !== null ? buf.subarray(offsets[0], offsets[2]) : null;
|
|
86
84
|
}
|
|
87
85
|
/**
|
|
88
86
|
* Returns byte offsets for the start of the box, the start of its content and
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import takePSSHOut, { getPsshSystemID } from "./take_pssh_out";
|
|
17
|
-
export { createBox, createBoxWithChildren
|
|
17
|
+
export { createBox, createBoxWithChildren } from "./create_box";
|
|
18
18
|
export { getBox, getBoxContent, getNextBoxOffsets, getBoxOffsets, getUuidContent, } from "./get_box";
|
|
19
|
-
export { getMDAT, getMDIA, getTRAF
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
19
|
+
export { getMDAT, getMDIA, getTRAF } from "./read";
|
|
20
|
+
export type { IEMSG, ISidxSegment } from "./utils";
|
|
21
|
+
export { getMDHDTimescale, getPlayReadyKIDFromPrivateData, getTrackFragmentDecodeTime, getDurationFromTrun, getSegmentsFromSidx, patchPssh, updateBoxLength, } from "./utils";
|
|
22
|
+
export { getPsshSystemID, takePSSHOut };
|
|
@@ -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 takePSSHOut, { getPsshSystemID
|
|
17
|
-
export { createBox, createBoxWithChildren
|
|
16
|
+
import takePSSHOut, { getPsshSystemID } from "./take_pssh_out";
|
|
17
|
+
export { createBox, createBoxWithChildren } from "./create_box";
|
|
18
18
|
export { getBox, getBoxContent, getNextBoxOffsets, getBoxOffsets, getUuidContent, } from "./get_box";
|
|
19
|
-
export { getMDAT, getMDIA, getTRAF
|
|
19
|
+
export { getMDAT, getMDIA, getTRAF } from "./read";
|
|
20
20
|
export { getMDHDTimescale, getPlayReadyKIDFromPrivateData, getTrackFragmentDecodeTime, getDurationFromTrun, getSegmentsFromSidx, patchPssh, updateBoxLength, } from "./utils";
|
|
21
|
-
export { getPsshSystemID, takePSSHOut
|
|
21
|
+
export { getPsshSystemID, takePSSHOut };
|
|
@@ -54,4 +54,4 @@ declare function getMDIA(buf: Uint8Array): Uint8Array | null;
|
|
|
54
54
|
* @returns {Uint8Array|null}
|
|
55
55
|
*/
|
|
56
56
|
declare function getEMSG(buffer: Uint8Array, offset?: number): Uint8Array | null;
|
|
57
|
-
export { getTRAF, getTRAFs, getMDAT, getMDIA, getEMSG
|
|
57
|
+
export { getTRAF, getTRAFs, getMDAT, getMDIA, getEMSG };
|
|
@@ -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 { getBoxContent, getBoxesContent
|
|
16
|
+
import { getBoxContent, getBoxesContent } from "./get_box";
|
|
17
17
|
/**
|
|
18
18
|
* Returns the content of the first "traf" box encountered in the given ISOBMFF
|
|
19
19
|
* data.
|
|
@@ -22,7 +22,7 @@ import { getBoxContent, getBoxesContent, } from "./get_box";
|
|
|
22
22
|
* @returns {Uint8Array|null}
|
|
23
23
|
*/
|
|
24
24
|
function getTRAF(buffer) {
|
|
25
|
-
var moof = getBoxContent(buffer,
|
|
25
|
+
var moof = getBoxContent(buffer, 0x6d6f6f66 /* moof */);
|
|
26
26
|
if (moof === null) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
@@ -37,7 +37,7 @@ function getTRAF(buffer) {
|
|
|
37
37
|
* @returns {Array.<Uint8Array>}
|
|
38
38
|
*/
|
|
39
39
|
function getTRAFs(buffer) {
|
|
40
|
-
var moofs = getBoxesContent(buffer,
|
|
40
|
+
var moofs = getBoxesContent(buffer, 0x6d6f6f66 /* moof */);
|
|
41
41
|
return moofs.reduce(function (acc, moof) {
|
|
42
42
|
var traf = getBoxContent(moof, 0x74726166 /* traf */);
|
|
43
43
|
if (traf !== null) {
|
|
@@ -54,7 +54,7 @@ function getTRAFs(buffer) {
|
|
|
54
54
|
* @returns {Uint8Array|null}
|
|
55
55
|
*/
|
|
56
56
|
function getMDAT(buf) {
|
|
57
|
-
return getBoxContent(buf,
|
|
57
|
+
return getBoxContent(buf, 0x6d646174 /* "mdat" */);
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Returns the content of the first "mdia" box encountered in the given ISOBMFF
|
|
@@ -64,15 +64,15 @@ function getMDAT(buf) {
|
|
|
64
64
|
* @returns {Uint8Array|null}
|
|
65
65
|
*/
|
|
66
66
|
function getMDIA(buf) {
|
|
67
|
-
var moov = getBoxContent(buf,
|
|
67
|
+
var moov = getBoxContent(buf, 0x6d6f6f76 /* moov */);
|
|
68
68
|
if (moov === null) {
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
|
-
var trak = getBoxContent(moov,
|
|
71
|
+
var trak = getBoxContent(moov, 0x7472616b /* "trak" */);
|
|
72
72
|
if (trak === null) {
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
|
-
return getBoxContent(trak,
|
|
75
|
+
return getBoxContent(trak, 0x6d646961 /* "mdia" */);
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Returns the content of the first "emsg" box encountered in the given ISOBMFF
|
|
@@ -83,6 +83,6 @@ function getMDIA(buf) {
|
|
|
83
83
|
*/
|
|
84
84
|
function getEMSG(buffer, offset) {
|
|
85
85
|
if (offset === void 0) { offset = 0; }
|
|
86
|
-
return getBoxContent(buffer.subarray(offset),
|
|
86
|
+
return getBoxContent(buffer.subarray(offset), 0x656d7367 /* emsg */);
|
|
87
87
|
}
|
|
88
|
-
export { getTRAF, getTRAFs, getMDAT, getMDIA, getEMSG
|
|
88
|
+
export { getTRAF, getTRAFs, getMDAT, getMDIA, getEMSG };
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import log from "../../../log";
|
|
17
17
|
import sliceUint8Array from "../../../utils/slice_uint8array";
|
|
18
18
|
import { bytesToHex } from "../../../utils/string_parsing";
|
|
19
|
-
import { getBoxContent, getBoxOffsets
|
|
19
|
+
import { getBoxContent, getBoxOffsets } from "./get_box";
|
|
20
20
|
/**
|
|
21
21
|
* Replace every PSSH box from an ISOBMFF segment by FREE boxes and returns the
|
|
22
22
|
* removed PSSH in an array.
|
|
@@ -28,7 +28,7 @@ import { getBoxContent, getBoxOffsets, } from "./get_box";
|
|
|
28
28
|
*/
|
|
29
29
|
export default function takePSSHOut(data) {
|
|
30
30
|
var i = 0;
|
|
31
|
-
var moov = getBoxContent(data,
|
|
31
|
+
var moov = getBoxContent(data, 0x6d6f6f76 /* moov */);
|
|
32
32
|
if (moov === null) {
|
|
33
33
|
return [];
|
|
34
34
|
}
|
|
@@ -73,8 +73,7 @@ export function getPsshSystemID(buff, initialDataOffset) {
|
|
|
73
73
|
log.warn("ISOBMFF: un-handled PSSH version");
|
|
74
74
|
return undefined;
|
|
75
75
|
}
|
|
76
|
-
var offset = initialDataOffset +
|
|
77
|
-
4; /* version + flags */
|
|
76
|
+
var offset = initialDataOffset + 4; /* version + flags */
|
|
78
77
|
if (offset + 16 > buff.length) {
|
|
79
78
|
return undefined;
|
|
80
79
|
}
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
import log from "../../../log";
|
|
17
17
|
import assert from "../../../utils/assert";
|
|
18
18
|
import { be2toi, be3toi, be4toi, be8toi, concat, itobe4, itobe8, } from "../../../utils/byte_parsing";
|
|
19
|
-
import { hexToBytes, readNullTerminatedString
|
|
19
|
+
import { hexToBytes, readNullTerminatedString } from "../../../utils/string_parsing";
|
|
20
20
|
import { MAX_32_BIT_INT } from "./constants";
|
|
21
21
|
import { createBox } from "./create_box";
|
|
22
22
|
import { getPlayReadyKIDFromPrivateData } from "./drm";
|
|
23
|
-
import { getBoxContent, getBoxOffsets, getChildBox
|
|
24
|
-
import { getEMSG, getMDIA, getTRAF, getTRAFs
|
|
23
|
+
import { getBoxContent, getBoxOffsets, getChildBox } from "./get_box";
|
|
24
|
+
import { getEMSG, getMDIA, getTRAF, getTRAFs } from "./read";
|
|
25
25
|
/**
|
|
26
26
|
* Parse the sidx part (segment index) of an ISOBMFF buffer and construct a
|
|
27
27
|
* corresponding Array of available segments.
|
|
@@ -79,7 +79,7 @@ function getSegmentsFromSidx(buf, sidxOffsetInWholeSegment) {
|
|
|
79
79
|
var refChunk = be4toi(buf, cursor);
|
|
80
80
|
cursor += 4;
|
|
81
81
|
var refType = (refChunk & 0x80000000) >>> 31;
|
|
82
|
-
var refSize =
|
|
82
|
+
var refSize = refChunk & 0x7fffffff;
|
|
83
83
|
// when set to 1 indicates that the reference is to a sidx, else to media
|
|
84
84
|
if (refType === 1) {
|
|
85
85
|
throw new Error("sidx with reference_type `1` not yet implemented");
|
|
@@ -118,9 +118,7 @@ function getTrackFragmentDecodeTime(buffer) {
|
|
|
118
118
|
return undefined;
|
|
119
119
|
}
|
|
120
120
|
var version = tfdt[0];
|
|
121
|
-
return version === 1 ? be8toi(tfdt, 4) :
|
|
122
|
-
version === 0 ? be4toi(tfdt, 4) :
|
|
123
|
-
undefined;
|
|
121
|
+
return version === 1 ? be8toi(tfdt, 4) : version === 0 ? be4toi(tfdt, 4) : undefined;
|
|
124
122
|
}
|
|
125
123
|
/**
|
|
126
124
|
* Returns the "default sample duration" which is the default value for duration
|
|
@@ -170,7 +168,7 @@ function getDurationFromTrun(buffer) {
|
|
|
170
168
|
var completeDuration = 0;
|
|
171
169
|
for (var _i = 0, trafs_1 = trafs; _i < trafs_1.length; _i++) {
|
|
172
170
|
var traf = trafs_1[_i];
|
|
173
|
-
var trun = getBoxContent(traf,
|
|
171
|
+
var trun = getBoxContent(traf, 0x7472756e /* trun */);
|
|
174
172
|
if (trun === null) {
|
|
175
173
|
return undefined;
|
|
176
174
|
}
|
|
@@ -240,16 +238,18 @@ function getMDHDTimescale(buffer) {
|
|
|
240
238
|
if (mdia === null) {
|
|
241
239
|
return undefined;
|
|
242
240
|
}
|
|
243
|
-
var mdhd = getBoxContent(mdia,
|
|
241
|
+
var mdhd = getBoxContent(mdia, 0x6d646864 /* "mdhd" */);
|
|
244
242
|
if (mdhd === null) {
|
|
245
243
|
return undefined;
|
|
246
244
|
}
|
|
247
245
|
var cursor = 0;
|
|
248
246
|
var version = mdhd[cursor];
|
|
249
247
|
cursor += 4;
|
|
250
|
-
return version === 1
|
|
251
|
-
|
|
252
|
-
|
|
248
|
+
return version === 1
|
|
249
|
+
? be4toi(mdhd, cursor + 16)
|
|
250
|
+
: version === 0
|
|
251
|
+
? be4toi(mdhd, cursor + 8)
|
|
252
|
+
: undefined;
|
|
253
253
|
}
|
|
254
254
|
/**
|
|
255
255
|
* Creates a PSSH box with the given systemId and data.
|
|
@@ -274,7 +274,7 @@ function patchPssh(buf, psshList) {
|
|
|
274
274
|
if (psshList == null || psshList.length === 0) {
|
|
275
275
|
return buf;
|
|
276
276
|
}
|
|
277
|
-
var moovOffsets = getBoxOffsets(buf,
|
|
277
|
+
var moovOffsets = getBoxOffsets(buf, 0x6d6f6f76 /* = "moov" */);
|
|
278
278
|
if (moovOffsets === null) {
|
|
279
279
|
return buf;
|
|
280
280
|
}
|
|
@@ -372,7 +372,15 @@ function parseEmsgBoxes(buffer) {
|
|
|
372
372
|
var id = be4toi(emsg, position);
|
|
373
373
|
position += 4; // skip id
|
|
374
374
|
var messageData = emsg.subarray(position, length_1);
|
|
375
|
-
var emsgData = {
|
|
375
|
+
var emsgData = {
|
|
376
|
+
schemeIdUri: schemeIdUri,
|
|
377
|
+
value: value,
|
|
378
|
+
timescale: timescale,
|
|
379
|
+
presentationTimeDelta: presentationTimeDelta,
|
|
380
|
+
eventDuration: eventDuration,
|
|
381
|
+
id: id,
|
|
382
|
+
messageData: messageData,
|
|
383
|
+
};
|
|
376
384
|
emsgs.push(emsgData);
|
|
377
385
|
}
|
|
378
386
|
}
|
|
@@ -386,46 +394,48 @@ function parseEmsgBoxes(buffer) {
|
|
|
386
394
|
* @returns {Uint8Array|null}
|
|
387
395
|
*/
|
|
388
396
|
function getKeyIdFromInitSegment(segment) {
|
|
389
|
-
var stsd = getChildBox(segment, [
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
0x7374626C /* stbl */,
|
|
394
|
-
0x73747364 /* stsd */]);
|
|
397
|
+
var stsd = getChildBox(segment, [
|
|
398
|
+
0x6d6f6f76 /* moov */, 0x7472616b /* trak */, 0x6d646961 /* mdia */,
|
|
399
|
+
0x6d696e66 /* minf */, 0x7374626c /* stbl */, 0x73747364 /* stsd */,
|
|
400
|
+
]);
|
|
395
401
|
if (stsd === null) {
|
|
396
402
|
return null;
|
|
397
403
|
}
|
|
398
404
|
var stsdSubBoxes = stsd.subarray(8);
|
|
399
|
-
var encBox = getBoxContent(stsdSubBoxes,
|
|
405
|
+
var encBox = getBoxContent(stsdSubBoxes, 0x656e6376 /* encv */);
|
|
400
406
|
var encContentOffset = 0;
|
|
401
407
|
if (encBox === null) {
|
|
402
|
-
encContentOffset =
|
|
403
|
-
8 + //
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
encContentOffset =
|
|
409
|
+
8 + // sample entry header
|
|
410
|
+
8 + // reserved
|
|
411
|
+
2 + // channelcount
|
|
412
|
+
2 + // samplesize
|
|
413
|
+
2 + // predefined
|
|
414
|
+
2 + // reserved
|
|
415
|
+
4; // samplerate
|
|
416
|
+
encBox = getBoxContent(stsdSubBoxes, 0x656e6361 /* enca */);
|
|
410
417
|
}
|
|
411
418
|
else {
|
|
412
|
-
encContentOffset =
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
419
|
+
encContentOffset =
|
|
420
|
+
8 + // sample entry header
|
|
421
|
+
2 +
|
|
422
|
+
2 +
|
|
423
|
+
12 + // predefined + reserved + predefined
|
|
424
|
+
2 +
|
|
425
|
+
2 + // width + height
|
|
426
|
+
4 +
|
|
427
|
+
4 + // horizresolution + vertresolution
|
|
428
|
+
4 + // reserved
|
|
429
|
+
2 + // frame_count
|
|
430
|
+
32 +
|
|
431
|
+
2 + // depth
|
|
432
|
+
2; // pre-defined;
|
|
421
433
|
}
|
|
422
434
|
if (encBox === null) {
|
|
423
435
|
// There's no encryption data here
|
|
424
436
|
return null;
|
|
425
437
|
}
|
|
426
|
-
var tenc = getChildBox(encBox.subarray(encContentOffset), [0x73696e66 /* sinf */,
|
|
427
|
-
0x73636869 /* schi */,
|
|
428
|
-
0x74656e63 /* tenc */]);
|
|
438
|
+
var tenc = getChildBox(encBox.subarray(encContentOffset), [0x73696e66 /* sinf */, 0x73636869 /* schi */, 0x74656e63 /* tenc */]);
|
|
429
439
|
if (tenc === null || tenc.byteLength < 24) {
|
|
430
440
|
return null;
|
|
431
441
|
}
|
|
@@ -13,4 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export { ICuesSegment
|
|
16
|
+
export type { ICuesSegment } from "./utils";
|
|
17
|
+
export { getSegmentsFromCues, getTimeCodeScale } from "./utils";
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import log from "../../../log";
|
|
17
17
|
var SEGMENT_ID = 0x18538067;
|
|
18
|
-
var INFO_ID =
|
|
19
|
-
var TIMECODESCALE_ID =
|
|
18
|
+
var INFO_ID = 0x1549a966;
|
|
19
|
+
var TIMECODESCALE_ID = 0x2ad7b1;
|
|
20
20
|
var DURATION_ID = 0x4489;
|
|
21
|
-
var CUES_ID =
|
|
22
|
-
var CUE_POINT_ID =
|
|
23
|
-
var CUE_TIME_ID =
|
|
24
|
-
var CUE_TRACK_POSITIONS_ID =
|
|
25
|
-
var CUE_CLUSTER_POSITIONS_ID =
|
|
21
|
+
var CUES_ID = 0x1c53bb6b;
|
|
22
|
+
var CUE_POINT_ID = 0xbb;
|
|
23
|
+
var CUE_TIME_ID = 0xb3;
|
|
24
|
+
var CUE_TRACK_POSITIONS_ID = 0xb7;
|
|
25
|
+
var CUE_CLUSTER_POSITIONS_ID = 0xf1;
|
|
26
26
|
/**
|
|
27
27
|
* Find the offsets of the value linked to the given element ID.
|
|
28
28
|
* @param {number} elementID - ID for the searched element.
|
|
@@ -57,7 +57,10 @@ function findNextElement(elementID, parents, buffer, _a) {
|
|
|
57
57
|
for (var i = 0; i < parents.length; i++) {
|
|
58
58
|
if (ebmlTagID === parents[i]) {
|
|
59
59
|
var newParents = parents.slice(i + 1, parents.length);
|
|
60
|
-
return findNextElement(elementID, newParents, buffer, [
|
|
60
|
+
return findNextElement(elementID, newParents, buffer, [
|
|
61
|
+
valueOffset,
|
|
62
|
+
valueEndOffset,
|
|
63
|
+
]);
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
}
|
|
@@ -105,7 +108,10 @@ function getDuration(buffer, initialOffset) {
|
|
|
105
108
|
* @returns {Array.<Object>|null}
|
|
106
109
|
*/
|
|
107
110
|
export function getSegmentsFromCues(buffer, initialOffset) {
|
|
108
|
-
var segmentRange = findNextElement(SEGMENT_ID, [], buffer, [
|
|
111
|
+
var segmentRange = findNextElement(SEGMENT_ID, [], buffer, [
|
|
112
|
+
initialOffset,
|
|
113
|
+
buffer.length,
|
|
114
|
+
]);
|
|
109
115
|
if (segmentRange == null) {
|
|
110
116
|
return null;
|
|
111
117
|
}
|
|
@@ -118,18 +124,27 @@ export function getSegmentsFromCues(buffer, initialOffset) {
|
|
|
118
124
|
if (duration == null) {
|
|
119
125
|
return null;
|
|
120
126
|
}
|
|
121
|
-
var cuesRange = findNextElement(CUES_ID, [], buffer, [
|
|
127
|
+
var cuesRange = findNextElement(CUES_ID, [], buffer, [
|
|
128
|
+
segmentRangeStart,
|
|
129
|
+
segmentRangeEnd,
|
|
130
|
+
]);
|
|
122
131
|
if (cuesRange == null) {
|
|
123
132
|
return null;
|
|
124
133
|
}
|
|
125
134
|
var rawInfos = [];
|
|
126
135
|
var currentOffset = cuesRange[0];
|
|
127
136
|
while (currentOffset < cuesRange[1]) {
|
|
128
|
-
var cuePointRange = findNextElement(CUE_POINT_ID, [], buffer, [
|
|
137
|
+
var cuePointRange = findNextElement(CUE_POINT_ID, [], buffer, [
|
|
138
|
+
currentOffset,
|
|
139
|
+
cuesRange[1],
|
|
140
|
+
]);
|
|
129
141
|
if (cuePointRange == null) {
|
|
130
142
|
break;
|
|
131
143
|
}
|
|
132
|
-
var cueTimeRange = findNextElement(CUE_TIME_ID, [], buffer, [
|
|
144
|
+
var cueTimeRange = findNextElement(CUE_TIME_ID, [], buffer, [
|
|
145
|
+
cuePointRange[0],
|
|
146
|
+
cuePointRange[1],
|
|
147
|
+
]);
|
|
133
148
|
if (cueTimeRange == null) {
|
|
134
149
|
return null;
|
|
135
150
|
}
|
|
@@ -150,8 +165,7 @@ export function getSegmentsFromCues(buffer, initialOffset) {
|
|
|
150
165
|
segments.push({
|
|
151
166
|
time: currentSegment.time,
|
|
152
167
|
timescale: timescale,
|
|
153
|
-
duration: i === 0 ? duration :
|
|
154
|
-
duration - currentSegment.time,
|
|
168
|
+
duration: i === 0 ? duration : duration - currentSegment.time,
|
|
155
169
|
range: [currentSegment.rangeStart, Infinity],
|
|
156
170
|
});
|
|
157
171
|
}
|
|
@@ -200,8 +214,7 @@ function getEBMLValue(buffer, offset) {
|
|
|
200
214
|
log.warn("webm: impossible length");
|
|
201
215
|
return null;
|
|
202
216
|
}
|
|
203
|
-
var value = (buffer[offset] & (1 << (8 - length)) - 1) *
|
|
204
|
-
Math.pow(2, (length - 1) * 8);
|
|
217
|
+
var value = (buffer[offset] & ((1 << (8 - length)) - 1)) * Math.pow(2, (length - 1) * 8);
|
|
205
218
|
for (var i = 1; i < length; i++) {
|
|
206
219
|
value = buffer[offset + i] * Math.pow(2, (length - i - 1) * 8) + value;
|
|
207
220
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* /!\ This file is feature-switchable.
|
|
18
18
|
* It always should be imported through the `features` object.
|
|
19
19
|
*/
|
|
20
|
-
import { le2toi, le4toi
|
|
20
|
+
import { le2toi, le4toi } from "../../utils/byte_parsing";
|
|
21
21
|
import { utf8ToStr } from "../../utils/string_parsing";
|
|
22
22
|
/**
|
|
23
23
|
* @param {UInt8Array} buf
|
|
@@ -77,12 +77,22 @@ function parseBif(buf) {
|
|
|
77
77
|
thumbs.push({ index: index, duration: duration, ts: ts, data: data });
|
|
78
78
|
index++;
|
|
79
79
|
}
|
|
80
|
-
if (currentImageTimestamp ===
|
|
80
|
+
if (currentImageTimestamp === 0xffffffff) {
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
83
|
-
previousImageInfo = { timestamp: currentImageTimestamp,
|
|
84
|
-
offset: currentImageOffset };
|
|
83
|
+
previousImageInfo = { timestamp: currentImageTimestamp, offset: currentImageOffset };
|
|
85
84
|
}
|
|
86
|
-
return {
|
|
85
|
+
return {
|
|
86
|
+
fileFormat: "BIF",
|
|
87
|
+
version: version,
|
|
88
|
+
imageCount: imageCount,
|
|
89
|
+
timescale: 1000,
|
|
90
|
+
format: format,
|
|
91
|
+
width: width,
|
|
92
|
+
height: height,
|
|
93
|
+
aspectRatio: aspectRatio,
|
|
94
|
+
isVod: isVod,
|
|
95
|
+
thumbs: thumbs,
|
|
96
|
+
};
|
|
87
97
|
}
|
|
88
98
|
export default parseBif;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { IParsedAdaptation, IParsedAdaptations } from "../../types";
|
|
16
|
+
import type { IParsedAdaptation, IParsedAdaptations } from "../../types";
|
|
17
17
|
/**
|
|
18
18
|
* Attach trick mode tracks to adaptations by assigning to the trickModeTracks
|
|
19
19
|
* property an array of trick mode track adaptations.
|
|
@@ -18,9 +18,7 @@ var supplementalCodecSeparator = /[, ]+/g;
|
|
|
18
18
|
*/
|
|
19
19
|
export function convertSupplementalCodecsToRFC6381(val) {
|
|
20
20
|
if (isNonEmptyString(val)) {
|
|
21
|
-
return val
|
|
22
|
-
.trim()
|
|
23
|
-
.replace(supplementalCodecSeparator, ", ");
|
|
21
|
+
return val.trim().replace(supplementalCodecSeparator, ", ");
|
|
24
22
|
}
|
|
25
23
|
return "";
|
|
26
24
|
}
|
|
@@ -49,7 +49,7 @@ export default function flattenOverlappingPeriods(parsedPeriods) {
|
|
|
49
49
|
var parsedPeriod = parsedPeriods[i];
|
|
50
50
|
var lastFlattenedPeriod = flattenedPeriods[flattenedPeriods.length - 1];
|
|
51
51
|
while (lastFlattenedPeriod.duration === undefined ||
|
|
52
|
-
|
|
52
|
+
lastFlattenedPeriod.start + lastFlattenedPeriod.duration > parsedPeriod.start) {
|
|
53
53
|
log.warn("DASH: Updating overlapping Periods.", lastFlattenedPeriod === null || lastFlattenedPeriod === void 0 ? void 0 : lastFlattenedPeriod.start, parsedPeriod.start);
|
|
54
54
|
lastFlattenedPeriod.duration = parsedPeriod.start - lastFlattenedPeriod.start;
|
|
55
55
|
lastFlattenedPeriod.end = parsedPeriod.start;
|