rx-player 4.5.0-dev.2026031700 → 4.5.0-dev.2026033100
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 +3 -1
- 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/browser_compatibility_types.d.ts +16 -14
- package/dist/commonjs/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/commonjs/compat/browser_compatibility_types.js +7 -4
- package/dist/commonjs/compat/browser_version.d.ts +2 -1
- package/dist/commonjs/compat/browser_version.d.ts.map +1 -1
- package/dist/commonjs/compat/browser_version.js +13 -0
- package/dist/commonjs/compat/disable_remote_playback_on_managed_media_source.d.ts.map +1 -1
- package/dist/commonjs/compat/disable_remote_playback_on_managed_media_source.js +1 -1
- package/dist/commonjs/compat/is_codec_supported.d.ts.map +1 -1
- package/dist/commonjs/compat/is_codec_supported.js +4 -3
- package/dist/commonjs/compat/should_patch_out_dolby_vision_config_data_from_mp4.d.ts +26 -0
- package/dist/commonjs/compat/should_patch_out_dolby_vision_config_data_from_mp4.d.ts.map +1 -0
- package/dist/commonjs/compat/should_patch_out_dolby_vision_config_data_from_mp4.js +45 -0
- package/dist/commonjs/core/entry/utils.js +3 -3
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.js +2 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +2 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +8 -6
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +4 -3
- package/dist/commonjs/initialize_worker.js +1 -1
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_content.js +3 -3
- package/dist/commonjs/main_thread/api/public_api.js +2 -2
- 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 +24 -12
- package/dist/commonjs/manifest/classes/adaptation.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/adaptation.js +3 -1
- package/dist/commonjs/manifest/classes/representation.d.ts +6 -2
- package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
- package/dist/commonjs/manifest/classes/representation.js +45 -23
- package/dist/commonjs/manifest/types.d.ts +14 -6
- package/dist/commonjs/manifest/types.d.ts.map +1 -1
- package/dist/commonjs/manifest/utils.js +4 -4
- package/dist/commonjs/mse/main_media_source_interface.d.ts.map +1 -1
- package/dist/commonjs/mse/main_media_source_interface.js +3 -2
- package/dist/commonjs/mse/worker_media_source_interface.d.ts.map +1 -1
- package/dist/commonjs/parsers/containers/isobmff/get_box.d.ts +12 -1
- package/dist/commonjs/parsers/containers/isobmff/get_box.d.ts.map +1 -1
- package/dist/commonjs/parsers/containers/isobmff/get_box.js +16 -0
- package/dist/commonjs/parsers/containers/isobmff/index.d.ts +2 -1
- package/dist/commonjs/parsers/containers/isobmff/index.d.ts.map +1 -1
- package/dist/commonjs/parsers/containers/isobmff/index.js +3 -1
- package/dist/commonjs/parsers/containers/isobmff/remove_dolby_vision_config_data.d.ts +13 -0
- package/dist/commonjs/parsers/containers/isobmff/remove_dolby_vision_config_data.d.ts.map +1 -0
- package/dist/commonjs/parsers/containers/isobmff/remove_dolby_vision_config_data.js +180 -0
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.js +4 -4
- package/dist/commonjs/transports/dash/segment_parser.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/segment_parser.js +6 -0
- package/dist/commonjs/transports/dash/text_parser.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/text_parser.js +5 -1
- package/dist/commonjs/transports/local/text_parser.d.ts.map +1 -1
- package/dist/commonjs/transports/local/text_parser.js +5 -1
- package/dist/commonjs/transports/metaplaylist/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/metaplaylist/pipelines.js +2 -1
- package/dist/commonjs/transports/smooth/pipelines.js +3 -3
- package/dist/commonjs/transports/types.d.ts +28 -2
- package/dist/commonjs/transports/types.d.ts.map +1 -1
- package/dist/commonjs/transports/utils/parse_text_track.d.ts +9 -2
- package/dist/commonjs/transports/utils/parse_text_track.d.ts.map +1 -1
- package/dist/commonjs/transports/utils/parse_text_track.js +1 -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/browser_compatibility_types.d.ts +16 -14
- package/dist/es2017/compat/browser_compatibility_types.d.ts.map +1 -1
- package/dist/es2017/compat/browser_compatibility_types.js +7 -1
- package/dist/es2017/compat/browser_version.d.ts +2 -1
- package/dist/es2017/compat/browser_version.d.ts.map +1 -1
- package/dist/es2017/compat/browser_version.js +13 -1
- package/dist/es2017/compat/disable_remote_playback_on_managed_media_source.d.ts.map +1 -1
- package/dist/es2017/compat/disable_remote_playback_on_managed_media_source.js +2 -2
- package/dist/es2017/compat/is_codec_supported.d.ts.map +1 -1
- package/dist/es2017/compat/is_codec_supported.js +2 -1
- package/dist/es2017/compat/should_patch_out_dolby_vision_config_data_from_mp4.d.ts +26 -0
- package/dist/es2017/compat/should_patch_out_dolby_vision_config_data_from_mp4.d.ts.map +1 -0
- package/dist/es2017/compat/should_patch_out_dolby_vision_config_data_from_mp4.js +42 -0
- package/dist/es2017/core/entry/utils.js +4 -4
- package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/segment/segment_fetcher.js +2 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.js +2 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.js +3 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +2 -1
- package/dist/es2017/initialize_worker.js +1 -1
- package/dist/es2017/main_thread/api/debug/modules/segment_buffer_content.js +3 -3
- package/dist/es2017/main_thread/api/public_api.js +2 -2
- 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 +9 -7
- package/dist/es2017/manifest/classes/adaptation.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/adaptation.js +3 -1
- package/dist/es2017/manifest/classes/representation.d.ts +6 -2
- package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
- package/dist/es2017/manifest/classes/representation.js +45 -23
- package/dist/es2017/manifest/types.d.ts +14 -6
- package/dist/es2017/manifest/types.d.ts.map +1 -1
- package/dist/es2017/manifest/utils.js +4 -4
- package/dist/es2017/mse/main_media_source_interface.d.ts.map +1 -1
- package/dist/es2017/mse/main_media_source_interface.js +2 -1
- package/dist/es2017/mse/worker_media_source_interface.d.ts.map +1 -1
- package/dist/es2017/parsers/containers/isobmff/get_box.d.ts +12 -1
- package/dist/es2017/parsers/containers/isobmff/get_box.d.ts.map +1 -1
- package/dist/es2017/parsers/containers/isobmff/get_box.js +16 -1
- package/dist/es2017/parsers/containers/isobmff/index.d.ts +2 -1
- package/dist/es2017/parsers/containers/isobmff/index.d.ts.map +1 -1
- package/dist/es2017/parsers/containers/isobmff/index.js +2 -1
- package/dist/es2017/parsers/containers/isobmff/remove_dolby_vision_config_data.d.ts +13 -0
- package/dist/es2017/parsers/containers/isobmff/remove_dolby_vision_config_data.d.ts.map +1 -0
- package/dist/es2017/parsers/containers/isobmff/remove_dolby_vision_config_data.js +155 -0
- package/dist/es2017/parsers/manifest/metaplaylist/metaplaylist_parser.js +4 -4
- package/dist/es2017/transports/dash/segment_parser.d.ts.map +1 -1
- package/dist/es2017/transports/dash/segment_parser.js +7 -1
- package/dist/es2017/transports/dash/text_parser.d.ts.map +1 -1
- package/dist/es2017/transports/dash/text_parser.js +5 -1
- package/dist/es2017/transports/local/text_parser.d.ts.map +1 -1
- package/dist/es2017/transports/local/text_parser.js +5 -1
- package/dist/es2017/transports/metaplaylist/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/metaplaylist/pipelines.js +2 -1
- package/dist/es2017/transports/smooth/pipelines.js +3 -3
- package/dist/es2017/transports/types.d.ts +28 -2
- package/dist/es2017/transports/types.d.ts.map +1 -1
- package/dist/es2017/transports/utils/parse_text_track.d.ts +9 -2
- package/dist/es2017/transports/utils/parse_text_track.d.ts.map +1 -1
- package/dist/es2017/transports/utils/parse_text_track.js +1 -1
- package/dist/worker.js +6 -6
- package/eslint.config.mjs +1 -14
- package/package.json +1 -1
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/compat/__tests__/browser_compatibility_types.test.ts +15 -26
- package/src/compat/__tests__/browser_version.test.ts +57 -18
- package/src/compat/__tests__/clear_element_src.test.ts +20 -40
- package/src/compat/__tests__/is_codec_supported.test.ts +39 -44
- package/src/compat/__tests__/is_vtt_cue.test.ts +5 -8
- package/src/compat/__tests__/make_vtt_cue.test.ts +20 -31
- package/src/compat/__tests__/remove_cue.test.ts +8 -20
- package/src/compat/__tests__/should_patch_out_dolby_vision_config_data_from_mp4.test.ts +78 -0
- package/src/compat/browser_compatibility_types.ts +8 -1
- package/src/compat/browser_version.ts +17 -1
- package/src/compat/disable_remote_playback_on_managed_media_source.ts +2 -2
- package/src/compat/is_codec_supported.ts +2 -1
- package/src/compat/should_patch_out_dolby_vision_config_data_from_mp4.ts +50 -0
- package/src/core/adaptive/__tests__/adaptive_representation_selector.test.ts +68 -28
- package/src/core/adaptive/__tests__/buffer_based_chooser.test.ts +26 -84
- package/src/core/entry/__tests__/utils.test.ts +7 -1
- package/src/core/entry/utils.ts +4 -4
- package/src/core/fetchers/segment/segment_fetcher.ts +2 -1
- package/src/errors/__tests__/format_error.test.ts +23 -24
- package/src/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.ts +2 -1
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaDisplayInfos.test.ts +106 -0
- package/src/experimental/tools/mediaCapabilitiesProber/probers/__tests__/HDCPPolicy.test.ts +19 -42
- package/src/experimental/tools/mediaCapabilitiesProber/probers/__tests__/decodingInfo.test.ts +33 -40
- package/src/experimental/tools/mediaCapabilitiesProber/probers/__tests__/defaultCodecsFinder.test.ts +44 -68
- package/src/experimental/tools/mediaCapabilitiesProber/probers/__tests__/mediaContentType.test.ts +45 -80
- package/src/experimental/tools/mediaCapabilitiesProber/probers/defaultCodecsFinder.ts +3 -1
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.ts +2 -1
- package/src/features/__tests__/add_features.test.ts +12 -27
- package/src/initialize_worker.ts +1 -1
- package/src/main_thread/api/__tests__/option_utils.test.ts +38 -67
- package/src/main_thread/api/__tests__/public_api.test.ts +56 -138
- package/src/main_thread/api/debug/modules/segment_buffer_content.ts +3 -3
- package/src/main_thread/api/public_api.ts +2 -2
- package/src/main_thread/decrypt/__tests__/__global__/find_key_system.test.ts +46 -28
- package/src/main_thread/decrypt/__tests__/__global__/get_license.test.ts +40 -10
- package/src/main_thread/decrypt/__tests__/__global__/init_data.test.ts +112 -129
- package/src/main_thread/decrypt/__tests__/__global__/media_key_system_access.test.ts +282 -377
- package/src/main_thread/decrypt/__tests__/__global__/media_keys.test.ts +70 -63
- package/src/main_thread/decrypt/__tests__/__global__/server_certificate.test.ts +73 -54
- package/src/main_thread/decrypt/__tests__/__global__/utils.ts +43 -83
- package/src/main_thread/decrypt/__tests__/find_key_system.test.ts +36 -17
- package/src/main_thread/decrypt/utils/__tests__/clean_old_stored_persistent_info.test.ts +44 -48
- package/src/main_thread/init/utils/__tests__/are_same_stream_events.test.ts +7 -22
- package/src/main_thread/init/utils/__tests__/refresh_scheduled_events_list.test.ts +3 -6
- package/src/main_thread/init/utils/__tests__/update_manifest_codec_support.test.ts +42 -19
- package/src/main_thread/init/utils/update_manifest_codec_support.ts +8 -6
- package/src/manifest/classes/__tests__/adaptation.test.ts +69 -125
- package/src/manifest/classes/__tests__/manifest.test.ts +88 -95
- package/src/manifest/classes/__tests__/period.test.ts +167 -117
- package/src/manifest/classes/__tests__/representation.test.ts +84 -25
- package/src/manifest/classes/__tests__/update_periods.test.ts +96 -225
- package/src/manifest/classes/adaptation.ts +4 -1
- package/src/manifest/classes/representation.ts +59 -27
- package/src/manifest/types.ts +14 -6
- package/src/manifest/utils.ts +4 -4
- package/src/mse/__tests__/main_media_source_interface.test.ts +3 -1
- package/src/mse/__tests__/worker_media_source_interface.test.ts +608 -0
- package/src/mse/main_media_source_interface.ts +2 -1
- package/src/mse/worker_media_source_interface.ts +2 -2
- package/src/parsers/containers/isobmff/__tests__/get_box.test.ts +449 -0
- package/src/parsers/containers/isobmff/__tests__/remove_dolby_vision_config_data.test.ts +282 -0
- package/src/parsers/containers/isobmff/get_box.ts +17 -0
- package/src/parsers/containers/isobmff/index.ts +8 -1
- package/src/parsers/containers/isobmff/remove_dolby_vision_config_data.ts +179 -0
- package/src/parsers/manifest/dash/common/__tests__/get_clock_offset.test.ts +19 -25
- package/src/parsers/manifest/dash/common/__tests__/get_http_utc-timing_url.test.ts +7 -19
- package/src/parsers/manifest/dash/js-parser/node_parsers/__tests__/ContentProtection.test.ts +26 -37
- package/src/parsers/manifest/dash/js-parser/node_parsers/__tests__/Initialization.test.ts +24 -53
- package/src/parsers/manifest/dash/js-parser/node_parsers/__tests__/SegmentURL.test.ts +31 -78
- package/src/parsers/manifest/metaplaylist/metaplaylist_parser.ts +6 -4
- package/src/parsers/manifest/utils/__tests__/update_segment_timeline.test.ts +79 -87
- package/src/parsers/texttracks/ttml/__tests__/resolve_styles_inheritance.test.ts +20 -26
- package/src/parsers/texttracks/ttml/html/__tests__/__global__/html_ttml_parser.test.ts +2 -7
- package/src/parsers/texttracks/webvtt/__tests__/parse_cue_block.test.ts +33 -30
- package/src/parsers/texttracks/webvtt/__tests__/parse_style_block.test.ts +33 -100
- package/src/parsers/texttracks/webvtt/html/__tests__/convert_payload_to_html.test.ts +16 -18
- package/src/parsers/texttracks/webvtt/html/__tests__/parse_webvtt_to_div.test.ts +73 -78
- package/src/parsers/texttracks/webvtt/html/__tests__/to_html.test.ts +36 -37
- package/src/transports/dash/segment_parser.ts +13 -0
- package/src/transports/dash/text_parser.ts +5 -1
- package/src/transports/local/text_parser.ts +5 -1
- package/src/transports/metaplaylist/pipelines.ts +2 -1
- package/src/transports/smooth/isobmff/__tests__/create_boxes.test.ts +150 -127
- package/src/transports/smooth/pipelines.ts +3 -3
- package/src/transports/types.ts +28 -2
- package/src/transports/utils/__tests__/check_isobmff_integrity.test.ts +49 -75
- package/src/transports/utils/parse_text_track.ts +10 -3
- package/src/utils/__tests__/object_assign.test.ts +2 -2
package/src/experimental/tools/mediaCapabilitiesProber/probers/__tests__/mediaContentType.test.ts
CHANGED
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
import { describe, beforeEach, it, expect, vi } from "vitest";
|
|
2
|
-
import
|
|
1
|
+
import { describe, beforeEach, it, expect, vi, afterEach } from "vitest";
|
|
2
|
+
import probeMediaContentType from "../../probers/mediaContentType";
|
|
3
3
|
import type { IMediaConfiguration } from "../../types";
|
|
4
4
|
|
|
5
|
+
const mocks = vi.hoisted(() => {
|
|
6
|
+
return {
|
|
7
|
+
default: {
|
|
8
|
+
MediaSource_: {} as unknown,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
vi.mock("../../../../../compat/browser_compatibility_types", () => {
|
|
14
|
+
return mocks;
|
|
15
|
+
});
|
|
16
|
+
|
|
5
17
|
describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
6
18
|
beforeEach(() => {
|
|
7
19
|
vi.resetModules();
|
|
8
20
|
});
|
|
21
|
+
afterEach(() => {
|
|
22
|
+
mocks.default.MediaSource_ = {};
|
|
23
|
+
});
|
|
9
24
|
|
|
10
25
|
it("should throw if no compatible MediaSource API", async () => {
|
|
11
|
-
|
|
12
|
-
MediaSource_: null,
|
|
13
|
-
}));
|
|
14
|
-
const probeMediaContentType = (
|
|
15
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
16
|
-
).default as typeof IProbeMediaContentType;
|
|
26
|
+
mocks.default.MediaSource_ = null;
|
|
17
27
|
expect(() => probeMediaContentType({})).toThrowError("MediaSource API not available");
|
|
18
28
|
});
|
|
19
29
|
|
|
20
30
|
it("should throw if no compatible isTypeSupported API", async () => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
}));
|
|
26
|
-
const probeMediaContentType = (
|
|
27
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
28
|
-
).default as typeof IProbeMediaContentType;
|
|
31
|
+
mocks.default.MediaSource_ = {
|
|
32
|
+
isTypeSupported: false,
|
|
33
|
+
};
|
|
29
34
|
expect(() => probeMediaContentType({})).toThrowError(
|
|
30
35
|
"MediaSource.isTypeSupported API not available",
|
|
31
36
|
);
|
|
@@ -33,17 +38,12 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
33
38
|
|
|
34
39
|
it("should throw if no specified contentType in config", async () => {
|
|
35
40
|
const mockIsTypeSupported = vi.fn(() => true);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
}));
|
|
41
|
+
mocks.default.MediaSource_ = {
|
|
42
|
+
isTypeSupported: mockIsTypeSupported,
|
|
43
|
+
};
|
|
41
44
|
const config: IMediaConfiguration = {
|
|
42
45
|
type: "media-source",
|
|
43
46
|
};
|
|
44
|
-
const probeMediaContentType = (
|
|
45
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
46
|
-
).default as typeof IProbeMediaContentType;
|
|
47
47
|
|
|
48
48
|
expect.assertions(1);
|
|
49
49
|
expect(() => probeMediaContentType(config)).toThrowError(
|
|
@@ -53,20 +53,15 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
53
53
|
|
|
54
54
|
it("should return `Supported` when video contentType is supported", async () => {
|
|
55
55
|
const mockIsTypeSupported = vi.fn(() => true);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
}));
|
|
56
|
+
mocks.default.MediaSource_ = {
|
|
57
|
+
isTypeSupported: mockIsTypeSupported,
|
|
58
|
+
};
|
|
61
59
|
const config: IMediaConfiguration = {
|
|
62
60
|
type: "media-source",
|
|
63
61
|
video: {
|
|
64
62
|
contentType: "video/mp5",
|
|
65
63
|
},
|
|
66
64
|
};
|
|
67
|
-
const probeMediaContentType = (
|
|
68
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
69
|
-
).default as typeof IProbeMediaContentType;
|
|
70
65
|
|
|
71
66
|
expect.assertions(2);
|
|
72
67
|
expect(probeMediaContentType(config)).toEqual("Supported");
|
|
@@ -75,20 +70,15 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
75
70
|
|
|
76
71
|
it("should return `Supported` when audio contentType is supported", async () => {
|
|
77
72
|
const mockIsTypeSupported = vi.fn(() => true);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
}));
|
|
73
|
+
mocks.default.MediaSource_ = {
|
|
74
|
+
isTypeSupported: mockIsTypeSupported,
|
|
75
|
+
};
|
|
83
76
|
const config: IMediaConfiguration = {
|
|
84
77
|
type: "media-source",
|
|
85
78
|
audio: {
|
|
86
79
|
contentType: "audio/wma",
|
|
87
80
|
},
|
|
88
81
|
};
|
|
89
|
-
const probeMediaContentType = (
|
|
90
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
91
|
-
).default as typeof IProbeMediaContentType;
|
|
92
82
|
|
|
93
83
|
expect.assertions(2);
|
|
94
84
|
expect(probeMediaContentType(config)).toEqual("Supported");
|
|
@@ -97,11 +87,9 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
97
87
|
|
|
98
88
|
it("should return `Supported` when both contentTypes are supported", async () => {
|
|
99
89
|
const mockIsTypeSupported = vi.fn(() => true);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
}));
|
|
90
|
+
mocks.default.MediaSource_ = {
|
|
91
|
+
isTypeSupported: mockIsTypeSupported,
|
|
92
|
+
};
|
|
105
93
|
const config: IMediaConfiguration = {
|
|
106
94
|
type: "media-source",
|
|
107
95
|
audio: {
|
|
@@ -111,9 +99,6 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
111
99
|
contentType: "video/mp5",
|
|
112
100
|
},
|
|
113
101
|
};
|
|
114
|
-
const probeMediaContentType = (
|
|
115
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
116
|
-
).default as typeof IProbeMediaContentType;
|
|
117
102
|
|
|
118
103
|
expect(probeMediaContentType(config)).toEqual("Supported");
|
|
119
104
|
expect(mockIsTypeSupported).toHaveBeenCalledTimes(2);
|
|
@@ -121,20 +106,15 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
121
106
|
|
|
122
107
|
it("should return `NotSupported` when audio contentType is not supported", async () => {
|
|
123
108
|
const mockIsTypeSupported = vi.fn(() => false);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
}));
|
|
109
|
+
mocks.default.MediaSource_ = {
|
|
110
|
+
isTypeSupported: mockIsTypeSupported,
|
|
111
|
+
};
|
|
129
112
|
const config: IMediaConfiguration = {
|
|
130
113
|
type: "media-source",
|
|
131
114
|
audio: {
|
|
132
115
|
contentType: "audio/wma",
|
|
133
116
|
},
|
|
134
117
|
};
|
|
135
|
-
const probeMediaContentType = (
|
|
136
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
137
|
-
).default as typeof IProbeMediaContentType;
|
|
138
118
|
|
|
139
119
|
expect.assertions(2);
|
|
140
120
|
expect(probeMediaContentType(config)).toEqual("NotSupported");
|
|
@@ -143,20 +123,15 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
143
123
|
|
|
144
124
|
it("should return `NotSupported` when video contentType is not supported", async () => {
|
|
145
125
|
const mockIsTypeSupported = vi.fn(() => false);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
}));
|
|
126
|
+
mocks.default.MediaSource_ = {
|
|
127
|
+
isTypeSupported: mockIsTypeSupported,
|
|
128
|
+
};
|
|
151
129
|
const config: IMediaConfiguration = {
|
|
152
130
|
type: "media-source",
|
|
153
131
|
video: {
|
|
154
132
|
contentType: "video/mp5",
|
|
155
133
|
},
|
|
156
134
|
};
|
|
157
|
-
const probeMediaContentType = (
|
|
158
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
159
|
-
).default as typeof IProbeMediaContentType;
|
|
160
135
|
|
|
161
136
|
expect.assertions(2);
|
|
162
137
|
expect(probeMediaContentType(config)).toEqual("NotSupported");
|
|
@@ -165,11 +140,9 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
165
140
|
|
|
166
141
|
it("should return `NotSupported` when contentTypes are not supported", async () => {
|
|
167
142
|
const mockIsTypeSupported = vi.fn(() => false);
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
}));
|
|
143
|
+
mocks.default.MediaSource_ = {
|
|
144
|
+
isTypeSupported: mockIsTypeSupported,
|
|
145
|
+
};
|
|
173
146
|
const config: IMediaConfiguration = {
|
|
174
147
|
type: "media-source",
|
|
175
148
|
video: {
|
|
@@ -179,9 +152,6 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
179
152
|
contentType: "audio/wma",
|
|
180
153
|
},
|
|
181
154
|
};
|
|
182
|
-
const probeMediaContentType = (
|
|
183
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
184
|
-
).default as typeof IProbeMediaContentType;
|
|
185
155
|
|
|
186
156
|
expect.assertions(2);
|
|
187
157
|
expect(probeMediaContentType(config)).toEqual("NotSupported");
|
|
@@ -192,11 +162,9 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
192
162
|
const mockIsTypeSupported = vi.fn((type: string) => {
|
|
193
163
|
return type === "video/mp5";
|
|
194
164
|
});
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
}));
|
|
165
|
+
mocks.default.MediaSource_ = {
|
|
166
|
+
isTypeSupported: mockIsTypeSupported,
|
|
167
|
+
};
|
|
200
168
|
const config: IMediaConfiguration = {
|
|
201
169
|
type: "media-source",
|
|
202
170
|
video: {
|
|
@@ -206,9 +174,6 @@ describe("MediaCapabilitiesProber - probers probeMediaContentType", () => {
|
|
|
206
174
|
contentType: "audio/wma",
|
|
207
175
|
},
|
|
208
176
|
};
|
|
209
|
-
const probeMediaContentType = (
|
|
210
|
-
await vi.importActual("../../probers/mediaContentType")
|
|
211
|
-
).default as typeof IProbeMediaContentType;
|
|
212
177
|
|
|
213
178
|
expect.assertions(2);
|
|
214
179
|
expect(probeMediaContentType(config)).toEqual("NotSupported");
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import BROWSER_GLOBALS from "../../../../compat/browser_compatibility_types";
|
|
18
18
|
import isNullOrUndefined from "../../../../utils/is_null_or_undefined";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -30,6 +30,7 @@ export function findDefaultVideoCodec(): string {
|
|
|
30
30
|
'video/mp4;codecs="hvc1.1.6.L93.B0"',
|
|
31
31
|
'video/webm;codecs="vp8"',
|
|
32
32
|
];
|
|
33
|
+
const { MediaSource_ } = BROWSER_GLOBALS;
|
|
33
34
|
if (
|
|
34
35
|
isNullOrUndefined(MediaSource_) ||
|
|
35
36
|
typeof MediaSource_.isTypeSupported !== "function"
|
|
@@ -52,6 +53,7 @@ export function findDefaultVideoCodec(): string {
|
|
|
52
53
|
*/
|
|
53
54
|
export function findDefaultAudioCodec(): string {
|
|
54
55
|
const audioCodecs = ['audio/mp4;codecs="mp4a.40.2"', 'audio/webm;codecs="opus"'];
|
|
56
|
+
const { MediaSource_ } = BROWSER_GLOBALS;
|
|
55
57
|
if (
|
|
56
58
|
isNullOrUndefined(MediaSource_) ||
|
|
57
59
|
typeof MediaSource_.isTypeSupported !== "function"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import BROWSER_GLOBALS from "../../../../compat/browser_compatibility_types";
|
|
18
18
|
import isNullOrUndefined from "../../../../utils/is_null_or_undefined";
|
|
19
19
|
import type { IMediaConfiguration } from "../types";
|
|
20
20
|
|
|
@@ -25,6 +25,7 @@ import type { IMediaConfiguration } from "../types";
|
|
|
25
25
|
export default function probeContentType(
|
|
26
26
|
config: IMediaConfiguration,
|
|
27
27
|
): "NotSupported" | "Supported" {
|
|
28
|
+
const { MediaSource_ } = BROWSER_GLOBALS;
|
|
28
29
|
if (isNullOrUndefined(MediaSource_)) {
|
|
29
30
|
throw new Error("MediaSource API not available");
|
|
30
31
|
}
|
|
@@ -1,31 +1,23 @@
|
|
|
1
1
|
import { describe, beforeEach, it, expect, vi } from "vitest";
|
|
2
|
-
import
|
|
2
|
+
import addFeatures from "../add_features";
|
|
3
3
|
import type { IFeature } from "../types";
|
|
4
4
|
|
|
5
|
+
vi.mock("../features_object", () => {
|
|
6
|
+
return {
|
|
7
|
+
default: { a: 412 },
|
|
8
|
+
};
|
|
9
|
+
});
|
|
10
|
+
|
|
5
11
|
describe("Features - addFeatures", () => {
|
|
6
12
|
beforeEach(() => {
|
|
7
13
|
vi.resetModules();
|
|
8
14
|
});
|
|
9
15
|
|
|
10
|
-
it("should do nothing if an empty array is given",
|
|
11
|
-
const feat = {};
|
|
12
|
-
vi.doMock("../features_object", () => ({
|
|
13
|
-
default: feat,
|
|
14
|
-
}));
|
|
15
|
-
const addFeatures = (await vi.importActual("../add_features"))
|
|
16
|
-
.default as typeof IAddFeatures;
|
|
17
|
-
|
|
16
|
+
it("should do nothing if an empty array is given", () => {
|
|
18
17
|
expect(() => addFeatures([])).not.toThrow();
|
|
19
18
|
});
|
|
20
19
|
|
|
21
|
-
it("should throw if something different than a function is given",
|
|
22
|
-
const feat = {};
|
|
23
|
-
vi.doMock("../features_object", () => ({
|
|
24
|
-
default: feat,
|
|
25
|
-
}));
|
|
26
|
-
const addFeatures = (await vi.importActual("../add_features"))
|
|
27
|
-
.default as typeof IAddFeatures;
|
|
28
|
-
|
|
20
|
+
it("should throw if something different than a function is given", () => {
|
|
29
21
|
expect(() => addFeatures([5 as unknown as IFeature])).toThrow(
|
|
30
22
|
new Error("Unrecognized feature"),
|
|
31
23
|
);
|
|
@@ -39,20 +31,13 @@ describe("Features - addFeatures", () => {
|
|
|
39
31
|
).toThrow(new Error("Unrecognized feature"));
|
|
40
32
|
});
|
|
41
33
|
|
|
42
|
-
it("should call the given functions with the features object in argument",
|
|
43
|
-
const feat = { a: 412 };
|
|
44
|
-
vi.doMock("../features_object", () => ({
|
|
45
|
-
default: feat,
|
|
46
|
-
}));
|
|
47
|
-
const addFeatures = (await vi.importActual("../add_features"))
|
|
48
|
-
.default as typeof IAddFeatures;
|
|
49
|
-
|
|
34
|
+
it("should call the given functions with the features object in argument", () => {
|
|
50
35
|
const fakeFeat1 = vi.fn();
|
|
51
36
|
const fakeFeat2 = vi.fn();
|
|
52
37
|
addFeatures([fakeFeat1, fakeFeat2]);
|
|
53
38
|
expect(fakeFeat1).toHaveBeenCalledTimes(1);
|
|
54
|
-
expect(fakeFeat1).toHaveBeenCalledWith(
|
|
39
|
+
expect(fakeFeat1).toHaveBeenCalledWith({ a: 412 });
|
|
55
40
|
expect(fakeFeat2).toHaveBeenCalledTimes(1);
|
|
56
|
-
expect(fakeFeat2).toHaveBeenCalledWith(
|
|
41
|
+
expect(fakeFeat2).toHaveBeenCalledWith({ a: 412 });
|
|
57
42
|
});
|
|
58
43
|
});
|
package/src/initialize_worker.ts
CHANGED
|
@@ -10,8 +10,8 @@ import initializeCoreEntry from "./core/entry";
|
|
|
10
10
|
import type { ICorePlugins } from "./core/entry";
|
|
11
11
|
import type { ICoreMessage } from "./core/types";
|
|
12
12
|
import { CoreMessageType } from "./core/types";
|
|
13
|
-
import log from "./experimental/tools/mediaCapabilitiesProber/log";
|
|
14
13
|
import features from "./features";
|
|
14
|
+
import log from "./log";
|
|
15
15
|
import Manifest from "./manifest/classes";
|
|
16
16
|
import DashJsParser from "./parsers/manifest/dash/js-parser";
|
|
17
17
|
import DashWasmParser from "./parsers/manifest/dash/wasm-parser";
|
|
@@ -1,43 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { describe, beforeEach, afterEach, it, expect, vi } from "vitest";
|
|
1
|
+
import { describe, afterEach, it, expect, vi } from "vitest";
|
|
3
2
|
import config from "../../../config";
|
|
3
|
+
import log from "../../../log";
|
|
4
4
|
import type {
|
|
5
5
|
IAudioTrackSwitchingMode,
|
|
6
6
|
IKeySystemOption,
|
|
7
7
|
ILoadVideoOptions,
|
|
8
8
|
IStartAtOption,
|
|
9
9
|
} from "../../../public_types";
|
|
10
|
-
import
|
|
11
|
-
parseConstructorOptions
|
|
12
|
-
parseLoadVideoOptions
|
|
13
|
-
checkReloadOptions
|
|
10
|
+
import {
|
|
11
|
+
parseConstructorOptions,
|
|
12
|
+
parseLoadVideoOptions,
|
|
13
|
+
checkReloadOptions,
|
|
14
14
|
} from "../option_utils";
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const mocks = vi.hoisted(() => {
|
|
17
|
+
return {
|
|
18
|
+
warnOnce: vi.fn(),
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
vi.mock("../../../utils/languages");
|
|
22
|
+
vi.mock("../../../utils/warn_once", () => {
|
|
23
|
+
return { default: mocks.warnOnce };
|
|
24
|
+
});
|
|
25
|
+
const logWarn = vi.spyOn(log, "warn").mockImplementation(() => {
|
|
26
|
+
/* noop */
|
|
27
|
+
});
|
|
18
28
|
|
|
19
29
|
describe("API - parseConstructorOptions", () => {
|
|
20
|
-
let parseConstructorOptions: typeof IParseConstructorOptions;
|
|
21
|
-
beforeEach(async () => {
|
|
22
|
-
warnOnceMock = vi.fn();
|
|
23
|
-
logWarnMock = vi.fn();
|
|
24
|
-
vi.doMock("../../../log", () => {
|
|
25
|
-
return {
|
|
26
|
-
default: {
|
|
27
|
-
warn: logWarnMock,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
vi.doMock("../../../utils/languages");
|
|
32
|
-
vi.doMock("../../../utils/warn_once", () => {
|
|
33
|
-
return { default: warnOnceMock };
|
|
34
|
-
});
|
|
35
|
-
parseConstructorOptions = (await vi.importActual("../option_utils"))
|
|
36
|
-
.parseConstructorOptions as typeof IParseConstructorOptions;
|
|
37
|
-
});
|
|
38
|
-
|
|
39
30
|
afterEach(() => {
|
|
40
31
|
vi.resetModules();
|
|
32
|
+
logWarn.mockClear();
|
|
33
|
+
mocks.warnOnce.mockReset();
|
|
41
34
|
});
|
|
42
35
|
|
|
43
36
|
const videoElement = document.createElement("video");
|
|
@@ -255,27 +248,10 @@ describe("API - parseConstructorOptions", () => {
|
|
|
255
248
|
});
|
|
256
249
|
|
|
257
250
|
describe("API - parseLoadVideoOptions", () => {
|
|
258
|
-
let parseLoadVideoOptions: typeof IParseLoadVideoOptions;
|
|
259
|
-
beforeEach(async () => {
|
|
260
|
-
warnOnceMock = vi.fn();
|
|
261
|
-
logWarnMock = vi.fn();
|
|
262
|
-
vi.doMock("../../../log", () => {
|
|
263
|
-
return {
|
|
264
|
-
default: {
|
|
265
|
-
warn: logWarnMock,
|
|
266
|
-
},
|
|
267
|
-
};
|
|
268
|
-
});
|
|
269
|
-
vi.doMock("../../../utils/languages");
|
|
270
|
-
vi.doMock("../../../utils/warn_once", () => {
|
|
271
|
-
return { default: warnOnceMock };
|
|
272
|
-
});
|
|
273
|
-
parseLoadVideoOptions = (await vi.importActual("../option_utils"))
|
|
274
|
-
.parseLoadVideoOptions as typeof IParseLoadVideoOptions;
|
|
275
|
-
});
|
|
276
|
-
|
|
277
251
|
afterEach(() => {
|
|
278
252
|
vi.resetModules();
|
|
253
|
+
logWarn.mockClear();
|
|
254
|
+
mocks.warnOnce.mockReset();
|
|
279
255
|
});
|
|
280
256
|
|
|
281
257
|
const defaultLoadVideoOptions = {
|
|
@@ -727,7 +703,7 @@ describe("API - parseLoadVideoOptions", () => {
|
|
|
727
703
|
});
|
|
728
704
|
|
|
729
705
|
it("should set an 'undefined' defaultAudioTrackSwitchingMode mode when the parameter is invalid or not specified", () => {
|
|
730
|
-
|
|
706
|
+
logWarn.mockReturnValue(undefined);
|
|
731
707
|
expect(
|
|
732
708
|
parseLoadVideoOptions({
|
|
733
709
|
defaultAudioTrackSwitchingMode: "foo-bar" as unknown as IAudioTrackSwitchingMode,
|
|
@@ -740,8 +716,8 @@ describe("API - parseLoadVideoOptions", () => {
|
|
|
740
716
|
transport: "bar",
|
|
741
717
|
defaultAudioTrackSwitchingMode: undefined,
|
|
742
718
|
});
|
|
743
|
-
expect(
|
|
744
|
-
expect(
|
|
719
|
+
expect(logWarn).toHaveBeenCalledTimes(1);
|
|
720
|
+
expect(logWarn).toHaveBeenCalledWith(
|
|
745
721
|
"API",
|
|
746
722
|
"The `defaultAudioTrackSwitchingMode` loadVideo option must match one of " +
|
|
747
723
|
`the following strategy name:
|
|
@@ -749,8 +725,8 @@ describe("API - parseLoadVideoOptions", () => {
|
|
|
749
725
|
- \`direct\`
|
|
750
726
|
- \`reload\``,
|
|
751
727
|
);
|
|
752
|
-
|
|
753
|
-
|
|
728
|
+
logWarn.mockClear();
|
|
729
|
+
logWarn.mockReturnValue(undefined);
|
|
754
730
|
|
|
755
731
|
expect(
|
|
756
732
|
parseLoadVideoOptions({
|
|
@@ -763,7 +739,7 @@ describe("API - parseLoadVideoOptions", () => {
|
|
|
763
739
|
transport: "bar",
|
|
764
740
|
defaultAudioTrackSwitchingMode: undefined,
|
|
765
741
|
});
|
|
766
|
-
expect(
|
|
742
|
+
expect(logWarn).not.toHaveBeenCalled();
|
|
767
743
|
});
|
|
768
744
|
|
|
769
745
|
it("should authorize setting a valid onCodecSwitch option", () => {
|
|
@@ -795,7 +771,7 @@ describe("API - parseLoadVideoOptions", () => {
|
|
|
795
771
|
});
|
|
796
772
|
|
|
797
773
|
it("should set a 'continue' onCodecSwitch when the parameter is invalid or not specified", () => {
|
|
798
|
-
|
|
774
|
+
logWarn.mockReturnValue(undefined);
|
|
799
775
|
expect(
|
|
800
776
|
parseLoadVideoOptions({
|
|
801
777
|
onCodecSwitch: "foo-bar" as unknown as "continue",
|
|
@@ -808,8 +784,8 @@ describe("API - parseLoadVideoOptions", () => {
|
|
|
808
784
|
transport: "bar",
|
|
809
785
|
onCodecSwitch: "continue",
|
|
810
786
|
});
|
|
811
|
-
expect(
|
|
812
|
-
expect(
|
|
787
|
+
expect(logWarn).toHaveBeenCalledTimes(1);
|
|
788
|
+
expect(logWarn).toHaveBeenCalledWith(
|
|
813
789
|
"API",
|
|
814
790
|
"The `onCodecSwitch` loadVideo option must match one " +
|
|
815
791
|
`of the following string:
|
|
@@ -817,8 +793,8 @@ describe("API - parseLoadVideoOptions", () => {
|
|
|
817
793
|
- \`reload\`
|
|
818
794
|
If badly set, continue will be used as default`,
|
|
819
795
|
);
|
|
820
|
-
|
|
821
|
-
|
|
796
|
+
logWarn.mockClear();
|
|
797
|
+
logWarn.mockReturnValue(undefined);
|
|
822
798
|
|
|
823
799
|
expect(
|
|
824
800
|
parseLoadVideoOptions({
|
|
@@ -831,7 +807,7 @@ If badly set, continue will be used as default`,
|
|
|
831
807
|
transport: "bar",
|
|
832
808
|
onCodecSwitch: "continue",
|
|
833
809
|
});
|
|
834
|
-
expect(
|
|
810
|
+
expect(logWarn).not.toHaveBeenCalled();
|
|
835
811
|
});
|
|
836
812
|
|
|
837
813
|
it("should authorize setting a valid enableFastSwitching option", () => {
|
|
@@ -1197,7 +1173,7 @@ If badly set, continue will be used as default`,
|
|
|
1197
1173
|
});
|
|
1198
1174
|
|
|
1199
1175
|
it("should warn when setting a textTrackElement with a `native` textTrackMode", () => {
|
|
1200
|
-
|
|
1176
|
+
logWarn.mockReturnValue(undefined);
|
|
1201
1177
|
const textTrackElement = document.createElement("div");
|
|
1202
1178
|
|
|
1203
1179
|
parseLoadVideoOptions({
|
|
@@ -1205,7 +1181,7 @@ If badly set, continue will be used as default`,
|
|
|
1205
1181
|
url: "foo",
|
|
1206
1182
|
transport: "bar",
|
|
1207
1183
|
});
|
|
1208
|
-
expect(
|
|
1184
|
+
expect(logWarn).not.toHaveBeenCalled();
|
|
1209
1185
|
|
|
1210
1186
|
expect(
|
|
1211
1187
|
parseLoadVideoOptions({
|
|
@@ -1221,8 +1197,8 @@ If badly set, continue will be used as default`,
|
|
|
1221
1197
|
textTrackMode: "native",
|
|
1222
1198
|
});
|
|
1223
1199
|
|
|
1224
|
-
expect(
|
|
1225
|
-
expect(
|
|
1200
|
+
expect(logWarn).toHaveBeenCalledTimes(1);
|
|
1201
|
+
expect(logWarn).toHaveBeenCalledWith(
|
|
1226
1202
|
"API",
|
|
1227
1203
|
"You have set a textTrackElement " +
|
|
1228
1204
|
'without being in an "html" textTrackMode. It will be ignored.',
|
|
@@ -1231,11 +1207,6 @@ If badly set, continue will be used as default`,
|
|
|
1231
1207
|
});
|
|
1232
1208
|
|
|
1233
1209
|
describe("API - checkReloadOptions", () => {
|
|
1234
|
-
let checkReloadOptions: typeof ICheckReloadOptions;
|
|
1235
|
-
beforeEach(async () => {
|
|
1236
|
-
checkReloadOptions = (await vi.importActual("../option_utils"))
|
|
1237
|
-
.checkReloadOptions as typeof ICheckReloadOptions;
|
|
1238
|
-
});
|
|
1239
1210
|
it("Should valid undefined options", () => {
|
|
1240
1211
|
const options = undefined;
|
|
1241
1212
|
expect(() => checkReloadOptions(options)).not.toThrow();
|