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
- updateCurrentTime(true);
526
- mTimingHandler.postDelayed(this, TIMING_UPDATE_INTERVAL);
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);
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ </Workspace>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-video-trim",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "Video trimmer for your React Native app",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",