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.
@@ -1,4 +1,4 @@
1
- import { S as StormcloudVideoPlayerConfig } from '../types-Ca4ZDaWw.cjs';
1
+ import { S as StormcloudVideoPlayerConfig } from '../types-2vzNGNdf.cjs';
2
2
 
3
3
  declare class StormcloudVideoPlayer {
4
4
  private readonly video;
@@ -442,6 +442,7 @@ function createAdStormPlayer(contentVideo, options) {
442
442
  var adContainerEl;
443
443
  var currentAd;
444
444
  var destroyed = false;
445
+ var allowNativeHls = false;
445
446
  var trackingFired = {
446
447
  impression: false,
447
448
  start: false,
@@ -899,7 +900,9 @@ function createAdStormPlayer(contentVideo, options) {
899
900
  }, 300);
900
901
  contentVideo.muted = true;
901
902
  contentVideo.volume = 0;
902
- contentVideo.pause();
903
+ if (allowNativeHls) {
904
+ contentVideo.pause();
905
+ }
903
906
  adPlaying = true;
904
907
  setAdPlayingFlag(true);
905
908
  if (adVideoElement) {
@@ -1075,6 +1078,10 @@ function createAdStormPlayer(contentVideo, options) {
1075
1078
  }
1076
1079
  }, 300);
1077
1080
  }
1081
+ },
1082
+ setAllowNativeHls: function setAllowNativeHls(value) {
1083
+ allowNativeHls = value;
1084
+ log("allowNativeHls set to: ".concat(value));
1078
1085
  }
1079
1086
  };
1080
1087
  }
@@ -1507,6 +1514,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
1507
1514
  });
1508
1515
  }
1509
1516
  this.adPlayer.initialize();
1517
+ this.adPlayer.setAllowNativeHls(!!this.config.allowNativeHls);
1510
1518
  if (!this.config.autoplay) return [
1511
1519
  3,
1512
1520
  2
@@ -1561,6 +1569,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
1561
1569
  });
1562
1570
  }
1563
1571
  this.adPlayer.initialize();
1572
+ this.adPlayer.setAllowNativeHls(!!this.config.allowNativeHls);
1564
1573
  this.bufferedSegmentsCount = 0;
1565
1574
  this.hasInitialBufferCompleted = false;
1566
1575
  this.shouldAutoplayAfterBuffering = !!this.config.autoplay;