unified-video-framework 1.4.456 → 1.4.458

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.
@@ -1743,22 +1743,30 @@ export class WebPlayer extends BasePlayer {
1743
1743
 
1744
1744
  // Different behavior based on mode
1745
1745
  if (!this.youtubeNativeControls) {
1746
- // Full blocking mode - block all YouTube controls
1747
- // Note: Don't set height inline - let CSS class .uvf-youtube-overlay handle it
1748
- // CSS sets height: calc(100% - 60px) normally, and 100% when not hovered
1746
+ // Custom controls mode - overlay doesn't cover controls area
1749
1747
  overlay.style.cssText = `
1750
1748
  position: absolute;
1751
1749
  top: 0;
1752
1750
  left: 0;
1753
1751
  width: 100%;
1752
+ height: calc(100% - 120px);
1754
1753
  z-index: 2;
1755
- pointer-events: auto;
1754
+ background: transparent;
1755
+ pointer-events: none;
1756
1756
  cursor: pointer;
1757
1757
  `;
1758
1758
 
1759
- // Handle click to toggle play/pause
1759
+ // Add click handler directly to the overlay since pointer-events is none
1760
+ // This allows video clicks while controls remain interactive
1760
1761
  overlay.addEventListener('click', () => {
1761
- this.togglePlayPause();
1762
+ if (this.youtubePlayer && this.youtubePlayerReady) {
1763
+ const state = this.youtubePlayer.getPlayerState();
1764
+ if (state === 1) { // Playing
1765
+ this.youtubePlayer.pauseVideo();
1766
+ } else {
1767
+ this.youtubePlayer.playVideo();
1768
+ }
1769
+ }
1762
1770
  });
1763
1771
 
1764
1772
  // Handle double-click for fullscreen
@@ -1900,7 +1908,7 @@ export class WebPlayer extends BasePlayer {
1900
1908
  this.debugLog('[YouTube] Hybrid mode - both YouTube native controls and custom controls enabled');
1901
1909
  } else if (!this.youtubeNativeControls && this.useCustomControls && this.playerWrapper) {
1902
1910
  // Custom controls only mode - ensure custom controls are visible
1903
- this.debugLog('[YouTube] Custom controls only mode - showing custom controls, hiding YouTube native controls');
1911
+ this.debugLog('[YouTube] Custom controls only mode - ensuring controls are visible');
1904
1912
  this.playerWrapper.classList.remove('youtube-native-controls-mode');
1905
1913
  this.playerWrapper.classList.add('youtube-custom-controls-mode');
1906
1914
  this.playerWrapper.classList.add('controls-visible');
@@ -1908,8 +1916,30 @@ export class WebPlayer extends BasePlayer {
1908
1916
  // Prevent auto-hide from interfering
1909
1917
  this.isYouTubeCustomControlsMode = true;
1910
1918
 
1919
+ // Force show controls with explicit visibility
1911
1920
  this.showCustomControls();
1912
- this.debugLog('[YouTube] Auto-hide disabled for custom controls');
1921
+
1922
+ // Additionally, force controls visibility with inline styles for YouTube
1923
+ const controlsBar = document.getElementById('uvf-controls') as HTMLElement;
1924
+ if (controlsBar) {
1925
+ controlsBar.style.display = 'flex';
1926
+ controlsBar.style.visibility = 'visible';
1927
+ controlsBar.style.opacity = '1';
1928
+ controlsBar.style.pointerEvents = 'auto';
1929
+ controlsBar.style.zIndex = '100';
1930
+ controlsBar.style.position = 'absolute'; // Anchor to bottom of player wrapper
1931
+ }
1932
+
1933
+ const topBar = document.querySelector('.uvf-top-bar') as HTMLElement;
1934
+ if (topBar) {
1935
+ topBar.style.display = 'flex';
1936
+ topBar.style.visibility = 'visible';
1937
+ topBar.style.opacity = '1';
1938
+ topBar.style.pointerEvents = 'auto';
1939
+ topBar.style.zIndex = '100';
1940
+ }
1941
+
1942
+ this.debugLog('[YouTube] Custom controls forced visible, auto-hide disabled');
1913
1943
  } else if (!this.youtubeNativeControls && !this.useCustomControls && this.playerWrapper) {
1914
1944
  // No controls mode - both YouTube native and custom controls are hidden
1915
1945
  this.debugLog('[YouTube] No controls mode - all controls hidden');
@@ -1917,6 +1947,48 @@ export class WebPlayer extends BasePlayer {
1917
1947
  this.hideCustomControls();
1918
1948
  }
1919
1949
 
1950
+ // Debug: Log control visibility state after YouTube loads
1951
+ setTimeout(() => {
1952
+ const controlsBar = document.getElementById('uvf-controls');
1953
+ const wrapper = this.playerWrapper;
1954
+ const overlay = wrapper?.querySelector('.uvf-youtube-overlay') as HTMLElement;
1955
+
1956
+ if (this.config.debug) {
1957
+ console.log('[YouTube Debug] Control visibility check:');
1958
+ console.log('- youtubeNativeControls:', this.youtubeNativeControls);
1959
+ console.log('- useCustomControls:', this.useCustomControls);
1960
+ console.log('- isYouTubeCustomControlsMode:', this.isYouTubeCustomControlsMode);
1961
+
1962
+ if (wrapper) {
1963
+ console.log('- Wrapper classes:', wrapper.className);
1964
+ }
1965
+
1966
+ if (controlsBar) {
1967
+ const rect = controlsBar.getBoundingClientRect();
1968
+ const style = window.getComputedStyle(controlsBar);
1969
+ console.log('- Controls bar:');
1970
+ console.log(' - Display:', style.display);
1971
+ console.log(' - Visibility:', style.visibility);
1972
+ console.log(' - Opacity:', style.opacity);
1973
+ console.log(' - Z-index:', style.zIndex);
1974
+ console.log(' - Pointer-events:', style.pointerEvents);
1975
+ console.log(' - Position:', style.position);
1976
+ console.log(' - Dimensions:', { width: rect.width, height: rect.height });
1977
+ console.log(' - Position:', { top: rect.top, left: rect.left, bottom: rect.bottom });
1978
+ }
1979
+
1980
+ if (overlay) {
1981
+ const overlayRect = overlay.getBoundingClientRect();
1982
+ const overlayStyle = window.getComputedStyle(overlay);
1983
+ console.log('- YouTube overlay:');
1984
+ console.log(' - Height:', overlayStyle.height);
1985
+ console.log(' - Pointer-events:', overlayStyle.pointerEvents);
1986
+ console.log(' - Z-index:', overlayStyle.zIndex);
1987
+ console.log(' - Bottom position:', overlayRect.bottom);
1988
+ }
1989
+ }
1990
+ }, 500);
1991
+
1920
1992
  // Set initial volume
1921
1993
  if (this.youtubePlayer) {
1922
1994
  const volume = this.config.volume ? this.config.volume * 100 : 100;
@@ -8916,6 +8988,44 @@ export class WebPlayer extends BasePlayer {
8916
8988
  cursor: default !important;
8917
8989
  }
8918
8990
 
8991
+ /* Ensure YouTube overlay doesn't block controls in custom mode */
8992
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-youtube-overlay {
8993
+ height: calc(100% - 120px) !important;
8994
+ pointer-events: none !important;
8995
+ }
8996
+
8997
+ /* Ensure controls bar is positioned correctly and visible */
8998
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-controls-bar {
8999
+ position: absolute !important;
9000
+ bottom: 0 !important;
9001
+ left: 0 !important;
9002
+ right: 0 !important;
9003
+ z-index: 100 !important;
9004
+ display: flex !important;
9005
+ visibility: visible !important;
9006
+ pointer-events: auto !important;
9007
+ opacity: 1 !important;
9008
+ transform: translateY(0) !important;
9009
+ }
9010
+
9011
+ /* Ensure top bar is visible in YouTube custom mode */
9012
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-top-bar {
9013
+ position: relative !important;
9014
+ z-index: 100 !important;
9015
+ display: flex !important;
9016
+ visibility: visible !important;
9017
+ pointer-events: auto !important;
9018
+ opacity: 1 !important;
9019
+ transform: translateY(0) !important;
9020
+ }
9021
+
9022
+ /* Force all control buttons to be interactive */
9023
+ .uvf-player-wrapper.youtube-custom-controls-mode .uvf-control-btn {
9024
+ pointer-events: auto !important;
9025
+ cursor: pointer !important;
9026
+ z-index: 101 !important;
9027
+ }
9028
+
8919
9029
  /* Override any inline styles */
8920
9030
  .controls-disabled .uvf-controls-bar,
8921
9031
  .controls-disabled .uvf-top-bar,