You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We set repeat to false and showOnEnd to true. We expect the video to stop when it finishes playing, but the video loops forever.
I believe the issue is in this function. The logic to pause the video and show controls shouldn't be inside the if statement. When video ends, from what I observed, the currentTime is always greater than or equal to the duration.
const_onEnd=()=>{if(currentTime<duration){// <----- this is always false. setCurrentTime(duration);setPaused(!props.repeat);if(showOnEnd){setShowControls(!props.repeat);}}if(typeofonEnd==='function'){onEnd();}};
The text was updated successfully, but these errors were encountered:
We set
repeat
to false andshowOnEnd
to true. We expect the video to stop when it finishes playing, but the video loops forever.I believe the issue is in this function. The logic to pause the video and show controls shouldn't be inside the if statement. When video ends, from what I observed, the
currentTime
is always greater than or equal to theduration
.The text was updated successfully, but these errors were encountered: