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
package/lib/sdk/vastAdLayer.cjs
CHANGED
|
@@ -619,7 +619,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
619
619
|
var tornDown = false;
|
|
620
620
|
var trackingFired = createEmptyTrackingState();
|
|
621
621
|
var adStallTimerId;
|
|
622
|
-
var savedContentVideoStyles;
|
|
623
622
|
var currentAdEventHandlers;
|
|
624
623
|
var preloadSlots = /* @__PURE__ */ new Map();
|
|
625
624
|
function emit(event, payload) {
|
|
@@ -736,7 +735,7 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
736
735
|
video.style.top = "0";
|
|
737
736
|
video.style.width = "100%";
|
|
738
737
|
video.style.height = "100%";
|
|
739
|
-
video.style.objectFit = "
|
|
738
|
+
video.style.objectFit = "contain";
|
|
740
739
|
video.style.backgroundColor = "#000";
|
|
741
740
|
video.playsInline = true;
|
|
742
741
|
video.muted = false;
|
|
@@ -851,31 +850,12 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
851
850
|
delete contentVideo.dataset.stormcloudAdPlaying;
|
|
852
851
|
}
|
|
853
852
|
}
|
|
854
|
-
function applyContentVideoAdCoverStyles() {
|
|
855
|
-
if (!singleElementMode) return;
|
|
856
|
-
savedContentVideoStyles = {
|
|
857
|
-
objectFit: contentVideo.style.objectFit,
|
|
858
|
-
width: contentVideo.style.width,
|
|
859
|
-
height: contentVideo.style.height
|
|
860
|
-
};
|
|
861
|
-
contentVideo.style.objectFit = "cover";
|
|
862
|
-
contentVideo.style.width = "100%";
|
|
863
|
-
contentVideo.style.height = "100%";
|
|
864
|
-
}
|
|
865
|
-
function restoreContentVideoStyles() {
|
|
866
|
-
if (!singleElementMode || !savedContentVideoStyles) return;
|
|
867
|
-
contentVideo.style.objectFit = savedContentVideoStyles.objectFit;
|
|
868
|
-
contentVideo.style.width = savedContentVideoStyles.width;
|
|
869
|
-
contentVideo.style.height = savedContentVideoStyles.height;
|
|
870
|
-
savedContentVideoStyles = void 0;
|
|
871
|
-
}
|
|
872
853
|
function handleAdComplete() {
|
|
873
854
|
if (tornDown) return;
|
|
874
855
|
clearAdStallTimer();
|
|
875
856
|
if (debug) console.log("".concat(LOG, " Handling ad completion"));
|
|
876
857
|
adPlaying = false;
|
|
877
858
|
setAdPlayingFlag(false);
|
|
878
|
-
restoreContentVideoStyles();
|
|
879
859
|
if (adContainerEl) {
|
|
880
860
|
adContainerEl.style.display = "none";
|
|
881
861
|
adContainerEl.style.pointerEvents = "none";
|
|
@@ -890,7 +870,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
890
870
|
if (debug) console.log("".concat(LOG, " Handling ad error"));
|
|
891
871
|
adPlaying = false;
|
|
892
872
|
setAdPlayingFlag(false);
|
|
893
|
-
restoreContentVideoStyles();
|
|
894
873
|
if (adContainerEl) {
|
|
895
874
|
adContainerEl.style.display = "none";
|
|
896
875
|
adContainerEl.style.pointerEvents = "none";
|
|
@@ -1061,7 +1040,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1061
1040
|
];
|
|
1062
1041
|
contentVideo.style.visibility = "visible";
|
|
1063
1042
|
contentVideo.style.opacity = "1";
|
|
1064
|
-
applyContentVideoAdCoverStyles();
|
|
1065
1043
|
emit("content_pause");
|
|
1066
1044
|
setupAdEventListeners();
|
|
1067
1045
|
adVolume2 = originalMutedState ? 1 : originalVolume;
|
|
@@ -1300,7 +1278,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1300
1278
|
];
|
|
1301
1279
|
contentVideo.style.visibility = "visible";
|
|
1302
1280
|
contentVideo.style.opacity = "1";
|
|
1303
|
-
applyContentVideoAdCoverStyles();
|
|
1304
1281
|
emit("content_pause");
|
|
1305
1282
|
setupAdEventListeners();
|
|
1306
1283
|
adVolume2 = originalMutedState ? 1 : originalVolume;
|
|
@@ -1451,7 +1428,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1451
1428
|
if (debug) console.log("".concat(LOG, " Stopping ad"));
|
|
1452
1429
|
adPlaying = false;
|
|
1453
1430
|
setAdPlayingFlag(false);
|
|
1454
|
-
restoreContentVideoStyles();
|
|
1455
1431
|
contentVideo.muted = originalMutedState;
|
|
1456
1432
|
contentVideo.volume = originalMutedState ? 0 : originalVolume;
|
|
1457
1433
|
contentVideo.style.visibility = "visible";
|
|
@@ -1490,7 +1466,6 @@ function createVastAdLayer(contentVideo, options) {
|
|
|
1490
1466
|
destroyed = true;
|
|
1491
1467
|
adPlaying = false;
|
|
1492
1468
|
setAdPlayingFlag(false);
|
|
1493
|
-
restoreContentVideoStyles();
|
|
1494
1469
|
contentVideo.muted = originalMutedState;
|
|
1495
1470
|
contentVideo.volume = originalVolume;
|
|
1496
1471
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|