Speakers

To playback recordings through iPhone speakers, you can either select Speaker in airplay menu: 

or rotate the phone 180 degrees to hold it with speakers up. 
Notice navigation bar tint changes to magenta.

Now playback will be routed to speakers unless headphones are plugged in.
Note: rotation might be locked on the iOS device

iPad: Understanding the side switch

http://support.apple.com/kb/HT4085

iPhone X user please note that it does not support upsidedown orientation.

Feedback and Knowledge Base