Video Chat IOS to IOS loudspeaker issue

HI we have an issue when the video chat is from one IOS device to another
The first IOS device that enters the room does not get the audio trough the loudspeaker, so the audio is very low from the other IOS device, in the other end audio goes out trough the loudspeaker. then trying to leave the room with the IOS device with low audio and entering again the low audio changes to the other participants IOS device.

Reproduce with 2 IOS devices using the video chat here https://demo.flashphoner.com/admin/demo.html#
 
Another finding probably related to the same issue is when using the media device example at https://demo.flashphoner.com/admin/demo.html#
1 loading the "media device" page with an iphone IOS 13.4 it asks for the microphone
2 connect and publish it ask for camera and microphone
3 play and audio is in loudspeaker
4 stop play
5 start play and audio is in the internal speaker
6 mute and unmute and audio is back in loudspeaker
 

Max

Administrator
Staff member
Good day.
Unfortunately, we cannot fix Webkit bug. You can switch audio output to internal speaker like Media Devices example does:
1. Collect audio output devices
Code:
    Flashphoner.getMediaDevices(null, true, MEDIA_DEVICE_KIND.OUTPUT).then(function (list) {
        list.audio.forEach(function (device) {
            var audio = document.getElementById("audioOutput");
            var deviceInList = false;
            for (var i = 0; i < audio.options.length; i++) {
                if (audio.options[i].value === device.id) {
                    deviceInList = true;
                    break;
                }
            }
            if (!deviceInList) {
                var option = document.createElement("option");
                option.text = device.label || device.id;
                option.value = device.id;
                audio.appendChild(option);
            }
        });
    }).catch(function (error) {
        console.error(error);
        $('#audioOutputForm').remove();
    });
2. While stream is playing, set audio output device to internal speaker
Code:
    $("#audioOutput").change(function() {
        if (previewStream) {
            previewStream.setAudioOutputId($(this).val());
        }
    });
 
HI Max

Thank you for the quick reply

It fails when on the media device example, so there´s no output selector, chrome on android has the selector
Flashphoner.getMediaDevices(null, true, MEDIA_DEVICE_KIND.OUTPUT

And hits
console.error(error); $('#audioOutputForm').remove();
 

Max

Administrator
Staff member
Good day.
We investigated this case.
Yes, this is Safari browser issue on all of the platforms (iOS and MacOS): it always returns input devices list only, no output devices. So audio output cannot be switched in Safari.
 
Top