React js sdk, need help about screensharing and audio device

Hi there,
I need help to make screensharing and change ring output device to work on my react wazo phone client.
to connect the phone, i use:
await Wazo.Phone.connect({ audio: true, video: true })

when i try:
const screenShareStream = await Wazo.Phone.startScreenSharing({audio: true, video: true})
i get a mediaStream, but nothing ask me the famous getDisplayMedia to get the content i want to share
and when i do:
const stream = await navigator.mediaDevices.getDisplayMedia({ audio: true, video: true })
i don’t know what to do with it

And about the ring device, i try:
const ring = await is the deviceId
I can see it in, but the ring sound still in the previous/default output audio device



ScreenSharing is working now, using sessionDescriptionHandler.peerConnection to push the new videoTrack.

The documentation of the Wazo.Phone.startScreenSharing() doesn’t help at all.

I’ll look for audio device later.


Here is something weird,

i use some Select to choose the deviceId

const handleRingChange = (e) => {

  const handleAudioOutputChange = (e) => {

for the test, i change the audioDevice and ringDevice the same way,
have both the same deviceId

the output audio is working, i can change it during the call, just works perfectly !
but the audioRingDevice stil in the default audio device despite the value of

looking deeper, i see no
but i see

So how can my WebRtcClient can ring on speaker and have the conversation on headphones ?


maybe got it