Reputation: 1584
I'm using AVPlayer to play a video (open to alternative players). My videos don't have sound. When the video starts, if the IOS device is playing music/audio of some sort, the music/audio pauses even though the video has no sound.
Is there any way to continue playing music while playing a silent movie?
Upvotes: 3
Views: 1093
Reputation: 2699
Try preparing the audio session before starting playback:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
[[AVAudioSession sharedInstance] setActive:NO error:nil];
//... create & configure AVPlayer and start playback
Upvotes: 5