how to play video again once it completed.

#1

I am using expo video component for video this works fine for the first time but once video is completed and i want to play it again the play/pause button not works is there any way to play that video again form start on press of play button ?

#2

Hi, @sobyyial.

  • U can use isLooping attribute,
     <Video isLooping  />
    
  • Or restart programally
     <Video ref={r =>  this.videoRef = r}  />
     // ...
     this.videoRef.replayAsync()
     // or
     this.videoRef.playFromPositionAsync(0)
    

Source: https://docs.expo.io/versions/v29.0.0/sdk/video, https://docs.expo.io/versions/v29.0.0/sdk/av.html

I hope I’ve helped u.

1 Like
closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.