Choosing Audio Device

115 views
Skip to first unread message

Kieran Woodcock

unread,
Jun 6, 2022, 11:33:22 AM6/6/22
to meetecho-janus
Hi All,

Having issues with having a specific device attached to a session. Looking at DeviceTest.js:113 it passes a deviceId via the media object when using createOffer, looking in Janus.js for the createOffer method, I don't actually see this deviceId being used at all and when using the media object in my own code the deviceId seems to be ignored and the only device that is ever used is whatever is set to 'default' on the local machine so I'm not sure where I am going wrong! The deviceId I am using is the retrieved from navigator.mediaDevices.enumerateDevices(). 

Many thanks!

Lorenzo Miniero

unread,
Jun 6, 2022, 1:22:10 PM6/6/22
to meetecho-janus
In janus.js we just pass whatever you set in media.audio and media.video to the getUserMedia constraint, so if the JS code sets true, that's what we pass, while if the code sets something more complex (e.g., the deviceId the devicetest demo sets) then that is what is passed to getUserMedia. What you see labeled as "Default" is not decided by us, but by the browser, and doesn't change just because you choose a different device in the picker: it's the Default as far as the OS mixer is concerned.

L.

trunki 3

unread,
Feb 28, 2023, 2:06:30 PM2/28/23
to meetecho-janus
One question.
In Janus 0.x I need pass two values to media/video parameter in  CreateOffer  videorrom sfutest.  One  video: "hires"    and other video: object with deviceId for select the videodevice.

I have seen that the same video parameter can hold values for different uses.

Its possible to pass two video parameters in the same createOffer function or its necessari to call the createOffer twice?

Thanks,
Reply all
Reply to author
Forward
0 new messages