stormcloud-video-player 0.8.54 → 0.8.56
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/dist/stormcloud-vp.min.js +2 -2
- package/lib/index.cjs +243 -80
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +243 -80
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.cjs +41 -40
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdConfigManager.cjs +24 -30
- package/lib/player/AdConfigManager.cjs.map +1 -1
- package/lib/player/AdTimingService.cjs +18 -25
- package/lib/player/AdTimingService.cjs.map +1 -1
- package/lib/player/HlsEngine.cjs +12 -21
- package/lib/player/HlsEngine.cjs.map +1 -1
- package/lib/player/PlaceholderLayer.cjs +1 -3
- package/lib/player/PlaceholderLayer.cjs.map +1 -1
- package/lib/player/PlayerControls.cjs.map +1 -1
- package/lib/player/Scte35CueManager.cjs +2 -4
- package/lib/player/Scte35CueManager.cjs.map +1 -1
- package/lib/player/Scte35Parser.cjs +6 -12
- package/lib/player/Scte35Parser.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +233 -66
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/playerTypes.cjs.map +1 -1
- package/lib/players/FilePlayer.cjs +17 -26
- package/lib/players/FilePlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +243 -80
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +243 -80
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +190 -25
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/pal.cjs +6 -9
- package/lib/sdk/pal.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +233 -66
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/utils/browserCompat.cjs +3 -6
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/ctvVastSignals.cjs +3 -6
- package/lib/utils/ctvVastSignals.cjs.map +1 -1
- package/lib/utils/devUrl.cjs.map +1 -1
- package/lib/utils/mqttClient.cjs +1 -3
- package/lib/utils/mqttClient.cjs.map +1 -1
- package/lib/utils/mqttConfig.cjs +1 -3
- package/lib/utils/mqttConfig.cjs.map +1 -1
- package/lib/utils/polyfills.cjs +4 -7
- package/lib/utils/polyfills.cjs.map +1 -1
- package/lib/utils/tracking.cjs +8 -13
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/vastEnvironmentSignals.cjs +3 -6
- package/lib/utils/vastEnvironmentSignals.cjs.map +1 -1
- package/lib/utils/vastMacros.cjs +4 -2
- package/lib/utils/vastMacros.cjs.map +1 -1
- package/lib/utils/vastTrackingMacros.cjs +185 -0
- package/lib/utils/vastTrackingMacros.cjs.map +1 -0
- package/lib/utils/vastTrackingMacros.d.cts +19 -0
- package/package.json +1 -1
|
@@ -15,11 +15,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
15
15
|
reject(error);
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
if (info.done)
|
|
19
|
-
|
|
20
|
-
} else {
|
|
21
|
-
Promise.resolve(value).then(_next, _throw);
|
|
22
|
-
}
|
|
18
|
+
if (info.done) resolve(value);
|
|
19
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
23
20
|
}
|
|
24
21
|
function _async_to_generator(fn) {
|
|
25
22
|
return function() {
|
|
@@ -37,9 +34,7 @@ function _async_to_generator(fn) {
|
|
|
37
34
|
};
|
|
38
35
|
}
|
|
39
36
|
function _class_call_check(instance, Constructor) {
|
|
40
|
-
if (!(instance instanceof Constructor))
|
|
41
|
-
throw new TypeError("Cannot call a class as a function");
|
|
42
|
-
}
|
|
37
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
43
38
|
}
|
|
44
39
|
function _defineProperties(target, props) {
|
|
45
40
|
for(var i = 0; i < props.length; i++){
|
|
@@ -63,16 +58,16 @@ function _define_property(obj, key, value) {
|
|
|
63
58
|
configurable: true,
|
|
64
59
|
writable: true
|
|
65
60
|
});
|
|
66
|
-
} else
|
|
67
|
-
obj[key] = value;
|
|
68
|
-
}
|
|
61
|
+
} else obj[key] = value;
|
|
69
62
|
return obj;
|
|
70
63
|
}
|
|
71
64
|
function _iterable_to_array(iter) {
|
|
72
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
65
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
66
|
+
return Array.from(iter);
|
|
67
|
+
}
|
|
73
68
|
}
|
|
74
69
|
function _non_iterable_spread() {
|
|
75
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
70
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
76
71
|
}
|
|
77
72
|
function _object_spread(target) {
|
|
78
73
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -92,18 +87,6 @@ function _object_spread(target) {
|
|
|
92
87
|
function _to_consumable_array(arr) {
|
|
93
88
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
94
89
|
}
|
|
95
|
-
function _type_of(obj) {
|
|
96
|
-
"@swc/helpers - typeof";
|
|
97
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
98
|
-
}
|
|
99
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
100
|
-
if (!o) return;
|
|
101
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
102
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
103
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
104
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
105
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
106
|
-
}
|
|
107
90
|
function _ts_generator(thisArg, body) {
|
|
108
91
|
var f, y, t, _ = {
|
|
109
92
|
label: 0,
|
|
@@ -205,18 +188,36 @@ function _ts_generator(thisArg, body) {
|
|
|
205
188
|
}
|
|
206
189
|
function _ts_values(o) {
|
|
207
190
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
208
|
-
if (m)
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
191
|
+
if (m) {
|
|
192
|
+
return m.call(o);
|
|
193
|
+
}
|
|
194
|
+
if (o && typeof o.length === "number") {
|
|
195
|
+
return {
|
|
196
|
+
next: function() {
|
|
197
|
+
if (o && i >= o.length) {
|
|
198
|
+
o = void 0;
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
value: o && o[i++],
|
|
202
|
+
done: !o
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
218
207
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
219
208
|
}
|
|
209
|
+
function _type_of(obj) {
|
|
210
|
+
"@swc/helpers - typeof";
|
|
211
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
212
|
+
}
|
|
213
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
214
|
+
if (!o) return;
|
|
215
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
216
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
217
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
218
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
219
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
220
|
+
}
|
|
220
221
|
var __create = Object.create;
|
|
221
222
|
var __defProp = Object.defineProperty;
|
|
222
223
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1144,7 +1145,7 @@ function buildPlayerMetricEvent() {
|
|
|
1144
1145
|
if (debugAdTiming) {
|
|
1145
1146
|
console.log("[StormcloudVideoPlayer] playerId: ", playerId);
|
|
1146
1147
|
}
|
|
1147
|
-
captureAt = (_flags_captureAt = flags.captureAt) !== null && _flags_captureAt !== void 0 ? _flags_captureAt : /* @__PURE__ */ new Date().toISOString();
|
|
1148
|
+
captureAt = (_flags_captureAt = flags.captureAt) !== null && _flags_captureAt !== void 0 ? _flags_captureAt : (/* @__PURE__ */ new Date()).toISOString();
|
|
1148
1149
|
return [
|
|
1149
1150
|
2,
|
|
1150
1151
|
_object_spread({
|
|
@@ -1376,7 +1377,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
1376
1377
|
sendAdImpressionTracking(_this.host.config.licenseKey, {
|
|
1377
1378
|
source: "hls",
|
|
1378
1379
|
adIndex: _this.timing.currentAdIndex,
|
|
1379
|
-
timestamp: /* @__PURE__ */ new Date().toISOString()
|
|
1380
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1380
1381
|
}, _this.analyticsContext).catch(function() {});
|
|
1381
1382
|
_this.timing.recordPlayedAdDuration(_this.host.getAdPlayer());
|
|
1382
1383
|
var remaining = _this.timing.getRemainingAdMs();
|
|
@@ -1438,7 +1439,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
1438
1439
|
sendAdImpressionTracking(_this.host.config.licenseKey, {
|
|
1439
1440
|
source: "hls",
|
|
1440
1441
|
adIndex: _this.timing.currentAdIndex,
|
|
1441
|
-
timestamp: /* @__PURE__ */ new Date().toISOString()
|
|
1442
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1442
1443
|
}, _this.analyticsContext).catch(function() {});
|
|
1443
1444
|
if (!_this.host.video.muted) {
|
|
1444
1445
|
_this.host.video.muted = true;
|
|
@@ -1677,7 +1678,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
1677
1678
|
sendAdLoadedTracking(this.host.config.licenseKey, {
|
|
1678
1679
|
source: "hls",
|
|
1679
1680
|
vastUrl: podUrl,
|
|
1680
|
-
timestamp: /* @__PURE__ */ new Date().toISOString()
|
|
1681
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1681
1682
|
}, this.analyticsContext).catch(function() {});
|
|
1682
1683
|
this.timing.startAdFailsafeTimer(requestToken);
|
|
1683
1684
|
return [
|
|
@@ -2197,7 +2198,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
2197
2198
|
sendAdLoadedTracking(this.host.config.licenseKey, {
|
|
2198
2199
|
source: "hls",
|
|
2199
2200
|
vastUrl: vastTagUrl,
|
|
2200
|
-
timestamp: /* @__PURE__ */ new Date().toISOString()
|
|
2201
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
2201
2202
|
}, this.analyticsContext).catch(function() {});
|
|
2202
2203
|
this.timing.clearAdRequestWatchdog();
|
|
2203
2204
|
if (this.timing.activeAdRequestToken !== requestToken) return [
|