stormcloud-video-player 0.5.2 → 0.5.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/dist/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +370 -447
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +355 -267
- package/lib/index.d.ts +355 -267
- package/lib/index.js +329 -406
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +96 -178
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/players/FilePlayer.cjs +99 -116
- package/lib/players/FilePlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +148 -230
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +227 -309
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +17 -9
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/sdk/ima.cjs +28 -20
- package/lib/sdk/ima.cjs.map +1 -1
- package/lib/sdk/ima.d.cts +1 -1
- package/lib/sdk/prebid.cjs +27 -85
- package/lib/sdk/prebid.cjs.map +1 -1
- package/lib/sdk/prebid.d.cts +6 -3
- package/lib/sdk/prebidController.cjs +35 -108
- package/lib/sdk/prebidController.cjs.map +1 -1
- package/lib/sdk/prebidController.d.cts +3 -2
- package/lib/sdk/vastParser.cjs +19 -11
- package/lib/sdk/vastParser.cjs.map +1 -1
- package/lib/{types-g2d4Akez.d.cts → types-CRi_KrjM.d.cts} +1 -45
- package/lib/ui/StormcloudVideoPlayer.cjs +190 -267
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/browserCompat.cjs +11 -11
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/polyfills.cjs +13 -13
- package/lib/utils/polyfills.cjs.map +1 -1
- package/lib/utils/tracking.cjs +19 -11
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/package.json +1 -1
package/lib/sdk/ima.cjs
CHANGED
|
@@ -41,9 +41,17 @@ function _ts_generator(thisArg, body) {
|
|
|
41
41
|
},
|
|
42
42
|
trys: [],
|
|
43
43
|
ops: []
|
|
44
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
45
|
-
return
|
|
46
|
-
|
|
44
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
45
|
+
return d(g, "next", {
|
|
46
|
+
value: verb(0)
|
|
47
|
+
}), d(g, "throw", {
|
|
48
|
+
value: verb(1)
|
|
49
|
+
}), d(g, "return", {
|
|
50
|
+
value: verb(2)
|
|
51
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
52
|
+
value: function() {
|
|
53
|
+
return this;
|
|
54
|
+
}
|
|
47
55
|
}), g;
|
|
48
56
|
function verb(n) {
|
|
49
57
|
return function(v) {
|
|
@@ -127,20 +135,20 @@ var __defProp = Object.defineProperty;
|
|
|
127
135
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
128
136
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
129
137
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
130
|
-
var __export = function(target, all) {
|
|
138
|
+
var __export = function __export(target, all) {
|
|
131
139
|
for(var name in all)__defProp(target, name, {
|
|
132
140
|
get: all[name],
|
|
133
141
|
enumerable: true
|
|
134
142
|
});
|
|
135
143
|
};
|
|
136
|
-
var __copyProps = function(to, from, except, desc) {
|
|
144
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
137
145
|
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
138
146
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
139
147
|
try {
|
|
140
148
|
var _loop = function() {
|
|
141
149
|
var key = _step.value;
|
|
142
150
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
143
|
-
get: function() {
|
|
151
|
+
get: function get() {
|
|
144
152
|
return from[key];
|
|
145
153
|
},
|
|
146
154
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -164,7 +172,7 @@ var __copyProps = function(to, from, except, desc) {
|
|
|
164
172
|
}
|
|
165
173
|
return to;
|
|
166
174
|
};
|
|
167
|
-
var __toCommonJS = function(mod) {
|
|
175
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
168
176
|
return __copyProps(__defProp({}, "__esModule", {
|
|
169
177
|
value: true
|
|
170
178
|
}), mod);
|
|
@@ -172,7 +180,7 @@ var __toCommonJS = function(mod) {
|
|
|
172
180
|
// src/sdk/ima.ts
|
|
173
181
|
var ima_exports = {};
|
|
174
182
|
__export(ima_exports, {
|
|
175
|
-
createImaController: function() {
|
|
183
|
+
createImaController: function createImaController1() {
|
|
176
184
|
return createImaController;
|
|
177
185
|
}
|
|
178
186
|
});
|
|
@@ -470,7 +478,7 @@ function createImaController(video, options) {
|
|
|
470
478
|
var fn = _step.value;
|
|
471
479
|
try {
|
|
472
480
|
fn(payload);
|
|
473
|
-
} catch (
|
|
481
|
+
} catch (unused) {}
|
|
474
482
|
}
|
|
475
483
|
} catch (err) {
|
|
476
484
|
_didIteratorError = true;
|
|
@@ -508,7 +516,7 @@ function createImaController(video, options) {
|
|
|
508
516
|
console.error("StormcloudVideoPlayer: The host page is inside a sandboxed iframe without 'allow-scripts'. Google IMA cannot run ads within sandboxed frames. Remove the sandbox attribute or include 'allow-scripts allow-same-origin'.");
|
|
509
517
|
}
|
|
510
518
|
}
|
|
511
|
-
} catch (
|
|
519
|
+
} catch (unused) {}
|
|
512
520
|
if (typeof window !== "undefined" && ((_window_google = window.google) === null || _window_google === void 0 ? void 0 : _window_google.ima)) return Promise.resolve();
|
|
513
521
|
var existing = document.querySelector('script[data-ima="true"]');
|
|
514
522
|
if (existing) {
|
|
@@ -756,7 +764,7 @@ function createImaController(video, options) {
|
|
|
756
764
|
if (adsManager) {
|
|
757
765
|
try {
|
|
758
766
|
adsManager.destroy();
|
|
759
|
-
} catch (
|
|
767
|
+
} catch (unused) {}
|
|
760
768
|
adsManager = void 0;
|
|
761
769
|
}
|
|
762
770
|
if (adVideoElement) {
|
|
@@ -767,7 +775,7 @@ function createImaController(video, options) {
|
|
|
767
775
|
if (adsLoader) {
|
|
768
776
|
try {
|
|
769
777
|
adsLoader.destroy();
|
|
770
|
-
} catch (
|
|
778
|
+
} catch (unused) {}
|
|
771
779
|
adsLoader = void 0;
|
|
772
780
|
}
|
|
773
781
|
}
|
|
@@ -785,7 +793,7 @@ function createImaController(video, options) {
|
|
|
785
793
|
try {
|
|
786
794
|
var _adDisplayContainer_initialize;
|
|
787
795
|
(_adDisplayContainer_initialize = adDisplayContainer.initialize) === null || _adDisplayContainer_initialize === void 0 ? void 0 : _adDisplayContainer_initialize.call(adDisplayContainer);
|
|
788
|
-
} catch (
|
|
796
|
+
} catch (unused) {}
|
|
789
797
|
}
|
|
790
798
|
}).catch(function() {});
|
|
791
799
|
},
|
|
@@ -944,7 +952,7 @@ function createImaController(video, options) {
|
|
|
944
952
|
window.setTimeout(function() {
|
|
945
953
|
try {
|
|
946
954
|
makeAdsRequest(google, lastAdTagUrl);
|
|
947
|
-
} catch (
|
|
955
|
+
} catch (unused) {}
|
|
948
956
|
}, delay);
|
|
949
957
|
} else {
|
|
950
958
|
emit("ad_error", {
|
|
@@ -976,7 +984,7 @@ function createImaController(video, options) {
|
|
|
976
984
|
if (adsManager) {
|
|
977
985
|
try {
|
|
978
986
|
adsManager.setVolume(adVolume);
|
|
979
|
-
} catch (
|
|
987
|
+
} catch (unused) {}
|
|
980
988
|
}
|
|
981
989
|
emit("content_pause");
|
|
982
990
|
});
|
|
@@ -990,7 +998,7 @@ function createImaController(video, options) {
|
|
|
990
998
|
if (adsManager) {
|
|
991
999
|
try {
|
|
992
1000
|
adsManager.setVolume(originalMutedState ? 0 : adVolume);
|
|
993
|
-
} catch (
|
|
1001
|
+
} catch (unused) {}
|
|
994
1002
|
}
|
|
995
1003
|
}
|
|
996
1004
|
if (adContainerEl) {
|
|
@@ -1151,7 +1159,7 @@ function createImaController(video, options) {
|
|
|
1151
1159
|
}
|
|
1152
1160
|
try {
|
|
1153
1161
|
adsManager.setVolume(originalMutedState ? 0 : adVolume);
|
|
1154
|
-
} catch (
|
|
1162
|
+
} catch (unused) {}
|
|
1155
1163
|
adsManager.start();
|
|
1156
1164
|
return [
|
|
1157
1165
|
2,
|
|
@@ -1233,7 +1241,7 @@ function createImaController(video, options) {
|
|
|
1233
1241
|
try {
|
|
1234
1242
|
;
|
|
1235
1243
|
adsManager === null || adsManager === void 0 ? void 0 : (_adsManager_stop = adsManager.stop) === null || _adsManager_stop === void 0 ? void 0 : _adsManager_stop.call(adsManager);
|
|
1236
|
-
} catch (
|
|
1244
|
+
} catch (unused) {}
|
|
1237
1245
|
destroyAdsManager();
|
|
1238
1246
|
return [
|
|
1239
1247
|
2
|
|
@@ -1264,7 +1272,7 @@ function createImaController(video, options) {
|
|
|
1264
1272
|
try {
|
|
1265
1273
|
var _adsLoader_destroy;
|
|
1266
1274
|
adsLoader === null || adsLoader === void 0 ? void 0 : (_adsLoader_destroy = adsLoader.destroy) === null || _adsLoader_destroy === void 0 ? void 0 : _adsLoader_destroy.call(adsLoader);
|
|
1267
|
-
} catch (
|
|
1275
|
+
} catch (unused) {}
|
|
1268
1276
|
adDisplayContainer = void 0;
|
|
1269
1277
|
adsLoader = void 0;
|
|
1270
1278
|
contentVideoHidden = false;
|
|
@@ -1313,7 +1321,7 @@ function createImaController(video, options) {
|
|
|
1313
1321
|
if (adsManager && adPlaying) {
|
|
1314
1322
|
try {
|
|
1315
1323
|
adsManager.setVolume(clampedVolume);
|
|
1316
|
-
} catch (
|
|
1324
|
+
} catch (unused) {}
|
|
1317
1325
|
}
|
|
1318
1326
|
},
|
|
1319
1327
|
getAdVolume: function getAdVolume() {
|