I want to play a video using MPMoviePlayerController
but I want it to ignore the mute switch, similar to the behavior of Youtube\'s video player.
Any ideas?
For anyone in the future, I know this has been answered already, but I had an issue with playing a video in my app which caused apps like spotify, youtube etc. to stop playing it's audio, so I ending up using this:
NSError *silentSwitcherror = nil;
BOOL silentSwitchSuccess = [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:&silentSwitcherror];
if (silentSwitchSuccess)
{
//put whatever video code you are trying to play
}
else
{
//put how to handle failed instances.
}