What I am trying to achieve: 1. When initiating a call via webrtc, the default speaker should be the ear speaker not the loudspeaker 2. I need a way to switch between loud and ear speakers while on call(I guess there is an event?)
What I tried so far:
1. Calling navigator.mediaDevices.enumerateDevices()
to see what "audiooutput" devices I will get.
It shows different devices on different devices(expected result). The strange thing is that on Mobile IOS I get no such devices, although I get voice from the loud speaker... On android devices I get only one "audiooutput"
2. Made a research for possible solutions but couldn`t find any...
Any help will be much appreciated!!! Thanks in advance!