This message was deleted.
# helpdesk
s
This message was deleted.
p
however it’s only supported on chromium based browsers as of now
b
Uh okay nice, I should have read it better but I assumed it was only for the mic/cam. Let me look at the implementation, I didn't see the
setSinkId
being referenced anywhere
and is there a way to retrieve the currently set
audiooutput
?
Room.html#switchActiveDevice
works like a charm
👌 1
p
As far as I am aware, there’s currently no way to retrieve the currently set
audioutput
b
@polite-kilobyte-67570 thanks for the feedback, I'll create a Feature Request on Github... Do you want me to create a PR for it or would you rather handle it yourself? (It's not super urgent for me)
p
I’ll have to check what impact the change would have in different scenarios also depending on which level calls it, so I guess I’ll take a stab at it myself. Thanks for offering!
👍 1
b
p
ah, sorry got confused with the threads, for this issue feel free to open a PR! I was thinking about the mute thing
b
okay, which of the approaches do you prefer @polite-kilobyte-67570?
p
you mean between
getActiveDevice
and
getActiveAudioDevice
?
Do you have any idea how you would want to determine
active
? would this return
undefined
if no publication of that kind was present? or the default device? 🤔
b
Hmm good question. I'd start with something like this
Copy code
getActiveAudioOutputDevice() {
    // throw exception if setSinkId isn't supported
    const deviceId = this.options.audioOutput.deviceId;
    if(deviceId)
        return deviceId;
    //else either return `undefined` here or go on to:
    //check if we have the permission to access the mic (needed to list the available output devices)
    //if not -> return undefined?
    //if yes -> list available output devices, find 'default' device and translate to the correct device ID
}
If we go for
getActiveDevice
For the Inputs, I think it should return
undefined
if we don't have any active publication
p
so for
localTracks
there is already a
getDeviceId
function that handles this. so maybe limiting it to the audioOutput would make sense
b
Here's a first draft. Let me know what you think @polite-kilobyte-67570 https://github.com/livekit/client-sdk-js/pull/500
@polite-kilobyte-67570 do you have any feedback?
p
hi @best-parrot-43500, thanks for the PR! I think this looks good, just thinking it might make sense to use the
empty string
instead of
undefined
as that seems to be the correct way for “default” device according to the spec: https://w3c.github.io/mediacapture-output/#attributes
b
I like that
🙌 1