Can I disable MPMoviePlayerController?

In my iPhone application, I want to mute and unmute the MPMoviePlayerController sound. I have searched a lot, but I cannot succeed. Can I turn off the sound in the MPMoviePlayer controller? Please help me. Thanks in advance.

+4
source share
2 answers
[[MPMusicPlayerController applicationMusicPlayer] setVolume:0]; 

This line will mute (hopefully) .. :)

+2
source

Use this to mute.

 NSError *error; if ( ![[AVAudioSession sharedInstance] setActive:NO error:&error] ) { NSLog(@"Error encountered: %@", [error localizedDescription]); } 

You will need to enable the AVFoundation structure.

+2
source

All Articles