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.cjs
CHANGED
|
@@ -2986,13 +2986,25 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
2986
2986
|
}
|
|
2987
2987
|
if (!(this.bufferedSegmentsCount >= minSegments)) return [
|
|
2988
2988
|
3,
|
|
2989
|
-
|
|
2989
|
+
3
|
|
2990
2990
|
];
|
|
2991
2991
|
this.hasInitialBufferCompleted = true;
|
|
2992
2992
|
if (!this.shouldAutoplayAfterBuffering) return [
|
|
2993
2993
|
3,
|
|
2994
|
-
|
|
2994
|
+
3
|
|
2995
|
+
];
|
|
2996
|
+
if (!(this.inAdBreak || this.adLayer.isAdPlaying())) return [
|
|
2997
|
+
3,
|
|
2998
|
+
1
|
|
2999
|
+
];
|
|
3000
|
+
if (this.config.debugAdTiming) {
|
|
3001
|
+
console.log("[StormcloudVideoPlayer] Initial buffer complete (".concat(this.bufferedSegmentsCount, " segments). Ad break active — deferring play() to handleAdPodComplete()."));
|
|
3002
|
+
}
|
|
3003
|
+
return [
|
|
3004
|
+
3,
|
|
3005
|
+
3
|
|
2995
3006
|
];
|
|
3007
|
+
case 1:
|
|
2996
3008
|
if (this.config.debugAdTiming) {
|
|
2997
3009
|
console.log("[StormcloudVideoPlayer] Initial buffer complete (".concat(this.bufferedSegmentsCount, " segments). Starting playback."));
|
|
2998
3010
|
}
|
|
@@ -3004,10 +3016,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3004
3016
|
}
|
|
3005
3017
|
})
|
|
3006
3018
|
];
|
|
3007
|
-
case 1:
|
|
3008
|
-
_state.sent();
|
|
3009
|
-
_state.label = 2;
|
|
3010
3019
|
case 2:
|
|
3020
|
+
_state.sent();
|
|
3021
|
+
_state.label = 3;
|
|
3022
|
+
case 3:
|
|
3011
3023
|
return [
|
|
3012
3024
|
2
|
|
3013
3025
|
];
|
|
@@ -4847,6 +4859,22 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4847
4859
|
var browser = detectBrowser();
|
|
4848
4860
|
var isSmartTV = browser.tizenVersion !== void 0 || browser.webOSVersion !== void 0;
|
|
4849
4861
|
if (isSmartTV && this.hls) {
|
|
4862
|
+
if (!restoredMuted) {
|
|
4863
|
+
var hlsRef = this.hls;
|
|
4864
|
+
var savedMuted = restoredMuted;
|
|
4865
|
+
var savedVolume = restoredVolume;
|
|
4866
|
+
var onManifestParsedRestore = function onManifestParsedRestore1() {
|
|
4867
|
+
hlsRef.off(import_hls2.default.Events.MANIFEST_PARSED, onManifestParsedRestore);
|
|
4868
|
+
if (!_this.inAdBreak && !_this.adLayer.isAdPlaying()) {
|
|
4869
|
+
if (_this.video.muted !== savedMuted) _this.video.muted = savedMuted;
|
|
4870
|
+
if (Math.abs(_this.video.volume - savedVolume) > 0.01) _this.video.volume = savedVolume;
|
|
4871
|
+
if (_this.config.debugAdTiming) {
|
|
4872
|
+
console.log("[StormcloudVideoPlayer] Smart TV: audio state restored on MANIFEST_PARSED after re-attach");
|
|
4873
|
+
}
|
|
4874
|
+
}
|
|
4875
|
+
};
|
|
4876
|
+
hlsRef.on(import_hls2.default.Events.MANIFEST_PARSED, onManifestParsedRestore);
|
|
4877
|
+
}
|
|
4850
4878
|
this.hls.attachMedia(this.video);
|
|
4851
4879
|
if (this.config.debugAdTiming) {
|
|
4852
4880
|
console.log("[StormcloudVideoPlayer] Smart TV: re-attached HLS to video element after ad break to restore media pipeline");
|
|
@@ -4888,7 +4916,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4888
4916
|
[
|
|
4889
4917
|
500,
|
|
4890
4918
|
1e3,
|
|
4891
|
-
2e3
|
|
4919
|
+
2e3,
|
|
4920
|
+
3e3,
|
|
4921
|
+
5e3
|
|
4892
4922
|
].forEach(function(delay) {
|
|
4893
4923
|
setTimeout(function() {
|
|
4894
4924
|
if (!_this.inAdBreak && !_this.adLayer.isAdPlaying()) {
|