unified-video-framework 1.4.460 → 1.4.461
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.map +1 -1
- package/packages/web/dist/WebPlayer.js +73 -3
- package/packages/web/dist/WebPlayer.js.map +1 -1
- package/packages/web/src/WebPlayer.ts +81 -3
|
@@ -2693,12 +2693,27 @@ export class WebPlayer extends BasePlayer {
|
|
|
2693
2693
|
private updateTimeTooltip(e: MouseEvent): void {
|
|
2694
2694
|
const progressBar = document.getElementById('uvf-progress-bar');
|
|
2695
2695
|
const tooltip = document.getElementById('uvf-time-tooltip');
|
|
2696
|
-
if (!progressBar || !tooltip
|
|
2696
|
+
if (!progressBar || !tooltip) return;
|
|
2697
|
+
|
|
2698
|
+
// Get duration from YouTube player or regular video
|
|
2699
|
+
let duration: number;
|
|
2700
|
+
if (this.youtubePlayer && this.youtubePlayerReady) {
|
|
2701
|
+
duration = this.youtubePlayer.getDuration();
|
|
2702
|
+
} else if (this.video) {
|
|
2703
|
+
duration = this.video.duration;
|
|
2704
|
+
} else {
|
|
2705
|
+
return; // No video source available
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
// Validate duration
|
|
2709
|
+
if (!isFinite(duration) || isNaN(duration) || duration <= 0) {
|
|
2710
|
+
return;
|
|
2711
|
+
}
|
|
2697
2712
|
|
|
2698
2713
|
const rect = progressBar.getBoundingClientRect();
|
|
2699
2714
|
const x = Math.max(0, Math.min(e.clientX - rect.left, rect.width));
|
|
2700
2715
|
const percent = (x / rect.width);
|
|
2701
|
-
const time = percent *
|
|
2716
|
+
const time = percent * duration;
|
|
2702
2717
|
|
|
2703
2718
|
// Update tooltip content and position
|
|
2704
2719
|
tooltip.textContent = this.formatTime(time);
|
|
@@ -4601,6 +4616,42 @@ export class WebPlayer extends BasePlayer {
|
|
|
4601
4616
|
this.playerWrapper.classList.add('uvf-fullscreen');
|
|
4602
4617
|
this.emit('onFullscreenChanged', true);
|
|
4603
4618
|
|
|
4619
|
+
// Force YouTube custom controls to be visible in fullscreen
|
|
4620
|
+
if (this.isYouTubeCustomControlsMode) {
|
|
4621
|
+
const controlsBar = document.getElementById('uvf-controls') as HTMLElement;
|
|
4622
|
+
const topBar = document.querySelector('.uvf-top-bar') as HTMLElement;
|
|
4623
|
+
|
|
4624
|
+
if (controlsBar) {
|
|
4625
|
+
controlsBar.style.position = 'fixed';
|
|
4626
|
+
controlsBar.style.bottom = '0';
|
|
4627
|
+
controlsBar.style.left = '0';
|
|
4628
|
+
controlsBar.style.right = '0';
|
|
4629
|
+
controlsBar.style.zIndex = '2147483645';
|
|
4630
|
+
controlsBar.style.display = 'flex';
|
|
4631
|
+
controlsBar.style.flexDirection = 'column';
|
|
4632
|
+
controlsBar.style.visibility = 'visible';
|
|
4633
|
+
controlsBar.style.opacity = '1';
|
|
4634
|
+
controlsBar.style.pointerEvents = 'auto';
|
|
4635
|
+
controlsBar.style.transform = 'translateY(0)';
|
|
4636
|
+
}
|
|
4637
|
+
|
|
4638
|
+
if (topBar) {
|
|
4639
|
+
topBar.style.position = 'fixed';
|
|
4640
|
+
topBar.style.top = '0';
|
|
4641
|
+
topBar.style.left = '0';
|
|
4642
|
+
topBar.style.right = '0';
|
|
4643
|
+
topBar.style.zIndex = '2147483645';
|
|
4644
|
+
topBar.style.display = 'flex';
|
|
4645
|
+
topBar.style.visibility = 'visible';
|
|
4646
|
+
topBar.style.opacity = '1';
|
|
4647
|
+
topBar.style.pointerEvents = 'auto';
|
|
4648
|
+
topBar.style.transform = 'translateY(0)';
|
|
4649
|
+
}
|
|
4650
|
+
|
|
4651
|
+
// Keep controls always visible in YouTube fullscreen
|
|
4652
|
+
this.playerWrapper?.classList.add('controls-visible');
|
|
4653
|
+
}
|
|
4654
|
+
|
|
4604
4655
|
// Lock to landscape orientation on mobile devices
|
|
4605
4656
|
await this.lockOrientationLandscape();
|
|
4606
4657
|
} else {
|
|
@@ -7817,7 +7868,34 @@ export class WebPlayer extends BasePlayer {
|
|
|
7817
7868
|
transform: translateY(-10px) !important;
|
|
7818
7869
|
pointer-events: none;
|
|
7819
7870
|
}
|
|
7820
|
-
|
|
7871
|
+
|
|
7872
|
+
/* YouTube custom controls in fullscreen - CRITICAL FIX for all devices */
|
|
7873
|
+
/* This rule applies regardless of device/orientation */
|
|
7874
|
+
.uvf-player-wrapper.youtube-custom-controls-mode.uvf-fullscreen .uvf-controls-bar,
|
|
7875
|
+
.uvf-player-wrapper.youtube-custom-controls-mode.uvf-fullscreen .uvf-top-bar {
|
|
7876
|
+
position: fixed !important;
|
|
7877
|
+
z-index: 2147483645 !important;
|
|
7878
|
+
visibility: visible !important;
|
|
7879
|
+
opacity: 1 !important;
|
|
7880
|
+
pointer-events: auto !important;
|
|
7881
|
+
transform: translateY(0) !important;
|
|
7882
|
+
}
|
|
7883
|
+
|
|
7884
|
+
.uvf-player-wrapper.youtube-custom-controls-mode.uvf-fullscreen .uvf-controls-bar {
|
|
7885
|
+
bottom: 0 !important;
|
|
7886
|
+
left: 0 !important;
|
|
7887
|
+
right: 0 !important;
|
|
7888
|
+
display: flex !important;
|
|
7889
|
+
flex-direction: column !important;
|
|
7890
|
+
}
|
|
7891
|
+
|
|
7892
|
+
.uvf-player-wrapper.youtube-custom-controls-mode.uvf-fullscreen .uvf-top-bar {
|
|
7893
|
+
top: 0 !important;
|
|
7894
|
+
left: 0 !important;
|
|
7895
|
+
right: 0 !important;
|
|
7896
|
+
display: flex !important;
|
|
7897
|
+
}
|
|
7898
|
+
|
|
7821
7899
|
/* Fullscreen specific styles - DESKTOP AND LANDSCAPE ONLY */
|
|
7822
7900
|
/* Mobile portrait uses Material You layout in fullscreen */
|
|
7823
7901
|
@media not all and (max-width: 767px) and (orientation: portrait) {
|