rx-player 4.3.0-dev.2025030400 → 4.3.0-dev.2025040100
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/CHANGELOG.md +15 -2
- package/VERSION +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/commonjs/compat/add_class_name.d.ts.map +1 -1
- package/dist/commonjs/compat/add_class_name.js +1 -4
- package/dist/commonjs/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/commonjs/compat/browser_compatibility_types.js +0 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.js +0 -2
- package/dist/commonjs/compat/eme/eme-api-implementation.js +0 -1
- package/dist/commonjs/compat/eme/generate_key_request.d.ts +2 -2
- package/dist/commonjs/compat/eme/generate_key_request.js +2 -2
- package/dist/commonjs/compat/is_vtt_cue.d.ts.map +1 -1
- package/dist/commonjs/compat/is_vtt_cue.js +0 -1
- package/dist/commonjs/compat/patch_webkit_source_buffer.js +1 -1
- package/dist/commonjs/core/fetchers/index.d.ts +5 -2
- package/dist/commonjs/core/fetchers/index.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/index.js +6 -1
- package/dist/commonjs/core/fetchers/segment/segment_queue_creator.d.ts +4 -3
- package/dist/commonjs/core/fetchers/segment/segment_queue_creator.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_queue_creator.js +3 -4
- package/dist/commonjs/core/fetchers/thumbnails/index.d.ts +6 -0
- package/dist/commonjs/core/fetchers/thumbnails/index.d.ts.map +1 -0
- package/dist/commonjs/core/fetchers/thumbnails/index.js +6 -0
- package/dist/commonjs/core/fetchers/thumbnails/thumbnail_fetcher.d.ts +87 -0
- package/dist/commonjs/core/fetchers/thumbnails/thumbnail_fetcher.d.ts.map +1 -0
- package/dist/commonjs/core/fetchers/thumbnails/thumbnail_fetcher.js +176 -0
- package/dist/commonjs/core/main/common/get_thumbnail_data.d.ts +13 -0
- package/dist/commonjs/core/main/common/get_thumbnail_data.d.ts.map +1 -0
- package/dist/commonjs/core/main/common/get_thumbnail_data.js +72 -0
- package/dist/commonjs/core/main/worker/content_preparer.d.ts +3 -0
- package/dist/commonjs/core/main/worker/content_preparer.d.ts.map +1 -1
- package/dist/commonjs/core/main/worker/content_preparer.js +88 -1
- package/dist/commonjs/core/main/worker/worker_main.d.ts.map +1 -1
- package/dist/commonjs/core/main/worker/worker_main.js +45 -3
- package/dist/commonjs/core/segment_sinks/garbage_collector.d.ts.map +1 -1
- package/dist/commonjs/core/segment_sinks/garbage_collector.js +4 -0
- package/dist/commonjs/core/stream/representation/representation_stream.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/representation_stream.js +29 -45
- package/dist/commonjs/core/stream/representation/utils/push_init_segment.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/utils/push_init_segment.js +0 -3
- package/dist/commonjs/core/stream/representation/utils/push_media_segment.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/utils/push_media_segment.js +0 -3
- package/dist/commonjs/default_config.d.ts +22 -0
- package/dist/commonjs/default_config.d.ts.map +1 -1
- package/dist/commonjs/default_config.js +27 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/index.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/capabilities.d.ts +2 -2
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/capabilities.js +2 -2
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +0 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +0 -1
- package/dist/commonjs/index.js +1 -1
- package/dist/commonjs/main_thread/api/public_api.d.ts +136 -7
- package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/public_api.js +95 -15
- package/dist/commonjs/main_thread/decrypt/session_events_listener.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/session_events_listener.js +26 -18
- package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.d.ts +1 -1
- package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.js +1 -1
- package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/directfile_content_initializer.js +3 -0
- package/dist/commonjs/main_thread/init/media_source_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/media_source_content_initializer.js +14 -3
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts +1 -6
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +77 -17
- package/dist/commonjs/main_thread/init/types.d.ts +8 -0
- package/dist/commonjs/main_thread/init/types.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.d.ts +5 -4
- package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.js +10 -4
- package/dist/commonjs/main_thread/render_thumbnail.d.ts +27 -0
- package/dist/commonjs/main_thread/render_thumbnail.d.ts.map +1 -0
- package/dist/commonjs/main_thread/render_thumbnail.js +255 -0
- package/dist/commonjs/manifest/classes/index.d.ts +2 -1
- package/dist/commonjs/manifest/classes/index.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/manifest.js +1 -1
- package/dist/commonjs/manifest/classes/period.d.ts +56 -1
- package/dist/commonjs/manifest/classes/period.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/period.js +24 -0
- package/dist/commonjs/manifest/classes/representation.d.ts +2 -0
- package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/representation.js +1 -0
- package/dist/commonjs/manifest/classes/representation_index/static.d.ts +15 -0
- package/dist/commonjs/manifest/classes/representation_index/static.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/representation_index/static.js +17 -0
- package/dist/commonjs/manifest/classes/representation_index/types.d.ts +20 -0
- package/dist/commonjs/manifest/classes/representation_index/types.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/update_period_in_place.d.ts +9 -0
- package/dist/commonjs/manifest/classes/update_period_in_place.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/update_period_in_place.js +85 -15
- package/dist/commonjs/manifest/index.d.ts +2 -2
- package/dist/commonjs/manifest/index.d.ts.map +1 -1
- package/dist/commonjs/manifest/types.d.ts +56 -0
- package/dist/commonjs/manifest/types.d.ts.map +1 -1
- package/dist/commonjs/manifest/utils.d.ts.map +1 -1
- package/dist/commonjs/manifest/utils.js +120 -56
- package/dist/commonjs/minimal.js +1 -1
- package/dist/commonjs/multithread_types.d.ts +33 -7
- package/dist/commonjs/multithread_types.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_hdr_information.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/get_hdr_information.js +17 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/base.d.ts +15 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/base.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/base.js +22 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/list.d.ts +15 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/list.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/list.js +18 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/template.d.ts +10 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/template.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/template.js +12 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +15 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +26 -0
- package/dist/commonjs/parsers/manifest/dash/common/indexes/tokens.js +3 -3
- package/dist/commonjs/parsers/manifest/dash/common/infer_adaptation_type.d.ts +15 -10
- package/dist/commonjs/parsers/manifest/dash/common/infer_adaptation_type.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/infer_adaptation_type.js +56 -4
- package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.d.ts +5 -2
- package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.js +71 -4
- package/dist/commonjs/parsers/manifest/dash/common/parse_periods.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/parse_periods.js +3 -2
- package/dist/commonjs/parsers/manifest/dash/common/parse_representations.d.ts +1 -0
- package/dist/commonjs/parsers/manifest/dash/common/parse_representations.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/common/parse_representations.js +19 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +8 -0
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Representation.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/Representation.js +8 -0
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/node_parser_types.d.ts +1 -0
- package/dist/commonjs/parsers/manifest/dash/node_parser_types.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Representation.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +10 -0
- package/dist/commonjs/parsers/manifest/local/parse_local_manifest.js +1 -0
- package/dist/commonjs/parsers/manifest/local/representation_index.d.ts +15 -0
- package/dist/commonjs/parsers/manifest/local/representation_index.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/local/representation_index.js +20 -0
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.js +1 -0
- package/dist/commonjs/parsers/manifest/metaplaylist/representation_index.d.ts +10 -0
- package/dist/commonjs/parsers/manifest/metaplaylist/representation_index.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/metaplaylist/representation_index.js +9 -0
- package/dist/commonjs/parsers/manifest/smooth/create_parser.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/smooth/create_parser.js +1 -0
- package/dist/commonjs/parsers/manifest/smooth/representation_index.d.ts +15 -0
- package/dist/commonjs/parsers/manifest/smooth/representation_index.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/smooth/representation_index.js +23 -0
- package/dist/commonjs/parsers/manifest/types.d.ts +61 -0
- package/dist/commonjs/parsers/manifest/types.d.ts.map +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/parse_ttml.d.ts +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/regexps.d.ts.map +1 -1
- package/dist/commonjs/parsers/texttracks/ttml/regexps.js +1 -1
- package/dist/commonjs/parsers/texttracks/webvtt/native/set_settings_on_cue.js +1 -1
- package/dist/commonjs/public_types.d.ts +60 -0
- package/dist/commonjs/public_types.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/pipelines.js +5 -0
- package/dist/commonjs/transports/dash/thumbnails.d.ts +21 -0
- package/dist/commonjs/transports/dash/thumbnails.d.ts.map +1 -0
- package/dist/commonjs/transports/dash/thumbnails.js +127 -0
- package/dist/commonjs/transports/local/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/local/pipelines.js +8 -0
- package/dist/commonjs/transports/metaplaylist/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/metaplaylist/pipelines.js +8 -0
- package/dist/commonjs/transports/smooth/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/smooth/pipelines.js +8 -0
- package/dist/commonjs/transports/smooth/segment_loader.d.ts.map +1 -1
- package/dist/commonjs/transports/types.d.ts +29 -0
- package/dist/commonjs/transports/types.d.ts.map +1 -1
- package/dist/commonjs/utils/are_codecs_compatible.js +1 -1
- package/dist/commonjs/utils/array_find.js +1 -1
- package/dist/commonjs/utils/array_find_index.js +1 -1
- package/dist/commonjs/utils/array_includes.js +1 -1
- package/dist/commonjs/utils/assert.js +1 -1
- package/dist/commonjs/utils/flat_map.d.ts.map +1 -1
- package/dist/commonjs/utils/flat_map.js +0 -1
- package/dist/commonjs/utils/logger.d.ts.map +1 -1
- package/dist/commonjs/utils/logger.js +0 -2
- package/dist/commonjs/utils/noop.js +1 -1
- package/dist/commonjs/utils/object_assign.d.ts.map +1 -1
- package/dist/commonjs/utils/object_assign.js +3 -4
- package/dist/commonjs/utils/object_values.js +1 -1
- package/dist/commonjs/utils/request/xhr.js +1 -1
- package/dist/commonjs/utils/starts_with.d.ts.map +1 -1
- package/dist/commonjs/utils/starts_with.js +0 -1
- package/dist/commonjs/utils/string_parsing.js +1 -1
- package/dist/commonjs/utils/url-utils.js +2 -2
- package/dist/commonjs/utils/weak_map_memory.d.ts.map +1 -1
- package/dist/commonjs/utils/weak_map_memory.js +0 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/es2017/compat/add_class_name.d.ts.map +1 -1
- package/dist/es2017/compat/add_class_name.js +1 -4
- package/dist/es2017/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/es2017/compat/browser_compatibility_types.js +0 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.js +0 -2
- package/dist/es2017/compat/eme/eme-api-implementation.js +0 -1
- package/dist/es2017/compat/eme/generate_key_request.d.ts +2 -2
- package/dist/es2017/compat/eme/generate_key_request.js +2 -2
- package/dist/es2017/compat/is_vtt_cue.d.ts.map +1 -1
- package/dist/es2017/compat/is_vtt_cue.js +0 -1
- package/dist/es2017/compat/patch_webkit_source_buffer.js +1 -1
- package/dist/es2017/core/fetchers/index.d.ts +5 -2
- package/dist/es2017/core/fetchers/index.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/index.js +3 -1
- package/dist/es2017/core/fetchers/segment/segment_queue_creator.d.ts +4 -3
- package/dist/es2017/core/fetchers/segment/segment_queue_creator.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/segment/segment_queue_creator.js +3 -4
- package/dist/es2017/core/fetchers/thumbnails/index.d.ts +6 -0
- package/dist/es2017/core/fetchers/thumbnails/index.d.ts.map +1 -0
- package/dist/es2017/core/fetchers/thumbnails/index.js +3 -0
- package/dist/es2017/core/fetchers/thumbnails/thumbnail_fetcher.d.ts +87 -0
- package/dist/es2017/core/fetchers/thumbnails/thumbnail_fetcher.d.ts.map +1 -0
- package/dist/es2017/core/fetchers/thumbnails/thumbnail_fetcher.js +123 -0
- package/dist/es2017/core/main/common/get_thumbnail_data.d.ts +13 -0
- package/dist/es2017/core/main/common/get_thumbnail_data.d.ts.map +1 -0
- package/dist/es2017/core/main/common/get_thumbnail_data.js +28 -0
- package/dist/es2017/core/main/worker/content_preparer.d.ts +3 -0
- package/dist/es2017/core/main/worker/content_preparer.d.ts.map +1 -1
- package/dist/es2017/core/main/worker/content_preparer.js +40 -1
- package/dist/es2017/core/main/worker/worker_main.d.ts.map +1 -1
- package/dist/es2017/core/main/worker/worker_main.js +45 -3
- package/dist/es2017/core/segment_sinks/garbage_collector.d.ts.map +1 -1
- package/dist/es2017/core/segment_sinks/garbage_collector.js +4 -0
- package/dist/es2017/core/stream/representation/representation_stream.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/representation_stream.js +29 -45
- package/dist/es2017/core/stream/representation/utils/push_init_segment.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/utils/push_init_segment.js +0 -3
- package/dist/es2017/core/stream/representation/utils/push_media_segment.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/utils/push_media_segment.js +0 -3
- package/dist/es2017/default_config.d.ts +22 -0
- package/dist/es2017/default_config.d.ts.map +1 -1
- package/dist/es2017/default_config.js +27 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/index.js +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/capabilities.d.ts +2 -2
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/capabilities.js +2 -2
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +0 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +0 -1
- package/dist/es2017/index.js +1 -1
- package/dist/es2017/main_thread/api/public_api.d.ts +136 -7
- package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/public_api.js +90 -14
- package/dist/es2017/main_thread/decrypt/session_events_listener.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/session_events_listener.js +4 -6
- package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.d.ts +1 -1
- package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.js +1 -1
- package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/directfile_content_initializer.js +1 -0
- package/dist/es2017/main_thread/init/media_source_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/media_source_content_initializer.js +11 -3
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts +1 -6
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +72 -16
- package/dist/es2017/main_thread/init/types.d.ts +8 -0
- package/dist/es2017/main_thread/init/types.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.d.ts +5 -4
- package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.js +10 -4
- package/dist/es2017/main_thread/render_thumbnail.d.ts +27 -0
- package/dist/es2017/main_thread/render_thumbnail.d.ts.map +1 -0
- package/dist/es2017/main_thread/render_thumbnail.js +187 -0
- package/dist/es2017/manifest/classes/index.d.ts +2 -1
- package/dist/es2017/manifest/classes/index.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/manifest.js +1 -1
- package/dist/es2017/manifest/classes/period.d.ts +56 -1
- package/dist/es2017/manifest/classes/period.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/period.js +24 -0
- package/dist/es2017/manifest/classes/representation.d.ts +2 -0
- package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/representation.js +1 -0
- package/dist/es2017/manifest/classes/representation_index/static.d.ts +15 -0
- package/dist/es2017/manifest/classes/representation_index/static.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/representation_index/static.js +17 -0
- package/dist/es2017/manifest/classes/representation_index/types.d.ts +20 -0
- package/dist/es2017/manifest/classes/representation_index/types.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/update_period_in_place.d.ts +9 -0
- package/dist/es2017/manifest/classes/update_period_in_place.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/update_period_in_place.js +64 -0
- package/dist/es2017/manifest/index.d.ts +2 -2
- package/dist/es2017/manifest/index.d.ts.map +1 -1
- package/dist/es2017/manifest/types.d.ts +56 -0
- package/dist/es2017/manifest/types.d.ts.map +1 -1
- package/dist/es2017/manifest/utils.d.ts.map +1 -1
- package/dist/es2017/manifest/utils.js +24 -0
- package/dist/es2017/minimal.js +1 -1
- package/dist/es2017/multithread_types.d.ts +33 -7
- package/dist/es2017/multithread_types.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/convert_supplemental_codecs.d.ts +1 -1
- package/dist/es2017/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -1
- package/dist/es2017/parsers/manifest/dash/common/get_hdr_information.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/get_hdr_information.js +17 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/base.d.ts +15 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/base.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/base.js +22 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/list.d.ts +15 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/list.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/list.js +18 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/template.d.ts +10 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/template.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/template.js +12 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +15 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +26 -0
- package/dist/es2017/parsers/manifest/dash/common/indexes/tokens.js +3 -3
- package/dist/es2017/parsers/manifest/dash/common/infer_adaptation_type.d.ts +15 -10
- package/dist/es2017/parsers/manifest/dash/common/infer_adaptation_type.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/infer_adaptation_type.js +51 -4
- package/dist/es2017/parsers/manifest/dash/common/parse_adaptation_sets.d.ts +5 -2
- package/dist/es2017/parsers/manifest/dash/common/parse_adaptation_sets.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/parse_adaptation_sets.js +72 -5
- package/dist/es2017/parsers/manifest/dash/common/parse_periods.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/parse_periods.js +2 -1
- package/dist/es2017/parsers/manifest/dash/common/parse_representations.d.ts +1 -0
- package/dist/es2017/parsers/manifest/dash/common/parse_representations.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/common/parse_representations.js +19 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +8 -0
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Representation.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/Representation.js +8 -0
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/node_parser_types.d.ts +1 -0
- package/dist/es2017/parsers/manifest/dash/node_parser_types.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Representation.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +10 -0
- package/dist/es2017/parsers/manifest/local/parse_local_manifest.js +1 -0
- package/dist/es2017/parsers/manifest/local/representation_index.d.ts +15 -0
- package/dist/es2017/parsers/manifest/local/representation_index.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/local/representation_index.js +20 -0
- package/dist/es2017/parsers/manifest/metaplaylist/metaplaylist_parser.js +1 -0
- package/dist/es2017/parsers/manifest/metaplaylist/representation_index.d.ts +10 -0
- package/dist/es2017/parsers/manifest/metaplaylist/representation_index.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/metaplaylist/representation_index.js +9 -0
- package/dist/es2017/parsers/manifest/smooth/create_parser.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/smooth/create_parser.js +1 -0
- package/dist/es2017/parsers/manifest/smooth/representation_index.d.ts +15 -0
- package/dist/es2017/parsers/manifest/smooth/representation_index.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/smooth/representation_index.js +23 -0
- package/dist/es2017/parsers/manifest/types.d.ts +61 -0
- package/dist/es2017/parsers/manifest/types.d.ts.map +1 -1
- package/dist/es2017/parsers/texttracks/ttml/parse_ttml.d.ts +1 -1
- package/dist/es2017/parsers/texttracks/ttml/regexps.d.ts.map +1 -1
- package/dist/es2017/parsers/texttracks/ttml/regexps.js +1 -1
- package/dist/es2017/parsers/texttracks/webvtt/native/set_settings_on_cue.js +1 -1
- package/dist/es2017/public_types.d.ts +60 -0
- package/dist/es2017/public_types.d.ts.map +1 -1
- package/dist/es2017/transports/dash/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/dash/pipelines.js +5 -0
- package/dist/es2017/transports/dash/thumbnails.d.ts +21 -0
- package/dist/es2017/transports/dash/thumbnails.d.ts.map +1 -0
- package/dist/es2017/transports/dash/thumbnails.js +72 -0
- package/dist/es2017/transports/local/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/local/pipelines.js +6 -0
- package/dist/es2017/transports/metaplaylist/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/metaplaylist/pipelines.js +6 -0
- package/dist/es2017/transports/smooth/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/smooth/pipelines.js +6 -0
- package/dist/es2017/transports/smooth/segment_loader.d.ts.map +1 -1
- package/dist/es2017/transports/types.d.ts +29 -0
- package/dist/es2017/transports/types.d.ts.map +1 -1
- package/dist/es2017/utils/are_codecs_compatible.js +1 -1
- package/dist/es2017/utils/array_find.js +1 -1
- package/dist/es2017/utils/array_find_index.js +1 -1
- package/dist/es2017/utils/array_includes.js +1 -1
- package/dist/es2017/utils/assert.js +1 -1
- package/dist/es2017/utils/flat_map.d.ts.map +1 -1
- package/dist/es2017/utils/flat_map.js +0 -1
- package/dist/es2017/utils/logger.d.ts.map +1 -1
- package/dist/es2017/utils/logger.js +0 -2
- package/dist/es2017/utils/noop.js +1 -1
- package/dist/es2017/utils/object_assign.d.ts.map +1 -1
- package/dist/es2017/utils/object_assign.js +3 -4
- package/dist/es2017/utils/object_values.js +1 -1
- package/dist/es2017/utils/request/xhr.js +1 -1
- package/dist/es2017/utils/starts_with.d.ts.map +1 -1
- package/dist/es2017/utils/starts_with.js +0 -1
- package/dist/es2017/utils/string_parsing.js +1 -1
- package/dist/es2017/utils/url-utils.js +2 -2
- package/dist/es2017/utils/weak_map_memory.d.ts.map +1 -1
- package/dist/es2017/utils/weak_map_memory.js +0 -1
- package/dist/rx-player.js +1014 -259
- package/dist/rx-player.min.js +18 -18
- package/dist/worker.js +8 -8
- package/eslint.config.mjs +423 -0
- package/package.json +48 -39
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/compat/__tests__/should_wait_for_data_before_loaded.test.ts +0 -1
- package/src/compat/add_class_name.ts +1 -4
- package/src/compat/browser_compatibility_types.ts +0 -1
- package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +0 -2
- package/src/compat/eme/eme-api-implementation.ts +0 -1
- package/src/compat/eme/generate_key_request.ts +2 -2
- package/src/compat/is_vtt_cue.ts +0 -1
- package/src/compat/patch_webkit_source_buffer.ts +1 -1
- package/src/core/fetchers/index.ts +11 -1
- package/src/core/fetchers/segment/segment_queue_creator.ts +4 -6
- package/src/core/fetchers/thumbnails/index.ts +8 -0
- package/src/core/fetchers/thumbnails/thumbnail_fetcher.ts +233 -0
- package/src/core/main/common/get_thumbnail_data.ts +43 -0
- package/src/core/main/worker/content_preparer.ts +47 -2
- package/src/core/main/worker/worker_main.ts +67 -3
- package/src/core/segment_sinks/garbage_collector.ts +4 -0
- package/src/core/stream/representation/representation_stream.ts +29 -64
- package/src/core/stream/representation/utils/push_init_segment.ts +0 -3
- package/src/core/stream/representation/utils/push_media_segment.ts +0 -3
- package/src/default_config.ts +30 -1
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/DRMInfos.test.ts +0 -3
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/HDCPPolicy.test.ts +0 -2
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/decodingInfos.test.ts +0 -2
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/defaultCodecFinder.test.ts +1 -1
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaContentType.test.ts +0 -2
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaDisplayInfos.test.ts +0 -7
- package/src/experimental/tools/mediaCapabilitiesProber/api/index.ts +1 -1
- package/src/experimental/tools/mediaCapabilitiesProber/capabilities.ts +2 -2
- package/src/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.ts +1 -1
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.ts +0 -1
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.ts +0 -1
- package/src/index.ts +1 -1
- package/src/main_thread/api/public_api.ts +142 -22
- package/src/main_thread/decrypt/__tests__/__global__/utils.ts +8 -4
- package/src/main_thread/decrypt/__tests__/find_key_system.test.ts +5 -5
- package/src/main_thread/decrypt/session_events_listener.ts +9 -8
- package/src/main_thread/decrypt/utils/loaded_sessions_store.ts +1 -1
- package/src/main_thread/init/directfile_content_initializer.ts +4 -0
- package/src/main_thread/init/media_source_content_initializer.ts +35 -3
- package/src/main_thread/init/multi_thread_content_initializer.ts +104 -28
- package/src/main_thread/init/types.ts +12 -0
- package/src/main_thread/init/utils/__tests__/update_manifest_codec_support.test.ts +326 -0
- package/src/main_thread/init/utils/update_manifest_codec_support.ts +13 -3
- package/src/main_thread/render_thumbnail.ts +255 -0
- package/src/manifest/classes/__tests__/adaptation.test.ts +3 -0
- package/src/manifest/classes/__tests__/manifest.test.ts +21 -8
- package/src/manifest/classes/__tests__/period.test.ts +50 -12
- package/src/manifest/classes/__tests__/representation.test.ts +3 -0
- package/src/manifest/classes/__tests__/update_period_in_place.test.ts +388 -0
- package/src/manifest/classes/__tests__/update_periods.test.ts +12 -10
- package/src/manifest/classes/index.ts +2 -0
- package/src/manifest/classes/manifest.ts +1 -1
- package/src/manifest/classes/period.ts +86 -1
- package/src/manifest/classes/representation.ts +3 -0
- package/src/manifest/classes/representation_index/static.ts +18 -0
- package/src/manifest/classes/representation_index/types.ts +23 -0
- package/src/manifest/classes/update_period_in_place.ts +84 -0
- package/src/manifest/index.ts +2 -0
- package/src/manifest/types.ts +58 -0
- package/src/manifest/utils.ts +36 -0
- package/src/minimal.ts +1 -1
- package/src/multithread_types.ts +37 -5
- package/src/parsers/manifest/dash/common/__tests__/flatten_overlapping_period.test.ts +16 -13
- package/src/parsers/manifest/dash/common/convert_supplemental_codecs.ts +1 -1
- package/src/parsers/manifest/dash/common/get_hdr_information.ts +17 -0
- package/src/parsers/manifest/dash/common/indexes/base.ts +23 -0
- package/src/parsers/manifest/dash/common/indexes/list.ts +19 -0
- package/src/parsers/manifest/dash/common/indexes/template.ts +16 -0
- package/src/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.ts +27 -0
- package/src/parsers/manifest/dash/common/indexes/tokens.ts +3 -3
- package/src/parsers/manifest/dash/common/infer_adaptation_type.ts +75 -8
- package/src/parsers/manifest/dash/common/parse_adaptation_sets.ts +95 -12
- package/src/parsers/manifest/dash/common/parse_periods.ts +5 -1
- package/src/parsers/manifest/dash/common/parse_representations.ts +19 -1
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.ts +7 -0
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/AdaptationSet.test.ts +3 -7
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/ContentComponent.test.ts +1 -1
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/ContentProtection.test.ts +1 -1
- package/src/parsers/manifest/dash/native-parser/node_parsers/Representation.ts +7 -0
- package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/AdaptationSet.test.ts +3 -3
- package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/ContentComponent.test.ts +1 -1
- package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/ContentProtection.test.ts +2 -2
- package/src/parsers/manifest/dash/node_parser_types.ts +1 -0
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/Representation.ts +11 -0
- package/src/parsers/manifest/local/parse_local_manifest.ts +1 -0
- package/src/parsers/manifest/local/representation_index.ts +21 -0
- package/src/parsers/manifest/metaplaylist/metaplaylist_parser.ts +1 -0
- package/src/parsers/manifest/metaplaylist/representation_index.ts +10 -0
- package/src/parsers/manifest/smooth/create_parser.ts +1 -0
- package/src/parsers/manifest/smooth/representation_index.ts +24 -0
- package/src/parsers/manifest/types.ts +62 -0
- package/src/parsers/manifest/utils/__tests__/get_first_time_from_adaptations.test.ts +3 -0
- package/src/parsers/manifest/utils/__tests__/get_last_time_from_adaptation.test.ts +3 -0
- package/src/parsers/texttracks/ttml/parse_ttml.ts +1 -1
- package/src/parsers/texttracks/ttml/regexps.ts +1 -1
- package/src/parsers/texttracks/webvtt/native/set_settings_on_cue.ts +1 -1
- package/src/public_types.ts +62 -0
- package/src/transports/dash/pipelines.ts +5 -0
- package/src/transports/dash/thumbnails.ts +97 -0
- package/src/transports/local/pipelines.ts +9 -0
- package/src/transports/metaplaylist/pipelines.ts +9 -0
- package/src/transports/smooth/pipelines.ts +7 -0
- package/src/transports/types.ts +43 -0
- package/src/utils/__tests__/are_codecs_compatible.test.ts +21 -1
- package/src/utils/__tests__/array_find.test.ts +1 -1
- package/src/utils/__tests__/array_find_index.test.ts +0 -1
- package/src/utils/__tests__/array_includes.test.ts +1 -1
- package/src/utils/__tests__/id_generator.test.ts +0 -2
- package/src/utils/are_codecs_compatible.ts +1 -1
- package/src/utils/array_find.ts +1 -1
- package/src/utils/array_find_index.ts +1 -1
- package/src/utils/array_includes.ts +1 -1
- package/src/utils/assert.ts +1 -1
- package/src/utils/flat_map.ts +0 -1
- package/src/utils/logger.ts +0 -2
- package/src/utils/noop.ts +1 -1
- package/src/utils/object_assign.ts +3 -4
- package/src/utils/object_values.ts +1 -1
- package/src/utils/request/xhr.ts +2 -2
- package/src/utils/starts_with.ts +0 -1
- package/src/utils/string_parsing.ts +1 -1
- package/src/utils/url-utils.ts +2 -2
- package/src/utils/weak_map_memory.ts +0 -1
- package/vitest.config.mjs +46 -22
|
@@ -166,6 +166,28 @@ function generateFakeAdaptation({
|
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
function generateFakeThumbnailTrack({ id }: { id: string }) {
|
|
170
|
+
return {
|
|
171
|
+
id,
|
|
172
|
+
mimeType: "image/png",
|
|
173
|
+
height: 100,
|
|
174
|
+
width: 200,
|
|
175
|
+
horizontalTiles: 5,
|
|
176
|
+
verticalTiles: 3,
|
|
177
|
+
start: 0,
|
|
178
|
+
end: 100,
|
|
179
|
+
tileDuration: 2,
|
|
180
|
+
index: {
|
|
181
|
+
_update() {
|
|
182
|
+
/* noop */
|
|
183
|
+
},
|
|
184
|
+
_replace() {
|
|
185
|
+
/* noop */
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
169
191
|
describe("Manifest - updatePeriodInPlace", () => {
|
|
170
192
|
let mockOldVideoRepresentation1Replace: MockInstance | undefined;
|
|
171
193
|
let mockOldVideoRepresentation2Replace: MockInstance | undefined;
|
|
@@ -308,6 +330,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
308
330
|
start: 5,
|
|
309
331
|
end: 15,
|
|
310
332
|
duration: 10,
|
|
333
|
+
thumbnailTracks: [],
|
|
311
334
|
adaptations: {
|
|
312
335
|
video: [oldVideoAdaptation1, oldVideoAdaptation2],
|
|
313
336
|
audio: [oldAudioAdaptation],
|
|
@@ -335,6 +358,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
335
358
|
start: 500,
|
|
336
359
|
end: 520,
|
|
337
360
|
duration: 20,
|
|
361
|
+
thumbnailTracks: [],
|
|
338
362
|
adaptations: {
|
|
339
363
|
video: [newVideoAdaptation1, newVideoAdaptation2],
|
|
340
364
|
audio: [newAudioAdaptation],
|
|
@@ -355,6 +379,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
355
379
|
);
|
|
356
380
|
|
|
357
381
|
expect(res).toEqual({
|
|
382
|
+
addedThumbnailTracks: [],
|
|
383
|
+
updatedThumbnailTracks: [],
|
|
384
|
+
removedThumbnailTracks: [],
|
|
358
385
|
addedAdaptations: [],
|
|
359
386
|
removedAdaptations: [],
|
|
360
387
|
updatedAdaptations: [
|
|
@@ -464,6 +491,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
464
491
|
start: 5,
|
|
465
492
|
end: 15,
|
|
466
493
|
duration: 10,
|
|
494
|
+
thumbnailTracks: [],
|
|
467
495
|
adaptations: {
|
|
468
496
|
video: [oldVideoAdaptation1, oldVideoAdaptation2],
|
|
469
497
|
audio: [oldAudioAdaptation],
|
|
@@ -491,6 +519,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
491
519
|
start: 500,
|
|
492
520
|
end: 520,
|
|
493
521
|
duration: 20,
|
|
522
|
+
thumbnailTracks: [],
|
|
494
523
|
adaptations: {
|
|
495
524
|
video: [newVideoAdaptation1, newVideoAdaptation2],
|
|
496
525
|
audio: [newAudioAdaptation],
|
|
@@ -510,6 +539,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
510
539
|
MANIFEST_UPDATE_TYPE.Partial,
|
|
511
540
|
);
|
|
512
541
|
expect(res).toEqual({
|
|
542
|
+
addedThumbnailTracks: [],
|
|
543
|
+
updatedThumbnailTracks: [],
|
|
544
|
+
removedThumbnailTracks: [],
|
|
513
545
|
addedAdaptations: [],
|
|
514
546
|
removedAdaptations: [],
|
|
515
547
|
updatedAdaptations: [
|
|
@@ -614,6 +646,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
614
646
|
start: 5,
|
|
615
647
|
end: 15,
|
|
616
648
|
duration: 10,
|
|
649
|
+
thumbnailTracks: [],
|
|
617
650
|
adaptations: {
|
|
618
651
|
video: [oldVideoAdaptation1],
|
|
619
652
|
audio: [oldAudioAdaptation],
|
|
@@ -644,6 +677,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
644
677
|
start: 500,
|
|
645
678
|
end: 520,
|
|
646
679
|
duration: 20,
|
|
680
|
+
thumbnailTracks: [],
|
|
647
681
|
adaptations: {
|
|
648
682
|
video: [newVideoAdaptation1, newVideoAdaptation2],
|
|
649
683
|
audio: [newAudioAdaptation],
|
|
@@ -663,6 +697,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
663
697
|
MANIFEST_UPDATE_TYPE.Full,
|
|
664
698
|
);
|
|
665
699
|
expect(res).toEqual({
|
|
700
|
+
addedThumbnailTracks: [],
|
|
701
|
+
updatedThumbnailTracks: [],
|
|
702
|
+
removedThumbnailTracks: [],
|
|
666
703
|
addedAdaptations: [newVideoAdaptation2.getMetadataSnapshot()],
|
|
667
704
|
removedAdaptations: [],
|
|
668
705
|
updatedAdaptations: [
|
|
@@ -709,6 +746,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
709
746
|
start: 5,
|
|
710
747
|
end: 15,
|
|
711
748
|
duration: 10,
|
|
749
|
+
thumbnailTracks: [],
|
|
712
750
|
adaptations: {
|
|
713
751
|
video: [oldVideoAdaptation1],
|
|
714
752
|
audio: [oldAudioAdaptation],
|
|
@@ -736,6 +774,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
736
774
|
start: 500,
|
|
737
775
|
end: 520,
|
|
738
776
|
duration: 20,
|
|
777
|
+
thumbnailTracks: [],
|
|
739
778
|
adaptations: {
|
|
740
779
|
video: [newVideoAdaptation1, newVideoAdaptation2],
|
|
741
780
|
audio: [newAudioAdaptation],
|
|
@@ -755,6 +794,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
755
794
|
MANIFEST_UPDATE_TYPE.Partial,
|
|
756
795
|
);
|
|
757
796
|
expect(res).toEqual({
|
|
797
|
+
addedThumbnailTracks: [],
|
|
798
|
+
updatedThumbnailTracks: [],
|
|
799
|
+
removedThumbnailTracks: [],
|
|
758
800
|
addedAdaptations: [newVideoAdaptation2.getMetadataSnapshot()],
|
|
759
801
|
removedAdaptations: [],
|
|
760
802
|
updatedAdaptations: [
|
|
@@ -806,6 +848,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
806
848
|
start: 5,
|
|
807
849
|
end: 15,
|
|
808
850
|
duration: 10,
|
|
851
|
+
thumbnailTracks: [],
|
|
809
852
|
adaptations: {
|
|
810
853
|
video: [oldVideoAdaptation1, oldVideoAdaptation2],
|
|
811
854
|
audio: [oldAudioAdaptation],
|
|
@@ -828,6 +871,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
828
871
|
start: 500,
|
|
829
872
|
end: 520,
|
|
830
873
|
duration: 20,
|
|
874
|
+
thumbnailTracks: [],
|
|
831
875
|
adaptations: {
|
|
832
876
|
video: [newVideoAdaptation1],
|
|
833
877
|
audio: [newAudioAdaptation],
|
|
@@ -847,6 +891,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
847
891
|
MANIFEST_UPDATE_TYPE.Full,
|
|
848
892
|
);
|
|
849
893
|
expect(res).toEqual({
|
|
894
|
+
addedThumbnailTracks: [],
|
|
895
|
+
updatedThumbnailTracks: [],
|
|
896
|
+
removedThumbnailTracks: [],
|
|
850
897
|
addedAdaptations: [],
|
|
851
898
|
removedAdaptations: [
|
|
852
899
|
{
|
|
@@ -903,6 +950,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
903
950
|
start: 5,
|
|
904
951
|
end: 15,
|
|
905
952
|
duration: 10,
|
|
953
|
+
thumbnailTracks: [],
|
|
906
954
|
adaptations: {
|
|
907
955
|
video: [oldVideoAdaptation1, oldVideoAdaptation2],
|
|
908
956
|
audio: [oldAudioAdaptation],
|
|
@@ -925,6 +973,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
925
973
|
start: 500,
|
|
926
974
|
end: 520,
|
|
927
975
|
duration: 20,
|
|
976
|
+
thumbnailTracks: [],
|
|
928
977
|
adaptations: {
|
|
929
978
|
video: [newVideoAdaptation1],
|
|
930
979
|
audio: [newAudioAdaptation],
|
|
@@ -944,6 +993,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
944
993
|
MANIFEST_UPDATE_TYPE.Partial,
|
|
945
994
|
);
|
|
946
995
|
expect(res).toEqual({
|
|
996
|
+
addedThumbnailTracks: [],
|
|
997
|
+
updatedThumbnailTracks: [],
|
|
998
|
+
removedThumbnailTracks: [],
|
|
947
999
|
addedAdaptations: [],
|
|
948
1000
|
removedAdaptations: [
|
|
949
1001
|
{
|
|
@@ -995,6 +1047,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
995
1047
|
start: 5,
|
|
996
1048
|
end: 15,
|
|
997
1049
|
duration: 10,
|
|
1050
|
+
thumbnailTracks: [],
|
|
998
1051
|
adaptations: {
|
|
999
1052
|
video: [oldVideoAdaptation1],
|
|
1000
1053
|
audio: [oldAudioAdaptation],
|
|
@@ -1018,6 +1071,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1018
1071
|
start: 500,
|
|
1019
1072
|
end: 520,
|
|
1020
1073
|
duration: 20,
|
|
1074
|
+
thumbnailTracks: [],
|
|
1021
1075
|
adaptations: {
|
|
1022
1076
|
video: [newVideoAdaptation1],
|
|
1023
1077
|
audio: [newAudioAdaptation],
|
|
@@ -1037,6 +1091,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1037
1091
|
MANIFEST_UPDATE_TYPE.Full,
|
|
1038
1092
|
);
|
|
1039
1093
|
expect(res).toEqual({
|
|
1094
|
+
addedThumbnailTracks: [],
|
|
1095
|
+
updatedThumbnailTracks: [],
|
|
1096
|
+
removedThumbnailTracks: [],
|
|
1040
1097
|
addedAdaptations: [],
|
|
1041
1098
|
removedAdaptations: [],
|
|
1042
1099
|
updatedAdaptations: [
|
|
@@ -1079,6 +1136,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1079
1136
|
start: 5,
|
|
1080
1137
|
end: 15,
|
|
1081
1138
|
duration: 10,
|
|
1139
|
+
thumbnailTracks: [],
|
|
1082
1140
|
adaptations: {
|
|
1083
1141
|
video: [oldVideoAdaptation1],
|
|
1084
1142
|
audio: [oldAudioAdaptation],
|
|
@@ -1102,6 +1160,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1102
1160
|
start: 500,
|
|
1103
1161
|
end: 520,
|
|
1104
1162
|
duration: 20,
|
|
1163
|
+
thumbnailTracks: [],
|
|
1105
1164
|
adaptations: {
|
|
1106
1165
|
video: [newVideoAdaptation1],
|
|
1107
1166
|
audio: [newAudioAdaptation],
|
|
@@ -1121,6 +1180,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1121
1180
|
MANIFEST_UPDATE_TYPE.Partial,
|
|
1122
1181
|
);
|
|
1123
1182
|
expect(res).toEqual({
|
|
1183
|
+
addedThumbnailTracks: [],
|
|
1184
|
+
updatedThumbnailTracks: [],
|
|
1185
|
+
removedThumbnailTracks: [],
|
|
1124
1186
|
addedAdaptations: [],
|
|
1125
1187
|
removedAdaptations: [],
|
|
1126
1188
|
updatedAdaptations: [
|
|
@@ -1163,6 +1225,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1163
1225
|
start: 500,
|
|
1164
1226
|
end: 520,
|
|
1165
1227
|
duration: 20,
|
|
1228
|
+
thumbnailTracks: [],
|
|
1166
1229
|
adaptations: {
|
|
1167
1230
|
video: [oldVideoAdaptation1],
|
|
1168
1231
|
audio: [oldAudioAdaptation],
|
|
@@ -1185,6 +1248,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1185
1248
|
start: 5,
|
|
1186
1249
|
end: 15,
|
|
1187
1250
|
duration: 10,
|
|
1251
|
+
thumbnailTracks: [],
|
|
1188
1252
|
adaptations: {
|
|
1189
1253
|
video: [newVideoAdaptation1],
|
|
1190
1254
|
audio: [newAudioAdaptation],
|
|
@@ -1204,6 +1268,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1204
1268
|
MANIFEST_UPDATE_TYPE.Full,
|
|
1205
1269
|
);
|
|
1206
1270
|
expect(res).toEqual({
|
|
1271
|
+
addedThumbnailTracks: [],
|
|
1272
|
+
updatedThumbnailTracks: [],
|
|
1273
|
+
removedThumbnailTracks: [],
|
|
1207
1274
|
addedAdaptations: [],
|
|
1208
1275
|
removedAdaptations: [],
|
|
1209
1276
|
updatedAdaptations: [
|
|
@@ -1246,6 +1313,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1246
1313
|
start: 500,
|
|
1247
1314
|
end: 520,
|
|
1248
1315
|
duration: 20,
|
|
1316
|
+
thumbnailTracks: [],
|
|
1249
1317
|
adaptations: {
|
|
1250
1318
|
video: [oldVideoAdaptation1],
|
|
1251
1319
|
audio: [oldAudioAdaptation],
|
|
@@ -1268,6 +1336,7 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1268
1336
|
start: 5,
|
|
1269
1337
|
end: 15,
|
|
1270
1338
|
duration: 10,
|
|
1339
|
+
thumbnailTracks: [],
|
|
1271
1340
|
adaptations: {
|
|
1272
1341
|
video: [newVideoAdaptation1],
|
|
1273
1342
|
audio: [newAudioAdaptation],
|
|
@@ -1287,6 +1356,9 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1287
1356
|
MANIFEST_UPDATE_TYPE.Partial,
|
|
1288
1357
|
);
|
|
1289
1358
|
expect(res).toEqual({
|
|
1359
|
+
addedThumbnailTracks: [],
|
|
1360
|
+
updatedThumbnailTracks: [],
|
|
1361
|
+
removedThumbnailTracks: [],
|
|
1290
1362
|
addedAdaptations: [],
|
|
1291
1363
|
removedAdaptations: [],
|
|
1292
1364
|
updatedAdaptations: [
|
|
@@ -1313,4 +1385,320 @@ describe("Manifest - updatePeriodInPlace", () => {
|
|
|
1313
1385
|
expect(oldVideoAdaptation1.representations).toHaveLength(1);
|
|
1314
1386
|
mockLog.mockRestore();
|
|
1315
1387
|
});
|
|
1388
|
+
|
|
1389
|
+
it("should add new Thumbnail Track in Full mode", () => {
|
|
1390
|
+
const oldThumbnailTrack1 = generateFakeThumbnailTrack({
|
|
1391
|
+
id: "thumb-1",
|
|
1392
|
+
});
|
|
1393
|
+
const oldPeriod = {
|
|
1394
|
+
start: 5,
|
|
1395
|
+
end: 15,
|
|
1396
|
+
duration: 10,
|
|
1397
|
+
thumbnailTracks: [oldThumbnailTrack1],
|
|
1398
|
+
adaptations: {
|
|
1399
|
+
video: [],
|
|
1400
|
+
audio: [],
|
|
1401
|
+
},
|
|
1402
|
+
getAdaptations() {
|
|
1403
|
+
return [];
|
|
1404
|
+
},
|
|
1405
|
+
};
|
|
1406
|
+
const newThumbnailTrack1 = generateFakeThumbnailTrack({
|
|
1407
|
+
id: "thumb-1",
|
|
1408
|
+
});
|
|
1409
|
+
const newThumbnailTrack2 = generateFakeThumbnailTrack({
|
|
1410
|
+
id: "thumb-2",
|
|
1411
|
+
});
|
|
1412
|
+
const newPeriod = {
|
|
1413
|
+
start: 500,
|
|
1414
|
+
end: 520,
|
|
1415
|
+
duration: 20,
|
|
1416
|
+
thumbnailTracks: [newThumbnailTrack1, newThumbnailTrack2],
|
|
1417
|
+
adaptations: {
|
|
1418
|
+
video: [],
|
|
1419
|
+
audio: [],
|
|
1420
|
+
},
|
|
1421
|
+
getAdaptations() {
|
|
1422
|
+
return [];
|
|
1423
|
+
},
|
|
1424
|
+
};
|
|
1425
|
+
const mockLog = vi.spyOn(log, "warn");
|
|
1426
|
+
const res = updatePeriodInPlace(
|
|
1427
|
+
oldPeriod as unknown as Period,
|
|
1428
|
+
newPeriod as unknown as Period,
|
|
1429
|
+
MANIFEST_UPDATE_TYPE.Full,
|
|
1430
|
+
);
|
|
1431
|
+
expect(res).toEqual({
|
|
1432
|
+
addedThumbnailTracks: [
|
|
1433
|
+
{
|
|
1434
|
+
height: 100,
|
|
1435
|
+
horizontalTiles: 5,
|
|
1436
|
+
id: "thumb-2",
|
|
1437
|
+
mimeType: "image/png",
|
|
1438
|
+
verticalTiles: 3,
|
|
1439
|
+
start: 0,
|
|
1440
|
+
end: 100,
|
|
1441
|
+
tileDuration: 2,
|
|
1442
|
+
width: 200,
|
|
1443
|
+
},
|
|
1444
|
+
],
|
|
1445
|
+
updatedThumbnailTracks: [
|
|
1446
|
+
{
|
|
1447
|
+
height: 100,
|
|
1448
|
+
horizontalTiles: 5,
|
|
1449
|
+
id: "thumb-1",
|
|
1450
|
+
mimeType: "image/png",
|
|
1451
|
+
verticalTiles: 3,
|
|
1452
|
+
start: 0,
|
|
1453
|
+
end: 100,
|
|
1454
|
+
tileDuration: 2,
|
|
1455
|
+
width: 200,
|
|
1456
|
+
},
|
|
1457
|
+
],
|
|
1458
|
+
removedThumbnailTracks: [],
|
|
1459
|
+
addedAdaptations: [],
|
|
1460
|
+
removedAdaptations: [],
|
|
1461
|
+
updatedAdaptations: [],
|
|
1462
|
+
});
|
|
1463
|
+
expect(mockLog).toHaveBeenCalled();
|
|
1464
|
+
expect(mockLog).toHaveBeenNthCalledWith(
|
|
1465
|
+
1,
|
|
1466
|
+
"Manifest: 1 new Thumbnail tracks found when merging.",
|
|
1467
|
+
);
|
|
1468
|
+
expect(oldPeriod.thumbnailTracks).toHaveLength(2);
|
|
1469
|
+
mockLog.mockRestore();
|
|
1470
|
+
});
|
|
1471
|
+
|
|
1472
|
+
it("should add new Thumbnail Track in Partial mode", () => {
|
|
1473
|
+
const oldThumbnailTrack1 = generateFakeThumbnailTrack({
|
|
1474
|
+
id: "thumb-1",
|
|
1475
|
+
});
|
|
1476
|
+
const oldPeriod = {
|
|
1477
|
+
start: 5,
|
|
1478
|
+
end: 15,
|
|
1479
|
+
duration: 10,
|
|
1480
|
+
thumbnailTracks: [oldThumbnailTrack1],
|
|
1481
|
+
adaptations: {
|
|
1482
|
+
video: [],
|
|
1483
|
+
audio: [],
|
|
1484
|
+
},
|
|
1485
|
+
getAdaptations() {
|
|
1486
|
+
return [];
|
|
1487
|
+
},
|
|
1488
|
+
};
|
|
1489
|
+
const newThumbnailTrack1 = generateFakeThumbnailTrack({
|
|
1490
|
+
id: "thumb-1",
|
|
1491
|
+
});
|
|
1492
|
+
const newThumbnailTrack2 = generateFakeThumbnailTrack({
|
|
1493
|
+
id: "thumb-2",
|
|
1494
|
+
});
|
|
1495
|
+
const newPeriod = {
|
|
1496
|
+
start: 500,
|
|
1497
|
+
end: 520,
|
|
1498
|
+
duration: 20,
|
|
1499
|
+
thumbnailTracks: [newThumbnailTrack1, newThumbnailTrack2],
|
|
1500
|
+
adaptations: {
|
|
1501
|
+
video: [],
|
|
1502
|
+
audio: [],
|
|
1503
|
+
},
|
|
1504
|
+
getAdaptations() {
|
|
1505
|
+
return [];
|
|
1506
|
+
},
|
|
1507
|
+
};
|
|
1508
|
+
const mockLog = vi.spyOn(log, "warn");
|
|
1509
|
+
const res = updatePeriodInPlace(
|
|
1510
|
+
oldPeriod as unknown as Period,
|
|
1511
|
+
newPeriod as unknown as Period,
|
|
1512
|
+
MANIFEST_UPDATE_TYPE.Partial,
|
|
1513
|
+
);
|
|
1514
|
+
expect(res).toEqual({
|
|
1515
|
+
addedThumbnailTracks: [
|
|
1516
|
+
{
|
|
1517
|
+
height: 100,
|
|
1518
|
+
horizontalTiles: 5,
|
|
1519
|
+
id: "thumb-2",
|
|
1520
|
+
mimeType: "image/png",
|
|
1521
|
+
verticalTiles: 3,
|
|
1522
|
+
start: 0,
|
|
1523
|
+
end: 100,
|
|
1524
|
+
tileDuration: 2,
|
|
1525
|
+
width: 200,
|
|
1526
|
+
},
|
|
1527
|
+
],
|
|
1528
|
+
updatedThumbnailTracks: [
|
|
1529
|
+
{
|
|
1530
|
+
height: 100,
|
|
1531
|
+
horizontalTiles: 5,
|
|
1532
|
+
id: "thumb-1",
|
|
1533
|
+
mimeType: "image/png",
|
|
1534
|
+
verticalTiles: 3,
|
|
1535
|
+
start: 0,
|
|
1536
|
+
end: 100,
|
|
1537
|
+
tileDuration: 2,
|
|
1538
|
+
width: 200,
|
|
1539
|
+
},
|
|
1540
|
+
],
|
|
1541
|
+
removedThumbnailTracks: [],
|
|
1542
|
+
addedAdaptations: [],
|
|
1543
|
+
removedAdaptations: [],
|
|
1544
|
+
updatedAdaptations: [],
|
|
1545
|
+
});
|
|
1546
|
+
expect(mockLog).toHaveBeenCalled();
|
|
1547
|
+
expect(mockLog).toHaveBeenNthCalledWith(
|
|
1548
|
+
1,
|
|
1549
|
+
"Manifest: 1 new Thumbnail tracks found when merging.",
|
|
1550
|
+
);
|
|
1551
|
+
expect(oldPeriod.thumbnailTracks).toHaveLength(2);
|
|
1552
|
+
mockLog.mockRestore();
|
|
1553
|
+
});
|
|
1554
|
+
|
|
1555
|
+
it("should remove unfound Thumbnail Tracks in Full mode", () => {
|
|
1556
|
+
const oldThumbnailTrack1 = generateFakeThumbnailTrack({
|
|
1557
|
+
id: "thumb-1",
|
|
1558
|
+
});
|
|
1559
|
+
const oldThumbnailTrack2 = generateFakeThumbnailTrack({
|
|
1560
|
+
id: "thumb-2",
|
|
1561
|
+
});
|
|
1562
|
+
const oldPeriod = {
|
|
1563
|
+
start: 5,
|
|
1564
|
+
end: 15,
|
|
1565
|
+
duration: 10,
|
|
1566
|
+
thumbnailTracks: [oldThumbnailTrack1, oldThumbnailTrack2],
|
|
1567
|
+
adaptations: {
|
|
1568
|
+
video: [],
|
|
1569
|
+
audio: [],
|
|
1570
|
+
},
|
|
1571
|
+
getAdaptations() {
|
|
1572
|
+
return [];
|
|
1573
|
+
},
|
|
1574
|
+
};
|
|
1575
|
+
const newThumbnailTrack1 = generateFakeThumbnailTrack({
|
|
1576
|
+
id: "thumb-1",
|
|
1577
|
+
});
|
|
1578
|
+
const newPeriod = {
|
|
1579
|
+
start: 500,
|
|
1580
|
+
end: 520,
|
|
1581
|
+
duration: 20,
|
|
1582
|
+
thumbnailTracks: [newThumbnailTrack1],
|
|
1583
|
+
adaptations: {
|
|
1584
|
+
video: [],
|
|
1585
|
+
audio: [],
|
|
1586
|
+
},
|
|
1587
|
+
getAdaptations() {
|
|
1588
|
+
return [];
|
|
1589
|
+
},
|
|
1590
|
+
};
|
|
1591
|
+
const mockLog = vi.spyOn(log, "warn");
|
|
1592
|
+
const res = updatePeriodInPlace(
|
|
1593
|
+
oldPeriod as unknown as Period,
|
|
1594
|
+
newPeriod as unknown as Period,
|
|
1595
|
+
MANIFEST_UPDATE_TYPE.Full,
|
|
1596
|
+
);
|
|
1597
|
+
expect(res).toEqual({
|
|
1598
|
+
addedThumbnailTracks: [],
|
|
1599
|
+
updatedThumbnailTracks: [
|
|
1600
|
+
{
|
|
1601
|
+
height: 100,
|
|
1602
|
+
horizontalTiles: 5,
|
|
1603
|
+
id: "thumb-1",
|
|
1604
|
+
mimeType: "image/png",
|
|
1605
|
+
verticalTiles: 3,
|
|
1606
|
+
start: 0,
|
|
1607
|
+
end: 100,
|
|
1608
|
+
tileDuration: 2,
|
|
1609
|
+
width: 200,
|
|
1610
|
+
},
|
|
1611
|
+
],
|
|
1612
|
+
removedThumbnailTracks: [
|
|
1613
|
+
{
|
|
1614
|
+
id: oldThumbnailTrack2.id,
|
|
1615
|
+
},
|
|
1616
|
+
],
|
|
1617
|
+
addedAdaptations: [],
|
|
1618
|
+
removedAdaptations: [],
|
|
1619
|
+
updatedAdaptations: [],
|
|
1620
|
+
});
|
|
1621
|
+
expect(mockLog).toHaveBeenCalled();
|
|
1622
|
+
expect(mockLog).toHaveBeenNthCalledWith(
|
|
1623
|
+
1,
|
|
1624
|
+
'Manifest: ThumbnailTrack "thumb-2" not found when merging.',
|
|
1625
|
+
);
|
|
1626
|
+
expect(oldPeriod.thumbnailTracks).toHaveLength(1);
|
|
1627
|
+
mockLog.mockRestore();
|
|
1628
|
+
});
|
|
1629
|
+
|
|
1630
|
+
it("should remove unfound ThumbnailTracks in Partial mode", () => {
|
|
1631
|
+
const oldThumbnailTrack1 = generateFakeThumbnailTrack({
|
|
1632
|
+
id: "thumb-1",
|
|
1633
|
+
});
|
|
1634
|
+
const oldThumbnailTrack2 = generateFakeThumbnailTrack({
|
|
1635
|
+
id: "thumb-2",
|
|
1636
|
+
});
|
|
1637
|
+
const oldPeriod = {
|
|
1638
|
+
start: 5,
|
|
1639
|
+
end: 15,
|
|
1640
|
+
duration: 10,
|
|
1641
|
+
thumbnailTracks: [oldThumbnailTrack1, oldThumbnailTrack2],
|
|
1642
|
+
adaptations: {
|
|
1643
|
+
video: [],
|
|
1644
|
+
audio: [],
|
|
1645
|
+
},
|
|
1646
|
+
getAdaptations() {
|
|
1647
|
+
return [];
|
|
1648
|
+
},
|
|
1649
|
+
};
|
|
1650
|
+
const newThumbnailTrack1 = generateFakeThumbnailTrack({
|
|
1651
|
+
id: "thumb-1",
|
|
1652
|
+
});
|
|
1653
|
+
const newPeriod = {
|
|
1654
|
+
start: 500,
|
|
1655
|
+
end: 520,
|
|
1656
|
+
duration: 20,
|
|
1657
|
+
thumbnailTracks: [newThumbnailTrack1],
|
|
1658
|
+
adaptations: {
|
|
1659
|
+
video: [],
|
|
1660
|
+
audio: [],
|
|
1661
|
+
},
|
|
1662
|
+
getAdaptations() {
|
|
1663
|
+
return [];
|
|
1664
|
+
},
|
|
1665
|
+
};
|
|
1666
|
+
const mockLog = vi.spyOn(log, "warn");
|
|
1667
|
+
const res = updatePeriodInPlace(
|
|
1668
|
+
oldPeriod as unknown as Period,
|
|
1669
|
+
newPeriod as unknown as Period,
|
|
1670
|
+
MANIFEST_UPDATE_TYPE.Partial,
|
|
1671
|
+
);
|
|
1672
|
+
expect(res).toEqual({
|
|
1673
|
+
addedThumbnailTracks: [],
|
|
1674
|
+
updatedThumbnailTracks: [
|
|
1675
|
+
{
|
|
1676
|
+
height: 100,
|
|
1677
|
+
horizontalTiles: 5,
|
|
1678
|
+
id: "thumb-1",
|
|
1679
|
+
mimeType: "image/png",
|
|
1680
|
+
verticalTiles: 3,
|
|
1681
|
+
start: 0,
|
|
1682
|
+
end: 100,
|
|
1683
|
+
tileDuration: 2,
|
|
1684
|
+
width: 200,
|
|
1685
|
+
},
|
|
1686
|
+
],
|
|
1687
|
+
removedThumbnailTracks: [
|
|
1688
|
+
{
|
|
1689
|
+
id: oldThumbnailTrack2.id,
|
|
1690
|
+
},
|
|
1691
|
+
],
|
|
1692
|
+
addedAdaptations: [],
|
|
1693
|
+
removedAdaptations: [],
|
|
1694
|
+
updatedAdaptations: [],
|
|
1695
|
+
});
|
|
1696
|
+
expect(mockLog).toHaveBeenCalled();
|
|
1697
|
+
expect(mockLog).toHaveBeenNthCalledWith(
|
|
1698
|
+
1,
|
|
1699
|
+
'Manifest: ThumbnailTrack "thumb-2" not found when merging.',
|
|
1700
|
+
);
|
|
1701
|
+
expect(oldPeriod.thumbnailTracks).toHaveLength(1);
|
|
1702
|
+
mockLog.mockRestore();
|
|
1703
|
+
});
|
|
1316
1704
|
});
|
|
@@ -32,6 +32,7 @@ function generateFakePeriod({
|
|
|
32
32
|
duration: end === undefined ? undefined : end - (start ?? 0),
|
|
33
33
|
streamEvents: [],
|
|
34
34
|
adaptations: {},
|
|
35
|
+
thumbnailTracks: [],
|
|
35
36
|
refreshCodecSupport() {
|
|
36
37
|
// noop
|
|
37
38
|
},
|
|
@@ -57,6 +58,7 @@ function generateFakePeriod({
|
|
|
57
58
|
id: id ?? String(start),
|
|
58
59
|
streamEvents: [],
|
|
59
60
|
adaptations: {},
|
|
61
|
+
thumbnailTracks: [],
|
|
60
62
|
};
|
|
61
63
|
},
|
|
62
64
|
};
|
|
@@ -393,7 +395,7 @@ describe("Manifest - updatePeriods", () => {
|
|
|
393
395
|
removedPeriods: [],
|
|
394
396
|
updatedPeriods: [
|
|
395
397
|
{
|
|
396
|
-
period: { id: "p2", start: 60, streamEvents: [] },
|
|
398
|
+
period: { id: "p2", start: 60, streamEvents: [], thumbnailTracks: [] },
|
|
397
399
|
result: fakeUpdatePeriodInPlaceRes,
|
|
398
400
|
},
|
|
399
401
|
],
|
|
@@ -434,7 +436,7 @@ describe("Manifest - updatePeriods", () => {
|
|
|
434
436
|
removedPeriods: [],
|
|
435
437
|
updatedPeriods: [
|
|
436
438
|
{
|
|
437
|
-
period: { id: "p2", start: 60, streamEvents: [] },
|
|
439
|
+
period: { id: "p2", start: 60, streamEvents: [], thumbnailTracks: [] },
|
|
438
440
|
result: fakeUpdatePeriodInPlaceRes,
|
|
439
441
|
},
|
|
440
442
|
],
|
|
@@ -527,11 +529,11 @@ describe("Manifest - updatePeriods", () => {
|
|
|
527
529
|
removedPeriods: [{ id: "p1.5", start: 69, end: 70 }],
|
|
528
530
|
updatedPeriods: [
|
|
529
531
|
{
|
|
530
|
-
period: { id: "p1", start: 60, end: 69, streamEvents: [] },
|
|
532
|
+
period: { id: "p1", start: 60, end: 69, streamEvents: [], thumbnailTracks: [] },
|
|
531
533
|
result: fakeUpdatePeriodInPlaceRes,
|
|
532
534
|
},
|
|
533
535
|
{
|
|
534
|
-
period: { id: "p2", start: 70, streamEvents: [] },
|
|
536
|
+
period: { id: "p2", start: 70, streamEvents: [], thumbnailTracks: [] },
|
|
535
537
|
result: fakeUpdatePeriodInPlaceRes,
|
|
536
538
|
},
|
|
537
539
|
],
|
|
@@ -805,11 +807,11 @@ describe("Manifest - updatePeriods", () => {
|
|
|
805
807
|
removedPeriods: [],
|
|
806
808
|
updatedPeriods: [
|
|
807
809
|
{
|
|
808
|
-
period: { id: "p1", start: 60, end: 70, streamEvents: [] },
|
|
810
|
+
period: { id: "p1", start: 60, end: 70, streamEvents: [], thumbnailTracks: [] },
|
|
809
811
|
result: fakeUpdatePeriodInPlaceRes,
|
|
810
812
|
},
|
|
811
813
|
{
|
|
812
|
-
period: { id: "p2", start: 70, streamEvents: [] },
|
|
814
|
+
period: { id: "p2", start: 70, streamEvents: [], thumbnailTracks: [] },
|
|
813
815
|
result: fakeUpdatePeriodInPlaceRes,
|
|
814
816
|
},
|
|
815
817
|
],
|
|
@@ -865,11 +867,11 @@ describe("Manifest - updatePeriods", () => {
|
|
|
865
867
|
removedPeriods: [{ id: "p2", start: 70, end: 80 }],
|
|
866
868
|
updatedPeriods: [
|
|
867
869
|
{
|
|
868
|
-
period: { id: "p1", start: 60, end: 70, streamEvents: [] },
|
|
870
|
+
period: { id: "p1", start: 60, end: 70, streamEvents: [], thumbnailTracks: [] },
|
|
869
871
|
result: fakeUpdatePeriodInPlaceRes,
|
|
870
872
|
},
|
|
871
873
|
{
|
|
872
|
-
period: { id: "p3", start: 80, streamEvents: [] },
|
|
874
|
+
period: { id: "p3", start: 80, streamEvents: [], thumbnailTracks: [] },
|
|
873
875
|
result: fakeUpdatePeriodInPlaceRes,
|
|
874
876
|
},
|
|
875
877
|
],
|
|
@@ -928,11 +930,11 @@ describe("Manifest - updatePeriods", () => {
|
|
|
928
930
|
],
|
|
929
931
|
updatedPeriods: [
|
|
930
932
|
{
|
|
931
|
-
period: { id: "p1", start: 60, end: 70, streamEvents: [] },
|
|
933
|
+
period: { id: "p1", start: 60, end: 70, streamEvents: [], thumbnailTracks: [] },
|
|
932
934
|
result: fakeUpdatePeriodInPlaceRes,
|
|
933
935
|
},
|
|
934
936
|
{
|
|
935
|
-
period: { id: "p3", start: 80, end: 90, streamEvents: [] },
|
|
937
|
+
period: { id: "p3", start: 80, end: 90, streamEvents: [], thumbnailTracks: [] },
|
|
936
938
|
result: fakeUpdatePeriodInPlaceRes,
|
|
937
939
|
},
|
|
938
940
|
],
|
|
@@ -19,6 +19,7 @@ import type { ICodecSupportInfo } from "./codec_support_cache";
|
|
|
19
19
|
import type { IUpdatedRepresentationInfo, IManifestParsingOptions } from "./manifest";
|
|
20
20
|
import Manifest from "./manifest";
|
|
21
21
|
import Period from "./period";
|
|
22
|
+
import type { IThumbnailTrack } from "./period";
|
|
22
23
|
import Representation from "./representation";
|
|
23
24
|
import type {
|
|
24
25
|
IMetaPlaylistPrivateInfos,
|
|
@@ -42,6 +43,7 @@ export type {
|
|
|
42
43
|
IRepresentationIndex,
|
|
43
44
|
IPrivateInfos,
|
|
44
45
|
ISegment,
|
|
46
|
+
IThumbnailTrack,
|
|
45
47
|
};
|
|
46
48
|
export {
|
|
47
49
|
areSameContent,
|
|
@@ -601,7 +601,7 @@ export default class Manifest
|
|
|
601
601
|
const adaptationsByType = firstPeriod.adaptations;
|
|
602
602
|
const adaptationsList: Adaptation[] = [];
|
|
603
603
|
for (const adaptationType in adaptationsByType) {
|
|
604
|
-
if (
|
|
604
|
+
if (Object.prototype.hasOwnProperty.call(adaptationsByType, adaptationType)) {
|
|
605
605
|
const adaptations = adaptationsByType[
|
|
606
606
|
adaptationType as ITrackType
|
|
607
607
|
] as Adaptation[];
|