unified-video-framework 1.4.156 → 1.4.157

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 +7 -0
  3. package/packages/web/dist/WebPlayer.d.ts.map +1 -1
  4. package/packages/web/dist/WebPlayer.js +205 -54
  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 +277 -71
  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.157",
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,9 @@ export declare class WebPlayer extends BasePlayer {
76
80
  private loadSubtitles;
77
81
  private isAbortPlayError;
78
82
  private isAutoplayRestrictionError;
83
+ private detectAutoplayCapabilities;
84
+ private attemptIntelligentAutoplay;
85
+ private setupAutoplayRetry;
79
86
  private showPlayOverlay;
80
87
  private hidePlayOverlay;
81
88
  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,GAAG,CAAa;IACxB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AO,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,7 +139,7 @@ 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;
142
+ this.video.autoplay = false;
134
143
  this.video.muted = this.config.autoPlay ? true : (this.config.muted ?? false);
135
144
  this.video.loop = this.config.loop ?? false;
136
145
  this.video.playsInline = this.config.playsInline ?? true;
@@ -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,134 @@ 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
+ async attemptIntelligentAutoplay() {
664
+ if (!this.config.autoPlay || !this.video)
665
+ return false;
666
+ await this.detectAutoplayCapabilities();
667
+ if (this.autoplayCapabilities.canAutoplayUnmuted && !this.config.muted) {
668
+ this.video.muted = false;
669
+ this.video.volume = this.config.volume ?? 1.0;
670
+ this.debugLog('🔊 Attempting unmuted autoplay');
671
+ try {
672
+ await this.play();
673
+ this.debugLog('✅ Unmuted autoplay successful');
674
+ return true;
675
+ }
676
+ catch (error) {
677
+ this.debugLog('⚠️ Unmuted autoplay failed, trying muted');
678
+ }
679
+ }
680
+ if (this.autoplayCapabilities.canAutoplayMuted) {
681
+ this.video.muted = true;
682
+ this.debugLog('🔇 Attempting muted autoplay');
683
+ try {
684
+ await this.play();
685
+ this.debugLog('✅ Muted autoplay successful');
686
+ return true;
687
+ }
688
+ catch (error) {
689
+ this.debugLog('❌ Muted autoplay failed');
690
+ }
691
+ }
692
+ return false;
693
+ }
694
+ setupAutoplayRetry() {
695
+ if (!this.config.autoPlay || this.autoplayRetryAttempts >= this.maxAutoplayRetries) {
696
+ return;
697
+ }
698
+ const interactionEvents = ['click', 'mousedown', 'keydown', 'touchstart'];
699
+ const retryAutoplay = async () => {
700
+ if (this.autoplayRetryPending || this.state.isPlaying) {
701
+ return;
702
+ }
703
+ this.autoplayRetryPending = true;
704
+ this.autoplayRetryAttempts++;
705
+ this.debugLog(`🔄 Attempting autoplay retry #${this.autoplayRetryAttempts}`);
706
+ try {
707
+ const success = await this.attemptIntelligentAutoplay();
708
+ if (success) {
709
+ this.debugLog('✅ Autoplay retry successful');
710
+ this.autoplayRetryPending = false;
711
+ interactionEvents.forEach(eventType => {
712
+ document.removeEventListener(eventType, retryAutoplay);
713
+ });
714
+ }
715
+ else {
716
+ this.autoplayRetryPending = false;
717
+ }
718
+ }
719
+ catch (error) {
720
+ this.autoplayRetryPending = false;
721
+ this.debugError('Autoplay retry failed:', error);
722
+ }
723
+ };
724
+ interactionEvents.forEach(eventType => {
725
+ document.addEventListener(eventType, retryAutoplay, { once: true, passive: true });
726
+ });
727
+ this.debugLog('🎯 Autoplay retry armed - waiting for user interaction');
728
+ }
593
729
  showPlayOverlay() {
594
730
  this.hidePlayOverlay();
731
+ this.debugLog('📺 Showing play overlay due to autoplay restriction');
595
732
  const overlay = document.createElement('div');
596
733
  overlay.id = 'uvf-play-overlay';
597
734
  overlay.className = 'uvf-play-overlay';
598
735
  const playButton = document.createElement('button');
599
736
  playButton.className = 'uvf-play-button';
737
+ playButton.setAttribute('aria-label', 'Play video');
600
738
  playButton.innerHTML = `
601
739
  <svg viewBox="0 0 24 24" fill="currentColor">
602
740
  <path d="M8 5v14l11-7z"/>
@@ -607,77 +745,85 @@ export class WebPlayer extends BasePlayer {
607
745
  message.textContent = 'Click to play';
608
746
  overlay.appendChild(playButton);
609
747
  overlay.appendChild(message);
610
- playButton.addEventListener('click', async (e) => {
748
+ const handlePlayClick = async (e) => {
749
+ e.preventDefault();
611
750
  e.stopPropagation();
612
751
  this.lastUserInteraction = Date.now();
752
+ this.debugLog('▶️ User clicked play overlay');
613
753
  try {
754
+ if (!this.video) {
755
+ this.debugError('Video element not available');
756
+ return;
757
+ }
614
758
  await this.play();
759
+ this.debugLog('✅ Play successful after user click');
615
760
  }
616
761
  catch (error) {
617
- this.debugError('Failed to play after user interaction:', error);
762
+ this.debugError('Failed to play after user interaction:', error);
763
+ message.textContent = 'Unable to play. Please try again.';
764
+ message.style.color = '#ff6b6b';
618
765
  }
619
- });
766
+ };
767
+ playButton.addEventListener('click', handlePlayClick);
620
768
  overlay.addEventListener('click', async (e) => {
621
769
  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
- }
770
+ await handlePlayClick(e);
630
771
  }
631
772
  });
632
773
  const style = document.createElement('style');
633
774
  style.textContent = `
634
775
  .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;
776
+ position: absolute !important;
777
+ top: 0 !important;
778
+ left: 0 !important;
779
+ width: 100% !important;
780
+ height: 100% !important;
781
+ background: rgba(0, 0, 0, 0.85) !important;
782
+ display: flex !important;
783
+ flex-direction: column !important;
784
+ justify-content: center !important;
785
+ align-items: center !important;
786
+ z-index: 999999 !important;
787
+ cursor: pointer !important;
788
+ backdrop-filter: blur(4px);
789
+ -webkit-backdrop-filter: blur(4px);
647
790
  }
648
-
791
+
649
792
  .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;
793
+ width: 96px !important;
794
+ height: 96px !important;
795
+ border-radius: 50% !important;
796
+ background: rgba(255, 255, 255, 0.95) !important;
797
+ border: 3px solid rgba(255, 255, 255, 0.3) !important;
798
+ color: #000 !important;
799
+ cursor: pointer !important;
800
+ display: flex !important;
801
+ align-items: center !important;
802
+ justify-content: center !important;
803
+ transition: all 0.3s ease !important;
804
+ margin-bottom: 20px !important;
805
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
662
806
  }
