在录制过程中按下主页按钮时,红色横幅突然消失 [英] Red banner comes and disappear suddenly when press home button during recording on going

查看:97
本文介绍了在录制过程中按下主页按钮时,红色横幅突然消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在录制过程中面临一个问题,如果我按下主页按钮,我注意到红色横幅突然消失,AVAudioRecorder无法正常创建文件。
请帮助这是什么?
是否与网络连接相关?

I face one issue during recording is on going, if i press home button, i noticed " Red banner comes and disappear suddenly" and AVAudioRecorder can not create file properly. Please help what is this ?. is it something like network connectivity related ?

请帮忙。

推荐答案

红色横幅表示您的应用程序当前正在使用麦克风硬件。它由对主录制上下文有主动控制的应用程序显示,并在应用程序释放它在录制上下文中时(例如按下主页按钮时)隐藏。因为您无法预测何时按下主页按钮以退出应用程序,您将需要支持后台录制以保留横幅(然后在一两秒之后优雅地释放您的上下文以使状态栏动画回黑色),或以某种方式在申请结束前终止您的上下文。

The "red banner" indicates that your application is currently using the microphone hardware. It is shown by applications that have active control over the main recording context, and hides when your application releases it's hold on the recording context (such as when the home button is pressed). Because you cannot predict when the home button will be pressed to exit your application, you will need to either support background recording to persist the banner (then gracefully release your context after a second or two to have the status bar animate back to black), or somehow terminate your context before the application closes.

这篇关于在录制过程中按下主页按钮时,红色横幅突然消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