stormcloud-video-player 0.8.53 → 0.8.55
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 +1 -1
- package/lib/index.cjs +204 -110
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +204 -110
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.cjs +69 -66
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +1 -1
- package/lib/player/AdConfigManager.cjs +38 -33
- package/lib/player/AdConfigManager.cjs.map +1 -1
- package/lib/player/AdConfigManager.d.cts +1 -1
- package/lib/player/AdTimingService.cjs +18 -25
- package/lib/player/AdTimingService.cjs.map +1 -1
- package/lib/player/AdTimingService.d.cts +1 -1
- package/lib/player/HlsEngine.cjs +86 -30
- package/lib/player/HlsEngine.cjs.map +1 -1
- package/lib/player/HlsEngine.d.cts +6 -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/PlayerControls.d.cts +1 -1
- package/lib/player/Scte35CueManager.cjs +2 -4
- package/lib/player/Scte35CueManager.cjs.map +1 -1
- package/lib/player/Scte35CueManager.d.cts +1 -1
- package/lib/player/Scte35Parser.cjs +6 -12
- package/lib/player/Scte35Parser.cjs.map +1 -1
- package/lib/player/Scte35Parser.d.cts +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +194 -96
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +2 -1
- package/lib/player/playerTypes.cjs.map +1 -1
- package/lib/player/playerTypes.d.cts +1 -1
- package/lib/players/FilePlayer.cjs +17 -26
- package/lib/players/FilePlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +204 -110
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +204 -110
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +42 -19
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/sdk/pal.cjs +6 -9
- package/lib/sdk/pal.cjs.map +1 -1
- package/lib/{types-cTqIKw_D.d.cts → types-DpbgEvSH.d.cts} +1 -0
- package/lib/ui/StormcloudVideoPlayer.cjs +194 -96
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +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 +27 -20
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/lib/utils/vastEnvironmentSignals.cjs +7 -6
- package/lib/utils/vastEnvironmentSignals.cjs.map +1 -1
- package/lib/utils/vastEnvironmentSignals.d.cts +2 -1
- package/lib/utils/vastMacros.cjs +4 -2
- package/lib/utils/vastMacros.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Scte35Marker, a as StormcloudVideoPlayerConfig, A as AdController } from '../types-
|
|
1
|
+
import { S as Scte35Marker, a as StormcloudVideoPlayerConfig, A as AdController } from '../types-DpbgEvSH.cjs';
|
|
2
2
|
import { AdTimingService } from './AdTimingService.cjs';
|
|
3
3
|
import { AdConfigManager } from './AdConfigManager.cjs';
|
|
4
4
|
import { Scte35CueManager } from './Scte35CueManager.cjs';
|
|
@@ -18,11 +18,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
18
18
|
reject(error);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
if (info.done)
|
|
22
|
-
|
|
23
|
-
} else {
|
|
24
|
-
Promise.resolve(value).then(_next, _throw);
|
|
25
|
-
}
|
|
21
|
+
if (info.done) resolve(value);
|
|
22
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
26
23
|
}
|
|
27
24
|
function _async_to_generator(fn) {
|
|
28
25
|
return function() {
|
|
@@ -40,9 +37,7 @@ function _async_to_generator(fn) {
|
|
|
40
37
|
};
|
|
41
38
|
}
|
|
42
39
|
function _class_call_check(instance, Constructor) {
|
|
43
|
-
if (!(instance instanceof Constructor))
|
|
44
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45
|
-
}
|
|
40
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
46
41
|
}
|
|
47
42
|
function _defineProperties(target, props) {
|
|
48
43
|
for(var i = 0; i < props.length; i++){
|
|
@@ -66,13 +61,13 @@ function _define_property(obj, key, value) {
|
|
|
66
61
|
configurable: true,
|
|
67
62
|
writable: true
|
|
68
63
|
});
|
|
69
|
-
} else
|
|
70
|
-
obj[key] = value;
|
|
71
|
-
}
|
|
64
|
+
} else obj[key] = value;
|
|
72
65
|
return obj;
|
|
73
66
|
}
|
|
74
67
|
function _iterable_to_array(iter) {
|
|
75
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
68
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
69
|
+
return Array.from(iter);
|
|
70
|
+
}
|
|
76
71
|
}
|
|
77
72
|
function _iterable_to_array_limit(arr, i) {
|
|
78
73
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -99,10 +94,10 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
99
94
|
return _arr;
|
|
100
95
|
}
|
|
101
96
|
function _non_iterable_rest() {
|
|
102
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
97
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
103
98
|
}
|
|
104
99
|
function _non_iterable_spread() {
|
|
105
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
100
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
106
101
|
}
|
|
107
102
|
function _object_spread(target) {
|
|
108
103
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -134,9 +129,8 @@ function ownKeys(object, enumerableOnly) {
|
|
|
134
129
|
}
|
|
135
130
|
function _object_spread_props(target, source) {
|
|
136
131
|
source = source != null ? source : {};
|
|
137
|
-
if (Object.getOwnPropertyDescriptors)
|
|
138
|
-
|
|
139
|
-
} else {
|
|
132
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
133
|
+
else {
|
|
140
134
|
ownKeys(Object(source)).forEach(function(key) {
|
|
141
135
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
142
136
|
});
|
|
@@ -149,18 +143,6 @@ function _sliced_to_array(arr, i) {
|
|
|
149
143
|
function _to_consumable_array(arr) {
|
|
150
144
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
151
145
|
}
|
|
152
|
-
function _type_of(obj) {
|
|
153
|
-
"@swc/helpers - typeof";
|
|
154
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
155
|
-
}
|
|
156
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
157
|
-
if (!o) return;
|
|
158
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
159
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
160
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
161
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
162
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
163
|
-
}
|
|
164
146
|
function _ts_generator(thisArg, body) {
|
|
165
147
|
var f, y, t, _ = {
|
|
166
148
|
label: 0,
|
|
@@ -260,6 +242,18 @@ function _ts_generator(thisArg, body) {
|
|
|
260
242
|
};
|
|
261
243
|
}
|
|
262
244
|
}
|
|
245
|
+
function _type_of(obj) {
|
|
246
|
+
"@swc/helpers - typeof";
|
|
247
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
248
|
+
}
|
|
249
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
250
|
+
if (!o) return;
|
|
251
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
252
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
253
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
254
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
255
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
256
|
+
}
|
|
263
257
|
var __create = Object.create;
|
|
264
258
|
var __defProp = Object.defineProperty;
|
|
265
259
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1736,7 +1730,7 @@ function buildPlayerMetricEvent() {
|
|
|
1736
1730
|
if (debugAdTiming) {
|
|
1737
1731
|
console.log("[StormcloudVideoPlayer] playerId: ", playerId);
|
|
1738
1732
|
}
|
|
1739
|
-
captureAt = (_flags_captureAt = flags.captureAt) !== null && _flags_captureAt !== void 0 ? _flags_captureAt : /* @__PURE__ */ new Date().toISOString();
|
|
1733
|
+
captureAt = (_flags_captureAt = flags.captureAt) !== null && _flags_captureAt !== void 0 ? _flags_captureAt : (/* @__PURE__ */ new Date()).toISOString();
|
|
1740
1734
|
return [
|
|
1741
1735
|
2,
|
|
1742
1736
|
_object_spread({
|
|
@@ -1755,8 +1749,19 @@ function buildPlayerMetricEvent() {
|
|
|
1755
1749
|
}).apply(this, arguments);
|
|
1756
1750
|
}
|
|
1757
1751
|
function publishTracking(licenseKey, channel, body) {
|
|
1752
|
+
var debug = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
1758
1753
|
ensureMQTTClient();
|
|
1759
|
-
|
|
1754
|
+
var topic = buildPlayerTopic(licenseKey, channel);
|
|
1755
|
+
var published = publishMQTT(topic, body);
|
|
1756
|
+
if (debug) {
|
|
1757
|
+
console.log("[StormcloudVideoPlayer] publishTracking:", JSON.stringify({
|
|
1758
|
+
licenseKey: licenseKey,
|
|
1759
|
+
channel: channel,
|
|
1760
|
+
topic: topic,
|
|
1761
|
+
body: body,
|
|
1762
|
+
published: published
|
|
1763
|
+
}, null, 2));
|
|
1764
|
+
}
|
|
1760
1765
|
}
|
|
1761
1766
|
function sendInitialTracking(_0) {
|
|
1762
1767
|
return _async_to_generator(function(licenseKey) {
|
|
@@ -1790,7 +1795,7 @@ function sendInitialTracking(_0) {
|
|
|
1790
1795
|
events: [
|
|
1791
1796
|
metricEvent
|
|
1792
1797
|
]
|
|
1793
|
-
});
|
|
1798
|
+
}, !!context.debugAdTiming);
|
|
1794
1799
|
return [
|
|
1795
1800
|
3,
|
|
1796
1801
|
4
|
|
@@ -1835,7 +1840,7 @@ function sendHeartbeat(_0) {
|
|
|
1835
1840
|
];
|
|
1836
1841
|
case 2:
|
|
1837
1842
|
heartbeatData = _state.sent();
|
|
1838
|
-
publishTracking(licenseKey, "heartbeat", heartbeatData);
|
|
1843
|
+
publishTracking(licenseKey, "heartbeat", heartbeatData, !!context.debugAdTiming);
|
|
1839
1844
|
return [
|
|
1840
1845
|
3,
|
|
1841
1846
|
4
|