AVAssetExportSession working in background

痴心易碎 提交于 2019-12-12 23:42:28

问题


I tried to manage AVAssetExportSession working when app in background. I have iOS 6 device and testing it there. So i m making audio mix and trying to export audio. When app is in foreground i m making all OK, but if i m going to background i m getting AVAssetExportSessionStatusFailed and have to create it from beginning. So, is it ever possible to make audio mixing work in background?

I m trying to make [exportSession exportAsynchronouslyWithCompletionHandler: ] in NSOperationQueue or getting global queue - but the results is the same - it stops when app going in background and sending failed afterwards.

Does anyone have an example with AVAssetExportSession working in background?


回答1:


I have found a solution which works for audio, I have not tried video

If you update your "Background Modes" setting in the capabilities of the project to include Audio. It will allow the export.

This is intended for playing music in the background.

---- Edit ---

This also works for video



来源:https://stackoverflow.com/questions/24123907/avassetexportsession-working-in-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!