title: Force audio to go through speakers with MPMoviePlayerController
body: <p>I have been messing with this for the past couple hours and i still can't figure out a solution. I am creating an app that uses twilio two connect to users. I am able to force that output audio to speakers with:</p>
  
  <pre><code>UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
  AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute,sizeof (audioRouteOverride),&amp;audioRouteOverride);
  </code></pre>
  
  <p>The problem is when I use MPMoviePlayerController to play a stream from the web. It takes over the audio session and forces it back through the headset again. I am still able to talk to the user but I can only use the headset(phone) speaker to hear them. I ahve tried forcing back to the speakers many different ways and nothing seems to work and apparently the ability  to prevent MPMoviePlayerController from using the AudioSession has been deprecated. Any ideas on how to solve this? My code is here:</p>
  
  <pre><code>UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord;
  AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &amp;sessionCategory);
  UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
  AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute,sizeof (audioRouteOverride),&amp;audioRouteOverride);
  _streamPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:fullURL]];
  
  
  [[_streamPlayer view] setFrame: [self.view bounds]];
  
  [self.view addSubview: [_streamPlayer view]];
  
  
  [_streamPlayer play];
  </code></pre>
  
  <p>Thanks in advance for any help.</p>