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

Suggestion: Output File Type as Input #73

Open
raggedy-coder opened this issue Jul 10, 2020 · 0 comments
Open

Suggestion: Output File Type as Input #73

raggedy-coder opened this issue Jul 10, 2020 · 0 comments

Comments

@raggedy-coder
Copy link

raggedy-coder commented Jul 10, 2020

Great library! I recently came across this problem where the video generated wasn't viewable on Safari so it got me thinking if if's feasible to add another parameter in the mix for situations like these. I didn't test the proposed code, but the idea is there.

Current:
open func mergeVideoWithAudio(videoUrl: URL, audioUrl: URL, outcome: @escaping (Result<URL, Error>) -> Void) {

"\(VideoGenerator.fileName).m4v"

exportSession.outputFileType = AVFileType.mp4

Proposed:
open func mergeVideoWithAudio(videoUrl: URL, audioUrl: URL, outputFileType: AVFileType = .m4v, outcome: @escaping (Result<URL, Error>) -> Void) {

"\(VideoGenerator.fileName)."\(outputFileType.rawValue)"

exportSession.outputFileType = outputFileType

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

1 participant