react-native-video-trim 2.2.9 → 2.2.10

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.
package/README.md CHANGED
@@ -477,11 +477,18 @@ buildscript {
477
477
  ```
478
478
 
479
479
  # Naming conflict with `ffmpeg-kit-react-native`
480
- This issue is due to this package and `ffmpeg-kit-react-native` share FFMPEG Kit under the hood. To fix it we need to synchronize the FFMPEG Kit version of the 2 packages.
480
+ This issue is due to this package and `ffmpeg-kit-react-native` have same ffmpegkit class name under the hood:
481
481
 
482
- First find out exactly FFMPEG Kit version that `ffmpeg-kit-react-native` is using. By default (if you don't change), the ffmpeg package is `https` ([check here](https://github.com/arthenica/ffmpeg-kit/blob/main/react-native/ffmpeg-kit-react-native.podspec#L19)) and version is `version` in [package.json](https://github.com/arthenica/ffmpeg-kit/blob/main/react-native/package.json#L3)
482
+ <img src="images/error_conflict_name.png"/>
483
483
 
484
- When you know the package name + version, simply follow the section [Customize FFMPEG version](#customize-ffmpeg-version) in this doc
484
+ To fix it we need to synchronize the FFMPEG Kit version of the 2 packages. For example: as shown in the image above, `ffmpeg-kit-react-native` uses `https`, version `6.0`, hence we need to run this:
485
+ ```
486
+ FFMPEGKIT_PACKAGE=https FFMPEG_KIT_PACKAGE_VERSION=6.0 pod install
487
+ ```
488
+
489
+ Another way to find out exactly FFMPEG Kit version that `ffmpeg-kit-react-native` using is to ([check here for package name](https://github.com/arthenica/ffmpeg-kit/blob/main/react-native/ffmpeg-kit-react-native.podspec#L19)) and package version is `version` in [package.json](https://github.com/arthenica/ffmpeg-kit/blob/main/react-native/package.json#L3)
490
+
491
+ When you know the package name + version, simply run `pod install` with `FFMPEGKIT_PACKAGE` and `FFMPEG_KIT_PACKAGE_VERSION` like above
485
492
 
486
493
  # Thanks
487
494
  - Android part is created by modified + fix bugs from: https://github.com/iknow4/Android-Video-Trimmer
@@ -640,6 +640,7 @@ public class VideoTrimmerView extends FrameLayout implements IVideoTrimmerView {
640
640
 
641
641
  private void setHandleTouchListener(View handle, boolean isLeading) {
642
642
  handle.setOnTouchListener((view, event) -> {
643
+ boolean draggingDisabled = mDuration < mMinDuration; // if the video is shorter than the minimum duration, disable dragging
643
644
  switch (event.getAction()) {
644
645
  case MotionEvent.ACTION_DOWN:
645
646
  currentSelectedhandle = handle;
@@ -650,6 +651,10 @@ public class VideoTrimmerView extends FrameLayout implements IVideoTrimmerView {
650
651
  playHapticFeedback(true);
651
652
  break;
652
653
  case MotionEvent.ACTION_MOVE:
654
+ if (draggingDisabled) {
655
+ return false;
656
+ }
657
+
653
658
  boolean didClamp = false;
654
659
  float newX = event.getRawX() - ((float) view.getWidth() / 2);
655
660
  if (isLeading) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-video-trim",
3
- "version": "2.2.9",
3
+ "version": "2.2.10",
4
4
  "description": "Video trimmer for your React Native app",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",