如何在屏幕录制swift时检查静音或取消静音
我已经使用RPSystemBroadcastPickerview进行了录制屏幕。 (broadcastExtension) 屏幕录制时,我必须知道静音/取消静音状态。 因此,请让我知道如何检查。
任何帮助将不胜感激。
I've used RPSystemBroadcastPickerView to record screen. (BroadcastExtension)
I have to know mute/unmute status while screen recording.
So please let me know how to check it.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在SampleBuffer中,您可以选择音频。
rpsampleBuffertype的其中有音频选项。
您必须检查
.audioApp
&.audiomic
。现在,将这些值打印在ProcessSmameBuffer方法中。据我所知,应该有级别的选项。尝试从元数据中提取音频水平。如果音频级别低于阈值值,则否则会静音。阈值值完全取决于您。
In sampleBuffer, you have options for audio.
where RPSampleBufferType has audio options.
You have to check both
.audioApp
&.audioMic
.Now print those values in processSampleBuffer methods. There should have level options as far as I can remember. try to extract the audio level from the metadata. If the audio level is under a threshold value then it is mute otherwise on. The threshold value is completely up to you.