[jitsi-dev] Change audio output device only for <audio> elements?


#1

Hello Everyone!

While working on audio output device selection feature, I've encountered a
situation with AbortError happening only when I try to setSinkId (
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId)
for <video> elements for local media streams. For <video> elements for
remote media streams everything works as expected. For <audio> elements
everything works OK for both local and remote media streams.

It turns out that such error happens only for <video> elements with GUM
video streams without audio tracks. And actually we create such video
stream here -
https://github.com/jitsi/lib-jitsi-meet/blob/master/modules/RTC/RTCUtils.js#L395.

So, am I right when I say that all audio output in
jitsi-meet/lib-jitsi-meet is done only via <audio> elements? If yes, then
can we just change audio output device by calling setSinkId only for
<audio> elements associated with audio streams and ignore all <video>
elements (both for local and remote streams)?

Thanks,
Kostia


#2

Hi Kostia,

You are right that the audio streams are attached only to <audio> elements.
I think it's ok to use setSinkId only on <audio> elements.

Regards,
Hristo.

ยทยทยท

On Sun, May 8, 2016 at 4:16 AM, Kostiantyn Tsaregradskyi < tsaregradskyi@gmail.com> wrote:

Hello Everyone!

While working on audio output device selection feature, I've encountered a
situation with AbortError happening only when I try to setSinkId (
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId)
for <video> elements for local media streams. For <video> elements for
remote media streams everything works as expected. For <audio> elements
everything works OK for both local and remote media streams.

It turns out that such error happens only for <video> elements with GUM
video streams without audio tracks. And actually we create such video
stream here -
https://github.com/jitsi/lib-jitsi-meet/blob/master/modules/RTC/RTCUtils.js#L395.

So, am I right when I say that all audio output in
jitsi-meet/lib-jitsi-meet is done only via <audio> elements? If yes, then
can we just change audio output device by calling setSinkId only for
<audio> elements associated with audio streams and ignore all <video>
elements (both for local and remote streams)?

Thanks,
Kostia

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
Regards,
Hristo.