unified-video-framework 1.4.156 → 1.4.158

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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/packages/web/dist/WebPlayer.d.ts +8 -0
  3. package/packages/web/dist/WebPlayer.d.ts.map +1 -1
  4. package/packages/web/dist/WebPlayer.js +220 -55
  5. package/packages/web/dist/WebPlayer.js.map +1 -1
  6. package/packages/web/dist/chapters/ChapterManager.d.ts.map +1 -1
  7. package/packages/web/dist/chapters/ChapterManager.js +22 -0
  8. package/packages/web/dist/chapters/ChapterManager.js.map +1 -1
  9. package/packages/web/dist/chapters/types/ChapterTypes.d.ts +1 -0
  10. package/packages/web/dist/chapters/types/ChapterTypes.d.ts.map +1 -1
  11. package/packages/web/dist/chapters/types/ChapterTypes.js +2 -1
  12. package/packages/web/dist/chapters/types/ChapterTypes.js.map +1 -1
  13. package/packages/web/dist/react/WebPlayerView.d.ts +1 -0
  14. package/packages/web/dist/react/WebPlayerView.d.ts.map +1 -1
  15. package/packages/web/dist/react/WebPlayerView.js +1 -0
  16. package/packages/web/dist/react/WebPlayerView.js.map +1 -1
  17. package/packages/web/src/WebPlayer.ts +305 -72
  18. package/packages/web/src/chapters/ChapterManager.ts +32 -0
  19. package/packages/web/src/chapters/types/ChapterTypes.ts +5 -1
  20. package/packages/web/src/react/WebPlayerView.tsx +2 -0
  21. package/packages/core/dist/chapter-manager.d.ts +0 -39
  22. package/packages/ios/README.md +0 -84
  23. package/packages/web/dist/HTML5Player.js.map +0 -1
  24. package/packages/web/dist/epg/EPGController.d.ts +0 -78
  25. package/packages/web/dist/epg/EPGController.d.ts.map +0 -1
  26. package/packages/web/dist/epg/EPGController.js +0 -476
  27. package/packages/web/dist/epg/EPGController.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unified-video-framework",
