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
|
@@ -980,7 +980,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
980
980
|
var tornDown = false;
|
|
981
981
|
var trackingFired = createEmptyTrackingState();
|
|
982
982
|
var adStallTimerId;
|
|
983
|
-
var savedContentVideoStyles;
|
|
984
983
|
var currentAdEventHandlers;
|
|
985
984
|
var preloadSlots = /* @__PURE__ */ new Map();
|
|
986
985
|
function emit(event, payload) {
|
|
@@ -1097,7 +1096,7 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1097
1096
|
video.style.top = "0";
|
|
1098
1097
|
video.style.width = "100%";
|
|
1099
1098
|
video.style.height = "100%";
|
|
1100
|
-
video.style.objectFit = "
|
|
1099
|
+
video.style.objectFit = "contain";
|
|
1101
1100
|
video.style.backgroundColor = "#000";
|
|
1102
1101
|
video.playsInline = true;
|
|
1103
1102
|
video.muted = false;
|
|
@@ -1212,31 +1211,12 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1212
1211
|
delete contentVideo.dataset.stormcloudAdPlaying;
|
|
1213
1212
|
}
|
|
1214
1213
|
}
|
|
1215
|
-
function applyContentVideoAdCoverStyles() {
|
|
1216
|
-
if (!singleElementMode) return;
|
|
1217
|
-
savedContentVideoStyles = {
|
|
1218
|
-
objectFit: contentVideo.style.objectFit,
|
|
1219
|
-
width: contentVideo.style.width,
|
|
1220
|
-
height: contentVideo.style.height
|
|
1221
|
-
};
|
|
1222
|
-
contentVideo.style.objectFit = "cover";
|
|
1223
|
-
contentVideo.style.width = "100%";
|
|
1224
|
-
contentVideo.style.height = "100%";
|
|
1225
|
-
}
|
|
1226
|
-
function restoreContentVideoStyles() {
|
|
1227
|
-
if (!singleElementMode || !savedContentVideoStyles) return;
|
|
1228
|
-
contentVideo.style.objectFit = savedContentVideoStyles.objectFit;
|
|
1229
|
-
contentVideo.style.width = savedContentVideoStyles.width;
|
|
1230
|
-
contentVideo.style.height = savedContentVideoStyles.height;
|
|
1231
|
-
savedContentVideoStyles = void 0;
|
|
1232
|
-
}
|
|
1233
1214
|
function handleAdComplete() {
|
|
1234
1215
|
if (tornDown) return;
|
|
1235
1216
|
clearAdStallTimer();
|
|
1236
1217
|
if (debug) console.log("".concat(LOG, " Handling ad completion"));
|
|
1237
1218
|
adPlaying = false;
|
|
1238
1219
|
setAdPlayingFlag(false);
|
|
1239
|
-
restoreContentVideoStyles();
|
|
1240
1220
|
if (adContainerEl) {
|
|
1241
1221
|
adContainerEl.style.display = "none";
|
|
1242
1222
|
adContainerEl.style.pointerEvents = "none";
|
|
@@ -1251,7 +1231,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1251
1231
|
if (debug) console.log("".concat(LOG, " Handling ad error"));
|
|
1252
1232
|
adPlaying = false;
|
|
1253
1233
|
setAdPlayingFlag(false);
|
|
1254
|
-
restoreContentVideoStyles();
|
|
1255
1234
|
if (adContainerEl) {
|
|
1256
1235
|
adContainerEl.style.display = "none";
|
|
1257
1236
|
adContainerEl.style.pointerEvents = "none";
|
|
@@ -1422,7 +1401,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1422
1401
|
];
|
|
1423
1402
|
contentVideo.style.visibility = "visible";
|
|
1424
1403
|
contentVideo.style.opacity = "1";
|
|
1425
|
-
applyContentVideoAdCoverStyles();
|
|
1426
1404
|
emit("content_pause");
|
|
1427
1405
|
setupAdEventListeners();
|
|
1428
1406
|
adVolume2 = originalMutedState ? 1 : originalVolume;
|
|
@@ -1661,7 +1639,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1661
1639
|
];
|
|
1662
1640
|
contentVideo.style.visibility = "visible";
|
|
1663
1641
|
contentVideo.style.opacity = "1";
|
|
1664
|
-
applyContentVideoAdCoverStyles();
|
|
1665
1642
|
emit("content_pause");
|
|
1666
1643
|
setupAdEventListeners();
|
|
1667
1644
|
adVolume2 = originalMutedState ? 1 : originalVolume;
|
|
@@ -1812,7 +1789,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1812
1789
|
if (debug) console.log("".concat(LOG, " Stopping ad"));
|
|
1813
1790
|
adPlaying = false;
|
|
1814
1791
|
setAdPlayingFlag(false);
|
|
1815
|
-
restoreContentVideoStyles();
|
|
1816
1792
|
contentVideo.muted = originalMutedState;
|
|
1817
1793
|
contentVideo.volume = originalMutedState ? 0 : originalVolume;
|
|
1818
1794
|
contentVideo.style.visibility = "visible";
|
|
@@ -1851,7 +1827,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1851
1827
|
destroyed = true;
|
|
1852
1828
|
adPlaying = false;
|
|
1853
1829
|
setAdPlayingFlag(false);
|
|
1854
|
-
restoreContentVideoStyles();
|
|
1855
1830
|
contentVideo.muted = originalMutedState;
|
|
1856
1831
|
contentVideo.volume = originalVolume;
|
|
1857
1832
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|