Improve Mouse detection in video player #191

This commit is contained in:
Prayag Prajapati committed 2023-10-04 18:54:51 +05:30
1 parent f238e367ba
commit 92bd2d5b0e
1 file changed
+16 -9
+16 -9
View File
@@ -462,12 +462,13 @@ export const VideoPlayer = () => {
const [appFullscreen, setAppFullScreen] = useState(false);
useEffect(() => {
let timeout = null;
if (showControls) {
window.clearTimeout(timeout);
timeout = setTimeout(() => {
let timeout = setTimeout(() => {
setShowControls(false);
}, 5000);
return () => {
clearTimeout(timeout);
};
}
}, [showControls]);
@@ -716,8 +717,10 @@ export const VideoPlayer = () => {
<IconButton
onClick={handlePlayPrevEpisode}
disabled={
episodes.isLoading ||
currentEpisodeIndex == 0
seriesId
? episodes.isLoading ||
currentEpisodeIndex == 0
: true
}
>
<MdiSkipPrevious />
@@ -750,9 +753,13 @@ export const VideoPlayer = () => {
<IconButton
onClick={handlePlayNextEpisode}
disabled={
episodes.isLoading ||
episodes.data?.TotalRecordCount ==
currentEpisodeIndex + 1
seriesId
? episodes.isLoading ||
episodes.data
?.TotalRecordCount ==
currentEpisodeIndex +
1
: true
}
>
<MdiSkipNext />
@@ -780,7 +787,7 @@ export const VideoPlayer = () => {
role: "listbox",
}}
anchorOrigin={{
vertical: "bottom",
vertical: "top",
horizontal: "center",
}}
transformOrigin={{