unified-video-framework 1.4.204 → 1.4.206
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unified-video-framework",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.206",
|
|
4
4
|
"description": "Cross-platform video player framework supporting iOS, Android, Web, Smart TVs (Samsung/LG), Roku, and more",
|
|
5
5
|
"main": "packages/core/dist/index.js",
|
|
6
6
|
"types": "packages/core/dist/index.d.ts",
|
|
@@ -100,8 +100,6 @@ export declare class WebPlayer extends BasePlayer {
|
|
|
100
100
|
private hasUserActivation;
|
|
101
101
|
private attemptIntelligentAutoplay;
|
|
102
102
|
private setupAutoplayRetry;
|
|
103
|
-
private showPlayOverlay;
|
|
104
|
-
private hidePlayOverlay;
|
|
105
103
|
private showUnmuteButton;
|
|
106
104
|
private hideUnmuteButton;
|
|
107
105
|
private updateTimeTooltip;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebPlayer.d.ts","sourceRoot":"","sources":["../src/WebPlayer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAOL,OAAO,EACP,cAAc,EACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,EACb,aAAa,EACb,YAAY,EAEb,MAAM,+BAA+B,CAAC;AAGvC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,GAAG,EAAE,GAAG,CAAC;QACT,MAAM,EAAE,GAAG,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,MAAM,CAAC,EAAE,GAAG,CAAC;QACb,qBAAqB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;KACxD;CACF;AAED,qBAAa,SAAU,SAAQ,UAAU;IACvC,SAAS,CA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AsBxB,OAAO,CAAC,6BAA6B;IA0BrC,OAAO,CAAC,0BAA0B;IAgBlC,OAAO,CAAC,2BAA2B;IAWnC,OAAO,CAAC,sBAAsB;IA4B9B,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,uBAAuB;IAqB/B,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,WAAW;YAoBL,QAAQ;YAqGR,UAAU;IAqBxB,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,sBAAsB;IA6B9B,OAAO,CAAC,sBAAsB;IAiF9B,OAAO,CAAC,uBAAuB;IAuB/B,OAAO,CAAC,4BAA4B;IAoDpC,OAAO,CAAC,oBAAoB;IA+BrB,aAAa,IAAI,IAAI;IAarB,aAAa,IAAI,IAAI;IAYrB,UAAU,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAe9B,kBAAkB,IAAI,OAAO;YAKtB,OAAO;IAgBf,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAqD/B"}
|
|
@@ -267,7 +267,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
267
267
|
this.state.isPlaying = true;
|
|
268
268
|
this.state.isPaused = false;
|
|
269
269
|
this.emit('onPlay');
|
|
270
|
-
this.hidePlayOverlay();
|
|
271
270
|
});
|
|
272
271
|
this.video.addEventListener('playing', () => {
|
|
273
272
|
if (this._deferredPause) {
|
|
@@ -277,7 +276,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
277
276
|
}
|
|
278
277
|
catch (_) { }
|
|
279
278
|
}
|
|
280
|
-
this.hidePlayOverlay();
|
|
281
279
|
this.setBuffering(false);
|
|
282
280
|
});
|
|
283
281
|
this.video.addEventListener('pause', () => {
|
|
@@ -307,6 +305,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
307
305
|
this.setBuffering(true);
|
|
308
306
|
});
|
|
309
307
|
this.video.addEventListener('canplay', () => {
|
|
308
|
+
this.debugLog('📡 canplay event fired');
|
|
310
309
|
this.setBuffering(false);
|
|
311
310
|
this.emit('onReady');
|
|
312
311
|
this.updateTimeDisplay();
|
|
@@ -317,12 +316,13 @@ export class WebPlayer extends BasePlayer {
|
|
|
317
316
|
}
|
|
318
317
|
catch (_) { }
|
|
319
318
|
}
|
|
319
|
+
this.debugLog(`🎬 Autoplay check: config.autoPlay=${this.config.autoPlay}, autoplayAttempted=${this.autoplayAttempted}`);
|
|
320
320
|
if (this.config.autoPlay && !this.autoplayAttempted) {
|
|
321
|
+
this.debugLog('🎬 Starting intelligent autoplay attempt');
|
|
321
322
|
this.autoplayAttempted = true;
|
|
322
323
|
this.attemptIntelligentAutoplay().then(success => {
|
|
323
324
|
if (!success) {
|
|
324
|
-
this.debugWarn('❌ Intelligent autoplay failed
|
|
325
|
-
this.showPlayOverlay();
|
|
325
|
+
this.debugWarn('❌ Intelligent autoplay failed - will retry on user interaction');
|
|
326
326
|
this.setupAutoplayRetry();
|
|
327
327
|
}
|
|
328
328
|
else {
|
|
@@ -330,10 +330,12 @@ export class WebPlayer extends BasePlayer {
|
|
|
330
330
|
}
|
|
331
331
|
}).catch(error => {
|
|
332
332
|
this.debugError('Autoplay failed:', error);
|
|
333
|
-
this.showPlayOverlay();
|
|
334
333
|
this.setupAutoplayRetry();
|
|
335
334
|
});
|
|
336
335
|
}
|
|
336
|
+
else {
|
|
337
|
+
this.debugLog(`⛔ Skipping autoplay: autoPlay=${this.config.autoPlay}, attempted=${this.autoplayAttempted}`);
|
|
338
|
+
}
|
|
337
339
|
});
|
|
338
340
|
this.video.addEventListener('loadedmetadata', () => {
|
|
339
341
|
if (!this.video)
|
|
@@ -692,10 +694,16 @@ export class WebPlayer extends BasePlayer {
|
|
|
692
694
|
return hasInteracted;
|
|
693
695
|
}
|
|
694
696
|
async attemptIntelligentAutoplay() {
|
|
695
|
-
|
|
697
|
+
this.debugLog('🎬 attemptIntelligentAutoplay called');
|
|
698
|
+
if (!this.config.autoPlay || !this.video) {
|
|
699
|
+
this.debugLog(`⛔ Early return: autoPlay=${this.config.autoPlay}, video=${!!this.video}`);
|
|
696
700
|
return false;
|
|
701
|
+
}
|
|
702
|
+
this.debugLog('🔍 Detecting autoplay capabilities...');
|
|
697
703
|
await this.detectAutoplayCapabilities();
|
|
704
|
+
this.debugLog(`📦 Capabilities detected: canAutoplayMuted=${this.autoplayCapabilities.canAutoplayMuted}, canAutoplayUnmuted=${this.autoplayCapabilities.canAutoplayUnmuted}`);
|
|
698
705
|
const hasActivation = this.hasUserActivation();
|
|
706
|
+
this.debugLog(`👤 User activation: ${hasActivation}`);
|
|
699
707
|
const shouldTryUnmuted = (this.autoplayCapabilities.canAutoplayUnmuted || hasActivation)
|
|
700
708
|
&& this.config.muted !== true;
|
|
701
709
|
if (shouldTryUnmuted) {
|
|
@@ -703,7 +711,9 @@ export class WebPlayer extends BasePlayer {
|
|
|
703
711
|
this.video.volume = this.config.volume ?? 1.0;
|
|
704
712
|
this.debugLog(`🔊 Attempting unmuted autoplay (activation: ${hasActivation})`);
|
|
705
713
|
try {
|
|
714
|
+
this.debugLog('▶️ Calling play() for unmuted autoplay...');
|
|
706
715
|
await this.play();
|
|
716
|
+
this.debugLog(`📊 Play returned, video.paused=${this.video.paused}`);
|
|
707
717
|
if (!this.video.paused) {
|
|
708
718
|
this.debugLog('✅ Unmuted autoplay successful');
|
|
709
719
|
return true;
|
|
@@ -713,14 +723,16 @@ export class WebPlayer extends BasePlayer {
|
|
|
713
723
|
}
|
|
714
724
|
}
|
|
715
725
|
catch (error) {
|
|
716
|
-
this.debugLog('⚠️ Unmuted autoplay failed,
|
|
726
|
+
this.debugLog('⚠️ Unmuted autoplay failed:', error);
|
|
717
727
|
}
|
|
718
728
|
}
|
|
719
729
|
if (this.autoplayCapabilities.canAutoplayMuted || hasActivation) {
|
|
720
730
|
this.video.muted = true;
|
|
721
731
|
this.debugLog('🔇 Attempting muted autoplay');
|
|
722
732
|
try {
|
|
733
|
+
this.debugLog('▶️ Calling play() for muted autoplay...');
|
|
723
734
|
await this.play();
|
|
735
|
+
this.debugLog(`📊 Play returned, video.paused=${this.video.paused}`);
|
|
724
736
|
if (!this.video.paused) {
|
|
725
737
|
this.debugLog('✅ Muted autoplay successful');
|
|
726
738
|
this.showUnmuteButton();
|
|
@@ -731,7 +743,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
731
743
|
}
|
|
732
744
|
}
|
|
733
745
|
catch (error) {
|
|
734
|
-
this.debugLog('❌ Muted autoplay failed');
|
|
746
|
+
this.debugLog('❌ Muted autoplay failed:', error);
|
|
735
747
|
}
|
|
736
748
|
}
|
|
737
749
|
return false;
|
|
@@ -771,134 +783,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
771
783
|
});
|
|
772
784
|
this.debugLog('🎯 Autoplay retry armed - waiting for user interaction');
|
|
773
785
|
}
|
|
774
|
-
showPlayOverlay() {
|
|
775
|
-
const unmuteBtn = document.getElementById('uvf-unmute-btn');
|
|
776
|
-
if (unmuteBtn) {
|
|
777
|
-
this.debugLog('Skipping play overlay - video is autoplaying muted with unmute button');
|
|
778
|
-
return;
|
|
779
|
-
}
|
|
780
|
-
if (this.video && !this.video.paused) {
|
|
781
|
-
this.debugLog('Skipping play overlay - video is already playing');
|
|
782
|
-
return;
|
|
783
|
-
}
|
|
784
|
-
this.hidePlayOverlay();
|
|
785
|
-
this.debugLog('📺 Showing play overlay due to autoplay restriction');
|
|
786
|
-
const overlay = document.createElement('div');
|
|
787
|
-
overlay.id = 'uvf-play-overlay';
|
|
788
|
-
overlay.className = 'uvf-play-overlay';
|
|
789
|
-
const playButton = document.createElement('button');
|
|
790
|
-
playButton.className = 'uvf-play-button';
|
|
791
|
-
playButton.setAttribute('aria-label', 'Play video');
|
|
792
|
-
playButton.innerHTML = `
|
|
793
|
-
<svg viewBox="0 0 24 24" fill="currentColor">
|
|
794
|
-
<path d="M8 5v14l11-7z"/>
|
|
795
|
-
</svg>
|
|
796
|
-
`;
|
|
797
|
-
const message = document.createElement('div');
|
|
798
|
-
message.className = 'uvf-play-message';
|
|
799
|
-
message.textContent = 'Click to play';
|
|
800
|
-
overlay.appendChild(playButton);
|
|
801
|
-
overlay.appendChild(message);
|
|
802
|
-
const handlePlayClick = async (e) => {
|
|
803
|
-
e.preventDefault();
|
|
804
|
-
e.stopPropagation();
|
|
805
|
-
this.lastUserInteraction = Date.now();
|
|
806
|
-
this.debugLog('▶️ User clicked play overlay');
|
|
807
|
-
try {
|
|
808
|
-
if (!this.video) {
|
|
809
|
-
this.debugError('Video element not available');
|
|
810
|
-
return;
|
|
811
|
-
}
|
|
812
|
-
await this.play();
|
|
813
|
-
this.debugLog('✅ Play successful after user click');
|
|
814
|
-
}
|
|
815
|
-
catch (error) {
|
|
816
|
-
this.debugError('❌ Failed to play after user interaction:', error);
|
|
817
|
-
message.textContent = 'Unable to play. Please try again.';
|
|
818
|
-
message.style.color = '#ff6b6b';
|
|
819
|
-
}
|
|
820
|
-
};
|
|
821
|
-
playButton.addEventListener('click', handlePlayClick);
|
|
822
|
-
overlay.addEventListener('click', async (e) => {
|
|
823
|
-
if (e.target === overlay) {
|
|
824
|
-
await handlePlayClick(e);
|
|
825
|
-
}
|
|
826
|
-
});
|
|
827
|
-
const style = document.createElement('style');
|
|
828
|
-
style.textContent = `
|
|
829
|
-
.uvf-play-overlay {
|
|
830
|
-
position: absolute !important;
|
|
831
|
-
top: 0 !important;
|
|
832
|
-
left: 0 !important;
|
|
833
|
-
width: 100% !important;
|
|
834
|
-
height: 100% !important;
|
|
835
|
-
background: rgba(0, 0, 0, 0.85) !important;
|
|
836
|
-
display: flex !important;
|
|
837
|
-
flex-direction: column !important;
|
|
838
|
-
justify-content: center !important;
|
|
839
|
-
align-items: center !important;
|
|
840
|
-
z-index: 999999 !important;
|
|
841
|
-
cursor: pointer !important;
|
|
842
|
-
backdrop-filter: blur(4px);
|
|
843
|
-
-webkit-backdrop-filter: blur(4px);
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
.uvf-play-button {
|
|
847
|
-
width: 96px !important;
|
|
848
|
-
height: 96px !important;
|
|
849
|
-
border-radius: 50% !important;
|
|
850
|
-
background: rgba(255, 255, 255, 0.95) !important;
|
|
851
|
-
border: 3px solid rgba(255, 255, 255, 0.3) !important;
|
|
852
|
-
color: #000 !important;
|
|
853
|
-
cursor: pointer !important;
|
|
854
|
-
display: flex !important;
|
|
855
|
-
align-items: center !important;
|
|
856
|
-
justify-content: center !important;
|
|
857
|
-
transition: all 0.3s ease !important;
|
|
858
|
-
margin-bottom: 20px !important;
|
|
859
|
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
.uvf-play-button:hover {
|
|
863
|
-
background: #fff !important;
|
|
864
|
-
transform: scale(1.15) !important;
|
|
865
|
-
box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4) !important;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
.uvf-play-button svg {
|
|
869
|
-
width: 40px !important;
|
|
870
|
-
height: 40px !important;
|
|
871
|
-
margin-left: 4px !important;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
.uvf-play-message {
|
|
875
|
-
color: white !important;
|
|
876
|
-
font-size: 18px !important;
|
|
877
|
-
font-weight: 600 !important;
|
|
878
|
-
text-align: center !important;
|
|
879
|
-
opacity: 0.95 !important;
|
|
880
|
-
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
|
|
881
|
-
}
|
|
882
|
-
`;
|
|
883
|
-
if (!document.getElementById('uvf-play-overlay-styles')) {
|
|
884
|
-
style.id = 'uvf-play-overlay-styles';
|
|
885
|
-
document.head.appendChild(style);
|
|
886
|
-
}
|
|
887
|
-
if (this.playerWrapper) {
|
|
888
|
-
this.playerWrapper.appendChild(overlay);
|
|
889
|
-
this.debugLog('✅ Play overlay added to player wrapper');
|
|
890
|
-
}
|
|
891
|
-
else {
|
|
892
|
-
this.debugError('❌ Cannot show play overlay - playerWrapper not found');
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
hidePlayOverlay() {
|
|
896
|
-
this.debugLog('🔇 Hiding play overlay');
|
|
897
|
-
const overlay = document.getElementById('uvf-play-overlay');
|
|
898
|
-
if (overlay) {
|
|
899
|
-
overlay.remove();
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
786
|
showUnmuteButton() {
|
|
903
787
|
this.hideUnmuteButton();
|
|
904
788
|
this.debugLog('🔇 Showing unmute button - video autoplaying muted');
|
|
@@ -1060,7 +944,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
1060
944
|
this._deferredPause = false;
|
|
1061
945
|
this.video.pause();
|
|
1062
946
|
}
|
|
1063
|
-
this.hidePlayOverlay();
|
|
1064
947
|
if (!this.video.muted) {
|
|
1065
948
|
this.hideUnmuteButton();
|
|
1066
949
|
}
|