Enhance cursor visibility in video overlay during inactivity
This commit is contained in:
parent
e880a93dcb
commit
d2c1384a92
@ -158,9 +158,11 @@
|
||||
let inactivityTimer;
|
||||
function showButtonAndResetTimer() {
|
||||
backButton.removeClass('button-hidden');
|
||||
overlayContainer.css('cursor', 'default'); // Show cursor
|
||||
clearTimeout(inactivityTimer);
|
||||
inactivityTimer = setTimeout(function() {
|
||||
backButton.addClass('button-hidden');
|
||||
overlayContainer.css('cursor', 'none'); // Hide cursor
|
||||
}, 3000); // 3 seconds
|
||||
}
|
||||
|
||||
@ -186,6 +188,9 @@
|
||||
videoElement.pause();
|
||||
}
|
||||
clearTimeout(inactivityTimer); // Clear inactivity timer
|
||||
if (overlayContainer) { // Ensure overlayContainer exists before trying to modify it
|
||||
overlayContainer.css('cursor', 'default'); // Always reset cursor on exit
|
||||
}
|
||||
// Exit fullscreen if active
|
||||
if (document.fullscreenElement || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement) {
|
||||
if (document.exitFullscreen) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user