stormcloud-video-player 0.7.1 → 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.
@@ -1030,7 +1030,6 @@ function createVastAdLayer(contentVideo, options) {
1030
1030
  var tornDown = false;
1031
1031
  var trackingFired = createEmptyTrackingState();
1032
1032
  var adStallTimerId;
1033
- var savedContentVideoStyles;
1034
1033
  var currentAdEventHandlers;
1035
1034
  var preloadSlots = /* @__PURE__ */ new Map();
1036
1035
  function emit(event, payload) {
@@ -1147,7 +1146,7 @@ function createVastAdLayer(contentVideo, options) {
1147
1146
  video.style.top = "0";
1148
1147
  video.style.width = "100%";
1149
1148
  video.style.height = "100%";
1150
- video.style.objectFit = "cover";
1149
+ video.style.objectFit = "contain";
1151
1150
  video.style.backgroundColor = "#000";
1152
1151
  video.playsInline = true;
1153
1152
  video.muted = false;
@@ -1262,31 +1261,12 @@ function createVastAdLayer(contentVideo, options) {
1262
1261
  delete contentVideo.dataset.stormcloudAdPlaying;
1263
1262
  }
1264
1263
  }
1265
- function applyContentVideoAdCoverStyles() {
1266
- if (!singleElementMode) return;
1267
- savedContentVideoStyles = {
1268
- objectFit: contentVideo.style.objectFit,
1269
- width: contentVideo.style.width,
1270
- height: contentVideo.style.height
1271
- };
1272
- contentVideo.style.objectFit = "cover";
1273
- contentVideo.style.width = "100%";
1274
- contentVideo.style.height = "100%";
1275
- }
1276
- function restoreContentVideoStyles() {
1277
- if (!singleElementMode || !savedContentVideoStyles) return;
1278
- contentVideo.style.objectFit = savedContentVideoStyles.objectFit;
1279
- contentVideo.style.width = savedContentVideoStyles.width;
1280
- contentVideo.style.height = savedContentVideoStyles.height;
1281
- savedContentVideoStyles = void 0;
1282
- }
1283
1264
  function handleAdComplete() {
1284
1265
  if (tornDown) return;
1285
1266
  clearAdStallTimer();
1286
1267
  if (debug) console.log("".concat(LOG, " Handling ad completion"));
1287
1268
  adPlaying = false;
1288
1269
  setAdPlayingFlag(false);
1289
- restoreContentVideoStyles();
1290
1270
  if (adContainerEl) {
1291
1271
  adContainerEl.style.display = "none";
1292
1272
  adContainerEl.style.pointerEvents = "none";
@@ -1301,7 +1281,6 @@ function createVastAdLayer(contentVideo, options) {
1301
1281
  if (debug) console.log("".concat(LOG, " Handling ad error"));
1302
1282
  adPlaying = false;
1303
1283
  setAdPlayingFlag(false);
1304
- restoreContentVideoStyles();
1305
1284
  if (adContainerEl) {
1306
1285
  adContainerEl.style.display = "none";
1307
1286
  adContainerEl.style.pointerEvents = "none";
@@ -1472,7 +1451,6 @@ function createVastAdLayer(contentVideo, options) {
1472
1451
  ];
1473
1452
  contentVideo.style.visibility = "visible";
1474
1453
  contentVideo.style.opacity = "1";
1475
- applyContentVideoAdCoverStyles();
1476
1454
  emit("content_pause");
1477
1455
  setupAdEventListeners();
1478
1456
  adVolume2 = originalMutedState ? 1 : originalVolume;
@@ -1711,7 +1689,6 @@ function createVastAdLayer(contentVideo, options) {
1711
1689
  ];
1712
1690
  contentVideo.style.visibility = "visible";
1713
1691
  contentVideo.style.opacity = "1";
1714
- applyContentVideoAdCoverStyles();
1715
1692
  emit("content_pause");
1716
1693
  setupAdEventListeners();
1717
1694
  adVolume2 = originalMutedState ? 1 : originalVolume;
@@ -1862,7 +1839,6 @@ function createVastAdLayer(contentVideo, options) {
1862
1839
  if (debug) console.log("".concat(LOG, " Stopping ad"));
1863
1840
  adPlaying = false;
1864
1841
  setAdPlayingFlag(false);
1865
- restoreContentVideoStyles();
1866
1842
  contentVideo.muted = originalMutedState;
1867
1843
  contentVideo.volume = originalMutedState ? 0 : originalVolume;
1868
1844
  contentVideo.style.visibility = "visible";
@@ -1901,7 +1877,6 @@ function createVastAdLayer(contentVideo, options) {
1901
1877
  destroyed = true;
1902
1878
  adPlaying = false;
1903
1879
  setAdPlayingFlag(false);
1904
- restoreContentVideoStyles();
1905
1880
  contentVideo.muted = originalMutedState;
1906
1881
  contentVideo.volume = originalVolume;
1907
1882
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;