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.
@@ -942,7 +942,6 @@ function createVastAdLayer(contentVideo, options) {
942
942
  var tornDown = false;
943
943
  var trackingFired = createEmptyTrackingState();
944
944
  var adStallTimerId;
945
- var savedContentVideoStyles;
946
945
  var currentAdEventHandlers;
947
946
  var preloadSlots = /* @__PURE__ */ new Map();
948
947
  function emit(event, payload) {
@@ -1059,7 +1058,7 @@ function createVastAdLayer(contentVideo, options) {
1059
1058
  video.style.top = "0";
1060
1059
  video.style.width = "100%";
1061
1060
  video.style.height = "100%";
1062
- video.style.objectFit = "cover";
1061
+ video.style.objectFit = "contain";
1063
1062
  video.style.backgroundColor = "#000";
1064
1063
  video.playsInline = true;
1065
1064
  video.muted = false;
@@ -1174,31 +1173,12 @@ function createVastAdLayer(contentVideo, options) {
1174
1173
  delete contentVideo.dataset.stormcloudAdPlaying;
1175
1174
  }
1176
1175
  }
1177
- function applyContentVideoAdCoverStyles() {
1178
- if (!singleElementMode) return;
1179
- savedContentVideoStyles = {
1180
- objectFit: contentVideo.style.objectFit,
1181
- width: contentVideo.style.width,
1182
- height: contentVideo.style.height
1183
- };
1184
- contentVideo.style.objectFit = "cover";
1185
- contentVideo.style.width = "100%";
1186
- contentVideo.style.height = "100%";
1187
- }
1188
- function restoreContentVideoStyles() {
1189
- if (!singleElementMode || !savedContentVideoStyles) return;
1190
- contentVideo.style.objectFit = savedContentVideoStyles.objectFit;
1191
- contentVideo.style.width = savedContentVideoStyles.width;
1192
- contentVideo.style.height = savedContentVideoStyles.height;
1193
- savedContentVideoStyles = void 0;
1194
- }
1195
1176
  function handleAdComplete() {
1196
1177
  if (tornDown) return;
1197
1178
  clearAdStallTimer();
1198
1179
  if (debug) console.log("".concat(LOG, " Handling ad completion"));
1199
1180
  adPlaying = false;
1200
1181
  setAdPlayingFlag(false);
1201
- restoreContentVideoStyles();
1202
1182
  if (adContainerEl) {
1203
1183
  adContainerEl.style.display = "none";
1204
1184
  adContainerEl.style.pointerEvents = "none";
@@ -1213,7 +1193,6 @@ function createVastAdLayer(contentVideo, options) {
1213
1193
  if (debug) console.log("".concat(LOG, " Handling ad error"));
1214
1194
  adPlaying = false;
1215
1195
  setAdPlayingFlag(false);
1216
- restoreContentVideoStyles();
1217
1196
  if (adContainerEl) {
1218
1197
  adContainerEl.style.display = "none";
1219
1198
  adContainerEl.style.pointerEvents = "none";
@@ -1384,7 +1363,6 @@ function createVastAdLayer(contentVideo, options) {
1384
1363
  ];
1385
1364
  contentVideo.style.visibility = "visible";
1386
1365
  contentVideo.style.opacity = "1";
1387
- applyContentVideoAdCoverStyles();
1388
1366
  emit("content_pause");
1389
1367
  setupAdEventListeners();
1390
1368
  adVolume2 = originalMutedState ? 1 : originalVolume;
@@ -1623,7 +1601,6 @@ function createVastAdLayer(contentVideo, options) {
1623
1601
  ];
1624
1602
  contentVideo.style.visibility = "visible";
1625
1603
  contentVideo.style.opacity = "1";
1626
- applyContentVideoAdCoverStyles();
1627
1604
  emit("content_pause");
1628
1605
  setupAdEventListeners();
1629
1606
  adVolume2 = originalMutedState ? 1 : originalVolume;
@@ -1774,7 +1751,6 @@ function createVastAdLayer(contentVideo, options) {
1774
1751
  if (debug) console.log("".concat(LOG, " Stopping ad"));
1775
1752
  adPlaying = false;
1776
1753
  setAdPlayingFlag(false);
1777
- restoreContentVideoStyles();
1778
1754
  contentVideo.muted = originalMutedState;
1779
1755
  contentVideo.volume = originalMutedState ? 0 : originalVolume;
1780
1756
  contentVideo.style.visibility = "visible";
@@ -1813,7 +1789,6 @@ function createVastAdLayer(contentVideo, options) {
1813
1789
  destroyed = true;
1814
1790
  adPlaying = false;
1815
1791
  setAdPlayingFlag(false);
1816
- restoreContentVideoStyles();
1817
1792
  contentVideo.muted = originalMutedState;
1818
1793
  contentVideo.volume = originalVolume;
1819
1794
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;