我的应用包含一个UIWebView,其中包含第三方内容。这些内容有时包括html5视频。我想要一种方法,在用户通过我的应用的设置或铃声/静音开关静音时,可以将html5音频静音。
我已尝试使用所有这些方法,但均无效:
我已尝试使用所有这些方法,但均无效:
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategorySoloAmbient error:nil]];
[[MPMusicPlayerController applicationMusicPlayer] setVolume:0.0];
[[MPMusicPlayerController iPodMusicPlayer] setVolume:0.0];