stormcloud-video-player 0.8.59 → 0.8.61
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/LICENSE +21 -21
- package/README.md +1369 -1369
- package/dist/stormcloud-vp.min.js +3 -1
- package/lib/Player.cjs +548 -0
- package/lib/Player.cjs.map +1 -0
- package/lib/Player.d.cts +146 -0
- package/lib/{index.js → StormcloudPlayer.cjs} +1193 -1908
- package/lib/StormcloudPlayer.cjs.map +1 -0
- package/lib/{index.d.ts → StormcloudPlayer.d.cts} +7 -400
- package/lib/index.cjs +1064 -280
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +18 -4032
- package/lib/patterns.cjs +111 -0
- package/lib/patterns.cjs.map +1 -0
- package/lib/patterns.d.cts +14 -0
- package/lib/player/AdBreakOrchestrator.cjs +51 -16
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +3 -1
- package/lib/player/AdConfigManager.cjs +206 -26
- package/lib/player/AdConfigManager.cjs.map +1 -1
- package/lib/player/AdConfigManager.d.cts +1 -1
- package/lib/player/AdTimingService.cjs.map +1 -1
- package/lib/player/AdTimingService.d.cts +1 -1
- package/lib/player/HlsEngine.cjs.map +1 -1
- package/lib/player/HlsEngine.d.cts +1 -1
- package/lib/player/PlaceholderLayer.cjs.map +1 -1
- package/lib/player/PlayerControls.cjs.map +1 -1
- package/lib/player/PlayerControls.d.cts +1 -1
- package/lib/player/Scte35CueManager.cjs.map +1 -1
- package/lib/player/Scte35CueManager.d.cts +1 -1
- package/lib/player/Scte35Parser.cjs.map +1 -1
- package/lib/player/Scte35Parser.d.cts +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +1060 -278
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/player/playerTypes.cjs.map +1 -1
- package/lib/player/playerTypes.d.cts +1 -1
- package/lib/players/FilePlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +1060 -278
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +1060 -278
- package/lib/players/index.cjs.map +1 -1
- package/lib/props.cjs +186 -0
- package/lib/props.cjs.map +1 -0
- package/lib/props.d.cts +62 -0
- package/lib/sdk/hlsAdPlayer.cjs +884 -234
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/sdk/pal.cjs +9 -5
- package/lib/sdk/pal.cjs.map +1 -1
- package/lib/sdk/pal.d.cts +1 -0
- package/lib/types.cjs +49 -0
- package/lib/types.cjs.map +1 -0
- package/lib/{types-52ASml2N.d.cts → types.d.cts} +48 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +1064 -280
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/ctvVastSignals.cjs +178 -19
- package/lib/utils/ctvVastSignals.cjs.map +1 -1
- package/lib/utils/devUrl.cjs.map +1 -1
- package/lib/utils/polyfills.cjs.map +1 -1
- package/lib/utils/tracking.cjs +45 -16
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/lib/utils/trackingIngest.cjs.map +1 -1
- package/lib/utils/vastEnvironmentSignals.cjs +192 -20
- package/lib/utils/vastEnvironmentSignals.cjs.map +1 -1
- package/lib/utils/vastEnvironmentSignals.d.cts +13 -2
- package/lib/utils/vastMacros.cjs +50 -4
- package/lib/utils/vastMacros.cjs.map +1 -1
- package/lib/utils/vastMacros.d.cts +2 -0
- package/lib/utils/vastTrackingMacros.cjs +5 -0
- package/lib/utils/vastTrackingMacros.cjs.map +1 -1
- package/lib/utils/vastTrackingMacros.d.cts +2 -0
- package/lib/utils.cjs +292 -0
- package/lib/utils.cjs.map +1 -0
- package/lib/utils.d.cts +17 -0
- package/package.json +91 -91
- package/rollup.config.js +90 -90
- package/lib/index.js.map +0 -1
package/lib/utils.d.cts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { lazy as lazy$1 } from 'react';
|
|
2
|
+
|
|
3
|
+
declare const lazy: typeof lazy$1;
|
|
4
|
+
declare const omit: <T extends Record<string, any>, K extends keyof T>(object: T, keys: K[]) => Omit<T, K>;
|
|
5
|
+
declare const isMediaStream: (url: any) => url is MediaStream;
|
|
6
|
+
declare const supportsWebKitPresentationMode: () => boolean;
|
|
7
|
+
declare const randomString: () => string;
|
|
8
|
+
declare const parseQuery: (url: string) => Record<string, string>;
|
|
9
|
+
declare const merge: <T extends Record<string, any>>(target: T, ...sources: Partial<T>[]) => T;
|
|
10
|
+
declare const IS_BROWSER: false | Document;
|
|
11
|
+
declare const IS_GLOBAL: false | Document;
|
|
12
|
+
declare const IS_IOS: boolean;
|
|
13
|
+
declare const IS_SAFARI: boolean;
|
|
14
|
+
declare const SUPPORTS_HLS: () => boolean;
|
|
15
|
+
declare const SUPPORTS_DASH: () => boolean;
|
|
16
|
+
|
|
17
|
+
export { IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, SUPPORTS_DASH, SUPPORTS_HLS, isMediaStream, lazy, merge, omit, parseQuery, randomString, supportsWebKitPresentationMode };
|
package/package.json
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "stormcloud-video-player",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"main": "lib/index.js",
|
|
5
|
-
"typings": "lib/index.d.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"clean": "rimraf lib dist *.d.ts",
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"build": "tsup src/index.ts --format esm,cjs --dts --sourcemap --out-dir lib",
|
|
10
|
-
"build:lib": "tsup src/**/*.ts src/**/*.tsx --format cjs --dts --sourcemap --out-dir lib",
|
|
11
|
-
"build:minified": "rollup -c rollup.config.js",
|
|
12
|
-
"build:dist": "rollup -c rollup.config.js --environment BUILD:production",
|
|
13
|
-
"build:all": "npm run clean && npm run build && npm run build:lib && npm run build:minified && npm run build:dist",
|
|
14
|
-
"dev": "tsup src/index.ts --format esm,cjs --dts --watch --out-dir lib",
|
|
15
|
-
"prepublishOnly": "npm run build:lib && npm run build:dist",
|
|
16
|
-
"postpublish": "npm run clean"
|
|
17
|
-
},
|
|
18
|
-
"description": "Ad-first HLS video player with SCTE-35 support and Google IMA integration for precise ad break alignment",
|
|
19
|
-
"keywords": [
|
|
20
|
-
"video",
|
|
21
|
-
"player",
|
|
22
|
-
"hls",
|
|
23
|
-
"streaming",
|
|
24
|
-
"ads",
|
|
25
|
-
"advertising",
|
|
26
|
-
"scte-35",
|
|
27
|
-
"ima",
|
|
28
|
-
"vast",
|
|
29
|
-
"vpaid",
|
|
30
|
-
"live-streaming",
|
|
31
|
-
"video-ads",
|
|
32
|
-
"ad-insertion",
|
|
33
|
-
"broadcast",
|
|
34
|
-
"ott",
|
|
35
|
-
"connected-tv",
|
|
36
|
-
"ctv",
|
|
37
|
-
"react",
|
|
38
|
-
"typescript"
|
|
39
|
-
],
|
|
40
|
-
"author": "Showfer Media LLC",
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"hls.js": "^1.6.11",
|
|
44
|
-
"react-icons": "^5.5.0"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@babel/core": "^7.28.5",
|
|
48
|
-
"@babel/preset-env": "^7.28.5",
|
|
49
|
-
"@rollup/plugin-babel": "^6.1.0",
|
|
50
|
-
"@rollup/plugin-commonjs": "^28.0.6",
|
|
51
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
52
|
-
"@rollup/plugin-replace": "^6.0.2",
|
|
53
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
54
|
-
"@rollup/plugin-typescript": "^12.1.4",
|
|
55
|
-
"@swc/core": "^1.15.3",
|
|
56
|
-
"@types/react": "^18.3.4",
|
|
57
|
-
"@types/react-dom": "^18.3.0",
|
|
58
|
-
"rimraf": "^3.0.2",
|
|
59
|
-
"rollup-plugin-swc3": "^0.12.1",
|
|
60
|
-
"tslib": "^2.8.1",
|
|
61
|
-
"tsup": "^8.5.0",
|
|
62
|
-
"typescript": "^5.9.2"
|
|
63
|
-
},
|
|
64
|
-
"type": "module",
|
|
65
|
-
"module": "lib/index.js",
|
|
66
|
-
"types": "lib/index.d.ts",
|
|
67
|
-
"exports": {
|
|
68
|
-
".": {
|
|
69
|
-
"import": "./lib/index.js",
|
|
70
|
-
"require": "./lib/index.cjs"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"peerDependencies": {
|
|
74
|
-
"react": ">=17",
|
|
75
|
-
"react-dom": ">=17"
|
|
76
|
-
},
|
|
77
|
-
"engines": {
|
|
78
|
-
"node": ">=16"
|
|
79
|
-
},
|
|
80
|
-
"files": [
|
|
81
|
-
"lib/**/*",
|
|
82
|
-
"dist/**/*",
|
|
83
|
-
"*.js",
|
|
84
|
-
"*.d.ts",
|
|
85
|
-
"README.md",
|
|
86
|
-
"LICENSE"
|
|
87
|
-
],
|
|
88
|
-
"publishConfig": {
|
|
89
|
-
"access": "public"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "stormcloud-video-player",
|
|
3
|
+
"version": "0.8.61",
|
|
4
|
+
"main": "lib/index.js",
|
|
5
|
+
"typings": "lib/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"clean": "rimraf lib dist *.d.ts",
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --sourcemap --out-dir lib",
|
|
10
|
+
"build:lib": "tsup src/**/*.ts src/**/*.tsx --format cjs --dts --sourcemap --out-dir lib",
|
|
11
|
+
"build:minified": "rollup -c rollup.config.js",
|
|
12
|
+
"build:dist": "rollup -c rollup.config.js --environment BUILD:production",
|
|
13
|
+
"build:all": "npm run clean && npm run build && npm run build:lib && npm run build:minified && npm run build:dist",
|
|
14
|
+
"dev": "tsup src/index.ts --format esm,cjs --dts --watch --out-dir lib",
|
|
15
|
+
"prepublishOnly": "npm run build:lib && npm run build:dist",
|
|
16
|
+
"postpublish": "npm run clean"
|
|
17
|
+
},
|
|
18
|
+
"description": "Ad-first HLS video player with SCTE-35 support and Google IMA integration for precise ad break alignment",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"video",
|
|
21
|
+
"player",
|
|
22
|
+
"hls",
|
|
23
|
+
"streaming",
|
|
24
|
+
"ads",
|
|
25
|
+
"advertising",
|
|
26
|
+
"scte-35",
|
|
27
|
+
"ima",
|
|
28
|
+
"vast",
|
|
29
|
+
"vpaid",
|
|
30
|
+
"live-streaming",
|
|
31
|
+
"video-ads",
|
|
32
|
+
"ad-insertion",
|
|
33
|
+
"broadcast",
|
|
34
|
+
"ott",
|
|
35
|
+
"connected-tv",
|
|
36
|
+
"ctv",
|
|
37
|
+
"react",
|
|
38
|
+
"typescript"
|
|
39
|
+
],
|
|
40
|
+
"author": "Showfer Media LLC",
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"hls.js": "^1.6.11",
|
|
44
|
+
"react-icons": "^5.5.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@babel/core": "^7.28.5",
|
|
48
|
+
"@babel/preset-env": "^7.28.5",
|
|
49
|
+
"@rollup/plugin-babel": "^6.1.0",
|
|
50
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
51
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
52
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
53
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
54
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
55
|
+
"@swc/core": "^1.15.3",
|
|
56
|
+
"@types/react": "^18.3.4",
|
|
57
|
+
"@types/react-dom": "^18.3.0",
|
|
58
|
+
"rimraf": "^3.0.2",
|
|
59
|
+
"rollup-plugin-swc3": "^0.12.1",
|
|
60
|
+
"tslib": "^2.8.1",
|
|
61
|
+
"tsup": "^8.5.0",
|
|
62
|
+
"typescript": "^5.9.2"
|
|
63
|
+
},
|
|
64
|
+
"type": "module",
|
|
65
|
+
"module": "lib/index.js",
|
|
66
|
+
"types": "lib/index.d.ts",
|
|
67
|
+
"exports": {
|
|
68
|
+
".": {
|
|
69
|
+
"import": "./lib/index.js",
|
|
70
|
+
"require": "./lib/index.cjs"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"react": ">=17",
|
|
75
|
+
"react-dom": ">=17"
|
|
76
|
+
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=16"
|
|
79
|
+
},
|
|
80
|
+
"files": [
|
|
81
|
+
"lib/**/*",
|
|
82
|
+
"dist/**/*",
|
|
83
|
+
"*.js",
|
|
84
|
+
"*.d.ts",
|
|
85
|
+
"README.md",
|
|
86
|
+
"LICENSE"
|
|
87
|
+
],
|
|
88
|
+
"publishConfig": {
|
|
89
|
+
"access": "public"
|
|
90
|
+
}
|
|
91
|
+
}
|
package/rollup.config.js
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import resolve from "@rollup/plugin-node-resolve";
|
|
2
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
3
|
-
import terser from "@rollup/plugin-terser";
|
|
4
|
-
import typescript from "@rollup/plugin-typescript";
|
|
5
|
-
import replace from "@rollup/plugin-replace";
|
|
6
|
-
import babel from "@rollup/plugin-babel";
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
input: "src/index.ts",
|
|
10
|
-
|
|
11
|
-
output: {
|
|
12
|
-
file: "dist/stormcloud-vp.min.js",
|
|
13
|
-
format: "umd",
|
|
14
|
-
name: "StormcloudVP",
|
|
15
|
-
sourcemap: false,
|
|
16
|
-
globals: {},
|
|
17
|
-
exports: "named",
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
treeshake: false,
|
|
21
|
-
|
|
22
|
-
plugins: [
|
|
23
|
-
resolve({
|
|
24
|
-
browser: true,
|
|
25
|
-
preferBuiltins: false,
|
|
26
|
-
}),
|
|
27
|
-
commonjs({
|
|
28
|
-
include: ["node_modules/**"],
|
|
29
|
-
}),
|
|
30
|
-
typescript({
|
|
31
|
-
tsconfig: "./tsconfig.json",
|
|
32
|
-
sourceMap: false,
|
|
33
|
-
inlineSources: false,
|
|
34
|
-
declaration: false,
|
|
35
|
-
declarationMap: false,
|
|
36
|
-
}),
|
|
37
|
-
babel({
|
|
38
|
-
babelHelpers: "bundled",
|
|
39
|
-
exclude: /node_modules\/core-js/,
|
|
40
|
-
extensions: [".js", ".jsx", ".ts", ".tsx", ".mjs"],
|
|
41
|
-
presets: [
|
|
42
|
-
[
|
|
43
|
-
"@babel/preset-env",
|
|
44
|
-
{
|
|
45
|
-
targets: {
|
|
46
|
-
chrome: "38",
|
|
47
|
-
},
|
|
48
|
-
modules: false,
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
],
|
|
52
|
-
}),
|
|
53
|
-
replace({
|
|
54
|
-
preventAssignment: true,
|
|
55
|
-
values: {
|
|
56
|
-
"process.env.NODE_ENV": JSON.stringify("production"),
|
|
57
|
-
"process.env": JSON.stringify({}),
|
|
58
|
-
},
|
|
59
|
-
}),
|
|
60
|
-
terser({
|
|
61
|
-
ecma: 5,
|
|
62
|
-
compress: {
|
|
63
|
-
drop_console: false,
|
|
64
|
-
drop_debugger: true,
|
|
65
|
-
pure_funcs: ["console.debug"],
|
|
66
|
-
ecma: 5,
|
|
67
|
-
},
|
|
68
|
-
mangle: {
|
|
69
|
-
reserved: ["StormcloudVP"],
|
|
70
|
-
},
|
|
71
|
-
output: {
|
|
72
|
-
ecma: 5,
|
|
73
|
-
},
|
|
74
|
-
}),
|
|
75
|
-
{
|
|
76
|
-
name: "globalthis-to-self",
|
|
77
|
-
renderChunk(code) {
|
|
78
|
-
return code.replace(/\bglobalThis\b/g, "self");
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
|
|
83
|
-
external: [],
|
|
84
|
-
|
|
85
|
-
onwarn(warning, warn) {
|
|
86
|
-
if (warning.code === "CIRCULAR_DEPENDENCY") return;
|
|
87
|
-
if (warning.code === "THIS_IS_UNDEFINED") return;
|
|
88
|
-
warn(warning);
|
|
89
|
-
},
|
|
90
|
-
};
|
|
1
|
+
import resolve from "@rollup/plugin-node-resolve";
|
|
2
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
3
|
+
import terser from "@rollup/plugin-terser";
|
|
4
|
+
import typescript from "@rollup/plugin-typescript";
|
|
5
|
+
import replace from "@rollup/plugin-replace";
|
|
6
|
+
import babel from "@rollup/plugin-babel";
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
input: "src/index.ts",
|
|
10
|
+
|
|
11
|
+
output: {
|
|
12
|
+
file: "dist/stormcloud-vp.min.js",
|
|
13
|
+
format: "umd",
|
|
14
|
+
name: "StormcloudVP",
|
|
15
|
+
sourcemap: false,
|
|
16
|
+
globals: {},
|
|
17
|
+
exports: "named",
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
treeshake: false,
|
|
21
|
+
|
|
22
|
+
plugins: [
|
|
23
|
+
resolve({
|
|
24
|
+
browser: true,
|
|
25
|
+
preferBuiltins: false,
|
|
26
|
+
}),
|
|
27
|
+
commonjs({
|
|
28
|
+
include: ["node_modules/**"],
|
|
29
|
+
}),
|
|
30
|
+
typescript({
|
|
31
|
+
tsconfig: "./tsconfig.json",
|
|
32
|
+
sourceMap: false,
|
|
33
|
+
inlineSources: false,
|
|
34
|
+
declaration: false,
|
|
35
|
+
declarationMap: false,
|
|
36
|
+
}),
|
|
37
|
+
babel({
|
|
38
|
+
babelHelpers: "bundled",
|
|
39
|
+
exclude: /node_modules\/core-js/,
|
|
40
|
+
extensions: [".js", ".jsx", ".ts", ".tsx", ".mjs"],
|
|
41
|
+
presets: [
|
|
42
|
+
[
|
|
43
|
+
"@babel/preset-env",
|
|
44
|
+
{
|
|
45
|
+
targets: {
|
|
46
|
+
chrome: "38",
|
|
47
|
+
},
|
|
48
|
+
modules: false,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
],
|
|
52
|
+
}),
|
|
53
|
+
replace({
|
|
54
|
+
preventAssignment: true,
|
|
55
|
+
values: {
|
|
56
|
+
"process.env.NODE_ENV": JSON.stringify("production"),
|
|
57
|
+
"process.env": JSON.stringify({}),
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
terser({
|
|
61
|
+
ecma: 5,
|
|
62
|
+
compress: {
|
|
63
|
+
drop_console: false,
|
|
64
|
+
drop_debugger: true,
|
|
65
|
+
pure_funcs: ["console.debug"],
|
|
66
|
+
ecma: 5,
|
|
67
|
+
},
|
|
68
|
+
mangle: {
|
|
69
|
+
reserved: ["StormcloudVP"],
|
|
70
|
+
},
|
|
71
|
+
output: {
|
|
72
|
+
ecma: 5,
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
{
|
|
76
|
+
name: "globalthis-to-self",
|
|
77
|
+
renderChunk(code) {
|
|
78
|
+
return code.replace(/\bglobalThis\b/g, "self");
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
|
|
83
|
+
external: [],
|
|
84
|
+
|
|
85
|
+
onwarn(warning, warn) {
|
|
86
|
+
if (warning.code === "CIRCULAR_DEPENDENCY") return;
|
|
87
|
+
if (warning.code === "THIS_IS_UNDEFINED") return;
|
|
88
|
+
warn(warning);
|
|
89
|
+
},
|
|
90
|
+
};
|