title: Play sound when iPhone sound switch is on silent mode in xamarin.iOS
body: <p>I want to play video with full sound, even i have the sound switch(positioned above volume buttons) set to silent mode. <strong><em>What i did is working on iOS 7.x and 8.1.x but doesn't work on 8.2.</em></strong> It's quite weird, not really sure. How to go about it. Any sample code will be appreciated.</p>
  
  <p><strong>I don't want to change to AVPlayer,at this stage, as i am almost ready for release</strong></p>
  
  <p>Here's what i have already tried and works in 7.x and 8.1.x</p>
  
  <pre><code>//I declare a class level variable
  MPMusicPlayerController VolumeRocker;
  
  //initialize it
  VolumeRocker =  MPMusicPlayerController.ApplicationMusicPlayer;
  
  //Use it. I set this inside the click even of button
  //which i use to start playback of video
  
  VolumeRocker.Volume = 1f;
  </code></pre>
  
  <p>Am i missing something ? This works in following scenarios in 7.x and 8.1.x,(but doesn't work on iOS 8.2, not sure abt 8.3)</p>
  
  <p>1) I switch to silent mode and start playing the video. I get to see the volume popup and i can hear the sound</p>
  
  <p>2) I set the volume to zero with sound switch set to ringer mode, i play the video , i get the volume popup. I can hear the sound, then i switch the sound mode to silent using the switch, i can still hear the sound. <strong><em>Even if i keep toggling the modes using the switch, it doesn't affect the volume of the video(which is what i need).</em></strong></p>