I looked in several forums and they all couldn\'t deliver a satisfying answer.
My wish is to be able to play and record video while playing music at the background.
When you override the seesion category with *kAudioSessionProperty_OverrideCategoryMixWithOthers* it uses the smaller speaker on the top side of the device (besides the frontend camera). To use the regular speaker as the output device, you should instead redirect the output route of your audio session. The following is the code snippet of achieving this
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty (
kAudioSessionProperty_OverrideAudioRoute,
sizeof (audioRouteOverride),
&audioRouteOverride
);
Replace this code with your above and it will work. You can further refer Redirect Output Audio on apple developer portal.