[英]Background audio recording
I wish to record audio when my app is not active. 我希望在我的应用未激活时录制音频。 Currently
AVAudioRecorder
works great for active
mode of app. 目前,
AVAudioRecorder
非常适合应用程序的active
模式。 But inactive
mode is unpredictable. 但是
inactive
模式是不可预测的。
AVAudioRecorder
can be used for inactive
also? AVAudioRecorder
可以用于inactive
吗? Any other class which could serve the purpose? 还有其他可以达到目的的课程吗?
From project navigation
select your app - > capabilities
- > turn on background modes
-> check Audio, AirPlay, and Picture in Picture
从
project navigation
选择您的应用-> capabilities
-> turn on background modes
->检查Audio, AirPlay, and Picture in Picture
This setup will add required background modes
key in your info.plist
此设置将在
info.plist
添加required background modes
键
After making this setup you can record audio in background by AVAudioRecorder
. 进行此设置后,您可以通过
AVAudioRecorder
在后台录制音频。
You can refer screenshot below, 您可以参考下面的屏幕截图,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.