如何静音在AVPlayer中播放的视频? [英] How to mute video played in AVPlayer?
本文介绍了如何静音在AVPlayer中播放的视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在AVPlayer中播放视频,现在我需要在播放音频时单独使其静音.请提出在目标C中的操作方法.
Im playing a video in AVPlayer, and now I need to mute the audio alone while playing it. Please suggest how to do in objective C.
谢谢, 苏雷什(Suresh)
Thanks, Suresh
推荐答案
从iOS7开始,您可以将AVPlayer isMuted
属性设置为true
.
Since iOS7 you can set the AVPlayer isMuted
property to true
.
在目标C中,该属性称为muted
.
In Objective C the property is called muted
.
参考: https://developer.apple.com/documentation/avfoundation/avplayer/1387544-被扭曲
这篇关于如何静音在AVPlayer中播放的视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文