stormcloud-video-player 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/package.json +37 -5
- package/rollup.config.js +0 -51
- package/src/index.ts +0 -20
- package/src/player/StormcloudVideoPlayer.ts +0 -1123
- package/src/sdk/ima.ts +0 -369
- package/src/types.ts +0 -124
- package/src/ui/StormcloudVideoPlayer.tsx +0 -258
- package/src/utils/tracking.ts +0 -251
- package/tsconfig.json +0 -49
package/README.md
CHANGED
|
@@ -27,6 +27,31 @@ npm install stormcloud-video-player hls.js
|
|
|
27
27
|
|
|
28
28
|
This library targets modern browsers (ES2020) and expects a DOM environment.
|
|
29
29
|
|
|
30
|
+
### CDN Usage
|
|
31
|
+
|
|
32
|
+
You can also use the library directly from CDN without npm:
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<!-- Use latest version (recommended for development) -->
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/stormcloud-video-player/dist/stormcloud-vp.min.js"></script>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
// The library is available as window.StormcloudVideoPlayer
|
|
40
|
+
const { StormcloudVideoPlayer } = window.StormcloudVideoPlayer;
|
|
41
|
+
|
|
42
|
+
const video = document.getElementById("video");
|
|
43
|
+
const player = new StormcloudVideoPlayer({
|
|
44
|
+
videoElement: video,
|
|
45
|
+
src: "https://example.com/live/playlist.m3u8",
|
|
46
|
+
autoplay: true,
|
|
47
|
+
muted: true,
|
|
48
|
+
allowNativeHls: false,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
player.load();
|
|
52
|
+
</script>
|
|
53
|
+
```
|
|
54
|
+
|
|
30
55
|
---
|
|
31
56
|
|
|
32
57
|
## Quick start
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stormcloud-video-player",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"main": "lib/index.cjs",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -11,10 +11,30 @@
|
|
|
11
11
|
"clean": "rm -rf lib dist",
|
|
12
12
|
"build:lib": "npm run build"
|
|
13
13
|
},
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
"description": "Ad-first HLS video player with SCTE-35 support and Google IMA integration for precise ad break alignment",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"video",
|
|
17
|
+
"player",
|
|
18
|
+
"hls",
|
|
19
|
+
"streaming",
|
|
20
|
+
"ads",
|
|
21
|
+
"advertising",
|
|
22
|
+
"scte-35",
|
|
23
|
+
"ima",
|
|
24
|
+
"vast",
|
|
25
|
+
"vpaid",
|
|
26
|
+
"live-streaming",
|
|
27
|
+
"video-ads",
|
|
28
|
+
"ad-insertion",
|
|
29
|
+
"broadcast",
|
|
30
|
+
"ott",
|
|
31
|
+
"connected-tv",
|
|
32
|
+
"ctv",
|
|
33
|
+
"react",
|
|
34
|
+
"typescript"
|
|
35
|
+
],
|
|
36
|
+
"author": "Showfer Media LLC",
|
|
37
|
+
"license": "MIT",
|
|
18
38
|
"dependencies": {
|
|
19
39
|
"hls.js": "^1.6.11"
|
|
20
40
|
},
|
|
@@ -41,5 +61,17 @@
|
|
|
41
61
|
"peerDependencies": {
|
|
42
62
|
"react": ">=17",
|
|
43
63
|
"react-dom": ">=17"
|
|
64
|
+
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=16"
|
|
67
|
+
},
|
|
68
|
+
"files": [
|
|
69
|
+
"lib/**/*",
|
|
70
|
+
"dist/**/*",
|
|
71
|
+
"README.md",
|
|
72
|
+
"LICENSE"
|
|
73
|
+
],
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"access": "public"
|
|
44
76
|
}
|
|
45
77
|
}
|
package/rollup.config.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
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
|
-
|
|
6
|
-
export default {
|
|
7
|
-
input: "src/index.ts",
|
|
8
|
-
|
|
9
|
-
output: {
|
|
10
|
-
file: "dist/stormcloud-vp.min.js",
|
|
11
|
-
format: "umd",
|
|
12
|
-
name: "StormcloudVP",
|
|
13
|
-
sourcemap: false,
|
|
14
|
-
globals: {},
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
plugins: [
|
|
18
|
-
resolve({
|
|
19
|
-
browser: true,
|
|
20
|
-
preferBuiltins: false,
|
|
21
|
-
}),
|
|
22
|
-
commonjs({
|
|
23
|
-
include: ["node_modules/**"],
|
|
24
|
-
}),
|
|
25
|
-
typescript({
|
|
26
|
-
tsconfig: "./tsconfig.json",
|
|
27
|
-
sourceMap: false,
|
|
28
|
-
inlineSources: false,
|
|
29
|
-
declaration: false,
|
|
30
|
-
declarationMap: false,
|
|
31
|
-
}),
|
|
32
|
-
terser({
|
|
33
|
-
compress: {
|
|
34
|
-
drop_console: false,
|
|
35
|
-
drop_debugger: true,
|
|
36
|
-
pure_funcs: ["console.debug"],
|
|
37
|
-
},
|
|
38
|
-
mangle: {
|
|
39
|
-
reserved: ["StormcloudVP"],
|
|
40
|
-
},
|
|
41
|
-
}),
|
|
42
|
-
],
|
|
43
|
-
|
|
44
|
-
external: [],
|
|
45
|
-
|
|
46
|
-
onwarn(warning, warn) {
|
|
47
|
-
if (warning.code === "CIRCULAR_DEPENDENCY") return;
|
|
48
|
-
if (warning.code === "THIS_IS_UNDEFINED") return;
|
|
49
|
-
warn(warning);
|
|
50
|
-
},
|
|
51
|
-
};
|
package/src/index.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { StormcloudVideoPlayer } from "./player/StormcloudVideoPlayer";
|
|
2
|
-
export type {
|
|
3
|
-
StormcloudVideoPlayerConfig,
|
|
4
|
-
AdBreak,
|
|
5
|
-
AdSchedule,
|
|
6
|
-
LateJoinPolicy,
|
|
7
|
-
ClientInfo,
|
|
8
|
-
TrackingData,
|
|
9
|
-
HeartbeatData,
|
|
10
|
-
} from "./types";
|
|
11
|
-
|
|
12
|
-
export { StormcloudVideoPlayerComponent } from "./ui/StormcloudVideoPlayer";
|
|
13
|
-
export type { StormcloudVideoPlayerProps } from "./ui/StormcloudVideoPlayer";
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
getClientInfo,
|
|
17
|
-
getBrowserID,
|
|
18
|
-
sendInitialTracking,
|
|
19
|
-
sendHeartbeat,
|
|
20
|
-
} from "./utils/tracking";
|