Repository navigation
Disable automatic device switching if user doesn't follow the system default device #694
Description
Activity
To clarify a bit more, we should only switch devices automatically when user asks to use the system default device. Using the system default means that the users pass a
NULLcubeb_devidincubeb_stream_init.
Line 524 in 5a2a20c
@param input_device Device for the input side of the stream. If NULL the
Line 531 in 5a2a20c
@param output_device Device for the output side of the stream. If NULL the If users pass a non-
NULLcubeb_devid, then it's not the default device, even if the device happens to be the current system default device. User must passNULLexplicitly to follow the system default.In brief, switching device or not can be summarized into the following situations:
For input stream:
device unplug input device unplug output device default input change default output change default Yes N/A Yes N/A non-default No N/A No N/A For output stream:
device unplug input device unplug output device default input change default output change default N/A Yes N/A Yes non-default N/A No N/A No For duplex stream:
device unplug input device unplug output device default input change default output change default input, default output Yes Yes Yes Yes default input, non-default output Yes No Yes No non-default input, default output No Yes No Yes non-default input, non-default output No No No No Reacted by Matthew Gregan and Paul AdenotI think it's a good time to revisit #167 again. I believe the WebRTC spec allow users to select the output device now: https://webrtc.github.io/samples/src/content/devices/input-output/, and Chrome has implemented that but we haven't. In addition, we need to support the setSinkId as well. We should check the WebRTC and setSinkId's spec and then think how we should handle the device-switching policy in cubeb. We also have a few special cases for the output device selection (e.g., Bluetooth Handsfree, Loopback). That's something we need to take into our consideration, and we need to document this policy somewhere.
I think it's a good time to revisit #167 again. I believe the WebRTC spec allow users to select the output device now: https://webrtc.github.io/samples/src/content/devices/input-output/, and Chrome has implemented that but we haven't.
@ChunMinChang,
Looking at the WebRTC link that you provided, I can confirm that I am able to switch input and output devices in Chromium, but not in Firefox. There are some related Mozilla bugs that could be resolved with this implementation as well:https://bugzilla.mozilla.org/show_bug.cgi?id=1650131
https://bugzilla.mozilla.org/show_bug.cgi?id=1716249Is there any roadmap tracking the progress of implementing this WebRTC specification in Firefox that we can vote on and/or contribute to?
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
To unblock BMO 1735201 and BMO 1238038, we should disable automatic device switching by default unless users ask to follow the system default device. That should be the default behavior in Firefox.