Closed yanghun0070 closed 5 months ago
Hi what error message is it?
Which platform are you facing the issue? Ios or android
Are you using real device?
Occurs on android. No error message occurs. However, if it appears as a blank screen as shown in the screenshot, a message will appear saying that there is no video when you click.
I don’t think it can be saved properly after trimming.
Is it possible for you to share me the sample video?
Also share me option you pass to showEditor
The options are simple. It seems like an Android path recognition issue.
showEditor(galleries[galleryIndex].uri, {
maxDuration: 30,
})
.then((res) => console.log("res:" + res))
.catch((e) => console.log("e:" + e));
}}
There seems to be a file format error in iOS.
onError {"message": "File is invalid", "name": "onError"}
uri: "ph://D9958F6F-AC62-431F-A08A-6A991579F189"
Okay, I'll check and get back to you soon
I tried with your video on my Device, it's working fine.
As shown in my video, I did 2 samples, with same option for showEditor as yours.
in the end of the video you can see that both samples are generated fine
Hi @yanghun0070 Can you try kill the photo app and reopen to see?
If it persists, can you run your project with your device connected using Android Studio?
Then at the time you're about to click Save, pay attention to Log Cat to see is there any suspicious when saving ?
After adding the code below, Android works normally.
public static void saveVideoToGallery(ReactApplicationContext context, String videoFilePath) throws IOException {
Log.w(TAG, "videoFilePath:" + videoFilePath);
File videoFile = new File(videoFilePath);
// Create the file if it doesn't exist
if (!videoFile.exists()) {
boolean isFileCreated = videoFile.createNewFile();
Log.w(TAG, "File Created: " + isFileCreated);
}
@maitrungduc1410 The error below occurs in iOS. Do you know what causes it?
There seems to be a file format error in iOS. onError {"message": "File is invalid", "name": "onError"}
uri: "ph://D9958F6F-AC62-431F-A08A-6A991579F189"
On ios you need to run on real device, don't you?
Btw where did you add the code for saveVideoToGallery?
@maitrungduc1410 I think it was an image library issue. I solved it by changing the ph:// path to the file path.
The added code is as follows.
File videoFile = new File(videoFilePath);
// Create the file if it doesn't exist
if (!videoFile.exists()) {
boolean isFileCreated = videoFile.createNewFile();
Log.w(TAG, "File Created: " + isFileCreated);
}
fixed in 1.0.8
After cutting the video, the video cannot be saved. The video cannot be played. An error appears saying