Closed Bug 1498512 Opened 6 years ago Closed 1 year ago

Enable by default setSinkId pref

Categories

(Core :: Audio/Video, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
116 Branch
Webcompat Priority P1
Tracking Status
relnote-firefox --- 116+
firefox116 --- fixed

People

(Reporter: achronop, Assigned: karlt)

References

(Depends on 1 open bug, Blocks 3 open bugs)

Details

(Keywords: dev-doc-complete, Whiteboard: [wfh][jitsi-meet])

Attachments

(1 file)

setSinkId functionality is behind a pref which is disabled by default. When all pieces are ready we can flip the pref. pref: media.setsinkid.enabled
Rank: 25
Priority: -- → P3
The pref `media.setsinkid.enabled` doesn't seem to work (on Firefox 64). the example on https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId gives the error: `TypeError: audio.setSinkId is not a function[Learn More]`. Is there another pref that needs to be set, or another condition to be met before the `.setSinkId` method is available on `HTMLMediaElement`?
There is no other pref and it appears to work here (on Nightly). Would you like to send me the code that you are testing?
Flags: needinfo?(jos.van.bakel)

I tested it again and now it works. Perhaps Firefox needs a restart to make the config effective?

Flags: needinfo?(jos.van.bakel)

The pref has this comment: "setSinkId expected to be unconditionally enabled in 63". That clearly didn't happen, so in bug 1490044 I'm updating the comment to "setSinkId will be enabled in bug 1498512".

Any update on this one? It's working great, it'd be really better for our users to enable it by default at this stage

Flags: needinfo?(drno)

We keep it off because it does not work for everything. It works when we playback a file but not for webaudio or WebRTC. We want to add those too and we keep it off till then. Just curious, have you used online or you are testing locally?

Flags: needinfo?(drno)

Ha, missed that indeed I was only testing the UI itself. We are intending to use it for a WebRTC meeting app so that's key. We have seen that many users need to manually change their mix of microphone + speaker, and as a result setSinkId is essential to ensure that headsets users have audio coming in & out from the same device.

Webcompat Priority: --- → ?

Tried this just now on meet.google.com with the pref media.setsinkid.enabled set to True on MacOS 10.15.3 (19D76) with Firefox Nightly 76.0a1 (2020-03-29) (64-bit)

It does not work for WebRTC during the call but does work for the 'Test' audio bit (likely a local file)

What's the status?

We are missing Bug 1493990 for the full functionality. Normal playback works, like the test you did or video/audio playback from youtube or any other service. The rest of the functionality that will cover WebRTC and any other MediaStream is coming. I have been working actively on it for some time now.

Whiteboard: [wfh][jitsi-meet]

DOCS TEAM: When this is done, we need to also remove this from the "Experimental features in Firefox" page.

Depends on: 1648732
Depends on: 1661649
Depends on: 1661710

Looks like https://bugzilla.mozilla.org/show_bug.cgi?id=1661649 fixed.
Any progress on this bug?

Flags: needinfo?(bvandyk)

You can see the dependency tree for this bug. Most notably bug 1493982 is a blocker.

Flags: needinfo?(bvandyk)

Hello,

I'm not sure if this is the right place to report this bug, but when I set that I want to use my headset in Google Meet's settings whereas my system is using my laptop speaker, the sound comes out of my laptop speaker. Google Meet's settings sound playing test, however, comes out of my headset.

Yann

(In reply to Yann Soubeyrand from comment #20)

Hello,

I'm not sure if this is the right place to report this bug, but when I set that I want to use my headset in Google Meet's settings whereas my system is using my laptop speaker, the sound comes out of my laptop speaker. Google Meet's settings sound playing test, however, comes out of my headset.

Yann

I took a look and they don't seem to be calling setSinkId properly. It worked fine when I called setSinkId manually on the appropriate audio element. When we ship setSinkId we'll require selectAudioOutput also, so they need to do some work to comply with the latest spec either way. I reckon they'll fix this when they go through that process.

Depends on: 1692385
Depends on: 1712880
Depends on: 1712892
Depends on: 1712894
Depends on: 1712895
Depends on: 1716494
Depends on: 1731076
Depends on: 1732409
Assignee: nobody → karlt
Webcompat Priority: ? → P1
Depends on: 1743524
Depends on: 1753131
No longer depends on: 1732409
Blocks: 1771183
Depends on: 1786306
Depends on: 1788558
Depends on: 1789522
Severity: normal → S3
Depends on: 1794961
Depends on: 1800286
Depends on: 1800287
Depends on: 1801049
Depends on: 1801190
Depends on: 1804352
Depends on: 1809745
Duplicate of this bug: 1816334
Depends on: 1823586
Depends on: 1829054
Depends on: 1829068
No longer depends on: multimsg
Blocks: 1838574
No longer depends on: 1712880, 1800286, 1809745
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c5ac7e957828 enable Audio Output Devices on desktop Firefox r=jib
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

:karlt, now that this is enabled by default in 116, can you nominate this for release notes?

Flags: needinfo?(karlt)

Thank you for the reminder.

Release Note Request (optional, but appreciated)
[Why is this notable]: New web platform feature potentially affecting user experience.
[Affects Firefox for Android]: No.
[Suggested wording]:
The Audio Output Devices API now enables sites to redirect audio from media elements to permitted output devices (speakers) other than the system default for the user-agent.

For example, WebRTC conferencing sites can now redirect audio either to the speakers in a headset or to external speakers.

[Links (documentation, blog post, etc)]:

https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/selectAudioOutput
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId

relnote-firefox: --- → ?
Flags: needinfo?(karlt)

FF116 Docs work can be tracked in https://github.com/mdn/content/issues/27748. Near complete except reviews.

\o/ woot!

No longer blocks: 1835385
Duplicate of this bug: 1835385
Depends on: 1849108
Blocks: 1835385
No longer duplicate of this bug: 1835385
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: