Choosing which speaker to output audio

Viewed 497

Let's say you are building a web app and it will run on a mobile device with two speakers, loudspeaker and the phone speaker you hold on your ear while on a call.

Can one select the speaker to output the audio with HTML5 and JavaScript? We do this when on a phone call to put the call in loudspeaker or vice versa.

I have checked MDN documentation about Audio elements and MediaDevices API but could not see anything about the audio output devices in general, it is usually all about input devices.

0 Answers
Related