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,5 +1,5 @@
1
1
  import { Component } from 'react';
2
- import { S as StormcloudVideoPlayerConfig } from '../types-Ca4ZDaWw.cjs';
2
+ import { S as StormcloudVideoPlayerConfig } from '../types-2vzNGNdf.cjs';
3
3
 
4
4
  interface HlsPlayerProps extends StormcloudVideoPlayerConfig {
5
5
  onMount?: (player: any) => void;
@@ -478,6 +478,7 @@ function createAdStormPlayer(contentVideo, options) {
478
478
  var adContainerEl;
479
479
  var currentAd;
480
480
  var destroyed = false;
481
+ var allowNativeHls = false;
481
482
  var trackingFired = {
482
483
  impression: false,
483
484
  start: false,
@@ -935,7 +936,9 @@ function createAdStormPlayer(contentVideo, options) {
935
936
  }, 300);
936
937
  contentVideo.muted = true;
937
938
  contentVideo.volume = 0;
938
- contentVideo.pause();
939
+ if (allowNativeHls) {
940
+ contentVideo.pause();
941
+ }
939
942
  adPlaying = true;
940
943
  setAdPlayingFlag(true);
941
944
  if (adVideoElement) {
@@ -1111,6 +1114,10 @@ function createAdStormPlayer(contentVideo, options) {
1111
1114
  }
1112
1115
  }, 300);
1113
1116
  }
1117
+ },
1118
+ setAllowNativeHls: function setAllowNativeHls(value) {
1119
+ allowNativeHls = value;
1120
+ log("allowNativeHls set to: ".concat(value));
1114
1121
  }
1115
1122
  };
1116
1123
  }
@@ -1543,6 +1550,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
1543
1550
  });
1544
1551
  }
1545
1552
  this.adPlayer.initialize();
1553
+ this.adPlayer.setAllowNativeHls(!!this.config.allowNativeHls);
1546
1554
  if (!this.config.autoplay) return [
1547
1555
  3,
1548
1556
  2
@@ -1597,6 +1605,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
1597
1605
  });
1598
1606
  }
1599
1607
  this.adPlayer.initialize();
1608
+ this.adPlayer.setAllowNativeHls(!!this.config.allowNativeHls);
1600
1609
  this.bufferedSegmentsCount = 0;
1601
1610
  this.hasInitialBufferCompleted = false;
1602
1611
  this.shouldAutoplayAfterBuffering = !!this.config.autoplay;