Merge pull request #2712 from monahans/master

updated ReactVideoView.java to fix seeking issue on android
This commit is contained in:
freeboub 2022-06-09 19:06:10 +02:00 committed by GitHub
commit d3708c7c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@
- Update basic example applications (React Native 0.63.4) [#2527](https://github.com/react-native-video/react-native-video/pull/2527)
- Fix volume reset issue in exoPlayer [#2371](https://github.com/react-native-video/react-native-video/pull/2371)
- Change WindowsTargetPlatformVersion to 10.0 [#2706](https://github.com/react-native-video/react-native-video/pull/2706)
- Fixed Android seeking bug [#2712](https://github.com/react-native-video/react-native-video/pull/2712)
### Version 5.2.0

View File

@ -637,7 +637,7 @@ public class ReactVideoView extends ScalableVideoView implements
public void seekTo(int msec) {
if (mMediaPlayerValid) {
mSeekTime = msec;
super.seekTo(msec);
mMediaPlayer.seekTo(msec, MediaPlayer.SEEK_CLOSEST);
if (isCompleted && mVideoDuration != 0 && msec < mVideoDuration) {
isCompleted = false;
}