stormcloud-video-player 0.5.20 → 0.5.21
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 +36 -6
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +36 -6
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +36 -6
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +36 -6
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +36 -6
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +36 -6
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2829,13 +2829,25 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
2829
2829
|
}
|
|
2830
2830
|
if (!(this.bufferedSegmentsCount >= minSegments)) return [
|
|
2831
2831
|
3,
|
|
2832
|
-
|
|
2832
|
+
3
|
|
2833
2833
|
];
|
|
2834
2834
|
this.hasInitialBufferCompleted = true;
|
|
2835
2835
|
if (!this.shouldAutoplayAfterBuffering) return [
|
|
2836
2836
|
3,
|
|
2837
|
-
|
|
2837
|
+
3
|
|
2838
|
+
];
|
|
2839
|
+
if (!(this.inAdBreak || this.adLayer.isAdPlaying())) return [
|
|
2840
|
+
3,
|
|
2841
|
+
1
|
|
2842
|
+
];
|
|
2843
|
+
if (this.config.debugAdTiming) {
|
|
2844
|
+
console.log("[StormcloudVideoPlayer] Initial buffer complete (".concat(this.bufferedSegmentsCount, " segments). Ad break active — deferring play() to handleAdPodComplete()."));
|
|
2845
|
+
}
|
|
2846
|
+
return [
|
|
2847
|
+
3,
|
|
2848
|
+
3
|
|
2838
2849
|
];
|
|
2850
|
+
case 1:
|
|
2839
2851
|
if (this.config.debugAdTiming) {
|
|
2840
2852
|
console.log("[StormcloudVideoPlayer] Initial buffer complete (".concat(this.bufferedSegmentsCount, " segments). Starting playback."));
|
|
2841
2853
|
}
|
|
@@ -2847,10 +2859,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
2847
2859
|
}
|
|
2848
2860
|
})
|
|
2849
2861
|
];
|
|
2850
|
-
case 1:
|
|
2851
|
-
_state.sent();
|
|
2852
|
-
_state.label = 2;
|
|
2853
2862
|
case 2:
|
|
2863
|
+
_state.sent();
|
|
2864
|
+
_state.label = 3;
|
|
2865
|
+
case 3:
|
|
2854
2866
|
return [
|
|
2855
2867
|
2
|
|
2856
2868
|
];
|
|
@@ -4690,6 +4702,22 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4690
4702
|
var browser = detectBrowser();
|
|
4691
4703
|
var isSmartTV = browser.tizenVersion !== void 0 || browser.webOSVersion !== void 0;
|
|
4692
4704
|
if (isSmartTV && this.hls) {
|
|
4705
|
+
if (!restoredMuted) {
|
|
4706
|
+
var hlsRef = this.hls;
|
|
4707
|
+
var savedMuted = restoredMuted;
|
|
4708
|
+
var savedVolume = restoredVolume;
|
|
4709
|
+
var onManifestParsedRestore = function onManifestParsedRestore1() {
|
|
4710
|
+
hlsRef.off(Hls2.Events.MANIFEST_PARSED, onManifestParsedRestore);
|
|
4711
|
+
if (!_this.inAdBreak && !_this.adLayer.isAdPlaying()) {
|
|
4712
|
+
if (_this.video.muted !== savedMuted) _this.video.muted = savedMuted;
|
|
4713
|
+
if (Math.abs(_this.video.volume - savedVolume) > 0.01) _this.video.volume = savedVolume;
|
|
4714
|
+
if (_this.config.debugAdTiming) {
|
|
4715
|
+
console.log("[StormcloudVideoPlayer] Smart TV: audio state restored on MANIFEST_PARSED after re-attach");
|
|
4716
|
+
}
|
|
4717
|
+
}
|
|
4718
|
+
};
|
|
4719
|
+
hlsRef.on(Hls2.Events.MANIFEST_PARSED, onManifestParsedRestore);
|
|
4720
|
+
}
|
|
4693
4721
|
this.hls.attachMedia(this.video);
|
|
4694
4722
|
if (this.config.debugAdTiming) {
|
|
4695
4723
|
console.log("[StormcloudVideoPlayer] Smart TV: re-attached HLS to video element after ad break to restore media pipeline");
|
|
@@ -4731,7 +4759,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4731
4759
|
[
|
|
4732
4760
|
500,
|
|
4733
4761
|
1e3,
|
|
4734
|
-
2e3
|
|
4762
|
+
2e3,
|
|
4763
|
+
3e3,
|
|
4764
|
+
5e3
|
|
4735
4765
|
].forEach(function(delay) {
|
|
4736
4766
|
setTimeout(function() {
|
|
4737
4767
|
if (!_this.inAdBreak && !_this.adLayer.isAdPlaying()) {
|