AVPlayer Volume Control
问题 I want to create a button that mutes the audio from an AVPlayer. Why can´t I use .volume with AVPlayer, only with AVAudioPlayer? Is there another way to change the volume? e.g music.volume = 0.0; Thanks for your answers. 回答1: Starting in iOS 7, simply call: myAvPlayer.volume = 0; Otherwise, you'll have to use the annoying setAudioMix solution. I'm detecting support for this in my app as follows: if ([mPlayer respondsToSelector:@selector(setVolume:)]) { mPlayer.volume = 0.0; } else { NSArray