From 0e445016c87a6bfe77264595cf5b65b4ccbf315b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Costa?= Date: Wed, 30 Aug 2023 11:16:32 -0300 Subject: [PATCH] fix: repeat not working --- src/VideoPlayer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VideoPlayer.tsx b/src/VideoPlayer.tsx index faf4bb8..19afde7 100644 --- a/src/VideoPlayer.tsx +++ b/src/VideoPlayer.tsx @@ -128,10 +128,10 @@ export const VideoPlayer = (props: VideoPlayerProps) => { const _onEnd = () => { if (currentTime < duration) { setCurrentTime(duration); - setPaused(true); + setPaused(!props.repeat); if (showOnEnd) { - setShowControls(true); + setShowControls(!props.repeat); } }