stormcloud-video-player 0.8.51 → 0.8.52
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 +12 -3
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +12 -3
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +1 -1
- package/lib/player/AdConfigManager.d.cts +1 -1
- package/lib/player/AdTimingService.d.cts +1 -1
- package/lib/player/HlsEngine.d.cts +1 -1
- package/lib/player/PlayerControls.d.cts +1 -1
- package/lib/player/Scte35CueManager.d.cts +1 -1
- package/lib/player/Scte35Parser.d.cts +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +12 -3
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/player/playerTypes.d.cts +1 -1
- package/lib/players/HlsPlayer.cjs +12 -3
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +12 -3
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +12 -3
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +12 -3
- 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/types-iDjS8f_7.d.cts +0 -133
|
@@ -585,6 +585,7 @@ function createHlsAdPlayer(contentVideo, options) {
|
|
|
585
585
|
var AD_CONTAINER_PROP = "__stormcloudAdContainer";
|
|
586
586
|
var AD_VIDEO_PROP = "__stormcloudAdVideo";
|
|
587
587
|
var FRAME_COUNTER_RELIABLE_PROP = "__stormcloudFrameCounterReliable";
|
|
588
|
+
var RVFC_RELIABLE_PROP = "__stormcloudRvfcReliable";
|
|
588
589
|
var adVideoElement = (_contentVideo_AD_VIDEO_PROP = contentVideo[AD_VIDEO_PROP]) !== null && _contentVideo_AD_VIDEO_PROP !== void 0 ? _contentVideo_AD_VIDEO_PROP : void 0;
|
|
589
590
|
var adHls;
|
|
590
591
|
var adContainerEl = (_contentVideo_AD_CONTAINER_PROP = contentVideo[AD_CONTAINER_PROP]) !== null && _contentVideo_AD_CONTAINER_PROP !== void 0 ? _contentVideo_AD_CONTAINER_PROP : void 0;
|
|
@@ -1586,6 +1587,12 @@ function createHlsAdPlayer(contentVideo, options) {
|
|
|
1586
1587
|
function markFrameCounterReliable() {
|
|
1587
1588
|
contentVideo[FRAME_COUNTER_RELIABLE_PROP] = true;
|
|
1588
1589
|
}
|
|
1590
|
+
function isRvfcReliable() {
|
|
1591
|
+
return contentVideo[RVFC_RELIABLE_PROP] === true;
|
|
1592
|
+
}
|
|
1593
|
+
function markRvfcReliable() {
|
|
1594
|
+
contentVideo[RVFC_RELIABLE_PROP] = true;
|
|
1595
|
+
}
|
|
1589
1596
|
function cancelVideoFrameProbe() {
|
|
1590
1597
|
if (videoFrameCallbackHandle != null && adVideoElement && typeof adVideoElement.cancelVideoFrameCallback === "function") {
|
|
1591
1598
|
try {
|
|
@@ -1605,6 +1612,7 @@ function createHlsAdPlayer(contentVideo, options) {
|
|
|
1605
1612
|
videoFrameCallbackHandle = void 0;
|
|
1606
1613
|
if (!adPlaying) return;
|
|
1607
1614
|
sawDecodedVideoFrame = true;
|
|
1615
|
+
markRvfcReliable();
|
|
1608
1616
|
};
|
|
1609
1617
|
try {
|
|
1610
1618
|
videoFrameCallbackHandle = rvfc.call(adVideoElement, onPresentedFrame);
|
|
@@ -1629,18 +1637,19 @@ function createHlsAdPlayer(contentVideo, options) {
|
|
|
1629
1637
|
noteAdProgress();
|
|
1630
1638
|
sawDecodedVideoFrame = false;
|
|
1631
1639
|
startVideoFrameProbe();
|
|
1640
|
+
var blackFrameDetectionEnabled = !requiresMediaPipelineResetAfterAds();
|
|
1632
1641
|
stallWatchdogId = window.setInterval(function() {
|
|
1633
1642
|
if (!adPlaying || !adVideoElement) {
|
|
1634
1643
|
return;
|
|
1635
1644
|
}
|
|
1636
|
-
if (!sawDecodedVideoFrame && !adVideoElement.paused) {
|
|
1645
|
+
if (blackFrameDetectionEnabled && !sawDecodedVideoFrame && !adVideoElement.paused) {
|
|
1637
1646
|
var decodedFrames = getDecodedVideoFrameCount(adVideoElement);
|
|
1638
1647
|
if (decodedFrames !== void 0 && decodedFrames > 0) {
|
|
1639
1648
|
sawDecodedVideoFrame = true;
|
|
1640
1649
|
markFrameCounterReliable();
|
|
1641
1650
|
} else if (adVideoElement.currentTime >= BLACKFRAME_MIN_PLAYBACK_S) {
|
|
1642
1651
|
var timeAdvancing = adVideoElement.currentTime > lastAdProgressPosition + 0.05;
|
|
1643
|
-
if (isRvfcSupported(adVideoElement) && timeAdvancing) {
|
|
1652
|
+
if (isRvfcSupported(adVideoElement) && timeAdvancing && isRvfcReliable()) {
|
|
1644
1653
|
handleVideoDecodeFailure();
|
|
1645
1654
|
return;
|
|
1646
1655
|
}
|
|
@@ -2041,7 +2050,7 @@ function createHlsAdPlayer(contentVideo, options) {
|
|
|
2041
2050
|
}
|
|
2042
2051
|
},
|
|
2043
2052
|
hidePlaceholder: function hidePlaceholder() {
|
|
2044
|
-
if (adContainerEl) {
|
|
2053
|
+
if (adContainerEl && !adPlaying) {
|
|
2045
2054
|
adContainerEl.style.display = "none";
|
|
2046
2055
|
adContainerEl.style.pointerEvents = "none";
|
|
2047
2056
|
}
|