stormcloud-video-player 0.5.26 → 0.5.27
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 +69 -20
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +70 -21
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +5 -2
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +5 -2
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +5 -2
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +69 -20
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -4263,7 +4263,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4263
4263
|
case 0:
|
|
4264
4264
|
_this = this;
|
|
4265
4265
|
durSec = (_marker_durationSeconds = marker.durationSeconds) !== null && _marker_durationSeconds !== void 0 ? _marker_durationSeconds : 60;
|
|
4266
|
-
estimatedCount = Math.min(4, Math.max(1, Math.ceil(durSec /
|
|
4266
|
+
estimatedCount = Math.min(4, Math.max(1, Math.ceil(durSec / 20)));
|
|
4267
4267
|
if (this.config.debugAdTiming) {
|
|
4268
4268
|
console.log("[PREFETCH] Firing ".concat(estimatedCount, " parallel bid request(s) for ").concat(durSec, "s break"));
|
|
4269
4269
|
}
|
|
@@ -4435,6 +4435,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4435
4435
|
if (bids.length > 0) {
|
|
4436
4436
|
_this.consecutiveFailures = 0;
|
|
4437
4437
|
_this.pendingNextAdBids = bids;
|
|
4438
|
+
_this.totalAdsInBreak = Math.max(_this.totalAdsInBreak, _this.currentAdIndex + _this.preloadedTokens.length + 1);
|
|
4438
4439
|
if (_this.config.debugAdTiming) {
|
|
4439
4440
|
console.log("[CONTINUOUS-FETCH] Pre-fetched next ad stored as pending");
|
|
4440
4441
|
}
|
|
@@ -4574,6 +4575,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4574
4575
|
17
|
|
4575
4576
|
];
|
|
4576
4577
|
_this.pendingNextAdBids = bids2;
|
|
4578
|
+
_this.totalAdsInBreak = Math.max(_this.totalAdsInBreak, _this.currentAdIndex + _this.preloadedTokens.length + 1);
|
|
4577
4579
|
if (_this.config.debugAdTiming) {
|
|
4578
4580
|
console.log("[CONTINUOUS-FETCH] Next ad response stored (ad currently playing or in transition)");
|
|
4579
4581
|
}
|
|
@@ -4727,7 +4729,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4727
4729
|
this.inAdBreak = true;
|
|
4728
4730
|
this.currentAdBreakStartWallClockMs = Date.now();
|
|
4729
4731
|
this.currentAdIndex = 0;
|
|
4730
|
-
this.totalAdsInBreak = 1;
|
|
4732
|
+
this.totalAdsInBreak = Math.max(1, this.preloadedTokens.length);
|
|
4731
4733
|
this.adPodQueue = [];
|
|
4732
4734
|
if (!this.config.disableFiller) this.showAds = true;
|
|
4733
4735
|
if (adBreakDurationMs != null) {
|
|
@@ -4952,6 +4954,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4952
4954
|
3
|
|
4953
4955
|
];
|
|
4954
4956
|
this.pendingNextAdBids = bids;
|
|
4957
|
+
this.totalAdsInBreak = Math.max(this.totalAdsInBreak, this.currentAdIndex + this.preloadedTokens.length);
|
|
4955
4958
|
return [
|
|
4956
4959
|
3,
|
|
4957
4960
|
5
|