But is there any way in which I can get didFinishPickingMediaWithInfo called inside the videoHelper only, so that I will not have to expose any other functions or delegates to the ViewController.
That was an AWESOME tutorial! Gave me exactly the code I needed. Thank you!
One thing I want to do is save the location of videos the user records (can’t work out where that info is in your code and how to access it) so that I can write some code where the app itself can call the videos up and edit them into a cool video for the user.
Yeah, one way is to make videoHelper a singleton. Then each VC can grab a shared instance of it and set it to the delegate of mediaUI. But you will still need to pass the VC to videoHelper when you want the picker to appear that way you have a UI context to view it in.
Hi! Please can you help. I want to be able to edit with an audio and a video file I placed in the assets of my project. I can reach it as a NSDataAsset, but I can’t edit with it unless I convert it into an AVAsset? Is that right?
How does one do that? Is that the only way?
Thanking you in advance,
Donovan
Second, I’d like to why the sound of my two videos is missing in the finale merge and what is the right way to load my sound but with keeping the sound of my video ? Because I d’ like to achieve a kind of video where people can introduce themselves with a little sound behind their video.
edit : I also noticed a crash in the console about an animation executed in the background thread when merge is done :
[Animation] +[UIView setAnimationsEnabled:] being called from a background thread. Performing any operation from a background thread on UIView or a subclass is not supported and may result in unexpected and insidious behavior
this is because in MergeVideoViewController.swift → func exportDidFinish(_ session: AVAssetExportSession) at saveVideoToPhotos you present an alertController in a background thread