stormcloud-video-player 0.4.0 → 0.4.1
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 +14 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +14 -1
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +10 -1
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/players/HlsPlayer.cjs +10 -1
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +10 -1
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/adstormPlayer.cjs +8 -1
- package/lib/sdk/adstormPlayer.cjs.map +1 -1
- package/lib/sdk/adstormPlayer.d.cts +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +4 -0
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/{types-Ca4ZDaWw.d.cts → types-2vzNGNdf.d.cts} +1 -0
- package/lib/ui/StormcloudVideoPlayer.cjs +10 -1
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/package.json +1 -1
package/lib/index.d.cts
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -403,6 +403,7 @@ function createAdStormPlayer(contentVideo, options) {
|
|
|
403
403
|
var adContainerEl;
|
|
404
404
|
var currentAd;
|
|
405
405
|
var destroyed = false;
|
|
406
|
+
var allowNativeHls = false;
|
|
406
407
|
var trackingFired = {
|
|
407
408
|
impression: false,
|
|
408
409
|
start: false,
|
|
@@ -860,7 +861,9 @@ function createAdStormPlayer(contentVideo, options) {
|
|
|
860
861
|
}, 300);
|
|
861
862
|
contentVideo.muted = true;
|
|
862
863
|
contentVideo.volume = 0;
|
|
863
|
-
|
|
864
|
+
if (allowNativeHls) {
|
|
865
|
+
contentVideo.pause();
|
|
866
|
+
}
|
|
864
867
|
adPlaying = true;
|
|
865
868
|
setAdPlayingFlag(true);
|
|
866
869
|
if (adVideoElement) {
|
|
@@ -1036,6 +1039,10 @@ function createAdStormPlayer(contentVideo, options) {
|
|
|
1036
1039
|
}
|
|
1037
1040
|
}, 300);
|
|
1038
1041
|
}
|
|
1042
|
+
},
|
|
1043
|
+
setAllowNativeHls: function setAllowNativeHls(value) {
|
|
1044
|
+
allowNativeHls = value;
|
|
1045
|
+
log("allowNativeHls set to: ".concat(value));
|
|
1039
1046
|
}
|
|
1040
1047
|
};
|
|
1041
1048
|
}
|
|
@@ -1494,6 +1501,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
1494
1501
|
});
|
|
1495
1502
|
}
|
|
1496
1503
|
this.adPlayer.initialize();
|
|
1504
|
+
this.adPlayer.setAllowNativeHls(!!this.config.allowNativeHls);
|
|
1497
1505
|
if (!this.config.autoplay) return [
|
|
1498
1506
|
3,
|
|
1499
1507
|
2
|
|
@@ -1548,6 +1556,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
1548
1556
|
});
|
|
1549
1557
|
}
|
|
1550
1558
|
this.adPlayer.initialize();
|
|
1559
|
+
this.adPlayer.setAllowNativeHls(!!this.config.allowNativeHls);
|
|
1551
1560
|
this.bufferedSegmentsCount = 0;
|
|
1552
1561
|
this.hasInitialBufferCompleted = false;
|
|
1553
1562
|
this.shouldAutoplayAfterBuffering = !!this.config.autoplay;
|
|
@@ -5372,6 +5381,7 @@ function createHlsAdPlayer(contentVideo, options) {
|
|
|
5372
5381
|
var adPlaying = false;
|
|
5373
5382
|
var originalMutedState = false;
|
|
5374
5383
|
var originalVolume = Math.max(0, Math.min(1, contentVideo.volume || 1));
|
|
5384
|
+
var allowNativeHls = false;
|
|
5375
5385
|
var listeners = /* @__PURE__ */ new Map();
|
|
5376
5386
|
var licenseKey = options === null || options === void 0 ? void 0 : options.licenseKey;
|
|
5377
5387
|
var mainHlsInstance = options === null || options === void 0 ? void 0 : options.mainHlsInstance;
|
|
@@ -6139,6 +6149,9 @@ function createHlsAdPlayer(contentVideo, options) {
|
|
|
6139
6149
|
adContainerEl.style.display = "none";
|
|
6140
6150
|
adContainerEl.style.pointerEvents = "none";
|
|
6141
6151
|
}
|
|
6152
|
+
},
|
|
6153
|
+
setAllowNativeHls: function setAllowNativeHls(value) {
|
|
6154
|
+
allowNativeHls = value;
|
|
6142
6155
|
}
|
|
6143
6156
|
};
|
|
6144
6157
|
}
|