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.
@@ -994,7 +994,6 @@ function createVastAdLayer(contentVideo, options) {
994
994
  var tornDown = false;
995
995
  var trackingFired = createEmptyTrackingState();
996
996
  var adStallTimerId;
997
- var savedContentVideoStyles;
998
997
  var currentAdEventHandlers;
999
998
  var preloadSlots = /* @__PURE__ */ new Map();
1000
999
  function emit(event, payload) {
@@ -1111,7 +1110,7 @@ function createVastAdLayer(contentVideo, options) {
1111
1110
  video.style.top = "0";
1112
1111
  video.style.width = "100%";
1113
1112
  video.style.height = "100%";
1114
- video.style.objectFit = "cover";
1113
+ video.style.objectFit = "contain";
1115
1114
  video.style.backgroundColor = "#000";
1116
1115
  video.playsInline = true;
1117
1116
  video.muted = false;
@@ -1226,31 +1225,12 @@ function createVastAdLayer(contentVideo, options) {
1226
1225
  delete contentVideo.dataset.stormcloudAdPlaying;
1227
1226
  }
1228
1227
  }
1229
- function applyContentVideoAdCoverStyles() {
1230
- if (!singleElementMode) return;
1231
- savedContentVideoStyles = {
1232
- objectFit: contentVideo.style.objectFit,
1233
- width: contentVideo.style.width,
1234
- height: contentVideo.style.height
1235
- };
1236
- contentVideo.style.objectFit = "cover";
1237
- contentVideo.style.width = "100%";
1238
- contentVideo.style.height = "100%";
1239
- }
1240
- function restoreContentVideoStyles() {
1241
- if (!singleElementMode || !savedContentVideoStyles) return;
1242
- contentVideo.style.objectFit = savedContentVideoStyles.objectFit;
1243
- contentVideo.style.width = savedContentVideoStyles.width;
1244
- contentVideo.style.height = savedContentVideoStyles.height;
1245
- savedContentVideoStyles = void 0;
1246
- }
1247
1228
  function handleAdComplete() {
1248
1229
  if (tornDown) return;
1249
1230
  clearAdStallTimer();
1250
1231
  if (debug) console.log("".concat(LOG, " Handling ad completion"));
1251
1232
  adPlaying = false;
1252
1233
  setAdPlayingFlag(false);
1253
- restoreContentVideoStyles();
1254
1234
  if (adContainerEl) {
1255
1235
  adContainerEl.style.display = "none";
1256
1236
  adContainerEl.style.pointerEvents = "none";
@@ -1265,7 +1245,6 @@ function createVastAdLayer(contentVideo, options) {
1265
1245
  if (debug) console.log("".concat(LOG, " Handling ad error"));
1266
1246
  adPlaying = false;
1267
1247
  setAdPlayingFlag(false);
1268
- restoreContentVideoStyles();
1269
1248
  if (adContainerEl) {
1270
1249
  adContainerEl.style.display = "none";
1271
1250
  adContainerEl.style.pointerEvents = "none";
@@ -1436,7 +1415,6 @@ function createVastAdLayer(contentVideo, options) {
1436
1415
  ];
1437
1416
  contentVideo.style.visibility = "visible";
1438
1417
  contentVideo.style.opacity = "1";
1439
- applyContentVideoAdCoverStyles();
1440
1418
  emit("content_pause");
1441
1419
  setupAdEventListeners();
1442
1420
  adVolume2 = originalMutedState ? 1 : originalVolume;
@@ -1675,7 +1653,6 @@ function createVastAdLayer(contentVideo, options) {
1675
1653
  ];
1676
1654
  contentVideo.style.visibility = "visible";
1677
1655
  contentVideo.style.opacity = "1";
1678
- applyContentVideoAdCoverStyles();
1679
1656
  emit("content_pause");
1680
1657
  setupAdEventListeners();
1681
1658
  adVolume2 = originalMutedState ? 1 : originalVolume;
@@ -1826,7 +1803,6 @@ function createVastAdLayer(contentVideo, options) {
1826
1803
  if (debug) console.log("".concat(LOG, " Stopping ad"));
1827
1804
  adPlaying = false;
1828
1805
  setAdPlayingFlag(false);
1829
- restoreContentVideoStyles();
1830
1806
  contentVideo.muted = originalMutedState;
1831
1807
  contentVideo.volume = originalMutedState ? 0 : originalVolume;
1832
1808
  contentVideo.style.visibility = "visible";
@@ -1865,7 +1841,6 @@ function createVastAdLayer(contentVideo, options) {
1865
1841
  destroyed = true;
1866
1842
  adPlaying = false;
1867
1843
  setAdPlayingFlag(false);
1868
- restoreContentVideoStyles();
1869
1844
  contentVideo.muted = originalMutedState;
1870
1845
  contentVideo.volume = originalVolume;
1871
1846
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;