unified-video-framework 1.4.265 → 1.4.267

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.
@@ -290,19 +290,13 @@ export class WebPlayer extends BasePlayer {
290
290
  videoContainer.appendChild(this.video);
291
291
  videoContainer.appendChild(this.watermarkCanvas);
292
292
 
293
- // Create custom controls if enabled
294
- if (this.useCustomControls) {
295
- this.createCustomControls(videoContainer);
296
- } else {
297
- // Hide controls if disabled
298
- this.debugLog('Controls disabled - not creating custom controls UI');
299
- }
300
-
301
-
293
+ // Always create custom controls
294
+ this.createCustomControls(videoContainer);
295
+
302
296
  // Apply controls-disabled class if controls are disabled
303
297
  if (!this.useCustomControls) {
304
298
  wrapper.classList.add('controls-disabled');
305
- this.debugLog('🚫 controls-disabled class applied to player wrapper');
299
+ this.debugLog('🚫 controls-disabled class applied to player wrapper - controls will be hidden via CSS');
306
300
  }
307
301
 
308
302
  // Assemble the player
@@ -1282,30 +1276,35 @@ export class WebPlayer extends BasePlayer {
1282
1276
  * Hide custom controls when YouTube is active
1283
1277
  */
1284
1278
  private hideCustomControls(): void {
1285
- const controlsBar = document.getElementById('uvf-controls');
1286
- const topBar = document.querySelector('.uvf-top-bar');
1287
- const topGradient = document.querySelector('.uvf-top-gradient');
1288
- const controlsGradient = document.querySelector('.uvf-controls-gradient');
1289
-
1290
- if (controlsBar) {
1291
- controlsBar.style.display = 'none !important';
1292
- controlsBar.style.visibility = 'hidden';
1293
- controlsBar.style.pointerEvents = 'none';
1294
- }
1295
- if (topBar) {
1296
- (topBar as HTMLElement).style.display = 'none';
1297
- (topBar as HTMLElement).style.visibility = 'hidden';
1298
- }
1299
- if (topGradient) {
1300
- (topGradient as HTMLElement).style.display = 'none';
1301
- (topGradient as HTMLElement).style.visibility = 'hidden';
1302
- }
1303
- if (controlsGradient) {
1304
- (controlsGradient as HTMLElement).style.display = 'none';
1305
- (controlsGradient as HTMLElement).style.visibility = 'hidden';
1279
+ // Apply youtube-mode class to wrapper which hides all custom controls via CSS
1280
+ if (this.playerWrapper) {
1281
+ this.playerWrapper.classList.add('youtube-mode');
1282
+ this.debugLog('🎬 youtube-mode class applied - custom controls hidden');
1306
1283
  }
1307
1284
 
1308
- this.debugLog('🎬 Custom controls hidden for YouTube player');
1285
+ // Fallback: direct DOM manipulation if class approach doesn't work
1286
+ setTimeout(() => {
1287
+ const controlsBar = document.getElementById('uvf-controls');
1288
+ const topBar = document.querySelector('.uvf-top-bar');
1289
+ const centerPlay = document.getElementById('uvf-center-play');
1290
+
1291
+ if (controlsBar) {
1292
+ controlsBar.style.display = 'none';
1293
+ controlsBar.style.visibility = 'hidden';
1294
+ controlsBar.style.pointerEvents = 'none';
1295
+ }
1296
+ if (topBar) {
1297
+ (topBar as HTMLElement).style.display = 'none';
1298
+ (topBar as HTMLElement).style.visibility = 'hidden';
1299
+ (topBar as HTMLElement).style.pointerEvents = 'none';
1300
+ }
1301
+ if (centerPlay) {
1302
+ centerPlay.style.display = 'none';
1303
+ centerPlay.style.visibility = 'hidden';
1304
+ }
1305
+
1306
+ this.debugLog('🎬 Fallback: Direct DOM manipulation applied');
1307
+ }, 100);
1309
1308
  }
1310
1309
 
1311
1310
  private onYouTubePlayerStateChange(event: any): void {
@@ -6349,11 +6348,23 @@ export class WebPlayer extends BasePlayer {
6349
6348
  display: flex !important;
6350
6349
  }
6351
6350
 
6351
+ /* YouTube Mode - Hide all custom controls */
6352
+ .uvf-player-wrapper.youtube-mode .uvf-controls-bar,
6353
+ .uvf-player-wrapper.youtube-mode .uvf-top-bar,
6354
+ .uvf-player-wrapper.youtube-mode .uvf-top-gradient,
6355
+ .uvf-player-wrapper.youtube-mode .uvf-controls-gradient,
6356
+ .uvf-player-wrapper.youtube-mode .uvf-center-play-container {
6357
+ display: none !important;
6358
+ visibility: hidden !important;
6359
+ pointer-events: none !important;
6360
+ }
6361
+
6352
6362
  /* Hide all controls if controls prop is false */
6353
6363
  .uvf-player-wrapper.controls-disabled .uvf-controls-bar,
6354
6364
  .uvf-player-wrapper.controls-disabled .uvf-top-bar,
6355
6365
  .uvf-player-wrapper.controls-disabled .uvf-top-gradient,
6356
- .uvf-player-wrapper.controls-disabled .uvf-controls-gradient {
6366
+ .uvf-player-wrapper.controls-disabled .uvf-controls-gradient,
6367
+ .uvf-player-wrapper.controls-disabled .uvf-center-play-container {
6357
6368
  display: none !important;
6358
6369
  visibility: hidden !important;
6359
6370
  pointer-events: none !important;