unified-video-framework 1.4.453 → 1.4.454

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.
@@ -616,6 +616,9 @@ export class WebPlayer extends BasePlayer {
616
616
  // Apply controls-disabled class if controls={false}
617
617
  if (!this.useCustomControls) {
618
618
  wrapper.classList.add('controls-disabled');
619
+ } else {
620
+ // Make controls visible by default when controls={true}
621
+ wrapper.classList.add('controls-visible');
619
622
  }
620
623
 
621
624
  // Assemble the player
@@ -1773,13 +1776,16 @@ export class WebPlayer extends BasePlayer {
1773
1776
  `;
1774
1777
  }
1775
1778
 
1776
- // Always add mousemove listener for hover detection
1779
+ // Add mouse event listeners for control visibility
1777
1780
  overlay.addEventListener('mouseenter', () => {
1778
1781
  this.playerWrapper?.classList.add('controls-visible');
1779
1782
  });
1780
1783
 
1781
1784
  overlay.addEventListener('mouseleave', () => {
1782
- this.playerWrapper?.classList.remove('controls-visible');
1785
+ // Only hide controls if video is playing, otherwise keep them visible
1786
+ if (this.state.isPlaying) {
1787
+ this.scheduleHideControls();
1788
+ }
1783
1789
  });
1784
1790
 
1785
1791
  container.appendChild(overlay);
@@ -1787,10 +1793,14 @@ export class WebPlayer extends BasePlayer {
1787
1793
  // Also add listeners to the container for fallback hover detection
1788
1794
  container.addEventListener('mouseenter', () => {
1789
1795
  this.playerWrapper?.classList.add('controls-visible');
1796
+ if (this.hideControlsTimeout) clearTimeout(this.hideControlsTimeout);
1790
1797
  });
1791
1798
 
1792
1799
  container.addEventListener('mouseleave', () => {
1793
- this.playerWrapper?.classList.remove('controls-visible');
1800
+ // Only hide controls if video is playing, otherwise keep them visible
1801
+ if (this.state.isPlaying) {
1802
+ this.scheduleHideControls();
1803
+ }
1794
1804
  });
1795
1805
  }
1796
1806