Closed Bug 1429985 Opened 8 years ago Closed 5 years ago

Remembered microphone sharing always chooses default device instead of saved device

Categories

(Core :: WebRTC: Audio/Video, defect, P2)

58 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 989094

People

(Reporter: mozilla, Unassigned)

Details

(Keywords: enterprise)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce: From a page which wants to record audio from the local machine (I used the Facebook messenger page), I activated recording, chose a device from the list, ticked the checkbox to remember my choice. On that attempt, the recording came from the correct device. On all subsequent recording attempts, the Windows default device was used instead. Actual results: Firefox didn't use the device I chose from the list on the first recording attempt. It used the Windows default recording device instead. Expected results: Firefox should have used the device I selected from the list it offered on the first recording attempt which I elected to save rather than the Windows default device.
Component: Untriaged → Audio/Video: Recording
Product: Firefox → Core
Component: Audio/Video: Recording → WebRTC: Audio/Video
I can repro on Linux Nightly.
Status: UNCONFIRMED → NEW
Rank: 15
Ever confirmed: true
Priority: -- → P2
Any ETA for this issue?
Is there available workaround? this setting saved in the pref.js?, DB?

Marking as [wfh]

Summary: Remembered microphone sharing always chooses default device instead of saved device → [wfh] Remembered microphone sharing always chooses default device instead of saved device
Summary: [wfh] Remembered microphone sharing always chooses default device instead of saved device → Remembered microphone sharing always chooses default device instead of saved device
Whiteboard: [wfh]

@jib: if I'm not mistaken this is based on the design of current APIs not the responsibility of the user agent, but instead the service needs to remember the device ID, correct?

Flags: needinfo?(jib)

Yes, in the web model the site is responsible for remembering the user's choice(s), using deviceId:

const stream = await navigator.mediaDevices.getUserMedia({audio: {deviceId: localStorage.lastMicId}});
localStorage.lastMicId = stream.getAudioTracks()[0].getSettings().deviceId;

This issue is thus limited to sites that implement no device choice (the number of such sites is likely low, but not zero). Not an issue on major sites AFAIK. We should keep this in mind when prioritizing.

Compared to other browsers, Firefox at least has a picker in its permission prompt, so that's better than most, and works as you would expect if the site is programmed right. But even then it only works until you persist permission (because our picker is in the permission prompt).

In bug 989094 we contemplated a way to remember the last-used device for these sorry sites, within site constraints. This might be good to revisit given our recent interest in pushing for standarizing our picker (bug 1637360).

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(jib)
Resolution: --- → DUPLICATE
Keywords: enterprise
Whiteboard: [wfh]
You need to log in before you can comment on or make changes to this bug.