stormcloud-video-player 0.7.2 → 0.7.3
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 +1 -26
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +1 -26
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +1 -26
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +1 -26
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +1 -26
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/vastAdLayer.cjs +1 -26
- package/lib/sdk/vastAdLayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +1 -26
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -1136,7 +1136,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1136
1136
|
var tornDown = false;
|
|
1137
1137
|
var trackingFired = createEmptyTrackingState();
|
|
1138
1138
|
var adStallTimerId;
|
|
1139
|
-
var savedContentVideoStyles;
|
|
1140
1139
|
var currentAdEventHandlers;
|
|
1141
1140
|
var preloadSlots = /* @__PURE__ */ new Map();
|
|
1142
1141
|
function emit(event, payload) {
|
|
@@ -1253,7 +1252,7 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1253
1252
|
video.style.top = "0";
|
|
1254
1253
|
video.style.width = "100%";
|
|
1255
1254
|
video.style.height = "100%";
|
|
1256
|
-
video.style.objectFit = "
|
|
1255
|
+
video.style.objectFit = "contain";
|
|
1257
1256
|
video.style.backgroundColor = "#000";
|
|
1258
1257
|
video.playsInline = true;
|
|
1259
1258
|
video.muted = false;
|
|
@@ -1368,31 +1367,12 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1368
1367
|
delete contentVideo.dataset.stormcloudAdPlaying;
|
|
1369
1368
|
}
|
|
1370
1369
|
}
|
|
1371
|
-
function applyContentVideoAdCoverStyles() {
|
|
1372
|
-
if (!singleElementMode) return;
|
|
1373
|
-
savedContentVideoStyles = {
|
|
1374
|
-
objectFit: contentVideo.style.objectFit,
|
|
1375
|
-
width: contentVideo.style.width,
|
|
1376
|
-
height: contentVideo.style.height
|
|
1377
|
-
};
|
|
1378
|
-
contentVideo.style.objectFit = "cover";
|
|
1379
|
-
contentVideo.style.width = "100%";
|
|
1380
|
-
contentVideo.style.height = "100%";
|
|
1381
|
-
}
|
|
1382
|
-
function restoreContentVideoStyles() {
|
|
1383
|
-
if (!singleElementMode || !savedContentVideoStyles) return;
|
|
1384
|
-
contentVideo.style.objectFit = savedContentVideoStyles.objectFit;
|
|
1385
|
-
contentVideo.style.width = savedContentVideoStyles.width;
|
|
1386
|
-
contentVideo.style.height = savedContentVideoStyles.height;
|
|
1387
|
-
savedContentVideoStyles = void 0;
|
|
1388
|
-
}
|
|
1389
1370
|
function handleAdComplete() {
|
|
1390
1371
|
if (tornDown) return;
|
|
1391
1372
|
clearAdStallTimer();
|
|
1392
1373
|
if (debug) console.log("".concat(LOG, " Handling ad completion"));
|
|
1393
1374
|
adPlaying = false;
|
|
1394
1375
|
setAdPlayingFlag(false);
|
|
1395
|
-
restoreContentVideoStyles();
|
|
1396
1376
|
if (adContainerEl) {
|
|
1397
1377
|
adContainerEl.style.display = "none";
|
|
1398
1378
|
adContainerEl.style.pointerEvents = "none";
|
|
@@ -1407,7 +1387,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1407
1387
|
if (debug) console.log("".concat(LOG, " Handling ad error"));
|
|
1408
1388
|
adPlaying = false;
|
|
1409
1389
|
setAdPlayingFlag(false);
|
|
1410
|
-
restoreContentVideoStyles();
|
|
1411
1390
|
if (adContainerEl) {
|
|
1412
1391
|
adContainerEl.style.display = "none";
|
|
1413
1392
|
adContainerEl.style.pointerEvents = "none";
|
|
@@ -1578,7 +1557,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1578
1557
|
];
|
|
1579
1558
|
contentVideo.style.visibility = "visible";
|
|
1580
1559
|
contentVideo.style.opacity = "1";
|
|
1581
|
-
applyContentVideoAdCoverStyles();
|
|
1582
1560
|
emit("content_pause");
|
|
1583
1561
|
setupAdEventListeners();
|
|
1584
1562
|
adVolume2 = originalMutedState ? 1 : originalVolume;
|
|
@@ -1817,7 +1795,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1817
1795
|
];
|
|
1818
1796
|
contentVideo.style.visibility = "visible";
|
|
1819
1797
|
contentVideo.style.opacity = "1";
|
|
1820
|
-
applyContentVideoAdCoverStyles();
|
|
1821
1798
|
emit("content_pause");
|
|
1822
1799
|
setupAdEventListeners();
|
|
1823
1800
|
adVolume2 = originalMutedState ? 1 : originalVolume;
|
|
@@ -1968,7 +1945,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1968
1945
|
if (debug) console.log("".concat(LOG, " Stopping ad"));
|
|
1969
1946
|
adPlaying = false;
|
|
1970
1947
|
setAdPlayingFlag(false);
|
|
1971
|
-
restoreContentVideoStyles();
|
|
1972
1948
|
contentVideo.muted = originalMutedState;
|
|
1973
1949
|
contentVideo.volume = originalMutedState ? 0 : originalVolume;
|
|
1974
1950
|
contentVideo.style.visibility = "visible";
|
|
@@ -2007,7 +1983,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
2007
1983
|
destroyed = true;
|
|
2008
1984
|
adPlaying = false;
|
|
2009
1985
|
setAdPlayingFlag(false);
|
|
2010
|
-
restoreContentVideoStyles();
|
|
2011
1986
|
contentVideo.muted = originalMutedState;
|
|
2012
1987
|
contentVideo.volume = originalVolume;
|
|
2013
1988
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|