react-native-video-trim 2.2.7 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -522,8 +522,15 @@ public class VideoTrimmerView extends FrameLayout implements IVideoTrimmerView {
|
|
|
522
522
|
@Override
|
|
523
523
|
public void run() {
|
|
524
524
|
try {
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
int currentPosition = mediaPlayer.getCurrentPosition();
|
|
526
|
+
|
|
527
|
+
if (currentPosition >= endTime) {
|
|
528
|
+
onMediaPause();
|
|
529
|
+
seekTo(endTime, true); // Ensure exact end time display
|
|
530
|
+
} else {
|
|
531
|
+
updateCurrentTime(true);
|
|
532
|
+
mTimingHandler.postDelayed(this, TIMING_UPDATE_INTERVAL);
|
|
533
|
+
}
|
|
527
534
|
} catch (IllegalStateException e) {
|
|
528
535
|
e.printStackTrace();
|
|
529
536
|
mTimingHandler.removeCallbacks(mTimingRunnable);
|