razorRun / react-native-vlc-media-player

React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
https://roshan.digital/
MIT License
353 stars 183 forks source link

Can't seek on android #175

Closed cheeka13 closed 1 year ago

cheeka13 commented 1 year ago

Guys I can't perform seeking or fast forwarding on Android. Video always restarts after pressing seek button. Did check the log cat but have no idea what's going on.

cheeka13 commented 1 year ago

got it, in android/src/main/java/com/yuanzhou/vlc/vlcplayer/ReactVlcPlayerViewManager.java change line 120 from videoView.seekTo(Math.round(seek * 1000f)) to videoView.setPosition(seek)

KevinNguyen263 commented 10 months ago

Thanks, i'm facing the same issue.

R4tch3t commented 7 months ago

or in JS

if(Platform.OS==="android"){
   videoRef.current.seek(seekInMilis/1000); // or seekInSeconds
}