Web:Common:Components:MediaViewer:Sub-Components:Viewer Fixed the visible toolbar of the player
This commit is contained in:
parent
bdd84aeacf
commit
1045f7d141
@ -65,7 +65,7 @@ function Viewer(props: ViewerProps) {
|
||||
const resetToolbarVisibleTimer = () => {
|
||||
if (panelToolbarRef.current) return;
|
||||
|
||||
if (panelVisibleRef.current) {
|
||||
if (panelVisibleRef.current && panelVisible) {
|
||||
clearTimeout(timerIDRef.current);
|
||||
timerIDRef.current = setTimeout(() => {
|
||||
panelVisibleRef.current = false;
|
||||
@ -73,6 +73,7 @@ function Viewer(props: ViewerProps) {
|
||||
}, 2500);
|
||||
} else {
|
||||
setPanelVisible(true);
|
||||
clearTimeout(timerIDRef.current);
|
||||
panelVisibleRef.current = true;
|
||||
|
||||
timerIDRef.current = setTimeout(() => {
|
||||
|
@ -406,10 +406,9 @@ function ViewerPlayer({
|
||||
togglePlay();
|
||||
};
|
||||
|
||||
const handleVideoEnded = (
|
||||
event: React.SyntheticEvent<HTMLVideoElement, Event>
|
||||
) => {
|
||||
const handleVideoEnded = () => {
|
||||
setIsPlaying(false);
|
||||
if (isMobile) removePanelVisibleTimeout();
|
||||
};
|
||||
|
||||
const handleVolumeChange = useCallback(
|
||||
|
Loading…
Reference in New Issue
Block a user