Skip to content

Commit bdf143e

Browse files
committed
show arrows in VOLUME_ONLY case
1 parent 4e0619a commit bdf143e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/components/VideoPlayer/BaseVideoPlayer.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,11 @@ function BaseVideoPlayer({
155155
}, [isPlaying, debouncedHideControl, controlStatusState, isPopoverVisible, canUseTouchScreen]);
156156

157157
useEffect(() => {
158-
if (!onTap) {
158+
if (!onTap || !controlStatusState) {
159159
return;
160160
}
161-
if (controlStatusState === CONST.VIDEO_PLAYER.CONTROLS_STATUS.SHOW) {
162-
onTap(true);
163-
} else if (controlStatusState === CONST.VIDEO_PLAYER.CONTROLS_STATUS.HIDE) {
164-
onTap(false);
165-
}
161+
const shouldShowArrows = controlStatusState === CONST.VIDEO_PLAYER.CONTROLS_STATUS.SHOW || controlStatusState === CONST.VIDEO_PLAYER.CONTROLS_STATUS.VOLUME_ONLY;
162+
onTap(shouldShowArrows);
166163
}, [controlStatusState, onTap]);
167164

168165
const stopWheelPropagation = useCallback((ev: WheelEvent) => ev.stopPropagation(), []);

0 commit comments

Comments
 (0)