663
-
807
+
664
808
  .uvf-play-button:hover {
665
- background: #fff;
666
- transform: scale(1.1);
809
+ background: #fff !important;
810
+ transform: scale(1.15) !important;
811
+ box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4) !important;
667
812
  }
668
-
813
+
669
814
  .uvf-play-button svg {
670
- width: 32px;
671
- height: 32px;
672
- margin-left: 4px;
815
+ width: 40px !important;
816
+ height: 40px !important;
817
+ margin-left: 4px !important;
673
818
  }
674
-
819
+
675
820
  .uvf-play-message {
676
- color: white;
677
- font-size: 16px;
678
- font-weight: 500;
679
- text-align: center;
680
- opacity: 0.9;
821
+ color: white !important;
822
+ font-size: 18px !important;
823
+ font-weight: 600 !important;
824
+ text-align: center !important;
825
+ opacity: 0.95 !important;
826
+ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
681
827
  }
682
828
  `;
683
829
  if (!document.getElementById('uvf-play-overlay-styles')) {
@@ -686,9 +832,14 @@ export class WebPlayer extends BasePlayer {
686
832
  }
687
833
  if (this.playerWrapper) {
688
834
  this.playerWrapper.appendChild(overlay);
835
+ this.debugLog('✅ Play overlay added to player wrapper');
836
+ }
837
+ else {
838
+ this.debugError('❌ Cannot show play overlay - playerWrapper not found');
689
839
  }
690
840
  }
691
841
  hidePlayOverlay() {
842
+ this.debugLog('🔇 Hiding play overlay');
692
843
  const overlay = document.getElementById('uvf-play-overlay');
693
844
  if (overlay) {
694
845
  overlay.remove();