title: Stop Audio before Playing Video file
body: <p>I have two view Controllers, one plays audio files and other plays video files. I am playing audio file in background and it continues to play even if I switch to Video view Controller but when I tap on a video link, audio should stop but it is not stoping.</p>
  
  <p>For audio player I am using <code>[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
          [[AVAudioSession sharedInstance] setActive: YES error: nil];</code>
  How can I stop audio before playing video? Is there any way to check in iPhone that a background music is playing?</p>
  
  <p>Any help will be appreciated.</p>