3
- "version": "1.4.156",
3
+ "version": "1.4.158",
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",
@@ -54,6 +54,10 @@ export declare class WebPlayer extends BasePlayer {
54
54
  private hasTriedButtonFallback;
55
55
  private lastUserInteraction;
56
56
  private showTimeTooltip;
57
+ private autoplayCapabilities;
58
+ private autoplayRetryPending;
59
+ private autoplayRetryAttempts;
60
+ private maxAutoplayRetries;
57
61
  private chapterManager;
58
62
  private coreChapterManager;
59
63
  private chapterConfig;
@@ -76,6 +80,10 @@ export declare class WebPlayer extends BasePlayer {
76
80
  private loadSubtitles;
77
81
  private isAbortPlayError;
78
82
  private isAutoplayRestrictionError;
83
+ private detectAutoplayCapabilities;
84
+ private hasUserActivation;
85
+ private attemptIntelligentAutoplay;
86
+ private setupAutoplayRetry;
79
87
  private showPlayOverlay;
80
88
  private hidePlayOverlay;
81
89
  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,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAChD,OAAO,CAAC,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sB;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"}
@@ -52,6 +52,15 @@ export class WebPlayer extends BasePlayer {
52
52
  this.hasTriedButtonFallback = false;
53
53
  this.lastUserInteraction = 0;
54
54
  this.showTimeTooltip = false;
55
+ this.autoplayCapabilities = {
56
+ canAutoplay: false,
57
+ canAutoplayMuted: false,
58
+ canAutoplayUnmuted: false,
59
+ lastCheck: 0
60
+ };
61
+ this.autoplayRetryPending = false;
62
+ this.autoplayRetryAttempts = 0;
63
+ this.maxAutoplayRetries = 3;
55
64
  this.chapterManager = null;
56
65
  this.coreChapterManager = null;
57
66
  this.chapterConfig = { enabled: false };
@@ -130,8 +139,8 @@ export class WebPlayer extends BasePlayer {
130
139
  this.video = document.createElement('video');
131
140
  this.video.className = 'uvf-video';
132
141
  this.video.controls = false;
133
- this.video.autoplay = this.config.autoPlay ?? false;
134
- this.video.muted = this.config.autoPlay ? true : (this.config.muted ?? false);
142
+ this.video.autoplay = false;
143
+ this.video.muted = this.config.muted ?? false;
135
144
  this.video.loop = this.config.loop ?? false;
136
145
  this.video.playsInline = this.config.playsInline ?? true;
137
146
  this.video.preload = this.config.preload ?? 'metadata';
@@ -240,6 +249,7 @@ export class WebPlayer extends BasePlayer {
240
249
  this.state.isPlaying = true;
241
250
  this.state.isPaused = false;
242
251
  this.emit('onPlay');
252
+ this.hidePlayOverlay();
243
253
  });
244
254
  this.video.addEventListener('playing', () => {
245
255
  if (this._deferredPause) {
@@ -249,6 +259,8 @@ export class WebPlayer extends BasePlayer {
249
259
  }
250
260
  catch (_) { }
251
261
  }
262
+ this.hidePlayOverlay();
263
+ this.setBuffering(false);
252
264
  });
253
265
  this.video.addEventListener('pause', () => {
254
266
  this.state.isPlaying = false;
@@ -433,14 +445,19 @@ export class WebPlayer extends BasePlayer {
433
445
  }));
434
446
  this.updateSettingsMenu();
435
447
  if (this.config.autoPlay) {
436
- this.play().catch(error => {
437
- if (this.isAutoplayRestrictionError(error)) {
438
- this.debugWarn('HLS autoplay blocked, showing play overlay');
448
+ this.attemptIntelligentAutoplay().then(success => {
449
+ if (!success) {
450
+ this.debugWarn(' Intelligent autoplay failed, showing play overlay');
439
451
  this.showPlayOverlay();
452
+ this.setupAutoplayRetry();
440
453
  }
441
454
  else {
442
- this.debugError('HLS autoplay failed:', error);
455
+ this.debugLog(' Intelligent autoplay succeeded');
443
456
  }
457
+ }).catch(error => {
458
+ this.debugError('HLS autoplay failed:', error);
459
+ this.showPlayOverlay();
460
+ this.setupAutoplayRetry();
444
461
  });
445
462
  }
446
463
  });
@@ -590,13 +607,148 @@ export class WebPlayer extends BasePlayer {
590
607
  message.includes('play() failed') ||
591
608
  message.includes('user interaction'));
592
609
  }
610
+ async detectAutoplayCapabilities() {
611
+ const now = Date.now();
612
+ if (this.autoplayCapabilities.lastCheck && (now - this.autoplayCapabilities.lastCheck) < 300000) {
613
+ return;
614
+ }
615
+ try {
616
+ const testVideo = document.createElement('video');
617
+ testVideo.muted = true;
618
+ testVideo.playsInline = true;
619
+ testVideo.style.position = 'absolute';
620
+ testVideo.style.opacity = '0';
621
+ testVideo.style.pointerEvents = 'none';
622
+ testVideo.style.width = '1px';
623
+ testVideo.style.height = '1px';
624
+ testVideo.src = 'data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAA70D=';
625
+ document.body.appendChild(testVideo);
626
+ try {
627
+ await testVideo.play();
628
+ this.autoplayCapabilities.canAutoplayMuted = true;
629
+ this.autoplayCapabilities.canAutoplay = true;
630
+ this.debugLog('✅ Muted autoplay is supported');
631
+ testVideo.pause();
632
+ testVideo.currentTime = 0;
633
+ testVideo.muted = false;
634
+ testVideo.volume = 0.5;
635
+ try {
636
+ await testVideo.play();
637
+ this.autoplayCapabilities.canAutoplayUnmuted = true;
638
+ this.debugLog('✅ Unmuted autoplay is supported');
639
+ }
640
+ catch (unmutedError) {
641
+ this.autoplayCapabilities.canAutoplayUnmuted = false;
642
+ this.debugLog('⚠️ Unmuted autoplay is blocked');
643
+ }
644
+ testVideo.pause();
645
+ }
646
+ catch (error) {
647
+ this.autoplayCapabilities.canAutoplay = false;
648
+ this.autoplayCapabilities.canAutoplayMuted = false;
649
+ this.autoplayCapabilities.canAutoplayUnmuted = false;
650
+ this.debugLog('❌ All autoplay is blocked');
651
+ }
652
+ finally {
653
+ document.body.removeChild(testVideo);
654
+ }
655
+ this.autoplayCapabilities.lastCheck = now;
656
+ }
657
+ catch (error) {
658
+ this.debugError('Failed to detect autoplay capabilities:', error);
659
+ this.autoplayCapabilities.canAutoplayMuted = true;
660
+ this.autoplayCapabilities.canAutoplay = true;
661
+ }
662
+ }
663
+ hasUserActivation() {
664
+ if (typeof navigator !== 'undefined' && navigator.userActivation) {
665
+ const hasActivation = navigator.userActivation.hasBeenActive;
666
+ this.debugLog(`🎯 User activation detected: ${hasActivation}`);
667
+ return hasActivation;
668
+ }
669
+ const hasInteracted = this.lastUserInteraction > 0 &&
670
+ (Date.now() - this.lastUserInteraction) < 5000;
671
+ this.debugLog(`🎯 Recent user interaction: ${hasInteracted}`);
672
+ return hasInteracted;
673
+ }
674
+ async attemptIntelligentAutoplay() {
675
+ if (!this.config.autoPlay || !this.video)
676
+ return false;
677
+ await this.detectAutoplayCapabilities();
678
+ const hasActivation = this.hasUserActivation();
679
+ const shouldTryUnmuted = (this.autoplayCapabilities.canAutoplayUnmuted || hasActivation)
680
+ && this.config.muted !== true;
681
+ if (shouldTryUnmuted) {
682
+ this.video.muted = false;
683
+ this.video.volume = this.config.volume ?? 1.0;
684
+ this.debugLog(`🔊 Attempting unmuted autoplay (activation: ${hasActivation})`);
685
+ try {
686
+ await this.play();
687
+ this.debugLog('✅ Unmuted autoplay successful');
688
+ return true;
689
+ }
690
+ catch (error) {
691
+ this.debugLog('⚠️ Unmuted autoplay failed, trying muted');
692
+ }
693
+ }
694
+ if (this.autoplayCapabilities.canAutoplayMuted || hasActivation) {
695
+ this.video.muted = true;
696
+ this.debugLog('🔇 Attempting muted autoplay');
697
+ try {
698
+ await this.play();
699
+ this.debugLog('✅ Muted autoplay successful');
700
+ return true;
701
+ }
702
+ catch (error) {
703
+ this.debugLog('❌ Muted autoplay failed');
704
+ }
705
+ }
706
+ return false;
707
+ }
708
+ setupAutoplayRetry() {
709
+ if (!this.config.autoPlay || this.autoplayRetryAttempts >= this.maxAutoplayRetries) {
710
+ return;
711
+ }
712
+ const interactionEvents = ['click', 'mousedown', 'keydown', 'touchstart'];
713
+ const retryAutoplay = async () => {
714
+ if (this.autoplayRetryPending || this.state.isPlaying) {
715
+ return;
716
+ }
717
+ this.autoplayRetryPending = true;
718
+ this.autoplayRetryAttempts++;
719
+ this.debugLog(`🔄 Attempting autoplay retry #${this.autoplayRetryAttempts}`);
720
+ try {
721
+ const success = await this.attemptIntelligentAutoplay();
722
+ if (success) {
723
+ this.debugLog('✅ Autoplay retry successful');
724
+ this.autoplayRetryPending = false;
725
+ interactionEvents.forEach(eventType => {
726
+ document.removeEventListener(eventType, retryAutoplay);
727
+ });
728
+ }
729
+ else {
730
+ this.autoplayRetryPending = false;
731
+ }
732
+ }
733
+ catch (error) {
734
+ this.autoplayRetryPending = false;
735
+ this.debugError('Autoplay retry failed:', error);
736
+ }
737
+ };
738
+ interactionEvents.forEach(eventType => {
739
+ document.addEventListener(eventType, retryAutoplay, { once: true, passive: true });
740
+ });
741
+ this.debugLog('🎯 Autoplay retry armed - waiting for user interaction');
742
+ }
593
743
  showPlayOverlay() {
594
744
  this.hidePlayOverlay();
745
+ this.debugLog('📺 Showing play overlay due to autoplay restriction');
595
746
  const overlay = document.createElement('div');
596
747
  overlay.id = 'uvf-play-overlay';
597
748
  overlay.className = 'uvf-play-overlay';
598
749
  const playButton = document.createElement('button');
599
750
  playButton.className = 'uvf-play-button';
751
+ playButton.setAttribute('aria-label', 'Play video');
600
752
  playButton.innerHTML = `
601
753
  <svg viewBox="0 0 24 24" fill="currentColor">
602
754
  <path d="M8 5v14l11-7z"/>
@@ -607,77 +759,85 @@ export class WebPlayer extends BasePlayer {
607
759
  message.textContent = 'Click to play';
608
760
  overlay.appendChild(playButton);
609
761
  overlay.appendChild(message);
610
- playButton.addEventListener('click', async (e) => {
762
+ const handlePlayClick = async (e) => {
763
+ e.preventDefault();
611
764
  e.stopPropagation();
612
765
  this.lastUserInteraction = Date.now();
766
+ this.debugLog('▶️ User clicked play overlay');
613
767
  try {
768
+ if (!this.video) {
769
+ this.debugError('Video element not available');
770
+ return;
771
+ }
614
772
  await this.play();
773
+ this.debugLog('✅ Play successful after user click');
615
774
  }
616
775
  catch (error) {
617
- this.debugError('Failed to play after user interaction:', error);
776
+ this.debugError('Failed to play after user interaction:', error);
777
+ message.textContent = 'Unable to play. Please try again.';
778
+ message.style.color = '#ff6b6b';
618
779
  }
619
- });
780
+ };
781
+ playButton.addEventListener('click', handlePlayClick);
620
782
  overlay.addEventListener('click', async (e) => {
621
783
  if (e.target === overlay) {
622
- e.stopPropagation();
623
- this.lastUserInteraction = Date.now();
624
- try {
625
- await this.play();
626
- }
627
- catch (error) {
628
- this.debugError('Failed to play after user interaction:', error);
629
- }
784
+ await handlePlayClick(e);
630
785
  }
631
786
  });
632
787
  const style = document.createElement('style');
633
788
  style.textContent = `
634
789
  .uvf-play-overlay {
635
- position: absolute;
636
- top: 0;
637
- left: 0;
638
- width: 100%;
639
- height: 100%;
640
- background: rgba(0, 0, 0, 0.7);
641
- display: flex;
642
- flex-direction: column;
643
- justify-content: center;
644
- align-items: center;
645
- z-index: 1000;
646
- cursor: pointer;
790
+ position: absolute !important;
791
+ top: 0 !important;
792
+ left: 0 !important;
793
+ width: 100% !important;
794
+ height: 100% !important;
795
+ background: rgba(0, 0, 0, 0.85) !important;
796
+ display: flex !important;
797
+ flex-direction: column !important;
798
+ justify-content: center !important;
799
+ align-items: center !important;
800
+ z-index: 999999 !important;
801
+ cursor: pointer !important;
802
+ backdrop-filter: blur(4px);
803
+ -webkit-backdrop-filter: blur(4px);
647
804
  }
648
-
805
+
649
806
  .uvf-play-button {
650
- width: 80px;
651
- height: 80px;
652
- border-radius: 50%;
653
- background: rgba(255, 255, 255, 0.9);
654
- border: none;
655
- color: #000;
656
- cursor: pointer;
657
- display: flex;
658
- align-items: center;
659
- justify-content: center;
660
- transition: all 0.3s ease;
661
- margin-bottom: 16px;
807
+ width: 96px !important;
808
+ height: 96px !important;
809
+ border-radius: 50% !important;
810
+ background: rgba(255, 255, 255, 0.95) !important;
811
+ border: 3px solid rgba(255, 255, 255, 0.3) !important;
812
+ color: #000 !important;
813
+ cursor: pointer !important;
814
+ display: flex !important;
815
+ align-items: center !important;
816
+ justify-content: center !important;
817
+ transition: all 0.3s ease !important;
818
+ margin-bottom: 20px !important;
819
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
662
820
  }
663
-
821
+
664
822
  .uvf-play-button:hover {
665
- background: #fff;
666
- transform: scale(1.1);
823
+ background: #fff !important;
824
+ transform: scale(1.15) !important;
825
+ box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4) !important;
667
826
  }
668
-
827
+
669
828
  .uvf-play-button svg {
670
- width: 32px;
671
- height: 32px;
672
- margin-left: 4px;
829
+ width: 40px !important;
830
+ height: 40px !important;
831
+ margin-left: 4px !important;
673
832
  }
674
-
833
+
675
834
  .uvf-play-message {
676
- color: white;
677
- font-size: 16px;
678
- font-weight: 500;
679
- text-align: center;
680
- opacity: 0.9;
835
+ color: white !important;
836
+ font-size: 18px !important;
837
+ font-weight: 600 !important;
838
+ text-align: center !important;
839
+ opacity: 0.95 !important;
840
+ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
681
841
  }
682
842
  `;
683
843
  if (!document.getElementById('uvf-play-overlay-styles')) {
@@ -686,9 +846,14 @@ export class WebPlayer extends BasePlayer {
686
846
  }
687
847
  if (this.playerWrapper) {
688
848
  this.playerWrapper.appendChild(overlay);
849
+ this.debugLog('✅ Play overlay added to player wrapper');
850
+ }
851
+ else {
852
+ this.debugError('❌ Cannot show play overlay - playerWrapper not found');
689
853
  }
690
854
  }
691
855
  hidePlayOverlay() {
856
+ this.debugLog('🔇 Hiding play overlay');
692
857
  const overlay = document.getElementById('uvf-play-overlay');
693
858
  if (overlay) {
694
859
  overlay.remove();