unified-video-framework 1.4.455 → 1.4.456

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.
@@ -216,6 +216,9 @@ export class WebPlayer extends BasePlayer {
216
216
  private currentThumbnailUrl: string | null = null;
217
217
  private thumbnailPreviewEnabled: boolean = false;
218
218
 
219
+ // YouTube custom controls mode tracking
220
+ private isYouTubeCustomControlsMode: boolean = false;
221
+
219
222
  // Debug logging helper
220
223
  private debugLog(message: string, ...args: any[]): void {
221
224
  if (this.config.debug) {
@@ -1646,6 +1649,9 @@ export class WebPlayer extends BasePlayer {
1646
1649
 
1647
1650
  private async loadYouTube(url: string, source: any): Promise<void> {
1648
1651
  try {
1652
+ // Reset YouTube custom controls mode flag when loading new video
1653
+ this.isYouTubeCustomControlsMode = false;
1654
+
1649
1655
  this.debugLog('Loading YouTube video:', url);
1650
1656
 
1651
1657
  // Extract video ID and fetch metadata
@@ -1898,7 +1904,12 @@ export class WebPlayer extends BasePlayer {
1898
1904
  this.playerWrapper.classList.remove('youtube-native-controls-mode');
1899
1905
  this.playerWrapper.classList.add('youtube-custom-controls-mode');
1900
1906
  this.playerWrapper.classList.add('controls-visible');
1907
+
1908
+ // Prevent auto-hide from interfering
1909
+ this.isYouTubeCustomControlsMode = true;
1910
+
1901
1911
  this.showCustomControls();
1912
+ this.debugLog('[YouTube] Auto-hide disabled for custom controls');
1902
1913
  } else if (!this.youtubeNativeControls && !this.useCustomControls && this.playerWrapper) {
1903
1914
  // No controls mode - both YouTube native and custom controls are hidden
1904
1915
  this.debugLog('[YouTube] No controls mode - all controls hidden');
@@ -8863,6 +8874,48 @@ export class WebPlayer extends BasePlayer {
8863
8874
  transform: scale(1) !important;
8864
8875
  }
8865
8876
 
8877
+ /* Force YouTube custom controls visible even with no-cursor class */
8878
+ .uvf-player-wrapper.youtube-custom-controls-mode.no-cursor .uvf-controls-bar,
8879
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-controls-bar {
8880
+ display: flex !important;
8881
+ visibility: visible !important;
8882
+ pointer-events: auto !important;
8883
+ opacity: 1 !important;
8884
+ transform: translateY(0) !important;
8885
+ }
8886
+
8887
+ .uvf-player-wrapper.youtube-custom-controls-mode.no-cursor .uvf-top-bar,
8888
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-top-bar {
8889
+ display: flex !important;
8890
+ visibility: visible !important;
8891
+ pointer-events: auto !important;
8892
+ opacity: 1 !important;
8893
+ transform: translateY(0) !important;
8894
+ }
8895
+
8896
+ .uvf-player-wrapper.youtube-custom-controls-mode.no-cursor .uvf-top-gradient,
8897
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-top-gradient {
8898
+ opacity: 1 !important;
8899
+ }
8900
+
8901
+ .uvf-player-wrapper.youtube-custom-controls-mode.no-cursor .uvf-controls-gradient,
8902
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-controls-gradient {
8903
+ opacity: 1 !important;
8904
+ }
8905
+
8906
+ .uvf-player-wrapper.youtube-custom-controls-mode.no-cursor .uvf-center-play-container,
8907
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-center-play-container {
8908
+ display: flex !important;
8909
+ visibility: visible !important;
8910
+ pointer-events: auto !important;
8911
+ opacity: 1 !important;
8912
+ transform: scale(1) !important;
8913
+ }
8914
+
8915
+ .uvf-player-wrapper.youtube-custom-controls-mode.no-cursor {
8916
+ cursor: default !important;
8917
+ }
8918
+
8866
8919
  /* Override any inline styles */
8867
8920
  .controls-disabled .uvf-controls-bar,
8868
8921
  .controls-disabled .uvf-top-bar,
@@ -10755,6 +10808,11 @@ export class WebPlayer extends BasePlayer {
10755
10808
  private hideControls(): void {
10756
10809
  if (!this.state.isPlaying) return;
10757
10810
 
10811
+ // Don't hide controls in YouTube custom mode
10812
+ if (this.isYouTubeCustomControlsMode) {
10813
+ return;
10814
+ }
10815
+
10758
10816
  const wrapper = this.container?.querySelector('.uvf-player-wrapper');
10759
10817
  if (wrapper) {
10760
10818
  wrapper.classList.remove('controls-visible');
@@ -10765,6 +10823,11 @@ export class WebPlayer extends BasePlayer {
10765
10823
  private scheduleHideControls(): void {
10766
10824
  if (!this.state.isPlaying) return;
10767
10825
 
10826
+ // Don't auto-hide in YouTube custom controls mode
10827
+ if (this.isYouTubeCustomControlsMode) {
10828
+ return;
10829
+ }
10830
+
10768
10831
  if (this.hideControlsTimeout) clearTimeout(this.hideControlsTimeout);
10769
10832
  // Use longer timeout in fullscreen for better UX
10770
10833
  const timeout = this.isFullscreen() ? 4000 : 3000;