stormcloud-video-player 0.4.0 → 0.4.1

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/lib/index.cjs CHANGED
@@ -563,6 +563,7 @@ function createAdStormPlayer(contentVideo, options) {
563
563
  var adContainerEl;
564
564
  var currentAd;
565
565
  var destroyed = false;
566
+ var allowNativeHls = false;
566
567
  var trackingFired = {
567
568
  impression: false,
568
569
  start: false,
@@ -1020,7 +1021,9 @@ function createAdStormPlayer(contentVideo, options) {
1020
1021
  }, 300);
1021
1022
  contentVideo.muted = true;
1022
1023
  contentVideo.volume = 0;
1023
- contentVideo.pause();
1024
+ if (allowNativeHls) {
1025
+ contentVideo.pause();
1026
+ }
1024
1027
  adPlaying = true;
1025
1028
  setAdPlayingFlag(true);
1026
1029
  if (adVideoElement) {
@@ -1196,6 +1199,10 @@ function createAdStormPlayer(contentVideo, options) {
1196
1199
  }
1197
1200
  }, 300);
1198
1201
  }
1202
+ },
1203
+ setAllowNativeHls: function setAllowNativeHls(value) {
1204
+ allowNativeHls = value;
1205
+ log("allowNativeHls set to: ".concat(value));
1199
1206
  }
1200
1207
  };
1201
1208
  }
@@ -1651,6 +1658,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
1651
1658
  });
1652
1659
  }
1653
1660
  this.adPlayer.initialize();
1661
+ this.adPlayer.setAllowNativeHls(!!this.config.allowNativeHls);
1654
1662
  if (!this.config.autoplay) return [
1655
1663
  3,
1656
1664
  2
@@ -1705,6 +1713,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
1705
1713
  });
1706
1714
  }
1707
1715
  this.adPlayer.initialize();
1716
+ this.adPlayer.setAllowNativeHls(!!this.config.allowNativeHls);
1708
1717
  this.bufferedSegmentsCount = 0;
1709
1718
  this.hasInitialBufferCompleted = false;
1710
1719
  this.shouldAutoplayAfterBuffering = !!this.config.autoplay;
@@ -5525,6 +5534,7 @@ function createHlsAdPlayer(contentVideo, options) {
5525
5534
  var adPlaying = false;
5526
5535
  var originalMutedState = false;
5527
5536
  var originalVolume = Math.max(0, Math.min(1, contentVideo.volume || 1));
5537
+ var allowNativeHls = false;
5528
5538
  var listeners = /* @__PURE__ */ new Map();
5529
5539
  var licenseKey = options === null || options === void 0 ? void 0 : options.licenseKey;
5530
5540
  var mainHlsInstance = options === null || options === void 0 ? void 0 : options.mainHlsInstance;
@@ -6292,6 +6302,9 @@ function createHlsAdPlayer(contentVideo, options) {
6292
6302
  adContainerEl.style.display = "none";
6293
6303
  adContainerEl.style.pointerEvents = "none";
6294
6304
  }
6305
+ },
6306
+ setAllowNativeHls: function setAllowNativeHls(value) {
6307
+ allowNativeHls = value;
6295
6308
  }
6296
6309
  };
6297
6310
  }