stormcloud-video-player 0.6.7 → 0.6.8
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
|
@@ -1124,7 +1124,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1124
1124
|
var tornDown = false;
|
|
1125
1125
|
var trackingFired = createEmptyTrackingState();
|
|
1126
1126
|
var adStallTimerId;
|
|
1127
|
-
var savedContentVideoStyles;
|
|
1128
1127
|
var currentAdEventHandlers;
|
|
1129
1128
|
var preloadSlots = /* @__PURE__ */ new Map();
|
|
1130
1129
|
function emit(event, payload) {
|
|
@@ -1241,7 +1240,7 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1241
1240
|
video.style.top = "0";
|
|
1242
1241
|
video.style.width = "100%";
|
|
1243
1242
|
video.style.height = "100%";
|
|
1244
|
-
video.style.objectFit = "
|
|
1243
|
+
video.style.objectFit = "contain";
|
|
1245
1244
|
video.style.backgroundColor = "#000";
|
|
1246
1245
|
video.playsInline = true;
|
|
1247
1246
|
video.muted = false;
|
|
@@ -1356,31 +1355,12 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1356
1355
|
delete contentVideo.dataset.stormcloudAdPlaying;
|
|
1357
1356
|
}
|
|
1358
1357
|
}
|
|
1359
|
-
function applyContentVideoAdCoverStyles() {
|
|
1360
|
-
if (!singleElementMode) return;
|
|
1361
|
-
savedContentVideoStyles = {
|
|
1362
|
-
objectFit: contentVideo.style.objectFit,
|
|
1363
|
-
width: contentVideo.style.width,
|
|
1364
|
-
height: contentVideo.style.height
|
|
1365
|
-
};
|
|
1366
|
-
contentVideo.style.objectFit = "cover";
|
|
1367
|
-
contentVideo.style.width = "100%";
|
|
1368
|
-
contentVideo.style.height = "100%";
|
|
1369
|
-
}
|
|
1370
|
-
function restoreContentVideoStyles() {
|
|
1371
|
-
if (!singleElementMode || !savedContentVideoStyles) return;
|
|
1372
|
-
contentVideo.style.objectFit = savedContentVideoStyles.objectFit;
|
|
1373
|
-
contentVideo.style.width = savedContentVideoStyles.width;
|
|
1374
|
-
contentVideo.style.height = savedContentVideoStyles.height;
|
|
1375
|
-
savedContentVideoStyles = void 0;
|
|
1376
|
-
}
|
|
1377
1358
|
function handleAdComplete() {
|
|
1378
1359
|
if (tornDown) return;
|
|
1379
1360
|
clearAdStallTimer();
|
|
1380
1361
|
if (debug) console.log("".concat(LOG, " Handling ad completion"));
|
|
1381
1362
|
adPlaying = false;
|
|
1382
1363
|
setAdPlayingFlag(false);
|
|
1383
|
-
restoreContentVideoStyles();
|
|
1384
1364
|
if (adContainerEl) {
|
|
1385
1365
|
adContainerEl.style.display = "none";
|
|
1386
1366
|
adContainerEl.style.pointerEvents = "none";
|
|
@@ -1395,7 +1375,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1395
1375
|
if (debug) console.log("".concat(LOG, " Handling ad error"));
|
|
1396
1376
|
adPlaying = false;
|
|
1397
1377
|
setAdPlayingFlag(false);
|
|
1398
|
-
restoreContentVideoStyles();
|
|
1399
1378
|
if (adContainerEl) {
|
|
1400
1379
|
adContainerEl.style.display = "none";
|
|
1401
1380
|
adContainerEl.style.pointerEvents = "none";
|
|
@@ -1566,7 +1545,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1566
1545
|
];
|
|
1567
1546
|
contentVideo.style.visibility = "visible";
|
|
1568
1547
|
contentVideo.style.opacity = "1";
|
|
1569
|
-
applyContentVideoAdCoverStyles();
|
|
1570
1548
|
emit("content_pause");
|
|
1571
1549
|
setupAdEventListeners();
|
|
1572
1550
|
adVolume2 = originalMutedState ? 1 : originalVolume;
|
|
@@ -1805,7 +1783,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1805
1783
|
];
|
|
1806
1784
|
contentVideo.style.visibility = "visible";
|
|
1807
1785
|
contentVideo.style.opacity = "1";
|
|
1808
|
-
applyContentVideoAdCoverStyles();
|
|
1809
1786
|
emit("content_pause");
|
|
1810
1787
|
setupAdEventListeners();
|
|
1811
1788
|
adVolume2 = originalMutedState ? 1 : originalVolume;
|
|
@@ -1956,7 +1933,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1956
1933
|
if (debug) console.log("".concat(LOG, " Stopping ad"));
|
|
1957
1934
|
adPlaying = false;
|
|
1958
1935
|
setAdPlayingFlag(false);
|
|
1959
|
-
restoreContentVideoStyles();
|
|
1960
1936
|
contentVideo.muted = originalMutedState;
|
|
1961
1937
|
contentVideo.volume = originalMutedState ? 0 : originalVolume;
|
|
1962
1938
|
contentVideo.style.visibility = "visible";
|
|
@@ -1995,7 +1971,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1995
1971
|
destroyed = true;
|
|
1996
1972
|
adPlaying = false;
|
|
1997
1973
|
setAdPlayingFlag(false);
|
|
1998
|
-
restoreContentVideoStyles();
|
|
1999
1974
|
contentVideo.muted = originalMutedState;
|
|
2000
1975
|
contentVideo.volume = originalVolume;
|
|
2001
1976
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|