Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

includeAudio & sharing intent issue (iOS) #80

Open
wildsurfer opened this issue Dec 17, 2020 · 4 comments
Open

includeAudio & sharing intent issue (iOS) #80

wildsurfer opened this issue Dec 17, 2020 · 4 comments

Comments

@wildsurfer
Copy link

This issue is related to iOS only.

My app is taking file from sharing intent (example) and compressing it using video_compress library. If includeAudio=true everything works as expected. But when it is false compression fails with error:

flutter: Invalid argument(s) (path): Must not be null

During debugging in Xcode I have found that json object in line below has only one field "isCancel":

And this is happening because below line hits return:

guard let track = avController.getTrack(asset) else { return [:] }

@Abacaxi-Nelson
Copy link

Same here @wildsurfer no matter what is includeAudio
Do you have a solution ?

thx

@wildsurfer
Copy link
Author

No solution yet. Unfortunately :(

@Abacaxi-Nelson
Copy link

Abacaxi-Nelson commented Jan 8, 2021

After digging,

avController.getTrack

is called twice, and the second call pointing to the compressing video failed

let status = asset.statusOfValue(forKey: "tracks", error: &error)
if (status == .loaded) {
track = asset.tracks(withMediaType: AVMediaType.video).first
}

error Optional(-1100) Optional("The requested URL was not found on this server.")
error: Optional(Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x1c0a56da0 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}})

Status = AVKeyValueStatus.failed so track is null...

@hyobbb
Copy link

hyobbb commented Jan 20, 2021

In my case, It works fine on Android but only happens in IOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants