From c110822b3f7dea33036405648c423552655d804c Mon Sep 17 00:00:00 2001 From: MONSX662 Date: Tue, 7 Jun 2022 08:57:31 -0400 Subject: [PATCH 1/3] updated ReactVideoView.java to fix seeking issue on android --- android/src/main/java/com/brentvatne/react/ReactVideoView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/brentvatne/react/ReactVideoView.java b/android/src/main/java/com/brentvatne/react/ReactVideoView.java index f3f5fe7b..ed71c846 100644 --- a/android/src/main/java/com/brentvatne/react/ReactVideoView.java +++ b/android/src/main/java/com/brentvatne/react/ReactVideoView.java @@ -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,3); if (isCompleted && mVideoDuration != 0 && msec < mVideoDuration) { isCompleted = false; } From 8254a1d670a9accd1395aa3d69db4a09cc4c93e7 Mon Sep 17 00:00:00 2001 From: MONSX662 Date: Tue, 7 Jun 2022 09:07:25 -0400 Subject: [PATCH 2/3] updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a5bdef7..26d7c06d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,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 From 5a949857623c67d1d8e0fd0b2cff681b66d0abb4 Mon Sep 17 00:00:00 2001 From: MONSX662 Date: Wed, 8 Jun 2022 11:52:33 -0400 Subject: [PATCH 3/3] updated parameter to use constant instead of 3 --- android/src/main/java/com/brentvatne/react/ReactVideoView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/brentvatne/react/ReactVideoView.java b/android/src/main/java/com/brentvatne/react/ReactVideoView.java index ed71c846..09285fb7 100644 --- a/android/src/main/java/com/brentvatne/react/ReactVideoView.java +++ b/android/src/main/java/com/brentvatne/react/ReactVideoView.java @@ -637,7 +637,7 @@ public class ReactVideoView extends ScalableVideoView implements public void seekTo(int msec) { if (mMediaPlayerValid) { mSeekTime = msec; - mMediaPlayer.seekTo(msec,3); + mMediaPlayer.seekTo(msec, MediaPlayer.SEEK_CLOSEST); if (isCompleted && mVideoDuration != 0 && msec < mVideoDuration) { isCompleted = false; }