rx-player 4.0.0-dev.2023121900 → 4.0.0-rc.1
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/.eslintrc.js +2 -0
- package/.github/workflows/checks.yml +24 -47
- package/CHANGELOG.md +71 -118
- package/CONTRIBUTING.md +11 -0
- package/FILES.md +8 -6
- package/VERSION +1 -1
- package/dist/_esm5.processed/compat/browser_detection.d.ts +3 -1
- package/dist/_esm5.processed/compat/browser_detection.js +24 -4
- package/dist/_esm5.processed/compat/should_prevent_seeking_at_0_initially.d.ts +14 -0
- package/dist/_esm5.processed/compat/should_prevent_seeking_at_0_initially.js +17 -0
- package/dist/_esm5.processed/config.d.ts +1 -0
- package/dist/_esm5.processed/core/api/option_utils.d.ts +4 -0
- package/dist/_esm5.processed/core/api/option_utils.js +8 -3
- package/dist/_esm5.processed/core/api/public_api.d.ts +11 -1
- package/dist/_esm5.processed/core/api/public_api.js +36 -5
- package/dist/_esm5.processed/core/decrypt/attach_media_keys.d.ts +2 -1
- package/dist/_esm5.processed/core/decrypt/attach_media_keys.js +2 -1
- package/dist/_esm5.processed/core/decrypt/init_media_keys.js +13 -5
- package/dist/_esm5.processed/core/init/directfile_content_initializer.js +25 -8
- package/dist/_esm5.processed/core/init/media_source_content_initializer.js +4 -6
- package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.d.ts +13 -12
- package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.js +16 -17
- package/dist/_esm5.processed/core/init/utils/get_initial_time.d.ts +17 -3
- package/dist/_esm5.processed/core/init/utils/get_initial_time.js +9 -7
- package/dist/_esm5.processed/core/init/utils/get_loaded_reference.js +7 -5
- package/dist/_esm5.processed/core/init/utils/initial_seek_and_play.d.ts +2 -1
- package/dist/_esm5.processed/core/init/utils/initial_seek_and_play.js +59 -6
- package/dist/_esm5.processed/core/segment_buffers/implementations/types.d.ts +6 -1
- package/dist/_esm5.processed/core/segment_buffers/implementations/types.js +7 -2
- package/dist/_esm5.processed/core/segment_buffers/inventory/segment_inventory.d.ts +6 -1
- package/dist/_esm5.processed/core/segment_buffers/inventory/segment_inventory.js +8 -2
- package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.js +16 -11
- package/dist/_esm5.processed/core/stream/representation/utils/get_buffer_status.js +5 -4
- package/dist/_esm5.processed/default_config.d.ts +7 -0
- package/dist/_esm5.processed/default_config.js +16 -0
- package/dist/_esm5.processed/manifest/manifest.js +8 -4
- package/dist/_esm5.processed/manifest/period.d.ts +3 -1
- package/dist/_esm5.processed/manifest/period.js +16 -3
- package/dist/_esm5.processed/manifest/representation_index/static.d.ts +1 -1
- package/dist/_esm5.processed/manifest/representation_index/static.js +2 -2
- package/dist/_esm5.processed/manifest/representation_index/types.d.ts +4 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.d.ts +6 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.js +4 -3
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_segments_from_timeline.d.ts +5 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +15 -4
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/index.d.ts +5 -5
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.js +2 -2
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.d.ts +12 -11
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.js +43 -34
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/index.d.ts +2 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +99 -6
- package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +247 -51
- package/dist/_esm5.processed/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts +40 -17
- package/dist/_esm5.processed/parsers/manifest/dash/common/manifest_bounds_calculator.js +38 -18
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.js +13 -11
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.js +27 -14
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.js +16 -17
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.d.ts +19 -8
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.js +21 -8
- package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.js +7 -3
- package/dist/_esm5.processed/parsers/manifest/local/representation_index.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/local/representation_index.js +3 -3
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.d.ts +1 -1
- package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.js +2 -2
- package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.d.ts +5 -5
- package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.js +25 -9
- package/dist/_esm5.processed/parsers/manifest/utils/index_helpers.js +1 -1
- package/dist/_esm5.processed/public_types.d.ts +12 -2
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts +3 -0
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +6 -0
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts +3 -0
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +6 -0
- package/dist/commonjs/__GENERATED_CODE/index.d.ts +2 -0
- package/dist/commonjs/__GENERATED_CODE/index.js +7 -0
- package/dist/commonjs/compat/browser_compatibility_types.js +1 -1
- package/dist/commonjs/compat/browser_detection.d.ts +3 -1
- package/dist/commonjs/compat/browser_detection.js +27 -6
- package/dist/commonjs/compat/eme/custom_media_keys/moz_media_keys_constructor.js +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/ms_media_keys_constructor.js +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/old_webkit_media_keys.js +1 -2
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +1 -1
- package/dist/commonjs/compat/eme/eme-api-implementation.js +4 -3
- package/dist/commonjs/compat/event_listeners.js +1 -1
- package/dist/commonjs/compat/has_mse_in_worker.d.ts +2 -0
- package/dist/commonjs/compat/has_mse_in_worker.js +6 -0
- package/dist/commonjs/compat/has_webassembly.d.ts +6 -0
- package/dist/commonjs/compat/has_webassembly.js +9 -0
- package/dist/commonjs/compat/index.d.ts +1 -2
- package/dist/commonjs/compat/index.js +1 -3
- package/dist/commonjs/compat/is_codec_supported.js +5 -0
- package/dist/commonjs/compat/is_vtt_cue.js +1 -1
- package/dist/commonjs/compat/make_vtt_cue.js +1 -1
- package/dist/commonjs/compat/on_height_width_change.js +1 -1
- package/dist/commonjs/compat/patch_webkit_source_buffer.js +2 -2
- package/dist/commonjs/config.d.ts +6 -17
- package/dist/commonjs/config.js +4 -12
- package/dist/commonjs/core/adaptive/adaptive_representation_selector.d.ts +2 -1
- package/dist/commonjs/core/adaptive/adaptive_representation_selector.js +1 -1
- package/dist/commonjs/core/api/debug/buffer_graph.js +3 -3
- package/dist/commonjs/core/api/debug/modules/general_info.js +23 -11
- package/dist/commonjs/core/api/debug/modules/segment_buffer_content.js +5 -4
- package/dist/commonjs/core/api/option_utils.d.ts +3 -2
- package/dist/commonjs/core/api/option_utils.js +14 -4
- package/dist/commonjs/core/api/playback_observer.d.ts +55 -24
- package/dist/commonjs/core/api/playback_observer.js +105 -72
- package/dist/commonjs/core/api/public_api.d.ts +35 -12
- package/dist/commonjs/core/api/public_api.js +321 -154
- package/dist/commonjs/core/api/track_management/track_dispatcher.d.ts +12 -8
- package/dist/commonjs/core/api/track_management/track_dispatcher.js +28 -22
- package/dist/commonjs/core/api/track_management/tracks_store.d.ts +26 -14
- package/dist/commonjs/core/api/track_management/tracks_store.js +134 -66
- package/dist/commonjs/core/decrypt/attach_media_keys.d.ts +2 -1
- package/dist/commonjs/core/decrypt/attach_media_keys.js +2 -1
- package/dist/commonjs/core/decrypt/content_decryptor.js +70 -181
- package/dist/commonjs/core/decrypt/init_media_keys.js +13 -5
- package/dist/commonjs/core/decrypt/types.d.ts +11 -5
- package/dist/commonjs/core/decrypt/utils/check_key_statuses.js +4 -4
- package/dist/{es2017/utils → commonjs/core/fetchers/segment}/initialization_segment_cache.d.ts +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.js +2 -2
- package/dist/commonjs/core/fetchers/utils/error_selector.js +2 -1
- package/dist/commonjs/core/fetchers/utils/schedule_request.js +2 -1
- package/dist/commonjs/core/init/directfile_content_initializer.js +8 -3
- package/dist/commonjs/core/init/media_source_content_initializer.d.ts +7 -22
- package/dist/commonjs/core/init/media_source_content_initializer.js +313 -115
- package/dist/commonjs/core/init/multithread/main_thread/multi_thread_content_initializer.d.ts +167 -0
- package/dist/commonjs/core/init/multithread/main_thread/multi_thread_content_initializer.js +1389 -0
- package/dist/commonjs/core/init/multithread/main_thread/send_message.d.ts +2 -0
- package/dist/commonjs/core/init/multithread/main_thread/send_message.js +13 -0
- package/dist/commonjs/core/init/multithread/worker/content_preparer.d.ts +92 -0
- package/dist/commonjs/core/init/multithread/worker/content_preparer.js +259 -0
- package/dist/commonjs/core/init/multithread/worker/globals.d.ts +13 -0
- package/dist/commonjs/core/init/multithread/worker/globals.js +26 -0
- package/dist/commonjs/core/init/multithread/worker/index.d.ts +2 -0
- package/dist/commonjs/core/init/multithread/worker/index.js +4 -0
- package/dist/commonjs/core/init/multithread/worker/send_message.d.ts +3 -0
- package/dist/commonjs/core/init/multithread/worker/send_message.js +25 -0
- package/dist/commonjs/core/init/multithread/worker/track_choice_setter.d.ts +19 -0
- package/dist/commonjs/core/init/multithread/worker/track_choice_setter.js +140 -0
- package/dist/commonjs/core/init/multithread/worker/worker_playback_observer.d.ts +21 -0
- package/dist/commonjs/core/init/multithread/worker/worker_playback_observer.js +47 -0
- package/dist/commonjs/core/init/multithread/worker/worker_portal.d.ts +1 -0
- package/dist/commonjs/core/init/multithread/worker/worker_portal.js +721 -0
- package/dist/commonjs/core/init/multithread/worker/worker_text_displayer_interface.d.ts +64 -0
- package/dist/commonjs/core/init/multithread/worker/worker_text_displayer_interface.js +127 -0
- package/dist/commonjs/core/init/types.d.ts +21 -12
- package/dist/commonjs/core/init/types.js +0 -1
- package/dist/commonjs/core/init/utils/DecipherabilityFreezeDetector.d.ts +54 -0
- package/dist/commonjs/core/init/utils/DecipherabilityFreezeDetector.js +129 -0
- package/dist/commonjs/core/init/utils/create_content_time_boundaries_observer.d.ts +28 -0
- package/dist/commonjs/core/init/utils/create_content_time_boundaries_observer.js +48 -0
- package/dist/commonjs/core/init/utils/create_core_playback_observer.d.ts +61 -0
- package/dist/commonjs/core/init/utils/create_core_playback_observer.js +130 -0
- package/dist/commonjs/core/init/utils/create_media_source.d.ts +3 -3
- package/dist/commonjs/core/init/utils/create_media_source.js +29 -38
- package/dist/commonjs/core/init/utils/get_initial_time.d.ts +2 -2
- package/dist/commonjs/core/init/utils/get_initial_time.js +6 -5
- package/dist/commonjs/core/init/utils/get_loaded_reference.js +7 -5
- package/dist/commonjs/core/init/utils/initial_seek_and_play.js +55 -6
- package/dist/commonjs/core/init/utils/initialize_content_decryption.d.ts +7 -1
- package/dist/commonjs/core/init/utils/initialize_content_decryption.js +6 -0
- package/dist/commonjs/core/init/utils/main_thread_text_displayer_interface.d.ts +35 -0
- package/dist/commonjs/core/init/utils/main_thread_text_displayer_interface.js +54 -0
- package/dist/commonjs/core/init/utils/rebuffering_controller.d.ts +5 -38
- package/dist/commonjs/core/init/utils/rebuffering_controller.js +3 -112
- package/dist/commonjs/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts +2 -2
- package/dist/commonjs/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +24 -1
- package/dist/commonjs/core/init/utils/stream_events_emitter/stream_events_emitter.d.ts +3 -2
- package/dist/commonjs/core/init/utils/stream_events_emitter/stream_events_emitter.js +4 -4
- package/dist/commonjs/core/segment_buffers/garbage_collector.d.ts +3 -1
- package/dist/commonjs/core/segment_buffers/garbage_collector.js +13 -4
- package/dist/commonjs/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.d.ts +26 -74
- package/dist/commonjs/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.js +183 -297
- package/dist/commonjs/core/segment_buffers/implementations/index.d.ts +2 -1
- package/dist/commonjs/core/segment_buffers/implementations/text/index.d.ts +3 -0
- package/dist/commonjs/core/segment_buffers/implementations/text/index.js +4 -0
- package/dist/commonjs/core/segment_buffers/implementations/text/text_segment_buffer.d.ts +89 -0
- package/dist/commonjs/core/segment_buffers/implementations/text/text_segment_buffer.js +253 -0
- package/dist/commonjs/core/segment_buffers/implementations/types.d.ts +46 -57
- package/dist/commonjs/core/segment_buffers/implementations/types.js +22 -29
- package/dist/commonjs/core/segment_buffers/index.d.ts +3 -3
- package/dist/commonjs/core/segment_buffers/inventory/segment_inventory.d.ts +23 -9
- package/dist/commonjs/core/segment_buffers/inventory/segment_inventory.js +53 -22
- package/dist/commonjs/core/segment_buffers/segment_buffers_store.d.ts +7 -16
- package/dist/commonjs/core/segment_buffers/segment_buffers_store.js +14 -24
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +15 -8
- package/dist/commonjs/core/stream/adaptation/get_representations_switch_strategy.d.ts +19 -5
- package/dist/commonjs/core/stream/adaptation/get_representations_switch_strategy.js +62 -57
- package/dist/commonjs/core/stream/adaptation/types.d.ts +17 -28
- package/dist/commonjs/core/stream/index.d.ts +2 -1
- package/dist/commonjs/core/stream/orchestrator/get_time_ranges_for_content.d.ts +4 -4
- package/dist/commonjs/core/stream/orchestrator/get_time_ranges_for_content.js +1 -2
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.js +11 -2
- package/dist/commonjs/core/stream/period/period_stream.js +55 -21
- package/dist/commonjs/core/stream/period/types.d.ts +11 -4
- package/dist/commonjs/core/stream/period/utils/get_adaptation_switch_strategy.js +75 -72
- package/dist/commonjs/core/stream/representation/representation_stream.js +4 -4
- package/dist/commonjs/core/stream/representation/types.d.ts +30 -3
- package/dist/commonjs/core/stream/representation/utils/append_segment_to_buffer.d.ts +5 -2
- package/dist/commonjs/core/stream/representation/utils/append_segment_to_buffer.js +36 -19
- package/dist/commonjs/core/stream/representation/utils/get_buffer_status.d.ts +2 -2
- package/dist/commonjs/core/stream/representation/utils/get_buffer_status.js +22 -12
- package/dist/commonjs/core/stream/representation/utils/get_needed_segments.d.ts +2 -2
- package/dist/commonjs/core/stream/representation/utils/get_needed_segments.js +2 -6
- package/dist/commonjs/core/stream/representation/utils/push_init_segment.d.ts +3 -1
- package/dist/commonjs/core/stream/representation/utils/push_init_segment.js +3 -4
- package/dist/commonjs/core/stream/representation/utils/push_media_segment.d.ts +3 -1
- package/dist/commonjs/core/stream/representation/utils/push_media_segment.js +3 -4
- package/dist/commonjs/default_config.d.ts +31 -34
- package/dist/commonjs/default_config.js +44 -47
- package/dist/commonjs/errors/encrypted_media_error.d.ts +17 -0
- package/dist/commonjs/errors/encrypted_media_error.js +13 -0
- package/dist/commonjs/errors/error_codes.d.ts +4 -3
- package/dist/commonjs/errors/error_codes.js +3 -8
- package/dist/commonjs/errors/index.d.ts +7 -8
- package/dist/commonjs/errors/index.js +3 -5
- package/dist/commonjs/errors/media_error.d.ts +21 -18
- package/dist/commonjs/errors/media_error.js +15 -19
- package/dist/commonjs/errors/network_error.d.ts +15 -1
- package/dist/commonjs/errors/network_error.js +12 -0
- package/dist/commonjs/errors/other_error.d.ts +14 -0
- package/dist/commonjs/errors/other_error.js +12 -0
- package/dist/commonjs/errors/source_buffer_error.d.ts +40 -0
- package/dist/commonjs/errors/source_buffer_error.js +62 -0
- package/dist/commonjs/experimental/features/index.d.ts +1 -2
- package/dist/commonjs/experimental/features/index.js +3 -5
- package/dist/commonjs/experimental/features/local.js +3 -1
- package/dist/commonjs/experimental/features/metaplaylist.js +3 -1
- package/dist/commonjs/experimental/features/multi_thread.d.ts +8 -0
- package/dist/commonjs/experimental/features/multi_thread.js +14 -0
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/load_and_push_segment.d.ts +3 -3
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/load_and_push_segment.js +13 -14
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +3 -3
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +24 -17
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +3 -5
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +4 -5
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +17 -12
- package/dist/commonjs/experimental/tools/index.d.ts +1 -2
- package/dist/commonjs/experimental/tools/index.js +1 -3
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/index.d.ts +2 -0
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +4 -4
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +1 -1
- package/dist/commonjs/features/features_object.js +5 -3
- package/dist/commonjs/features/list/dash.js +3 -1
- package/dist/commonjs/{experimental/features → features/list}/dash_wasm.js +3 -1
- package/dist/commonjs/features/list/html_sami_parser.js +4 -4
- package/dist/commonjs/features/list/html_srt_parser.js +4 -4
- package/dist/commonjs/features/list/html_text_buffer.js +2 -2
- package/dist/commonjs/features/list/html_ttml_parser.js +4 -4
- package/dist/commonjs/features/list/html_vtt_parser.js +4 -4
- package/dist/commonjs/features/list/index.d.ts +3 -0
- package/dist/commonjs/features/list/index.js +7 -1
- package/dist/commonjs/features/list/media_source_main.d.ts +8 -0
- package/dist/commonjs/features/list/media_source_main.js +14 -0
- package/dist/commonjs/features/list/native_sami_parser.js +4 -5
- package/dist/commonjs/features/list/native_srt_parser.js +4 -5
- package/dist/commonjs/features/list/native_text_buffer.js +2 -3
- package/dist/commonjs/features/list/native_ttml_parser.js +4 -5
- package/dist/commonjs/features/list/native_vtt_parser.js +4 -5
- package/dist/commonjs/features/list/smooth.d.ts +1 -1
- package/dist/commonjs/features/list/smooth.js +7 -3
- package/dist/commonjs/features/types.d.ts +28 -5
- package/dist/commonjs/manifest/adaptation.d.ts +66 -44
- package/dist/commonjs/manifest/adaptation.js +96 -78
- package/dist/commonjs/manifest/index.d.ts +4 -3
- package/dist/commonjs/manifest/index.js +16 -1
- package/dist/commonjs/manifest/manifest.d.ts +132 -9
- package/dist/commonjs/manifest/manifest.js +114 -72
- package/dist/commonjs/manifest/period.d.ts +41 -3
- package/dist/commonjs/manifest/period.js +120 -24
- package/dist/commonjs/manifest/representation.d.ts +61 -74
- package/dist/commonjs/manifest/representation.js +125 -45
- package/dist/commonjs/manifest/types.d.ts +382 -0
- package/dist/commonjs/manifest/types.js +0 -15
- package/dist/commonjs/manifest/update_period_in_place.d.ts +12 -9
- package/dist/commonjs/manifest/update_period_in_place.js +10 -6
- package/dist/commonjs/manifest/update_periods.d.ts +7 -4
- package/dist/commonjs/manifest/update_periods.js +53 -14
- package/dist/commonjs/manifest/utils.d.ts +156 -0
- package/dist/commonjs/manifest/utils.js +689 -1
- package/dist/commonjs/minimal.d.ts +3 -0
- package/dist/commonjs/minimal.js +6 -0
- package/dist/commonjs/mse/index.d.ts +1 -0
- package/dist/commonjs/mse/index.js +2 -0
- package/dist/commonjs/mse/main_codec_support_prober.d.ts +26 -0
- package/dist/commonjs/mse/main_codec_support_prober.js +44 -0
- package/dist/commonjs/mse/main_media_source_interface.d.ts +112 -0
- package/dist/commonjs/mse/main_media_source_interface.js +504 -0
- package/dist/commonjs/mse/types.d.ts +301 -0
- package/dist/commonjs/mse/types.js +2 -0
- package/dist/commonjs/mse/worker_codec_support_prober.d.ts +42 -0
- package/dist/commonjs/mse/worker_codec_support_prober.js +61 -0
- package/dist/commonjs/mse/worker_media_source_interface.d.ts +105 -0
- package/dist/commonjs/mse/worker_media_source_interface.js +368 -0
- package/dist/commonjs/multithread_types.d.ts +781 -0
- package/dist/commonjs/multithread_types.js +7 -0
- package/dist/commonjs/parsers/manifest/dash/common/parse_periods.js +14 -16
- package/dist/commonjs/parsers/manifest/dash/js-parser/parse_from_document.js +2 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +22 -7
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/types.d.ts +55 -55
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.js +13 -1
- package/dist/commonjs/parsers/manifest/smooth/parse_protection_node.js +1 -1
- package/dist/commonjs/parsers/manifest/types.d.ts +8 -1
- package/dist/commonjs/public_types.d.ts +66 -21
- package/dist/commonjs/public_types.js +3 -13
- package/dist/commonjs/{core/segment_buffers/implementations/text/html/parsers.d.ts → text_displayer/html/html_parsers.d.ts} +0 -15
- package/dist/commonjs/{core/segment_buffers/implementations/text/html/parsers.js → text_displayer/html/html_parsers.js} +2 -17
- package/dist/commonjs/text_displayer/html/html_text_displayer.d.ts +100 -0
- package/dist/commonjs/{core/segment_buffers/implementations/text/html/html_text_segment_buffer.js → text_displayer/html/html_text_displayer.js} +96 -186
- package/dist/commonjs/text_displayer/html/index.d.ts +2 -0
- package/dist/commonjs/text_displayer/html/index.js +4 -0
- package/dist/commonjs/{core/segment_buffers/implementations/text → text_displayer}/html/text_track_cues_store.d.ts +4 -18
- package/dist/commonjs/{core/segment_buffers/implementations/text → text_displayer}/html/text_track_cues_store.js +6 -18
- package/dist/commonjs/text_displayer/html/update_proportional_elements.d.ts +15 -0
- package/dist/commonjs/{core/segment_buffers/implementations/text → text_displayer}/html/update_proportional_elements.js +0 -15
- package/dist/{es2017/core/segment_buffers/implementations/text → commonjs/text_displayer}/html/utils.d.ts +10 -16
- package/dist/commonjs/{core/segment_buffers/implementations/text → text_displayer}/html/utils.js +1 -17
- package/dist/commonjs/text_displayer/index.d.ts +2 -0
- package/dist/commonjs/text_displayer/index.js +2 -0
- package/dist/commonjs/text_displayer/manual_time_ranges.d.ts +14 -0
- package/dist/commonjs/text_displayer/manual_time_ranges.js +52 -0
- package/dist/commonjs/text_displayer/native/index.d.ts +2 -0
- package/dist/commonjs/text_displayer/native/index.js +4 -0
- package/dist/commonjs/text_displayer/native/native_parsers.d.ts +11 -0
- package/dist/commonjs/{core/segment_buffers/implementations/text/native/parsers.js → text_displayer/native/native_parsers.js} +2 -17
- package/dist/commonjs/text_displayer/native/native_text_displayer.d.ts +56 -0
- package/dist/commonjs/text_displayer/native/native_text_displayer.js +207 -0
- package/dist/commonjs/text_displayer/types.d.ts +74 -0
- package/dist/commonjs/text_displayer/types.js +2 -0
- package/dist/commonjs/tools/TextTrackRenderer/text_track_renderer.d.ts +1 -1
- package/dist/commonjs/tools/TextTrackRenderer/text_track_renderer.js +11 -15
- package/dist/commonjs/tools/index.d.ts +2 -1
- package/dist/commonjs/tools/index.js +3 -1
- package/dist/commonjs/{experimental/tools → tools}/parseBIFThumbnails/index.js +1 -1
- package/dist/commonjs/transports/dash/extract_complete_chunks.d.ts +1 -1
- package/dist/commonjs/transports/dash/extract_complete_chunks.js +35 -6
- package/dist/commonjs/transports/dash/get_events_out_of_emsgs.js +0 -1
- package/dist/commonjs/transports/dash/low_latency_segment_loader.js +2 -2
- package/dist/commonjs/transports/utils/generate_manifest_loader.js +2 -2
- package/dist/commonjs/utils/assert.d.ts +41 -0
- package/dist/commonjs/utils/assert.js +69 -3
- package/dist/commonjs/utils/event_emitter.js +8 -2
- package/dist/commonjs/utils/languages/ISO_639-1_to_ISO_639-3.js +182 -182
- package/dist/commonjs/utils/languages/ISO_639-2_to_ISO_639-3.js +19 -19
- package/dist/commonjs/utils/logger.d.ts +13 -3
- package/dist/commonjs/utils/logger.js +78 -21
- package/dist/commonjs/utils/monotonic_timestamp.d.ts +20 -4
- package/dist/commonjs/utils/monotonic_timestamp.js +22 -5
- package/dist/commonjs/utils/object_assign.d.ts +26 -5
- package/dist/commonjs/utils/object_assign.js +14 -3
- package/dist/commonjs/utils/request/fetch.js +8 -8
- package/dist/commonjs/utils/request/index.d.ts +2 -1
- package/dist/commonjs/utils/request/index.js +4 -1
- package/dist/{es2017/errors → commonjs/utils/request}/request_error.d.ts +12 -3
- package/dist/commonjs/{errors → utils/request}/request_error.js +11 -0
- package/dist/commonjs/utils/request/xhr.d.ts +4 -4
- package/dist/commonjs/utils/request/xhr.js +7 -7
- package/dist/commonjs/utils/retry_promise_with_backoff.d.ts +1 -2
- package/dist/commonjs/utils/string_parsing.js +1 -1
- package/dist/commonjs/utils/sync_or_async.d.ts +70 -0
- package/dist/commonjs/utils/sync_or_async.js +47 -0
- package/dist/commonjs/worker_entry_point.d.ts +5 -0
- package/dist/commonjs/worker_entry_point.js +8 -0
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts +3 -0
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +3 -0
- package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts +3 -0
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +3 -0
- package/dist/es2017/__GENERATED_CODE/index.d.ts +2 -0
- package/dist/es2017/__GENERATED_CODE/index.js +2 -0
- package/dist/es2017/compat/browser_compatibility_types.js +1 -1
- package/dist/es2017/compat/browser_detection.d.ts +3 -1
- package/dist/es2017/compat/browser_detection.js +26 -6
- package/dist/es2017/compat/eme/custom_media_keys/moz_media_keys_constructor.js +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/ms_media_keys_constructor.js +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.d.ts +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/old_webkit_media_keys.js +1 -2
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys_constructor.js +1 -1
- package/dist/es2017/compat/eme/eme-api-implementation.js +4 -3
- package/dist/es2017/compat/event_listeners.js +1 -1
- package/dist/es2017/compat/has_mse_in_worker.d.ts +2 -0
- package/dist/es2017/compat/has_mse_in_worker.js +4 -0
- package/dist/es2017/compat/has_webassembly.d.ts +6 -0
- package/dist/es2017/compat/has_webassembly.js +7 -0
- package/dist/es2017/compat/index.d.ts +1 -2
- package/dist/es2017/compat/index.js +1 -2
- package/dist/es2017/compat/is_codec_supported.js +5 -0
- package/dist/es2017/compat/is_vtt_cue.js +1 -1
- package/dist/es2017/compat/make_vtt_cue.js +1 -1
- package/dist/es2017/compat/on_height_width_change.js +1 -1
- package/dist/es2017/compat/patch_webkit_source_buffer.js +2 -2
- package/dist/es2017/config.d.ts +6 -17
- package/dist/es2017/config.js +4 -12
- package/dist/es2017/core/adaptive/adaptive_representation_selector.d.ts +2 -1
- package/dist/es2017/core/adaptive/adaptive_representation_selector.js +2 -2
- package/dist/es2017/core/api/debug/buffer_graph.js +3 -3
- package/dist/es2017/core/api/debug/modules/general_info.js +20 -8
- package/dist/es2017/core/api/debug/modules/segment_buffer_content.js +5 -4
- package/dist/es2017/core/api/option_utils.d.ts +3 -2
- package/dist/es2017/core/api/option_utils.js +15 -4
- package/dist/es2017/core/api/playback_observer.d.ts +55 -24
- package/dist/es2017/core/api/playback_observer.js +103 -75
- package/dist/es2017/core/api/public_api.d.ts +35 -12
- package/dist/es2017/core/api/public_api.js +323 -143
- package/dist/es2017/core/api/track_management/track_dispatcher.d.ts +12 -8
- package/dist/es2017/core/api/track_management/track_dispatcher.js +30 -23
- package/dist/es2017/core/api/track_management/tracks_store.d.ts +26 -14
- package/dist/es2017/core/api/track_management/tracks_store.js +95 -58
- package/dist/es2017/core/decrypt/attach_media_keys.d.ts +2 -1
- package/dist/es2017/core/decrypt/attach_media_keys.js +2 -1
- package/dist/es2017/core/decrypt/content_decryptor.js +35 -89
- package/dist/es2017/core/decrypt/init_media_keys.js +11 -1
- package/dist/es2017/core/decrypt/types.d.ts +11 -5
- package/dist/es2017/core/decrypt/utils/check_key_statuses.js +1 -1
- package/dist/{commonjs/utils → es2017/core/fetchers/segment}/initialization_segment_cache.d.ts +1 -1
- package/dist/es2017/core/fetchers/segment/segment_fetcher.js +2 -2
- package/dist/es2017/core/fetchers/utils/error_selector.js +2 -1
- package/dist/es2017/core/fetchers/utils/schedule_request.js +2 -1
- package/dist/es2017/core/init/directfile_content_initializer.js +8 -3
- package/dist/es2017/core/init/media_source_content_initializer.d.ts +7 -22
- package/dist/es2017/core/init/media_source_content_initializer.js +214 -106
- package/dist/es2017/core/init/multithread/main_thread/multi_thread_content_initializer.d.ts +167 -0
- package/dist/es2017/core/init/multithread/main_thread/multi_thread_content_initializer.js +1313 -0
- package/dist/es2017/core/init/multithread/main_thread/send_message.d.ts +2 -0
- package/dist/es2017/core/init/multithread/main_thread/send_message.js +10 -0
- package/dist/es2017/core/init/multithread/worker/content_preparer.d.ts +92 -0
- package/dist/es2017/core/init/multithread/worker/content_preparer.js +236 -0
- package/dist/es2017/core/init/multithread/worker/globals.d.ts +13 -0
- package/dist/es2017/core/init/multithread/worker/globals.js +18 -0
- package/dist/es2017/core/init/multithread/worker/index.d.ts +2 -0
- package/dist/es2017/core/init/multithread/worker/index.js +2 -0
- package/dist/es2017/core/init/multithread/worker/send_message.d.ts +3 -0
- package/dist/es2017/core/init/multithread/worker/send_message.js +20 -0
- package/dist/es2017/core/init/multithread/worker/track_choice_setter.d.ts +19 -0
- package/dist/es2017/core/init/multithread/worker/track_choice_setter.js +114 -0
- package/dist/es2017/core/init/multithread/worker/worker_playback_observer.d.ts +21 -0
- package/dist/es2017/core/init/multithread/worker/worker_playback_observer.js +43 -0
- package/dist/es2017/core/init/multithread/worker/worker_portal.d.ts +1 -0
- package/dist/es2017/core/init/multithread/worker/worker_portal.js +665 -0
- package/dist/es2017/core/init/multithread/worker/worker_text_displayer_interface.d.ts +64 -0
- package/dist/es2017/core/init/multithread/worker/worker_text_displayer_interface.js +121 -0
- package/dist/es2017/core/init/types.d.ts +21 -12
- package/dist/es2017/core/init/types.js +0 -1
- package/dist/es2017/core/init/utils/DecipherabilityFreezeDetector.d.ts +54 -0
- package/dist/es2017/core/init/utils/DecipherabilityFreezeDetector.js +93 -0
- package/dist/es2017/core/init/utils/create_content_time_boundaries_observer.d.ts +28 -0
- package/dist/es2017/core/init/utils/create_content_time_boundaries_observer.js +41 -0
- package/dist/es2017/core/init/utils/create_core_playback_observer.d.ts +61 -0
- package/dist/es2017/core/init/utils/create_core_playback_observer.js +122 -0
- package/dist/es2017/core/init/utils/create_media_source.d.ts +3 -3
- package/dist/es2017/core/init/utils/create_media_source.js +28 -37
- package/dist/es2017/core/init/utils/get_initial_time.d.ts +2 -2
- package/dist/es2017/core/init/utils/get_initial_time.js +6 -5
- package/dist/es2017/core/init/utils/get_loaded_reference.js +7 -5
- package/dist/es2017/core/init/utils/initial_seek_and_play.js +55 -6
- package/dist/es2017/core/init/utils/initialize_content_decryption.d.ts +7 -1
- package/dist/es2017/core/init/utils/initialize_content_decryption.js +6 -0
- package/dist/es2017/core/init/utils/main_thread_text_displayer_interface.d.ts +35 -0
- package/dist/es2017/core/init/utils/main_thread_text_displayer_interface.js +50 -0
- package/dist/es2017/core/init/utils/rebuffering_controller.d.ts +5 -38
- package/dist/es2017/core/init/utils/rebuffering_controller.js +3 -80
- package/dist/es2017/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts +2 -2
- package/dist/es2017/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +24 -1
- package/dist/es2017/core/init/utils/stream_events_emitter/stream_events_emitter.d.ts +3 -2
- package/dist/es2017/core/init/utils/stream_events_emitter/stream_events_emitter.js +4 -4
- package/dist/es2017/core/segment_buffers/garbage_collector.d.ts +3 -1
- package/dist/es2017/core/segment_buffers/garbage_collector.js +14 -5
- package/dist/es2017/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.d.ts +26 -74
- package/dist/es2017/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.js +111 -294
- package/dist/es2017/core/segment_buffers/implementations/index.d.ts +2 -1
- package/dist/es2017/core/segment_buffers/implementations/index.js +1 -1
- package/dist/es2017/core/segment_buffers/implementations/text/index.d.ts +3 -0
- package/dist/es2017/core/segment_buffers/implementations/text/index.js +2 -0
- package/dist/es2017/core/segment_buffers/implementations/text/text_segment_buffer.d.ts +89 -0
- package/dist/es2017/core/segment_buffers/implementations/text/text_segment_buffer.js +152 -0
- package/dist/es2017/core/segment_buffers/implementations/types.d.ts +46 -57
- package/dist/es2017/core/segment_buffers/implementations/types.js +22 -29
- package/dist/es2017/core/segment_buffers/index.d.ts +3 -3
- package/dist/es2017/core/segment_buffers/inventory/segment_inventory.d.ts +23 -9
- package/dist/es2017/core/segment_buffers/inventory/segment_inventory.js +53 -21
- package/dist/es2017/core/segment_buffers/segment_buffers_store.d.ts +7 -16
- package/dist/es2017/core/segment_buffers/segment_buffers_store.js +14 -23
- package/dist/es2017/core/stream/adaptation/adaptation_stream.js +14 -7
- package/dist/es2017/core/stream/adaptation/get_representations_switch_strategy.d.ts +19 -5
- package/dist/es2017/core/stream/adaptation/get_representations_switch_strategy.js +33 -60
- package/dist/es2017/core/stream/adaptation/types.d.ts +17 -28
- package/dist/es2017/core/stream/index.d.ts +2 -1
- package/dist/es2017/core/stream/orchestrator/get_time_ranges_for_content.d.ts +4 -4
- package/dist/es2017/core/stream/orchestrator/get_time_ranges_for_content.js +1 -2
- package/dist/es2017/core/stream/orchestrator/stream_orchestrator.js +11 -2
- package/dist/es2017/core/stream/period/period_stream.js +55 -21
- package/dist/es2017/core/stream/period/types.d.ts +11 -4
- package/dist/es2017/core/stream/period/utils/get_adaptation_switch_strategy.js +44 -73
- package/dist/es2017/core/stream/representation/representation_stream.js +4 -2
- package/dist/es2017/core/stream/representation/types.d.ts +30 -3
- package/dist/es2017/core/stream/representation/utils/append_segment_to_buffer.d.ts +5 -2
- package/dist/es2017/core/stream/representation/utils/append_segment_to_buffer.js +28 -11
- package/dist/es2017/core/stream/representation/utils/get_buffer_status.d.ts +2 -2
- package/dist/es2017/core/stream/representation/utils/get_buffer_status.js +22 -12
- package/dist/es2017/core/stream/representation/utils/get_needed_segments.d.ts +2 -2
- package/dist/es2017/core/stream/representation/utils/get_needed_segments.js +2 -6
- package/dist/es2017/core/stream/representation/utils/push_init_segment.d.ts +3 -1
- package/dist/es2017/core/stream/representation/utils/push_init_segment.js +2 -3
- package/dist/es2017/core/stream/representation/utils/push_media_segment.d.ts +3 -1
- package/dist/es2017/core/stream/representation/utils/push_media_segment.js +2 -3
- package/dist/es2017/default_config.d.ts +31 -34
- package/dist/es2017/default_config.js +44 -47
- package/dist/es2017/errors/encrypted_media_error.d.ts +17 -0
- package/dist/es2017/errors/encrypted_media_error.js +13 -0
- package/dist/es2017/errors/error_codes.d.ts +4 -3
- package/dist/es2017/errors/error_codes.js +3 -7
- package/dist/es2017/errors/index.d.ts +7 -8
- package/dist/es2017/errors/index.js +2 -3
- package/dist/es2017/errors/media_error.d.ts +21 -18
- package/dist/es2017/errors/media_error.js +15 -19
- package/dist/es2017/errors/network_error.d.ts +15 -1
- package/dist/es2017/errors/network_error.js +12 -0
- package/dist/es2017/errors/other_error.d.ts +14 -0
- package/dist/es2017/errors/other_error.js +12 -0
- package/dist/es2017/errors/source_buffer_error.d.ts +40 -0
- package/dist/es2017/errors/source_buffer_error.js +41 -0
- package/dist/es2017/experimental/features/index.d.ts +1 -2
- package/dist/es2017/experimental/features/index.js +1 -2
- package/dist/es2017/experimental/features/local.js +3 -1
- package/dist/es2017/experimental/features/metaplaylist.js +3 -1
- package/dist/es2017/experimental/features/multi_thread.d.ts +8 -0
- package/dist/es2017/experimental/features/multi_thread.js +11 -0
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/load_and_push_segment.d.ts +3 -3
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/load_and_push_segment.js +11 -15
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts +3 -3
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +25 -18
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.d.ts +3 -5
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.js +4 -5
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +17 -12
- package/dist/es2017/experimental/tools/index.d.ts +1 -2
- package/dist/es2017/experimental/tools/index.js +1 -2
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/index.d.ts +2 -0
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +4 -4
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +1 -1
- package/dist/es2017/features/features_object.js +5 -3
- package/dist/es2017/features/list/dash.js +3 -1
- package/dist/es2017/{experimental/features → features/list}/dash_wasm.js +3 -1
- package/dist/es2017/features/list/html_sami_parser.js +2 -2
- package/dist/es2017/features/list/html_srt_parser.js +2 -2
- package/dist/es2017/features/list/html_text_buffer.js +2 -2
- package/dist/es2017/features/list/html_ttml_parser.js +2 -2
- package/dist/es2017/features/list/html_vtt_parser.js +2 -2
- package/dist/es2017/features/list/index.d.ts +3 -0
- package/dist/es2017/features/list/index.js +3 -0
- package/dist/es2017/features/list/media_source_main.d.ts +8 -0
- package/dist/es2017/features/list/media_source_main.js +11 -0
- package/dist/es2017/features/list/native_sami_parser.js +2 -3
- package/dist/es2017/features/list/native_srt_parser.js +2 -3
- package/dist/es2017/features/list/native_text_buffer.js +2 -3
- package/dist/es2017/features/list/native_ttml_parser.js +2 -3
- package/dist/es2017/features/list/native_vtt_parser.js +2 -3
- package/dist/es2017/features/list/smooth.d.ts +1 -1
- package/dist/es2017/features/list/smooth.js +7 -3
- package/dist/es2017/features/types.d.ts +28 -5
- package/dist/es2017/manifest/adaptation.d.ts +66 -44
- package/dist/es2017/manifest/adaptation.js +60 -79
- package/dist/es2017/manifest/index.d.ts +4 -3
- package/dist/es2017/manifest/index.js +2 -2
- package/dist/es2017/manifest/manifest.d.ts +132 -9
- package/dist/es2017/manifest/manifest.js +73 -53
- package/dist/es2017/manifest/period.d.ts +41 -3
- package/dist/es2017/manifest/period.js +87 -24
- package/dist/es2017/manifest/representation.d.ts +61 -74
- package/dist/es2017/manifest/representation.js +111 -55
- package/dist/es2017/manifest/types.d.ts +382 -0
- package/dist/es2017/manifest/types.js +0 -15
- package/dist/es2017/manifest/update_period_in_place.d.ts +12 -9
- package/dist/es2017/manifest/update_period_in_place.js +11 -7
- package/dist/es2017/manifest/update_periods.d.ts +7 -4
- package/dist/es2017/manifest/update_periods.js +54 -15
- package/dist/es2017/manifest/utils.d.ts +156 -0
- package/dist/es2017/manifest/utils.js +470 -0
- package/dist/es2017/minimal.d.ts +3 -0
- package/dist/es2017/minimal.js +6 -0
- package/dist/es2017/mse/index.d.ts +1 -0
- package/dist/es2017/mse/index.js +1 -0
- package/dist/es2017/mse/main_codec_support_prober.d.ts +26 -0
- package/dist/es2017/mse/main_codec_support_prober.js +41 -0
- package/dist/es2017/mse/main_media_source_interface.d.ts +112 -0
- package/dist/es2017/mse/main_media_source_interface.js +406 -0
- package/dist/es2017/mse/types.d.ts +301 -0
- package/dist/es2017/mse/types.js +1 -0
- package/dist/es2017/mse/worker_codec_support_prober.d.ts +42 -0
- package/dist/es2017/mse/worker_codec_support_prober.js +58 -0
- package/dist/es2017/mse/worker_media_source_interface.d.ts +105 -0
- package/dist/es2017/mse/worker_media_source_interface.js +303 -0
- package/dist/es2017/multithread_types.d.ts +781 -0
- package/dist/es2017/multithread_types.js +6 -0
- package/dist/es2017/parsers/manifest/dash/common/parse_periods.js +15 -16
- package/dist/es2017/parsers/manifest/dash/js-parser/parse_from_document.js +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +21 -5
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/types.d.ts +55 -55
- package/dist/es2017/parsers/manifest/metaplaylist/metaplaylist_parser.js +13 -1
- package/dist/es2017/parsers/manifest/smooth/parse_protection_node.js +1 -1
- package/dist/es2017/parsers/manifest/types.d.ts +8 -1
- package/dist/es2017/public_types.d.ts +66 -21
- package/dist/es2017/public_types.js +3 -13
- package/dist/es2017/{core/segment_buffers/implementations/text/html/parsers.d.ts → text_displayer/html/html_parsers.d.ts} +0 -15
- package/dist/es2017/{core/segment_buffers/implementations/text/html/parsers.js → text_displayer/html/html_parsers.js} +2 -17
- package/dist/es2017/text_displayer/html/html_text_displayer.d.ts +100 -0
- package/dist/es2017/{core/segment_buffers/implementations/text/html/html_text_segment_buffer.js → text_displayer/html/html_text_displayer.js} +81 -153
- package/dist/es2017/text_displayer/html/index.d.ts +2 -0
- package/dist/es2017/text_displayer/html/index.js +2 -0
- package/dist/es2017/{core/segment_buffers/implementations/text → text_displayer}/html/text_track_cues_store.d.ts +4 -18
- package/dist/es2017/{core/segment_buffers/implementations/text → text_displayer}/html/text_track_cues_store.js +6 -18
- package/dist/es2017/text_displayer/html/update_proportional_elements.d.ts +15 -0
- package/dist/es2017/{core/segment_buffers/implementations/text → text_displayer}/html/update_proportional_elements.js +0 -15
- package/dist/{commonjs/core/segment_buffers/implementations/text → es2017/text_displayer}/html/utils.d.ts +10 -16
- package/dist/es2017/{core/segment_buffers/implementations/text → text_displayer}/html/utils.js +1 -17
- package/dist/es2017/text_displayer/index.d.ts +2 -0
- package/dist/es2017/text_displayer/index.js +1 -0
- package/dist/es2017/text_displayer/manual_time_ranges.d.ts +14 -0
- package/dist/es2017/text_displayer/manual_time_ranges.js +48 -0
- package/dist/es2017/text_displayer/native/index.d.ts +2 -0
- package/dist/es2017/text_displayer/native/index.js +2 -0
- package/dist/es2017/text_displayer/native/native_parsers.d.ts +11 -0
- package/dist/es2017/{core/segment_buffers/implementations/text/native/parsers.js → text_displayer/native/native_parsers.js} +2 -17
- package/dist/es2017/text_displayer/native/native_text_displayer.d.ts +56 -0
- package/dist/es2017/text_displayer/native/native_text_displayer.js +203 -0
- package/dist/es2017/text_displayer/types.d.ts +74 -0
- package/dist/es2017/text_displayer/types.js +1 -0
- package/dist/es2017/tools/TextTrackRenderer/text_track_renderer.d.ts +1 -1
- package/dist/es2017/tools/TextTrackRenderer/text_track_renderer.js +12 -17
- package/dist/es2017/tools/index.d.ts +2 -1
- package/dist/es2017/tools/index.js +4 -2
- package/dist/es2017/{experimental/tools → tools}/parseBIFThumbnails/index.js +1 -1
- package/dist/es2017/transports/dash/extract_complete_chunks.d.ts +1 -1
- package/dist/es2017/transports/dash/extract_complete_chunks.js +11 -7
- package/dist/es2017/transports/dash/get_events_out_of_emsgs.js +0 -1
- package/dist/es2017/transports/dash/low_latency_segment_loader.js +2 -2
- package/dist/es2017/transports/utils/generate_manifest_loader.js +1 -1
- package/dist/es2017/utils/assert.d.ts +41 -0
- package/dist/es2017/utils/assert.js +47 -1
- package/dist/es2017/utils/event_emitter.js +8 -2
- package/dist/es2017/utils/languages/ISO_639-1_to_ISO_639-3.js +182 -182
- package/dist/es2017/utils/languages/ISO_639-2_to_ISO_639-3.js +19 -19
- package/dist/es2017/utils/logger.d.ts +13 -3
- package/dist/es2017/utils/logger.js +30 -14
- package/dist/es2017/utils/monotonic_timestamp.d.ts +20 -4
- package/dist/es2017/utils/monotonic_timestamp.js +21 -5
- package/dist/es2017/utils/object_assign.d.ts +26 -5
- package/dist/es2017/utils/object_assign.js +14 -3
- package/dist/es2017/utils/request/fetch.js +7 -7
- package/dist/es2017/utils/request/index.d.ts +2 -1
- package/dist/es2017/utils/request/index.js +2 -1
- package/dist/{commonjs/errors → es2017/utils/request}/request_error.d.ts +12 -3
- package/dist/es2017/{errors → utils/request}/request_error.js +10 -0
- package/dist/es2017/utils/request/xhr.d.ts +4 -4
- package/dist/es2017/utils/request/xhr.js +7 -7
- package/dist/es2017/utils/retry_promise_with_backoff.d.ts +1 -2
- package/dist/es2017/utils/string_parsing.js +1 -1
- package/dist/es2017/utils/sync_or_async.d.ts +70 -0
- package/dist/es2017/utils/sync_or_async.js +45 -0
- package/dist/es2017/worker_entry_point.d.ts +5 -0
- package/dist/es2017/worker_entry_point.js +6 -0
- package/dist/mpd-parser.wasm +0 -0
- package/dist/rx-player.js +28189 -26269
- package/dist/rx-player.min.js +1 -1
- package/dist/worker.js +3 -0
- package/package.json +88 -84
- package/scripts/build_demo.mjs +31 -2
- package/scripts/bundle_worker.mjs +143 -0
- package/scripts/generate_build.mjs +185 -0
- package/scripts/generate_embeds.mjs +145 -0
- package/scripts/make-dev-releases +41 -16
- package/scripts/update-version +4 -4
- package/scripts/wasm-optimize.mjs +63 -0
- package/scripts/wasm-strip.mjs +6 -0
- package/sonar-project.properties +1 -1
- package/src/README.md +8 -1
- package/src/TODO_README.md +231 -0
- package/src/__GENERATED_CODE/embedded_dash_wasm.ts +3 -0
- package/src/__GENERATED_CODE/embedded_worker.ts +3 -0
- package/src/__GENERATED_CODE/index.ts +2 -0
- package/src/compat/README.md +7 -0
- package/src/compat/__tests__/browser_compatibility_types.test.ts +9 -9
- package/src/compat/__tests__/is_vtt_cue.test.ts +1 -1
- package/src/compat/__tests__/make_vtt_cue.test.ts +1 -1
- package/src/compat/__tests__/patch_webkit_source_buffer.test.ts +1 -1
- package/src/compat/__tests__/should_favour_custom_safari_EME.test.ts +1 -1
- package/src/compat/browser_compatibility_types.ts +1 -1
- package/src/compat/browser_detection.ts +23 -3
- package/src/compat/eme/custom_media_keys/moz_media_keys_constructor.ts +1 -1
- package/src/compat/eme/custom_media_keys/ms_media_keys_constructor.ts +1 -1
- package/src/compat/eme/custom_media_keys/old_webkit_media_keys.ts +4 -3
- package/src/compat/eme/custom_media_keys/webkit_media_keys_constructor.ts +1 -1
- package/src/compat/eme/eme-api-implementation.ts +3 -3
- package/src/compat/event_listeners.ts +1 -1
- package/src/compat/has_mse_in_worker.ts +5 -0
- package/src/compat/has_webassembly.ts +7 -0
- package/src/compat/index.ts +0 -2
- package/src/compat/is_codec_supported.ts +5 -0
- package/src/compat/is_vtt_cue.ts +1 -1
- package/src/compat/make_vtt_cue.ts +1 -1
- package/src/compat/on_height_width_change.ts +1 -1
- package/src/compat/patch_webkit_source_buffer.ts +2 -2
- package/src/config.ts +4 -12
- package/src/core/README.md +7 -0
- package/src/core/adaptive/README.md +11 -0
- package/src/core/adaptive/adaptive_representation_selector.ts +4 -4
- package/src/core/api/README.md +7 -0
- package/src/core/api/__tests__/option_utils.test.ts +8 -0
- package/src/core/api/__tests__/public_api.test.ts +13 -25
- package/src/core/api/debug/modules/general_info.ts +13 -3
- package/src/core/api/debug/modules/segment_buffer_content.ts +11 -10
- package/src/core/api/option_utils.ts +20 -7
- package/src/core/api/playback_observer.ts +193 -116
- package/src/core/api/public_api.ts +398 -181
- package/src/core/api/track_management/README.md +7 -0
- package/src/core/api/track_management/track_dispatcher.ts +48 -36
- package/src/core/api/track_management/tracks_store.ts +162 -100
- package/src/core/decrypt/README.md +8 -0
- package/src/core/decrypt/attach_media_keys.ts +5 -2
- package/src/core/decrypt/content_decryptor.ts +40 -117
- package/src/core/decrypt/init_media_keys.ts +10 -1
- package/src/core/decrypt/types.ts +17 -8
- package/src/core/decrypt/utils/check_key_statuses.ts +1 -1
- package/src/core/fetchers/README.md +11 -0
- package/src/{utils → core/fetchers/segment}/__tests__/initialization_segment_cache.test.ts +1 -1
- package/src/{utils → core/fetchers/segment}/initialization_segment_cache.ts +1 -1
- package/src/core/fetchers/segment/segment_fetcher.ts +2 -3
- package/src/core/fetchers/utils/error_selector.ts +1 -1
- package/src/core/fetchers/utils/schedule_request.ts +1 -1
- package/src/core/init/README.md +15 -0
- package/src/core/init/directfile_content_initializer.ts +7 -8
- package/src/core/init/media_source_content_initializer.ts +275 -145
- package/src/core/init/multithread/main_thread/multi_thread_content_initializer.ts +1832 -0
- package/src/core/init/multithread/main_thread/send_message.ts +15 -0
- package/src/core/init/multithread/worker/content_preparer.ts +392 -0
- package/src/core/init/multithread/worker/globals.ts +36 -0
- package/src/core/init/multithread/worker/index.ts +2 -0
- package/src/core/init/multithread/worker/send_message.ts +29 -0
- package/src/core/init/multithread/worker/track_choice_setter.ts +166 -0
- package/src/core/init/multithread/worker/worker_playback_observer.ts +79 -0
- package/src/core/init/multithread/worker/worker_portal.ts +859 -0
- package/src/core/init/multithread/worker/worker_text_displayer_interface.ts +162 -0
- package/src/core/init/types.ts +25 -15
- package/src/core/init/utils/DecipherabilityFreezeDetector.ts +133 -0
- package/src/core/init/utils/create_content_time_boundaries_observer.ts +71 -0
- package/src/core/init/utils/create_core_playback_observer.ts +199 -0
- package/src/core/init/utils/create_media_source.ts +31 -49
- package/src/core/init/utils/get_initial_time.ts +12 -7
- package/src/core/init/utils/get_loaded_reference.ts +7 -5
- package/src/core/init/utils/initial_seek_and_play.ts +59 -11
- package/src/core/init/utils/initialize_content_decryption.ts +19 -2
- package/src/core/init/utils/main_thread_text_displayer_interface.ts +59 -0
- package/src/core/init/utils/rebuffering_controller.ts +12 -120
- package/src/core/init/utils/stream_events_emitter/refresh_scheduled_events_list.ts +27 -3
- package/src/core/init/utils/stream_events_emitter/stream_events_emitter.ts +8 -8
- package/src/core/segment_buffers/README.md +11 -0
- package/src/core/segment_buffers/garbage_collector.ts +15 -5
- package/src/core/segment_buffers/implementations/audio_video/audio_video_segment_buffer.ts +145 -427
- package/src/core/segment_buffers/implementations/index.ts +5 -1
- package/src/core/segment_buffers/implementations/text/index.ts +6 -0
- package/src/core/segment_buffers/implementations/text/text_segment_buffer.ts +249 -0
- package/src/core/segment_buffers/implementations/types.ts +50 -69
- package/src/core/segment_buffers/index.ts +8 -11
- package/src/core/segment_buffers/inventory/segment_inventory.ts +89 -23
- package/src/core/segment_buffers/segment_buffers_store.ts +29 -39
- package/src/core/stream/README.md +10 -0
- package/src/core/stream/adaptation/adaptation_stream.ts +19 -7
- package/src/core/stream/adaptation/get_representations_switch_strategy.ts +56 -80
- package/src/core/stream/adaptation/types.ts +18 -29
- package/src/core/stream/index.ts +2 -0
- package/src/core/stream/orchestrator/README.md +10 -0
- package/src/core/stream/orchestrator/get_time_ranges_for_content.ts +7 -8
- package/src/core/stream/orchestrator/stream_orchestrator.ts +12 -2
- package/src/core/stream/period/period_stream.ts +58 -30
- package/src/core/stream/period/types.ts +10 -4
- package/src/core/stream/period/utils/get_adaptation_switch_strategy.ts +46 -90
- package/src/core/stream/representation/README.md +10 -0
- package/src/core/stream/representation/representation_stream.ts +4 -2
- package/src/core/stream/representation/types.ts +31 -3
- package/src/core/stream/representation/utils/append_segment_to_buffer.ts +34 -16
- package/src/core/stream/representation/utils/get_buffer_status.ts +31 -16
- package/src/core/stream/representation/utils/get_needed_segments.ts +6 -12
- package/src/core/stream/representation/utils/push_init_segment.ts +8 -5
- package/src/core/stream/representation/utils/push_media_segment.ts +8 -5
- package/src/default_config.ts +36 -40
- package/src/errors/README.md +11 -0
- package/src/errors/__tests__/is_known_error.test.ts +1 -7
- package/src/errors/__tests__/network_error.test.ts +1 -1
- package/src/errors/encrypted_media_error.ts +25 -0
- package/src/errors/error_codes.ts +5 -13
- package/src/errors/index.ts +20 -9
- package/src/errors/media_error.ts +32 -50
- package/src/errors/network_error.ts +25 -1
- package/src/errors/other_error.ts +21 -0
- package/src/errors/source_buffer_error.ts +63 -0
- package/src/experimental/features/__tests__/index.test.ts +0 -6
- package/src/experimental/features/__tests__/local.test.ts +6 -2
- package/src/experimental/features/__tests__/metaplaylist.test.ts +6 -2
- package/src/experimental/features/__tests__/multi_thread.test.ts +18 -0
- package/src/experimental/features/index.ts +1 -2
- package/src/experimental/features/local.ts +3 -1
- package/src/experimental/features/metaplaylist.ts +3 -1
- package/src/experimental/features/multi_thread.ts +16 -0
- package/src/experimental/tools/VideoThumbnailLoader/load_and_push_segment.ts +13 -19
- package/src/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.ts +29 -20
- package/src/experimental/tools/VideoThumbnailLoader/remove_buffer_around_time.ts +7 -12
- package/src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.ts +23 -21
- package/src/experimental/tools/index.ts +0 -2
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaDisplayInfos.test.ts +1 -1
- package/src/experimental/tools/mediaCapabilitiesProber/index.ts +2 -0
- package/src/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.ts +4 -4
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.ts +1 -1
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.ts +1 -1
- package/src/features/features_object.ts +5 -3
- package/src/features/list/__tests__/dash.test.ts +7 -3
- package/src/features/list/__tests__/html_sami_parser.test.ts +3 -3
- package/src/features/list/__tests__/html_srt_parser.test.ts +2 -3
- package/src/features/list/__tests__/html_text_buffer.test.ts +3 -4
- package/src/features/list/__tests__/html_ttml_parser.test.ts +2 -3
- package/src/features/list/__tests__/html_vtt_parser.test.ts +2 -3
- package/src/features/list/__tests__/index.test.ts +6 -0
- package/src/features/list/__tests__/native_sami_parser.test.ts +3 -3
- package/src/features/list/__tests__/native_srt_parser.test.ts +2 -2
- package/src/features/list/__tests__/native_text_buffer.test.ts +3 -4
- package/src/features/list/__tests__/native_ttml_parser.test.ts +2 -3
- package/src/features/list/__tests__/native_vtt_parser.test.ts +2 -3
- package/src/features/list/__tests__/smooth.test.ts +5 -3
- package/src/features/list/dash.ts +3 -1
- package/src/{experimental/features → features/list}/dash_wasm.ts +3 -1
- package/src/features/list/html_sami_parser.ts +2 -2
- package/src/features/list/html_srt_parser.ts +2 -2
- package/src/features/list/html_text_buffer.ts +2 -2
- package/src/features/list/html_ttml_parser.ts +2 -2
- package/src/features/list/html_vtt_parser.ts +2 -2
- package/src/features/list/index.ts +3 -0
- package/src/features/list/media_source_main.ts +14 -0
- package/src/features/list/native_sami_parser.ts +2 -3
- package/src/features/list/native_srt_parser.ts +2 -3
- package/src/features/list/native_text_buffer.ts +2 -3
- package/src/features/list/native_ttml_parser.ts +2 -3
- package/src/features/list/native_vtt_parser.ts +2 -3
- package/src/features/list/smooth.ts +8 -3
- package/src/features/types.ts +29 -5
- package/src/manifest/__tests__/adaptation.test.ts +3 -62
- package/src/manifest/__tests__/manifest.test.ts +37 -26
- package/src/manifest/__tests__/representation.test.ts +360 -142
- package/src/manifest/__tests__/update_period_in_place.test.ts +406 -324
- package/src/manifest/__tests__/update_periods.test.ts +240 -162
- package/src/manifest/adaptation.ts +115 -132
- package/src/manifest/index.ts +40 -2
- package/src/manifest/manifest.ts +120 -61
- package/src/manifest/period.ts +113 -28
- package/src/manifest/representation.ts +150 -137
- package/src/manifest/types.ts +407 -0
- package/src/manifest/update_period_in_place.ts +31 -18
- package/src/manifest/update_periods.ts +71 -19
- package/src/manifest/utils.ts +686 -0
- package/src/minimal.ts +7 -0
- package/src/mse/README.md +33 -0
- package/src/mse/index.ts +7 -0
- package/src/mse/main_codec_support_prober.ts +52 -0
- package/src/mse/main_media_source_interface.ts +569 -0
- package/src/mse/types.ts +318 -0
- package/src/mse/worker_codec_support_prober.ts +79 -0
- package/src/mse/worker_media_source_interface.ts +468 -0
- package/src/multithread_types.ts +942 -0
- package/src/parsers/README.md +7 -0
- package/src/parsers/manifest/dash/common/parse_periods.ts +15 -18
- package/src/parsers/manifest/dash/js-parser/parse_from_document.ts +1 -1
- package/src/parsers/manifest/dash/wasm-parser/README.md +18 -14
- package/src/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.ts +22 -6
- package/src/parsers/manifest/metaplaylist/metaplaylist_parser.ts +13 -1
- package/src/parsers/manifest/types.ts +5 -1
- package/src/parsers/texttracks/ttml/html/__tests__/__global__/html_ttml_parser.test.test.ts +1 -1
- package/src/parsers/texttracks/webvtt/html/__tests__/convert_payload_to_html.test.ts +1 -1
- package/src/public_types.ts +72 -21
- package/src/{core/segment_buffers/implementations/text → text_displayer}/html/__tests__/utils.test.ts +1 -1
- package/src/{core/segment_buffers/implementations/text/html/parsers.ts → text_displayer/html/html_parsers.ts} +2 -18
- package/src/{core/segment_buffers/implementations/text/html/html_text_segment_buffer.ts → text_displayer/html/html_text_displayer.ts} +107 -190
- package/src/text_displayer/html/index.ts +2 -0
- package/src/{core/segment_buffers/implementations/text → text_displayer}/html/text_track_cues_store.ts +8 -22
- package/src/{core/segment_buffers/implementations/text → text_displayer}/html/update_proportional_elements.ts +0 -16
- package/src/{core/segment_buffers/implementations/text → text_displayer}/html/utils.ts +8 -21
- package/src/text_displayer/index.ts +9 -0
- package/src/text_displayer/manual_time_ranges.ts +64 -0
- package/src/text_displayer/native/index.ts +3 -0
- package/src/{core/segment_buffers/implementations/text/native/parsers.ts → text_displayer/native/native_parsers.ts} +4 -19
- package/src/text_displayer/native/native_text_displayer.ts +268 -0
- package/src/text_displayer/types.ts +76 -0
- package/src/tools/TextTrackRenderer/text_track_renderer.ts +13 -18
- package/src/tools/index.ts +5 -1
- package/src/{experimental/tools → tools}/parseBIFThumbnails/index.ts +1 -1
- package/src/transports/dash/extract_complete_chunks.ts +12 -8
- package/src/transports/dash/get_events_out_of_emsgs.ts +0 -1
- package/src/transports/dash/low_latency_segment_loader.ts +2 -2
- package/src/transports/utils/generate_manifest_loader.ts +1 -1
- package/src/utils/README.md +7 -0
- package/src/utils/__tests__/assert.test.ts +31 -0
- package/src/utils/__tests__/base64.test.ts +1 -1
- package/src/utils/__tests__/event_emitter.test.ts +0 -24
- package/src/utils/__tests__/id_generator.test.ts +1 -1
- package/src/utils/__tests__/object_assign.test.ts +15 -0
- package/src/utils/assert.ts +53 -1
- package/src/utils/event_emitter.ts +8 -2
- package/src/utils/logger.ts +45 -15
- package/src/utils/monotonic_timestamp.ts +24 -5
- package/src/utils/object_assign.ts +46 -14
- package/src/utils/request/fetch.ts +9 -10
- package/src/utils/request/index.ts +10 -0
- package/src/{errors → utils/request}/request_error.ts +27 -4
- package/src/utils/request/xhr.ts +13 -12
- package/src/utils/retry_promise_with_backoff.ts +1 -2
- package/src/utils/string_parsing.ts +1 -1
- package/src/utils/sync_or_async.ts +90 -0
- package/src/worker_entry_point.ts +7 -0
- package/tsconfig.dev.commonjs.json +7 -0
- package/tsconfig.dev.json +10 -0
- package/tsconfig.jest.json +0 -1
- package/tsconfig.json +1 -2
- package/dist/_esm5.processed/parsers/manifest/utils/is_segment_still_available.d.ts +0 -29
- package/dist/_esm5.processed/parsers/manifest/utils/is_segment_still_available.js +0 -51
- package/dist/commonjs/core/init/utils/create_stream_playback_observer.d.ts +0 -41
- package/dist/commonjs/core/init/utils/create_stream_playback_observer.js +0 -91
- package/dist/commonjs/core/segment_buffers/implementations/text/html/html_text_segment_buffer.d.ts +0 -141
- package/dist/commonjs/core/segment_buffers/implementations/text/html/index.d.ts +0 -21
- package/dist/commonjs/core/segment_buffers/implementations/text/html/index.js +0 -23
- package/dist/commonjs/core/segment_buffers/implementations/text/html/types.d.ts +0 -25
- package/dist/commonjs/core/segment_buffers/implementations/text/html/types.js +0 -17
- package/dist/commonjs/core/segment_buffers/implementations/text/html/update_proportional_elements.d.ts +0 -30
- package/dist/commonjs/core/segment_buffers/implementations/text/native/index.d.ts +0 -17
- package/dist/commonjs/core/segment_buffers/implementations/text/native/index.js +0 -19
- package/dist/commonjs/core/segment_buffers/implementations/text/native/native_text_segment_buffer.d.ts +0 -83
- package/dist/commonjs/core/segment_buffers/implementations/text/native/native_text_segment_buffer.js +0 -273
- package/dist/commonjs/core/segment_buffers/implementations/text/native/parsers.d.ts +0 -26
- package/dist/commonjs/core/stream/representation/utils/force_garbage_collection.d.ts +0 -29
- package/dist/commonjs/core/stream/representation/utils/force_garbage_collection.js +0 -179
- package/dist/commonjs/errors/assertion_error.d.ts +0 -31
- package/dist/commonjs/errors/assertion_error.js +0 -56
- package/dist/commonjs/utils/assert_unreachable.d.ts +0 -40
- package/dist/commonjs/utils/assert_unreachable.js +0 -46
- package/dist/es2017/core/init/utils/create_stream_playback_observer.d.ts +0 -41
- package/dist/es2017/core/init/utils/create_stream_playback_observer.js +0 -87
- package/dist/es2017/core/segment_buffers/implementations/text/html/html_text_segment_buffer.d.ts +0 -141
- package/dist/es2017/core/segment_buffers/implementations/text/html/index.d.ts +0 -21
- package/dist/es2017/core/segment_buffers/implementations/text/html/index.js +0 -21
- package/dist/es2017/core/segment_buffers/implementations/text/html/types.d.ts +0 -25
- package/dist/es2017/core/segment_buffers/implementations/text/html/types.js +0 -16
- package/dist/es2017/core/segment_buffers/implementations/text/html/update_proportional_elements.d.ts +0 -30
- package/dist/es2017/core/segment_buffers/implementations/text/native/index.d.ts +0 -17
- package/dist/es2017/core/segment_buffers/implementations/text/native/index.js +0 -17
- package/dist/es2017/core/segment_buffers/implementations/text/native/native_text_segment_buffer.d.ts +0 -83
- package/dist/es2017/core/segment_buffers/implementations/text/native/native_text_segment_buffer.js +0 -251
- package/dist/es2017/core/segment_buffers/implementations/text/native/parsers.d.ts +0 -26
- package/dist/es2017/core/stream/representation/utils/force_garbage_collection.d.ts +0 -29
- package/dist/es2017/core/stream/representation/utils/force_garbage_collection.js +0 -91
- package/dist/es2017/errors/assertion_error.d.ts +0 -31
- package/dist/es2017/errors/assertion_error.js +0 -35
- package/dist/es2017/utils/assert_unreachable.d.ts +0 -40
- package/dist/es2017/utils/assert_unreachable.js +0 -43
- package/dist/rx-player.d.ts +0 -3
- package/dist/rx-player.min.d.ts +0 -3
- package/experimental/features/index.d.ts +0 -16
- package/experimental/features/index.js +0 -16
- package/experimental/index.d.ts +0 -16
- package/experimental/index.js +0 -16
- package/experimental/tools/VideoThumbnailLoader.d.ts +0 -18
- package/experimental/tools/VideoThumbnailLoader.js +0 -18
- package/experimental/tools/createMetaplaylist.d.ts +0 -18
- package/experimental/tools/createMetaplaylist.js +0 -18
- package/experimental/tools/index.d.ts +0 -16
- package/experimental/tools/index.js +0 -16
- package/experimental/tools/mediaCapabilitiesProber.d.ts +0 -18
- package/experimental/tools/mediaCapabilitiesProber.js +0 -18
- package/experimental/tools/parseBIFThumbnails.d.ts +0 -18
- package/experimental/tools/parseBIFThumbnails.js +0 -18
- package/features/index.d.ts +0 -16
- package/features/index.js +0 -16
- package/logger/index.d.ts +0 -17
- package/logger/index.js +0 -17
- package/minimal/index.d.ts +0 -17
- package/minimal/index.js +0 -17
- package/scripts/build/generate_build.mjs +0 -194
- package/scripts/build/templates/experimental/features/index.d.ts +0 -16
- package/scripts/build/templates/experimental/features/index.js +0 -16
- package/scripts/build/templates/experimental/index.d.ts +0 -16
- package/scripts/build/templates/experimental/index.js +0 -16
- package/scripts/build/templates/experimental/tools/VideoThumbnailLoader.d.ts +0 -18
- package/scripts/build/templates/experimental/tools/VideoThumbnailLoader.js +0 -18
- package/scripts/build/templates/experimental/tools/createMetaplaylist.d.ts +0 -18
- package/scripts/build/templates/experimental/tools/createMetaplaylist.js +0 -18
- package/scripts/build/templates/experimental/tools/index.d.ts +0 -16
- package/scripts/build/templates/experimental/tools/index.js +0 -16
- package/scripts/build/templates/experimental/tools/mediaCapabilitiesProber.d.ts +0 -18
- package/scripts/build/templates/experimental/tools/mediaCapabilitiesProber.js +0 -18
- package/scripts/build/templates/experimental/tools/parseBIFThumbnails.d.ts +0 -18
- package/scripts/build/templates/experimental/tools/parseBIFThumbnails.js +0 -18
- package/scripts/build/templates/features/index.d.ts +0 -16
- package/scripts/build/templates/features/index.js +0 -16
- package/scripts/build/templates/logger/index.d.ts +0 -17
- package/scripts/build/templates/logger/index.js +0 -17
- package/scripts/build/templates/minimal/index.d.ts +0 -17
- package/scripts/build/templates/minimal/index.js +0 -17
- package/scripts/build/templates/tools/TextTrackRenderer.d.ts +0 -18
- package/scripts/build/templates/tools/TextTrackRenderer.js +0 -18
- package/scripts/build/templates/tools/index.d.ts +0 -16
- package/scripts/build/templates/tools/index.js +0 -16
- package/scripts/build/templates/tools/string-utils.d.ts +0 -18
- package/scripts/build/templates/tools/string-utils.js +0 -18
- package/scripts/build/templates/types/index.d.ts +0 -16
- package/scripts/build/templates/types/index.js +0 -15
- package/src/core/init/utils/create_stream_playback_observer.ts +0 -131
- package/src/core/segment_buffers/implementations/text/html/index.ts +0 -24
- package/src/core/segment_buffers/implementations/text/html/types.ts +0 -23
- package/src/core/segment_buffers/implementations/text/native/index.ts +0 -19
- package/src/core/segment_buffers/implementations/text/native/native_text_segment_buffer.ts +0 -335
- package/src/core/stream/representation/utils/force_garbage_collection.ts +0 -113
- package/src/errors/__tests__/assertion_error.test.ts +0 -26
- package/src/errors/assertion_error.ts +0 -40
- package/src/typings/README.md +0 -7
- package/src/utils/__tests__/assert_unreachable.test.ts +0 -40
- package/src/utils/assert_unreachable.ts +0 -45
- package/tools/TextTrackRenderer.d.ts +0 -18
- package/tools/TextTrackRenderer.js +0 -18
- package/tools/index.d.ts +0 -16
- package/tools/index.js +0 -16
- package/tools/string-utils.d.ts +0 -18
- package/tools/string-utils.js +0 -18
- package/types/index.d.ts +0 -16
- package/types/index.js +0 -15
- /package/dist/commonjs/{utils → core/fetchers/segment}/initialization_segment_cache.js +0 -0
- /package/dist/commonjs/{experimental/features → features/list}/dash_wasm.d.ts +0 -0
- /package/dist/commonjs/{experimental/features → features/list}/debug_element.d.ts +0 -0
- /package/dist/commonjs/{experimental/features → features/list}/debug_element.js +0 -0
- /package/dist/commonjs/{experimental/tools → tools}/parseBIFThumbnails/index.d.ts +0 -0
- /package/dist/commonjs/{compat → utils}/global_scope.d.ts +0 -0
- /package/dist/commonjs/{compat → utils}/global_scope.js +0 -0
- /package/dist/commonjs/{compat → utils}/is_node.d.ts +0 -0
- /package/dist/commonjs/{compat → utils}/is_node.js +0 -0
- /package/dist/commonjs/{compat → utils}/is_worker.d.ts +0 -0
- /package/dist/commonjs/{compat → utils}/is_worker.js +0 -0
- /package/dist/es2017/{utils → core/fetchers/segment}/initialization_segment_cache.js +0 -0
- /package/dist/es2017/{experimental/features → features/list}/dash_wasm.d.ts +0 -0
- /package/dist/es2017/{experimental/features → features/list}/debug_element.d.ts +0 -0
- /package/dist/es2017/{experimental/features → features/list}/debug_element.js +0 -0
- /package/dist/es2017/{experimental/tools → tools}/parseBIFThumbnails/index.d.ts +0 -0
- /package/dist/es2017/{compat → utils}/global_scope.d.ts +0 -0
- /package/dist/es2017/{compat → utils}/global_scope.js +0 -0
- /package/dist/es2017/{compat → utils}/is_node.d.ts +0 -0
- /package/dist/es2017/{compat → utils}/is_node.js +0 -0
- /package/dist/es2017/{compat → utils}/is_worker.d.ts +0 -0
- /package/dist/es2017/{compat → utils}/is_worker.js +0 -0
- /package/src/{experimental/features → features/list}/__tests__/dash_wasm.test.ts +0 -0
- /package/src/{experimental/features → features/list}/__tests__/debug_element.test.ts +0 -0
- /package/src/{experimental/features → features/list}/debug_element.ts +0 -0
- /package/src/{compat → utils}/global_scope.ts +0 -0
- /package/src/{compat → utils}/is_node.ts +0 -0
- /package/src/{compat → utils}/is_worker.ts +0 -0
- /package/src/{errors → utils/request}/__tests__/request_error.test.ts +0 -0
package/.eslintrc.js
CHANGED
|
@@ -176,6 +176,8 @@ module.exports = {
|
|
|
176
176
|
"@typescript-eslint/no-namespace": "error",
|
|
177
177
|
"@typescript-eslint/no-non-null-assertion": "error",
|
|
178
178
|
"@typescript-eslint/no-this-alias": "error",
|
|
179
|
+
// Might be enabled in the future, for now this is too much work:
|
|
180
|
+
"@typescript-eslint/no-unsafe-enum-comparison": ["off"],
|
|
179
181
|
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
|
180
182
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
181
183
|
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
|
@@ -10,7 +10,7 @@ on:
|
|
|
10
10
|
types: [opened, synchronize, reopened]
|
|
11
11
|
|
|
12
12
|
jobs:
|
|
13
|
-
|
|
13
|
+
typechecking_and_linting:
|
|
14
14
|
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
|
|
@@ -28,6 +28,24 @@ jobs:
|
|
|
28
28
|
cache: 'npm'
|
|
29
29
|
- run: npm install
|
|
30
30
|
- run: npm run check
|
|
31
|
+
|
|
32
|
+
unit_tests:
|
|
33
|
+
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
|
|
36
|
+
strategy:
|
|
37
|
+
matrix:
|
|
38
|
+
node-version: [16.x]
|
|
39
|
+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v2
|
|
43
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
44
|
+
uses: actions/setup-node@v2
|
|
45
|
+
with:
|
|
46
|
+
node-version: ${{ matrix.node-version }}
|
|
47
|
+
cache: 'npm'
|
|
48
|
+
- run: npm install
|
|
31
49
|
- run: npm run test:unit
|
|
32
50
|
|
|
33
51
|
integration_linux:
|
|
@@ -46,56 +64,15 @@ jobs:
|
|
|
46
64
|
with:
|
|
47
65
|
node-version: ${{ matrix.node-version }}
|
|
48
66
|
cache: 'npm'
|
|
67
|
+
- uses: actions-rs/toolchain@v1
|
|
68
|
+
with:
|
|
69
|
+
toolchain: stable
|
|
49
70
|
# needed for integration & memory tests codecs support
|
|
50
71
|
- run: sudo add-apt-repository multiverse && sudo apt update && sudo apt install -y ubuntu-restricted-extras
|
|
51
72
|
- run: npm install
|
|
73
|
+
- run: rustup target add wasm32-unknown-unknown
|
|
74
|
+
- run: npm run build
|
|
52
75
|
# Firefox seems to have issue with integration tests on GitHub actions only
|
|
53
76
|
# TODO to check
|
|
54
77
|
- run: node tests/integration/run.mjs --bchromehl
|
|
55
78
|
- run: npm run test:memory
|
|
56
|
-
|
|
57
|
-
# Windows seems to be a lot less stable for some reason.
|
|
58
|
-
# TODO debug?
|
|
59
|
-
# integration_windows:
|
|
60
|
-
|
|
61
|
-
# runs-on: windows-latest
|
|
62
|
-
|
|
63
|
-
# strategy:
|
|
64
|
-
# matrix:
|
|
65
|
-
# node-version: [16.x]
|
|
66
|
-
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
67
|
-
|
|
68
|
-
# steps:
|
|
69
|
-
# - uses: actions/checkout@v2
|
|
70
|
-
# - name: Use Node.js ${{ matrix.node-version }}
|
|
71
|
-
# uses: actions/setup-node@v2
|
|
72
|
-
# with:
|
|
73
|
-
# node-version: ${{ matrix.node-version }}
|
|
74
|
-
# cache: 'npm'
|
|
75
|
-
# - run: npm install
|
|
76
|
-
# # Firefox seems to have issue with integration tests on GitHub actions only
|
|
77
|
-
# # TODO to check
|
|
78
|
-
# - run: node tests/integration/run.mjs --bchromehl
|
|
79
|
-
# - run: npm run test:memory
|
|
80
|
-
|
|
81
|
-
# MacOS seems to be a lot less stable for some reason.
|
|
82
|
-
# TODO debug?
|
|
83
|
-
# integration_macos:
|
|
84
|
-
|
|
85
|
-
# runs-on: macos-latest
|
|
86
|
-
|
|
87
|
-
# strategy:
|
|
88
|
-
# matrix:
|
|
89
|
-
# node-version: [16.x]
|
|
90
|
-
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
91
|
-
|
|
92
|
-
# steps:
|
|
93
|
-
# - uses: actions/checkout@v2
|
|
94
|
-
# - name: Use Node.js ${{ matrix.node-version }}
|
|
95
|
-
# uses: actions/setup-node@v2
|
|
96
|
-
# with:
|
|
97
|
-
# node-version: ${{ matrix.node-version }}
|
|
98
|
-
# cache: 'npm'
|
|
99
|
-
# - run: npm install
|
|
100
|
-
# - run: npm run test:integration:gh-actions
|
|
101
|
-
# - run: npm run test:memory
|
package/CHANGELOG.md
CHANGED
|
@@ -1,95 +1,4 @@
|
|
|
1
|
-
## v4.0.0-
|
|
2
|
-
|
|
3
|
-
### Changes
|
|
4
|
-
|
|
5
|
-
- A `representationFilter`'s advertised `codec` has now been renamed to `codecs` and is an Array when defined [#1332]
|
|
6
|
-
|
|
7
|
-
### Features
|
|
8
|
-
|
|
9
|
-
- Add `getLivePosition` RxPlayer method [#1300]
|
|
10
|
-
- Add `startAt.fromLivePosition` `loadVideo` option [#1300]
|
|
11
|
-
- add `connectionTimeout` property to the `requestConfig` `loadVideo` option for both the manifest and segment requests to set a timeout just linked to HTTP connection establishment [#1319]
|
|
12
|
-
- Add the possibility to set a new `keySystems` option on the `reload` API [#1308]
|
|
13
|
-
|
|
14
|
-
### Bug fixes
|
|
15
|
-
|
|
16
|
-
- Fix subtitles "blinking" in some specific conditions, especially with some DASH low-latency contents [#1314]
|
|
17
|
-
- DASH: Fix Period overlap resolution logic for when the first Period is removed [#1311]
|
|
18
|
-
- TTML: Fix handling of the `tts:lineHeight` attribute [#1320]
|
|
19
|
-
- Fix import of the `LOCAL_MANIFEST` experimental feature
|
|
20
|
-
- Smooth: Rely on a defined `segmentLoader` when playing smooth streaming contents.
|
|
21
|
-
- Avoid very rarely skipping segments which initially were too big to be pushed due to memory limitations [#1323]
|
|
22
|
-
- Tizen (Samsung TVs): Try again to work around all potential issues that could arise due to tizen seeking back by itself [#1327]
|
|
23
|
-
|
|
24
|
-
### Other improvements
|
|
25
|
-
|
|
26
|
-
- Provide both commonJS and ES6-style exports to improve compatibilities with applications
|
|
27
|
-
- DASH: rely on SCTE214 `supplementalCodecs` instead of `codecs` if it's supported to better support backward compatible Dolby Vision contents [#1307]
|
|
28
|
-
- DASH: Provide better support of the `availabilityTimeOffset` attribute [#1300]
|
|
29
|
-
- DEBUG_ELEMENT: Add unsupported and undecipherable bitrates to the debug element [#1321]
|
|
30
|
-
- DEBUG_ELEMENT: update buffer graph maximum size so it becomes more readable for lengthy contents [#1316]
|
|
31
|
-
- DEBUG_ELEMENT: always synchronize inventory of segments before rendering it [#1317]
|
|
32
|
-
- Remove remaining RxPlayer dependency removing possibility of some application-side bundling errors [#1312]
|
|
33
|
-
- Add cache when checking for codec support, improving performance on some devices and potentially working around some xbox bugs on long-lived pages [#1324]
|
|
34
|
-
- Add exception to text Garbage collection logic to avoid unnecessarily reload text segments frequently [#1325]
|
|
35
|
-
- Demo: Fix switching mode toggle [#1328]
|
|
36
|
-
- Demo: Add possibility to see the debug element in the demo page
|
|
37
|
-
- Demo: Fix reporting of live position in demo page [#1313]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## v4.0.0-beta.3 (2023-10-19)
|
|
41
|
-
|
|
42
|
-
### Changes
|
|
43
|
-
|
|
44
|
-
- The `MediaError`'s `trackInfo` property is now an array renamed as `tracksInfo` and similar `MediaError` are grouped in one [#1264]
|
|
45
|
-
- The `manifestUpdateUrl` `loadVideo` option has been removed as it was unused [#1276]
|
|
46
|
-
- The `/dist` directory in the project has been removed [#1270]
|
|
47
|
-
|
|
48
|
-
### Bug fixes
|
|
49
|
-
|
|
50
|
-
- Fix adaptive logic on some legacy Edge browsers [#1302]
|
|
51
|
-
|
|
52
|
-
### Other improvements
|
|
53
|
-
|
|
54
|
-
- `newAvailablePeriods` is now sent lazily at the time new Periods are considered to improve performance [#1265]
|
|
55
|
-
- Implement better error messages by not repeating the Error Type in it [#1290]
|
|
56
|
-
- All import path to the RxPlayer now depend on the same RxPlayer modular build (and not just the minimal, as before) [#1301]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## v4.0.0-beta.2 (2023-06-27)
|
|
60
|
-
|
|
61
|
-
### Changes
|
|
62
|
-
|
|
63
|
-
- If all Representations from the current track become undecipherable, automatically switch to another track (also send a `trackUpdate` event) instead of stopping on error [#1234]
|
|
64
|
-
- Only send `MediaError` errors with the `NO_PLAYABLE_REPRESENTATION` error code when no Representation from all tracks of a given type can be played [#1234]
|
|
65
|
-
|
|
66
|
-
### Features
|
|
67
|
-
|
|
68
|
-
- Add `representationListUpdate` event for when the list of available Representation for a current track changes [#1240]
|
|
69
|
-
- Add `"no-playable-representation"` as a `reason` for `trackUpdate` events when the track switch is due to encrypted Representations [#1234]
|
|
70
|
-
|
|
71
|
-
### Other improvements
|
|
72
|
-
|
|
73
|
-
- DRM: Reload when playback is unexpectedly frozen with encrypted but only decipherable data in the buffer to work-around rare encryption-related issues [#1236]
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
## v4.0.0-beta.1 (2023-03-08)
|
|
77
|
-
|
|
78
|
-
### Bug fixes
|
|
79
|
-
|
|
80
|
-
- (v4.0.0-beta.0-only issue) Fix memory leak
|
|
81
|
-
- (v4.0.0-beta.0-only issue) Fix MediaSource duration when the maximum buffered end is inferior to current duration but superior to calculated duration
|
|
82
|
-
- (v4.0.0-beta.0-only issue) Fix `stopAtEnd` option by also switching to STOPPED state on ended
|
|
83
|
-
- (v4.0.0-beta.0-only issue) Fix some target's support by not relying on `Promise.prototype.finally` anymore [#1224]
|
|
84
|
-
- (v4.0.0-beta.0-only issue) For dynamic contents, always set a very high duration [#1220]
|
|
85
|
-
- (v4.0.0-beta.0-only issue) DRM: Fix fallbacking for an already-played content by checking key statuses initially linked to a MediaKeySession
|
|
86
|
-
|
|
87
|
-
### Other improvements
|
|
88
|
-
|
|
89
|
-
- Based on the v3.30.0 of which it inherits all the features, bug fixes and other improvements
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## v4.0.0-beta.0 (2023-01-27)
|
|
1
|
+
## v4.0.0-rc.1 (2024-01-24)
|
|
93
2
|
|
|
94
3
|
### Changes
|
|
95
4
|
|
|
@@ -150,9 +59,19 @@
|
|
|
150
59
|
- Remove public types `IDefaultAudioTrackOption` and `IDefaultTextTrackOption`. Those are the types respectively for `defaultAudioTrack` and `defaultTextTrack` `loadVideo` options which have been removed
|
|
151
60
|
- Remove public types `IAudioTrackPreference`, `ITextTrackPreference` and `IVideoTrackPreference` as the corresponding API do not exist anymore.
|
|
152
61
|
- Stop officially supporting the Internet Explorer 11 browser
|
|
62
|
+
- The `MediaError`'s `trackInfo` property is now an array renamed as `tracksInfo` and similar `MediaError` are grouped in one [#1264]
|
|
63
|
+
- The `manifestUpdateUrl` `loadVideo` option has been removed as it was unused [#1276]
|
|
64
|
+
- `volumeChange` events are now sending both the audio volume and the muted status [#1348]
|
|
65
|
+
- `mute`/`unMute`/`isMute` now rely on the `HTMLMediaElement`'s `muted` property and not the audio volume [#1348]
|
|
66
|
+
- A `representationFilter`'s advertised `codec` has now been renamed to `codecs` and is an Array when defined [#1332]
|
|
67
|
+
- `DASH_WASM` and `DEBUG_ELEMENT` are not experimental features anymore [#1339]
|
|
68
|
+
- The `parseBifThumbnails` function is not an experimental tool anymore [#1339]
|
|
69
|
+
- If all Representations from the current track become undecipherable, automatically switch to another track (also send a `trackUpdate` event) instead of stopping on error [#1234]
|
|
70
|
+
- Only send `MediaError` errors with the `NO_PLAYABLE_REPRESENTATION` error code when no Representation from all tracks of a given type can be played [#1234]
|
|
153
71
|
|
|
154
72
|
### Features
|
|
155
73
|
|
|
74
|
+
- Add `MULTI_THREAD` experimental feature to enable multithreading capabilities through a WebWorker
|
|
156
75
|
- `setAudioTrack`, `setVideoTrack` and `setTextTrack` now may take an object in argument, with the track's id set as a `trackId` property, to allow new features
|
|
157
76
|
- Add `switchingMode` optional property to `setVideoTrack` and `setAudioTrack`, to configure the way in which the RxPlayer switches between the previous and new track
|
|
158
77
|
- Add optional `periodId` property to `setAudioTrack`, `setVideoTrack` and `setTextTrack`, to allow setting the track of another, future or past, Period.
|
|
@@ -164,45 +83,79 @@
|
|
|
164
83
|
- Add `lockVideoRepresentations`, `lockAudioRepresentations`, `getLockedVideoRepresentations`, `getLockedAudioRepresentations`, `unlockVideoRepresentations` and `unlockAudioRepresentations` methods to allow a complex selection of Representations that are currently allowed to play.
|
|
165
84
|
- Add `getVideoRepresentation` and `getAudioRepresentation` method to retrieve information on the currently loaded representations [#1144]
|
|
166
85
|
- Add `audioRepresentationChange` and `videoRepresentationChange` events to be notified when the currently-loaded Representation for the current Period changes.
|
|
167
|
-
- Add `updateContentUrls` API, allowing to update the Manifest's URL during playback [#1182]
|
|
168
|
-
- DASH: implement forced-subtitles, adding the `forced` property to the audio tracks API and selecting by default a forced text track linked to the audio track's language if present [#1187]
|
|
169
86
|
- Add `getContentUrls` allowing to retrieve the one or several known URLs through which the current Manifest or content is reachable.
|
|
170
87
|
- Add `videoResolutionLimit` constructor option allowing to automatically limit a video Representation's resolution.
|
|
171
88
|
- Add `newAvailablePeriods` event to signal new Period on which a track and/or Representation choice can be made
|
|
172
89
|
- Add `brokenRepresentationsLock` event for when a Representations lock could not be respected anymore
|
|
173
90
|
- Add `trackUpdate` event for when a track has been updated for any type and Period
|
|
174
|
-
- Add
|
|
175
|
-
- Add
|
|
91
|
+
- Add `distinctiveIdentifier` property in the `keySystems` option (given to the `loadVideo` method) to have full control over the MediaKeySystemConfiguration of the same name in the chosen key system [#1148]
|
|
92
|
+
- Add `persistentState` property in the `keySystems` option (given to the `loadVideo` method) to have full control over the MediaKeySystemConfiguration of the same name in the chosen key system [#1148]
|
|
176
93
|
- Add `keySystems[].onKeyOutputRestricted` and `keySystems[].onKeyInternalError` properties to configure the RxPlayer's behavior when a key switches to the status respectively `"output-restricted"` and `"internal-error"`
|
|
177
94
|
- Add `audioCapabilitiesConfig` and `videoCapabilitiesConfig` properties in the `keySystems` option (given to the `loadVideo` method) to allow advanced configuration of respectively the "audioCapabilities" and "videoCapabilities" in the asked MediaKeySystemConfiguration [#1148]
|
|
178
|
-
- Add `
|
|
179
|
-
-
|
|
180
|
-
- Add `
|
|
181
|
-
-
|
|
182
|
-
- Add `
|
|
183
|
-
- Add `
|
|
184
|
-
- Add `
|
|
185
|
-
- Add `
|
|
186
|
-
- Add `
|
|
187
|
-
- Add `
|
|
188
|
-
- Add `
|
|
189
|
-
- Add `
|
|
190
|
-
- Add `
|
|
191
|
-
- Add `
|
|
192
|
-
- Add `
|
|
193
|
-
- Add `
|
|
95
|
+
- Add `representationListUpdate` event for when the list of available Representation for a current track changes [#1240]
|
|
96
|
+
- add `connectionTimeout` property to the `requestConfig` `loadVideo` option for both the manifest and segment requests to set a timeout just linked to HTTP connection establishment [#1319]
|
|
97
|
+
- Add `relativeResumingPosition` property to the `setVideoTrack`and `setAudioTrack` options [#1331]
|
|
98
|
+
- types: export type `ICompatibleKeySystem` to the public API [#1340]
|
|
99
|
+
- types: Add `ISegmentLoaderContext` public type for the first argument of the `segmentLoader` API
|
|
100
|
+
- types: Add `IRepresentationFilterRepresentation` public type for the first argument of the `representationFilter` API
|
|
101
|
+
- types: Add `IRepresentationContext` public type for the second argument of the `representationFilter` API
|
|
102
|
+
- types: Add `IManifestLoaderInfo` public type for the first argument of the `manifestLoader` API
|
|
103
|
+
- types: Add `IPeriodChangeEvent` public type to define the properties send through a `periodChange` event
|
|
104
|
+
- types: Add `IPeriod` public type to define a Period object returned by methods like `getAvailablePeriods` or `getCurrentPeriod`
|
|
105
|
+
- types: Add `IVideoTrackSwitchingMode` public type to define the type of the `switchingMode` property optionally given to `setAudioTrack`
|
|
106
|
+
- types: Add `IAudioRepresentationsSwitchingMode` public type to define the type of the `switchingMode` property optionally given to `lockAudioRepresentations`
|
|
107
|
+
- types: Add `IVideoRepresentationsSwitchingMode` public type to define the type of the `switchingMode` property optionally given to `lockAudioRepresentations`
|
|
108
|
+
- types: Add `IBrokenRepresentationsLockContext` public type to define the type sent as a payload of the `brokenRepresentationsLock` event
|
|
109
|
+
- types: Add `ITrackUpdateEventPayload` public type to define the type sent as a payload of the `trackUpdate` event
|
|
110
|
+
- types: Add `ILockedVideoRepresentationsSettings` public type to define the object that should be given to the new `lockVideoRepresentation` method
|
|
111
|
+
- types: Add `ILockedAudioRepresentationsSettings` public type to define the object that should be given to the new `lockAudioRepresentation` method
|
|
112
|
+
- types: Add `IAudioTrackSetting` public type to define the object that may be given to the `setAudioTrack` method
|
|
113
|
+
- types: Add `IVideoTrackSetting` public type to define the object that may be given to the `setVideoTrack` method
|
|
114
|
+
- types: Add `ITextTrackSetting` public type to define the object that may be given to the `setTextTrack` method
|
|
194
115
|
|
|
195
116
|
### Bug fixes
|
|
196
117
|
|
|
197
|
-
-
|
|
198
|
-
- API: Stop sending events if the content is stopped due to a side-effect of one of the event handler [#1197]
|
|
199
|
-
- text-tracks/ttml: fix inconsistent line spacing when resizing the `textTrackElement` [#1191]
|
|
200
|
-
- DRM: Fix race condition leading to a JS error instead of a `NO_PLAYABLE_REPRESENTATION` [#1201]
|
|
201
|
-
- DRM/Compat: Renew MediaKeys at each `loadVideo` on all WebOS (LG TV) platforms to work around issues [#1188]
|
|
118
|
+
- Tizen (Samsung TVs): Try again to work around all potential issues that could arise due to tizen seeking back by itself [#1327, #1355]
|
|
202
119
|
|
|
203
120
|
### Other improvements
|
|
204
121
|
|
|
205
|
-
-
|
|
122
|
+
- Provide both commonJS and ES6-style exports to improve compatibilities with applications
|
|
123
|
+
- Implement better error messages by not repeating the Error Type in it [#1290]
|
|
124
|
+
- DRM: Reload when playback is unexpectedly frozen with encrypted but only decipherable data in the buffer to work-around rare encryption-related issues [#1236]
|
|
125
|
+
- Add cache when checking for codec support, improving performance on some devices and potentially working around some xbox bugs on long-lived pages [#1324]
|
|
126
|
+
- Demo: Add possibility to see the debug element in the demo page
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## v3.33.0 (2024-01-24)
|
|
130
|
+
|
|
131
|
+
### Features
|
|
132
|
+
|
|
133
|
+
- Add `getLivePosition` RxPlayer method [#1300]
|
|
134
|
+
- Add `startAt.fromLivePosition` `loadVideo` option [#1300]
|
|
135
|
+
- Add the possibility to set a new `keySystems` option on the `reload` API [#1308]
|
|
136
|
+
|
|
137
|
+
### Bug fixes
|
|
138
|
+
|
|
139
|
+
- Fix subtitles "blinking" in some specific conditions, especially with some DASH low-latency contents [#1314]
|
|
140
|
+
- DASH: Fix Period overlap resolution logic for when the first Period is removed [#1311]
|
|
141
|
+
- TTML: Fix handling of the `tts:lineHeight` attribute [#1320]
|
|
142
|
+
- Fix import of the `LOCAL_MANIFEST` experimental feature
|
|
143
|
+
- Avoid very rarely skipping segments which initially were too big to be pushed due to memory limitations [#1323]
|
|
144
|
+
- Fix issue arising when using track APIs at the exact last possible position of a Period with no consecutive Period [#1337]
|
|
145
|
+
- Starting at the end (through a `startAt` `loadVideo` option) or reloading at the end led to the restart of the content [#1338]
|
|
146
|
+
- DRM/Safari: also perform Safari DRM work-arounds when the page is launched from the dock [#1351, #1356]
|
|
147
|
+
|
|
148
|
+
### Other improvements
|
|
149
|
+
|
|
150
|
+
- DASH: rely on SCTE214 `supplementalCodecs` instead of `codecs` if it's supported to better support backward compatible Dolby Vision contents [#1307]
|
|
151
|
+
- DASH: Provide better support of the `availabilityTimeOffset` attribute [#1300]
|
|
152
|
+
- DEBUG_ELEMENT: Add unsupported and undecipherable bitrates to the debug element [#1321]
|
|
153
|
+
- DEBUG_ELEMENT: update buffer graph maximum size so it becomes more readable for lengthy contents [#1316]
|
|
154
|
+
- DEBUG_ELEMENT: always synchronize inventory of segments before rendering it [#1317]
|
|
155
|
+
- Remove remaining RxPlayer dependency removing possibility of some application-side bundling errors [#1312]
|
|
156
|
+
- Add exception to text Garbage collection logic to avoid unnecessarily reload text segments frequently [#1325]
|
|
157
|
+
- Avoid logging too much the buffer's content when our debugging UI or the demo is used [#1341]
|
|
158
|
+
- Demo: Fix reporting of live position in demo page [#1313]
|
|
206
159
|
|
|
207
160
|
|
|
208
161
|
## v3.32.1 (2023-10-19)
|
package/CONTRIBUTING.md
CHANGED
|
@@ -47,6 +47,17 @@ the `features` object exported at `/src/features`. This is to reduce bundle size
|
|
|
47
47
|
when an application doesn't need all of the RxPlayer's features.
|
|
48
48
|
|
|
49
49
|
|
|
50
|
+
### Multithreading
|
|
51
|
+
|
|
52
|
+
Some parts of the code are intented to be runnable in a WebWorker. In that
|
|
53
|
+
environment some API, more specifically DOM-related API, are not available
|
|
54
|
+
directly (if some interaction with the DOM is needed, it will have to go through
|
|
55
|
+
an asynchronous `postMessage` round-trip).
|
|
56
|
+
|
|
57
|
+
Whether the code needs to be runnable or not in a WebWorker is generally
|
|
58
|
+
documented in the `README.md` of concerned directories.
|
|
59
|
+
|
|
60
|
+
|
|
50
61
|
|
|
51
62
|
## Code style
|
|
52
63
|
|
package/FILES.md
CHANGED
|
@@ -114,6 +114,14 @@ Defines a common `Manifest` class, regardless of the streaming technology (DASH,
|
|
|
114
114
|
HSS...). This class is then used by the rest of the RxPlayer, to allow
|
|
115
115
|
interaction with it without considering the underlying technology used.
|
|
116
116
|
|
|
117
|
+
### `src/mse/`: MSE abstractions
|
|
118
|
+
|
|
119
|
+
Abstraction over Media Source Extensions API, which are the browser API allowing
|
|
120
|
+
to buffer media.
|
|
121
|
+
|
|
122
|
+
This allows to provide a common API to the rest of the RxPlayer's code
|
|
123
|
+
regardless of the environment (e.g. in a WebWorker without MSE API or in an
|
|
124
|
+
environment with MSE API).
|
|
117
125
|
|
|
118
126
|
### `src/transports/`: Streaming protocols implementation
|
|
119
127
|
|
|
@@ -141,12 +149,6 @@ The parsed data being either:
|
|
|
141
149
|
- image containers: BIF
|
|
142
150
|
|
|
143
151
|
|
|
144
|
-
### `src/typings/`: Typescript typings
|
|
145
|
-
|
|
146
|
-
This directory contains only declaration files for TypeScript. It is
|
|
147
|
-
automatically added as a `typeRoots` when the TypeScript code is transpiled.
|
|
148
|
-
|
|
149
|
-
|
|
150
152
|
### `src/utils/`: Util functions
|
|
151
153
|
|
|
152
154
|
This directory contains general helpers which are used in different parts of the
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.0-
|
|
1
|
+
4.0.0-rc.1
|
|
@@ -39,4 +39,6 @@ declare let isWebOs2022: boolean;
|
|
|
39
39
|
declare let isPanasonic: boolean;
|
|
40
40
|
/** `true` for the PlayStation 5 game console. */
|
|
41
41
|
declare let isPlayStation5: boolean;
|
|
42
|
-
|
|
42
|
+
/** `true` for the Xbox game consoles. */
|
|
43
|
+
declare let isXbox: boolean;
|
|
44
|
+
export { isEdgeChromium, isIE11, isIEOrEdge, isFirefox, isPanasonic, isPlayStation5, isXbox, isSafariDesktop, isSafariMobile, isSamsungBrowser, isTizen, isWebOs, isWebOs2021, isWebOs2022, };
|
|
@@ -40,8 +40,10 @@ var isWebOs2022 = false;
|
|
|
40
40
|
var isPanasonic = false;
|
|
41
41
|
/** `true` for the PlayStation 5 game console. */
|
|
42
42
|
var isPlayStation5 = false;
|
|
43
|
+
/** `true` for the Xbox game consoles. */
|
|
44
|
+
var isXbox = false;
|
|
43
45
|
((function findCurrentBrowser() {
|
|
44
|
-
var _a, _b;
|
|
46
|
+
var _a, _b, _c;
|
|
45
47
|
if (isNode) {
|
|
46
48
|
return;
|
|
47
49
|
}
|
|
@@ -66,9 +68,24 @@ var isPlayStation5 = false;
|
|
|
66
68
|
/iPad|iPhone|iPod/.test(navigator.platform)) {
|
|
67
69
|
isSafariMobile = true;
|
|
68
70
|
}
|
|
69
|
-
else if (
|
|
71
|
+
else if (
|
|
72
|
+
// the following statement check if the window.safari contains the method
|
|
73
|
+
// "pushNotification", this condition is not met when using web app from the dock
|
|
74
|
+
// on macOS, this is why we also check userAgent.
|
|
75
|
+
Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor") >= 0 ||
|
|
70
76
|
((_b = (_a = window.safari) === null || _a === void 0 ? void 0 : _a.pushNotification) === null || _b === void 0 ? void 0 : _b.toString()) ===
|
|
71
|
-
"[object SafariRemoteNotification]"
|
|
77
|
+
"[object SafariRemoteNotification]" ||
|
|
78
|
+
// browsers are lying: Chrome reports both as Chrome and Safari in user
|
|
79
|
+
// agent string, So to detect Safari we have to check for the Safari string
|
|
80
|
+
// and the absence of the Chrome string
|
|
81
|
+
// eslint-disable-next-line max-len
|
|
82
|
+
// @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#which_part_of_the_user_agent_contains_the_information_you_are_looking_for
|
|
83
|
+
((/Safari\/(\d+)/).test(navigator.userAgent) &&
|
|
84
|
+
// Safari should contain Version/ in userAgent
|
|
85
|
+
(/Version\/(\d+)/).test(navigator.userAgent) &&
|
|
86
|
+
(((_c = navigator.vendor) === null || _c === void 0 ? void 0 : _c.indexOf("Apple")) !== -1) &&
|
|
87
|
+
!(/Chrome\/(\d+)/).test(navigator.userAgent) &&
|
|
88
|
+
!(/Chromium\/(\d+)/).test(navigator.userAgent))) {
|
|
72
89
|
isSafariDesktop = true;
|
|
73
90
|
}
|
|
74
91
|
// 2 - Find out specific device/platform information
|
|
@@ -99,5 +116,8 @@ var isPlayStation5 = false;
|
|
|
99
116
|
else if (/[Pp]anasonic/.test(navigator.userAgent)) {
|
|
100
117
|
isPanasonic = true;
|
|
101
118
|
}
|
|
119
|
+
else if (navigator.userAgent.indexOf("Xbox") !== -1) {
|
|
120
|
+
isXbox = true;
|
|
121
|
+
}
|
|
102
122
|
})());
|
|
103
|
-
export { isEdgeChromium, isIE11, isIEOrEdge, isFirefox, isPanasonic, isPlayStation5, isSafariDesktop, isSafariMobile, isSamsungBrowser, isTizen, isWebOs, isWebOs2021, isWebOs2022, };
|
|
123
|
+
export { isEdgeChromium, isIE11, isIEOrEdge, isFirefox, isPanasonic, isPlayStation5, isXbox, isSafariDesktop, isSafariMobile, isSamsungBrowser, isTizen, isWebOs, isWebOs2021, isWebOs2022, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We noticed that on Xbox game consoles and Universal windows platforms
|
|
3
|
+
* (presumably an Edge version is in cause here), the browser didn't send
|
|
4
|
+
* a "seeking" event if we were seeking at a 0 position initially.
|
|
5
|
+
*
|
|
6
|
+
* We could theoretically never seek at 0 initially as the initial position of
|
|
7
|
+
* an HTMLMediaElement should be at 0 anyway, but we still do it as a safe
|
|
8
|
+
* solution, as many devices have a buggy integration of HTML5 media API.
|
|
9
|
+
*
|
|
10
|
+
* This function returns `true` when we should avoid doing so, for now only for
|
|
11
|
+
* the non-standard behavior of those Edge platforms.
|
|
12
|
+
* @returns {number}
|
|
13
|
+
*/
|
|
14
|
+
export default function shouldPreventSeekingAt0Initially(): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isIEOrEdge, isXbox } from "./browser_detection";
|
|
2
|
+
/**
|
|
3
|
+
* We noticed that on Xbox game consoles and Universal windows platforms
|
|
4
|
+
* (presumably an Edge version is in cause here), the browser didn't send
|
|
5
|
+
* a "seeking" event if we were seeking at a 0 position initially.
|
|
6
|
+
*
|
|
7
|
+
* We could theoretically never seek at 0 initially as the initial position of
|
|
8
|
+
* an HTMLMediaElement should be at 0 anyway, but we still do it as a safe
|
|
9
|
+
* solution, as many devices have a buggy integration of HTML5 media API.
|
|
10
|
+
*
|
|
11
|
+
* This function returns `true` when we should avoid doing so, for now only for
|
|
12
|
+
* the non-standard behavior of those Edge platforms.
|
|
13
|
+
* @returns {number}
|
|
14
|
+
*/
|
|
15
|
+
export default function shouldPreventSeekingAt0Initially() {
|
|
16
|
+
return isXbox || isIEOrEdge;
|
|
17
|
+
}
|
|
@@ -39,6 +39,7 @@ declare class ConfigHandler {
|
|
|
39
39
|
DEFAULT_MAX_BUFFER_BEHIND: number;
|
|
40
40
|
DEFAULT_MAX_VIDEO_BUFFER_SIZE: number;
|
|
41
41
|
MAXIMUM_MAX_BUFFER_AHEAD: Partial<Record<"audio" | "video" | "image" | "text", number>>;
|
|
42
|
+
MINIMUM_MAX_BUFFER_AHEAD: Partial<Record<"audio" | "video" | "image" | "text", number>>;
|
|
42
43
|
MAXIMUM_MAX_BUFFER_BEHIND: Partial<Record<"audio" | "video" | "image" | "text", number>>;
|
|
43
44
|
DEFAULT_INITIAL_BITRATES: {
|
|
44
45
|
audio: number;
|
|
@@ -24,6 +24,8 @@ export type IParsedStartAtOption = {
|
|
|
24
24
|
percentage: number;
|
|
25
25
|
} | {
|
|
26
26
|
fromLastPosition: number;
|
|
27
|
+
} | {
|
|
28
|
+
fromLivePosition: number;
|
|
27
29
|
} | {
|
|
28
30
|
fromFirstPosition: number;
|
|
29
31
|
};
|
|
@@ -125,6 +127,8 @@ declare function checkReloadOptions(options?: {
|
|
|
125
127
|
position?: number;
|
|
126
128
|
relative?: number;
|
|
127
129
|
};
|
|
130
|
+
keySystems?: IKeySystemOption[];
|
|
131
|
+
autoPlay?: boolean;
|
|
128
132
|
}): void;
|
|
129
133
|
/**
|
|
130
134
|
* Parse options given to loadVideo and set default options as found
|
|
@@ -255,6 +255,12 @@ function checkReloadOptions(options) {
|
|
|
255
255
|
((_d = options === null || options === void 0 ? void 0 : options.reloadAt) === null || _d === void 0 ? void 0 : _d.relative) !== undefined) {
|
|
256
256
|
throw new Error("API: reload - Invalid 'reloadAt.relative' option format.");
|
|
257
257
|
}
|
|
258
|
+
if (!Array.isArray(options === null || options === void 0 ? void 0 : options.keySystems) && (options === null || options === void 0 ? void 0 : options.keySystems) !== undefined) {
|
|
259
|
+
throw new Error("API: reload - Invalid 'keySystems' option format.");
|
|
260
|
+
}
|
|
261
|
+
if ((options === null || options === void 0 ? void 0 : options.autoPlay) !== undefined && typeof options.autoPlay !== "boolean") {
|
|
262
|
+
throw new Error("API: reload - Invalid 'autoPlay' option format.");
|
|
263
|
+
}
|
|
258
264
|
}
|
|
259
265
|
/**
|
|
260
266
|
* Parse options given to loadVideo and set default options as found
|
|
@@ -456,9 +462,8 @@ function parseLoadVideoOptions(options) {
|
|
|
456
462
|
"an \"html\" textTrackMode. It will be ignored.");
|
|
457
463
|
}
|
|
458
464
|
if (!isNullOrUndefined(options.startAt)) {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
instanceof Date) {
|
|
465
|
+
if ("wallClockTime" in options.startAt
|
|
466
|
+
&& options.startAt.wallClockTime instanceof Date) {
|
|
462
467
|
var wallClockTime = options.startAt
|
|
463
468
|
.wallClockTime.getTime() / 1000;
|
|
464
469
|
startAt = objectAssign({}, options.startAt, { wallClockTime: wallClockTime });
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { IErrorCode, IErrorType } from "../../errors";
|
|
17
17
|
import { IFeature } from "../../features";
|
|
18
18
|
import Manifest from "../../manifest";
|
|
19
|
-
import { IAdaptation, IAudioTrack, IAudioTrackPreference, IAvailableAudioTrack, IAvailableTextTrack, IAvailableVideoTrack, IBifThumbnail, IBitrateEstimate, IConstructorOptions, IDecipherabilityUpdateContent, IKeySystemConfigurationOutput, ILoadVideoOptions, IPeriod, IPlayerError, IPlayerState, IPositionUpdate, IRepresentation, IStreamEvent, ITextTrack, ITextTrackPreference, IVideoTrack, IVideoTrackPreference } from "../../public_types";
|
|
19
|
+
import { IAdaptation, IAudioTrack, IAudioTrackPreference, IAvailableAudioTrack, IAvailableTextTrack, IAvailableVideoTrack, IBifThumbnail, IBitrateEstimate, IConstructorOptions, IDecipherabilityUpdateContent, IKeySystemConfigurationOutput, IKeySystemOption, ILoadVideoOptions, IPeriod, IPlayerError, IPlayerState, IPositionUpdate, IRepresentation, IStreamEvent, ITextTrack, ITextTrackPreference, IVideoTrack, IVideoTrackPreference } from "../../public_types";
|
|
20
20
|
import EventEmitter, { IListener } from "../../utils/event_emitter";
|
|
21
21
|
import Logger from "../../utils/logger";
|
|
22
22
|
import { IBufferedChunk, IBufferType } from "../segment_buffers";
|
|
@@ -169,6 +169,7 @@ declare class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
169
169
|
position?: number;
|
|
170
170
|
relative?: number;
|
|
171
171
|
};
|
|
172
|
+
keySystems?: IKeySystemOption[];
|
|
172
173
|
autoPlay?: boolean;
|
|
173
174
|
}): void;
|
|
174
175
|
createDebugElement(element: HTMLElement): {
|
|
@@ -716,6 +717,15 @@ declare class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
716
717
|
* @returns {number}
|
|
717
718
|
*/
|
|
718
719
|
getMinimumPosition(): number | null;
|
|
720
|
+
/**
|
|
721
|
+
* Returns the current position for live contents.
|
|
722
|
+
*
|
|
723
|
+
* Returns `null` if no content is loaded or if the current loaded content is
|
|
724
|
+
* not considered as a live content.
|
|
725
|
+
* Returns `undefined` if that live position is currently unknown.
|
|
726
|
+
* @returns {number}
|
|
727
|
+
*/
|
|
728
|
+
getLivePosition(): number | undefined | null;
|
|
719
729
|
/**
|
|
720
730
|
* Get maximum seek-able position.
|
|
721
731
|
* @returns {number}
|