unified-video-framework 1.4.451 → 1.4.452
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 +1 -1
- package/packages/core/dist/version.d.ts +1 -1
- package/packages/core/dist/version.js +1 -1
- package/packages/core/src/version.ts +1 -1
- package/packages/web/dist/WebPlayer.d.ts +1 -0
- package/packages/web/dist/WebPlayer.d.ts.map +1 -1
- package/packages/web/dist/WebPlayer.js +55 -1
- package/packages/web/dist/WebPlayer.js.map +1 -1
- package/packages/web/src/WebPlayer.ts +61 -1
|
@@ -1743,6 +1743,8 @@ export class WebPlayer extends BasePlayer {
|
|
|
1743
1743
|
// Different behavior based on mode
|
|
1744
1744
|
if (!this.youtubeNativeControls) {
|
|
1745
1745
|
// Full blocking mode - block all YouTube controls
|
|
1746
|
+
// Note: Don't set height inline - let CSS class .uvf-youtube-overlay handle it
|
|
1747
|
+
// CSS sets height: calc(100% - 60px) normally, and 100% when not hovered
|
|
1746
1748
|
overlay.style.cssText = `
|
|
1747
1749
|
position: absolute;
|
|
1748
1750
|
top: 0;
|
|
@@ -1750,6 +1752,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
1750
1752
|
width: 100%;
|
|
1751
1753
|
z-index: 2;
|
|
1752
1754
|
pointer-events: auto;
|
|
1755
|
+
cursor: pointer;
|
|
1753
1756
|
`;
|
|
1754
1757
|
|
|
1755
1758
|
// Handle click to toggle play/pause
|
|
@@ -1887,6 +1890,17 @@ export class WebPlayer extends BasePlayer {
|
|
|
1887
1890
|
this.hideCustomControls();
|
|
1888
1891
|
} else if (this.youtubeNativeControls && this.useCustomControls) {
|
|
1889
1892
|
this.debugLog('[YouTube] Hybrid mode - both YouTube native controls and custom controls enabled');
|
|
1893
|
+
} else if (!this.youtubeNativeControls && this.useCustomControls && this.playerWrapper) {
|
|
1894
|
+
// Custom controls only mode - ensure custom controls are visible
|
|
1895
|
+
this.debugLog('[YouTube] Custom controls only mode - showing custom controls, hiding YouTube native controls');
|
|
1896
|
+
this.playerWrapper.classList.remove('youtube-native-controls-mode');
|
|
1897
|
+
this.playerWrapper.classList.add('youtube-custom-controls-mode');
|
|
1898
|
+
this.showCustomControls();
|
|
1899
|
+
} else if (!this.youtubeNativeControls && !this.useCustomControls && this.playerWrapper) {
|
|
1900
|
+
// No controls mode - both YouTube native and custom controls are hidden
|
|
1901
|
+
this.debugLog('[YouTube] No controls mode - all controls hidden');
|
|
1902
|
+
this.playerWrapper.classList.add('youtube-native-controls-mode');
|
|
1903
|
+
this.hideCustomControls();
|
|
1890
1904
|
}
|
|
1891
1905
|
|
|
1892
1906
|
// Set initial volume
|
|
@@ -2062,6 +2076,33 @@ export class WebPlayer extends BasePlayer {
|
|
|
2062
2076
|
}
|
|
2063
2077
|
}
|
|
2064
2078
|
|
|
2079
|
+
private showCustomControls(): void {
|
|
2080
|
+
// Show all custom control elements for YouTube videos when custom controls are enabled
|
|
2081
|
+
const controlsBar = document.getElementById('uvf-controls') as HTMLElement;
|
|
2082
|
+
if (controlsBar) {
|
|
2083
|
+
controlsBar.style.display = '';
|
|
2084
|
+
controlsBar.style.visibility = '';
|
|
2085
|
+
controlsBar.style.opacity = '';
|
|
2086
|
+
controlsBar.style.pointerEvents = '';
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
const topBar = document.querySelector('.uvf-top-bar') as HTMLElement;
|
|
2090
|
+
if (topBar) {
|
|
2091
|
+
topBar.style.display = '';
|
|
2092
|
+
topBar.style.visibility = '';
|
|
2093
|
+
topBar.style.opacity = '';
|
|
2094
|
+
topBar.style.pointerEvents = '';
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
const centerPlayContainer = document.querySelector('.uvf-center-play-container') as HTMLElement;
|
|
2098
|
+
if (centerPlayContainer) {
|
|
2099
|
+
centerPlayContainer.style.display = '';
|
|
2100
|
+
centerPlayContainer.style.visibility = '';
|
|
2101
|
+
centerPlayContainer.style.opacity = '';
|
|
2102
|
+
centerPlayContainer.style.pointerEvents = '';
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2065
2106
|
private youtubeTimeTrackingInterval: NodeJS.Timeout | null = null;
|
|
2066
2107
|
|
|
2067
2108
|
private startYouTubeTimeTracking(): void {
|
|
@@ -8793,7 +8834,26 @@ export class WebPlayer extends BasePlayer {
|
|
|
8793
8834
|
opacity: 0 !important;
|
|
8794
8835
|
pointer-events: none !important;
|
|
8795
8836
|
}
|
|
8796
|
-
|
|
8837
|
+
|
|
8838
|
+
/* YouTube custom controls mode - show our custom controls for YouTube videos */
|
|
8839
|
+
.uvf-player-wrapper.youtube-custom-controls-mode .uvf-controls-bar {
|
|
8840
|
+
display: flex !important;
|
|
8841
|
+
visibility: visible !important;
|
|
8842
|
+
pointer-events: auto !important;
|
|
8843
|
+
}
|
|
8844
|
+
|
|
8845
|
+
.uvf-player-wrapper.youtube-custom-controls-mode .uvf-top-bar {
|
|
8846
|
+
display: flex !important;
|
|
8847
|
+
visibility: visible !important;
|
|
8848
|
+
pointer-events: auto !important;
|
|
8849
|
+
}
|
|
8850
|
+
|
|
8851
|
+
.uvf-player-wrapper.youtube-custom-controls-mode .uvf-center-play-container {
|
|
8852
|
+
display: flex !important;
|
|
8853
|
+
visibility: visible !important;
|
|
8854
|
+
pointer-events: auto !important;
|
|
8855
|
+
}
|
|
8856
|
+
|
|
8797
8857
|
/* Override any inline styles */
|
|
8798
8858
|
.controls-disabled .uvf-controls-bar,
|
|
8799
8859
|
.controls-disabled .uvf-top-bar,
|