Is there a way - not from react-native or 'apps', but from Safari on iOS, to programmatically (from Javascript - reactJs) control whether caller audio in a webRtc call can be sent to the top speaker, not the bottom speaker for a non-video call?
On desktops, we iterate the devices using navigated.mediaDevices.enumerateDevices - and then set the HTML audio element like this:
this.activeSoundEffect = new Audio("audio/sound.wav");
this.activeSoundEffect.loop = true;
this.activeSoundEffect.load();
const audioEl = <HTMLAudioElement & { setSinkId (deviceId: string): void }> this.activeSoundEffect;
if (deviceId) {
alert('about to set sinkId (to play ringingtone): ' + deviceId);
audioElement.setSinkId(deviceId);
On iOS - there is never a device ID however, because no audio outputs are returned from enumerateDevices.