stormcloud-video-player 0.5.13 → 0.5.15

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
@@ -1434,7 +1434,7 @@ function createPrebidAdLayer(contentVideo, options) {
1434
1434
  contentVideo.volume = 0;
1435
1435
  adPlaying = true;
1436
1436
  setAdPlayingFlag(true);
1437
- adVolume = originalMutedState ? 0 : originalVolume;
1437
+ adVolume = originalMutedState ? 1 : originalVolume;
1438
1438
  adVideoElement.volume = Math.max(0, Math.min(1, adVolume));
1439
1439
  adVideoElement.muted = false;
1440
1440
  if (adContainerEl) {
@@ -3220,7 +3220,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3220
3220
  console.log("[StormcloudVideoPlayer] Starting ad break timer on content_pause (first ad starting)");
3221
3221
  }
3222
3222
  }
3223
- _this.adLayer.setAdVolume(_this.adLayer.getOriginalMutedState() ? 0 : _this.adLayer.getOriginalVolume());
3223
+ _this.adLayer.setAdVolume(_this.adLayer.getOriginalMutedState() ? 1 : _this.adLayer.getOriginalVolume());
3224
3224
  if (_this.isShowingPlaceholder) {
3225
3225
  if (_this.config.debugAdTiming) {
3226
3226
  console.log("[StormcloudVideoPlayer] Hiding placeholder - new ads starting");
@@ -4164,7 +4164,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4164
4164
  if (_this.expectedAdBreakDurationMs != null && _this.adStopTimerId == null) {
4165
4165
  _this.scheduleAdStopCountdown(_this.getRemainingAdMs());
4166
4166
  }
4167
- _this.adLayer.setAdVolume(_this.adLayer.getOriginalMutedState() ? 0 : _this.adLayer.getOriginalVolume());
4167
+ _this.adLayer.setAdVolume(_this.adLayer.getOriginalMutedState() ? 1 : _this.adLayer.getOriginalVolume());
4168
4168
  _state.label = 7;
4169
4169
  case 7:
4170
4170
  return [
@@ -4326,7 +4326,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4326
4326
  if (this.expectedAdBreakDurationMs != null && this.adStopTimerId == null) {
4327
4327
  this.scheduleAdStopCountdown(this.getRemainingAdMs());
4328
4328
  }
4329
- adVolume = state.muted ? 0 : state.volume;
4329
+ adVolume = state.muted ? 1 : state.volume;
4330
4330
  this.adLayer.setAdVolume(adVolume);
4331
4331
  return [
4332
4332
  3,
@@ -4517,7 +4517,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4517
4517
  if (this.expectedAdBreakDurationMs != null && this.adStopTimerId == null) {
4518
4518
  this.scheduleAdStopCountdown(this.getRemainingAdMs());
4519
4519
  }
4520
- this.adLayer.setAdVolume(this.adLayer.getOriginalMutedState() ? 0 : this.adLayer.getOriginalVolume());
4520
+ this.adLayer.setAdVolume(this.adLayer.getOriginalMutedState() ? 1 : this.adLayer.getOriginalVolume());
4521
4521
  _state.label = 5;
4522
4522
  case 5:
4523
4523
  return [
@@ -4850,11 +4850,19 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4850
4850
  var _this_video_play1;
4851
4851
  (_this_video_play1 = this.video.play()) === null || _this_video_play1 === void 0 ? void 0 : _this_video_play1.catch(function() {});
4852
4852
  }
4853
- if (isTizen && !restoredMuted) {
4853
+ if (!restoredMuted) {
4854
4854
  requestAnimationFrame(function() {
4855
4855
  _this.video.muted = false;
4856
4856
  _this.video.volume = restoredVolume;
4857
4857
  });
4858
+ setTimeout(function() {
4859
+ _this.video.muted = false;
4860
+ _this.video.volume = restoredVolume;
4861
+ }, 0);
4862
+ setTimeout(function() {
4863
+ _this.video.muted = false;
4864
+ _this.video.volume = restoredVolume;
4865
+ }, 50);
4858
4866
  }
4859
4867
  }
4860
4868
  },