v152 · enabled by default · screen capture
audioPreferred capture in getDisplayMedia API
A hint that lets an application calling navigator.mediaDevices.getDisplayMedia() tell the browser it prefers audio to be shared along with the screen video — so Chrome's picker presents audio sharing as the recommended, pre-selected choice instead of an opt-in the user has to notice. The shipped API member is DisplayMediaStreamOptions.audioSelection with the single value "preferred"; “audioPreferred” is the feature's name, not the member's (see naming).
“audioPreferred” is the feature's name in the milestone=152 listing and Intent to Ship; the shipped API member is DisplayMediaStreamOptions.audioSelection with the single value "preferred" (verified in the Screen Capture WD and Chromium's media_stream_constraints.idl, 2026-07-28). Searching IDL, specs, or source for “audioPreferred” finds nothing. The listing also files this same feature id under “In developer trial (Behind a flag)” — a duplicate-row quirk on the record; the Blink runtime feature GetDisplayMediaAudioSelection is status stable at trunk. See naming.
at a glance
| Milestone listing | Chrome 152 — “Enabled by default” (the milestone=152 listing, authoritative per gendn invariant #2, also files the same feature id under “In developer trial (Behind a flag)”; the enabled-by-default row matches the Chromium flag being stable at trunk, verified 2026-07-28) |
|---|---|
| API surface | One new dictionary member, audioSelection, on DisplayMediaStreamOptions — the options argument of navigator.mediaDevices.getDisplayMedia(); plus its single-value enum AudioSelectionPreferenceEnum ("preferred"). No new methods, interfaces, or events |
| What it does | Steers Chrome's desktop screen-picker toward audio sharing: the audio toggle starts checked for screen and window sources, the confirm button reads “Share with Audio” while audio is on, and a recommendation banner appears if the user turns audio off |
| Platform | Desktop only at ship — the ChromeStatus record lists desktop 152 and no Android/WebView milestone; the picker UI it modifies is Chrome's desktop (Views) dialog |
| Runtime feature | GetDisplayMediaAudioSelection, status stable, in runtime_enabled_features.json5 (trunk, fetched 2026-07-28) |
| Normative text | W3C Screen Capture, Working Draft 23 July 2026 (merged via PR #332, 2026-07-16) |
| ChromeStatus | 5085785343787008 — audioPreferred capture in getDisplayMedia API (blink component Blink>GetDisplayMedia) |
naming: “audioPreferred” the feature, audioSelection the member
The ChromeStatus listing, the Intent to Ship thread, and the spec PR title all call this feature “audioPreferred”, and the ChromeStatus summary describes an “audioPreference attribute”. Neither string exists in the shipped platform. The member that actually landed — in the W3C specification, the Chromium IDL, and the explainer — is:
navigator.mediaDevices.getDisplayMedia({
video: true,
audio: true,
audioSelection: "preferred"
});
gendn keeps the listing name for the page title and URL (per gendn invariant #1 the listing is authoritative), but every code sample on this page uses the real member name, audioSelection. If you search MDN or a spec for “audioPreferred” you will find nothing — search for audioSelection instead.
why it exists
In getDisplayMedia(), video capture is mandatory and audio is optional: the browser's picker offers audio sharing but leaves it off by default. Applications whose core function needs the audio — the explainer names transcription note-takers, co-watching apps, game streaming, and presentations with media — lose users at that unchecked box, and end up building instructions (“remember to tick share audio”) around a default they cannot influence.
The feature gives the application a declarative way to say audio matters to me, and lets the user agent present the picker accordingly. The user still makes the final call: the spec is explicit that the member is a hint the UA MAY ignore, and Chrome's implementation keeps the toggle fully under user control — including surfacing a recommendation banner rather than blocking when the user turns audio off.
An audio-only capture alternative was considered and rejected in the explainer: it would not serve co-watching-style uses, it departs from the “video anchors what is being shared” security model, and it raises new privacy questions.
Source: explainer — introduction, goals, alternatives considered; Screen Capture WD — member text; developer ask recorded at w3c/mediacapture-screen-share-extensions #12how it works — Chrome's picker behavior
The hint is consumed entirely inside the browser's desktop media picker; there is no observable JavaScript-side state change in the call itself. Verified against the Chrome trunk implementation (desktop_media_picker_views.cc, fetched 2026-07-28), when audioSelection: "preferred" is passed and audio capture was also requested (audio: true or audio constraints):
| Behavior | Contract |
|---|---|
| Audio pre-selected for screen/window | The “Share system audio” toggle on the screen and window panes starts checked (system_audio_capture_default_checked becomes true). Tab audio already defaults to checked in Chrome, so the tab pane is unchanged |
| Recommendation banner | If the user turns the audio toggle off while the hint is set and audio is offered, the pane shows an audio-recommendation banner nudging them to reconsider (SetAudioRecommendationVisible) |
| Dynamic confirm button | The OK button label follows the toggle: “Share with Audio” when audio is on, “Share” when off (UpdateOkButtonLabel) |
| Restyled audio control | The audio toggle renders in the boxed style with simplified labels (“Share with system audio” / “Share with tab audio”) introduced by the UI change |
| getDisplayMedia only | The behavior applies only when the picker was opened for a getDisplayMedia() request (RequestSource::kGetDisplayMedia) — not for the legacy chrome.desktopCapture extension flow |
| Audio must be requested | With audio absent or false, no audio control is offered at all, so the hint has no observable effect — it steers audio sharing, it does not request an audio track |
All of these behaviors are gated on the GetDisplayMediaAudioSelection blink feature (stable at trunk) and degrade silently where it is absent: an unknown dictionary member is ignored per WebIDL dictionary semantics, so passing audioSelection to a browser that does not support it is not an error — the picker simply shows its historical defaults.
syntax
Verbatim WebIDL from the W3C Screen Capture Working Draft of 23 July 2026 — the enum and the dictionary member this feature adds:
enum AudioSelectionPreferenceEnum { "preferred" };
dictionary DisplayMediaStreamOptions {
(boolean or MediaTrackConstraints) video = true;
(boolean or MediaTrackConstraints) audio = false;
CaptureController controller;
SelfCapturePreferenceEnum selfBrowserSurface;
SystemAudioPreferenceEnum systemAudio;
WindowAudioPreferenceEnum windowAudio;
SurfaceSwitchingPreferenceEnum surfaceSwitching;
MonitorTypeSurfacesEnum monitorTypeSurfaces;
AudioSelectionPreferenceEnum audioSelection;
};
The member has no default value: when it is absent, no preference is expressed and the picker behaves as it always has. The enum carries exactly one value, "preferred" — there is no way to express “prefer no audio”; omitting the member is the neutral state.
Reference in this guide
DisplayMediaStreamOptions.audioSelection— the dictionary member: value, validation, lifecycle, examples, compatibility, security & privacy
[RuntimeEnabled=GetDisplayMediaAudioSelection])
examples
Request a screen capture with audio, and hint that audio is preferred. Always handle the user declining audio anyway — the hint steers, it does not guarantee:
const stream = await navigator.mediaDevices.getDisplayMedia({
video: true,
audio: true,
audioSelection: "preferred" // hint: this app relies on shared audio
});
const audioTracks = stream.getAudioTracks();
if (audioTracks.length === 0) {
// The user declined audio sharing (or the UA ignored the hint).
// The hint never forces audio — decide whether your app can continue.
showAudioMissingNotice();
}
Feature-detect by probing the picker-facing behavior indirectly — there is no capability query; the member is ignored where unsupported, so detection is best-effort (checking that the browser ships the feature is not exposed to script):
// There is no JS-visible capability surface for the hint itself.
// The safe pattern is unconditional use: unsupported browsers ignore
// the unknown dictionary member (WebIDL semantics) with no exception.
const options = { video: true, audio: true, audioSelection: "preferred" };
browser compatibility
Interim table. BCD has no DisplayMediaStreamOptions data file at all (BCD api/ listing, verified 2026-07-28) and no audioSelection subfeature under api.MediaDevices.getDisplayMedia — the newest sibling subfeature recorded there is windowAudio_option. Rows below are compiled from the linked primary sources, not from BCD.
| Browser | Support | Evidence |
|---|---|---|
| Chrome (desktop) | 152 — enabled by default | milestone=152 listing (“Enabled by default”); launch CL 8138688; flag stable in runtime_enabled_features.json5 |
| Chrome (Android / WebView) | Not recorded | The ChromeStatus record lists no Android/WebView milestone, and the modified picker is Chrome's desktop Views dialog |
| Edge | Not separately reported | Chromium-based; no separate position on the ChromeStatus record |
| Firefox | No position recorded | The ChromeStatus record carries no Mozilla view entry; the member is ignored (WebIDL dictionary semantics) in browsers without support |
| Safari | No signal | WebKit standards-positions #696 is open with no position label (2026-07-28); the ChromeStatus record notes the spec PR was approved by WebKit |
Base method support for context (BCD): getDisplayMedia() — Chrome 72, Firefox 66, Safari 13; display audio capture at all — Chrome 74, not supported in Firefox or Safari per BCD audio_capture_support. The hint only steers an audio capability that itself remains Chrome-only today.
security and privacy
- No new capture capability — the member cannot turn audio on by itself; audio sharing along with screen video has always been possible. The user retains the final decision in the picker, and Chrome even warns them (the recommendation banner) when they decline audio against the hint.
- Hint, not permission — the spec states the UA MAY ignore the hint; the explainer's privacy analysis concludes no new privacy or security risk is introduced because no new information crosses the trust boundary and no new user control is removed.
- Fingerprinting surface unchanged — the member is write-only (an input to the picker); no state about it is readable back from script, and no new fingerprinting vector is created beyond the existing
getDisplayMediacapability. - Standard
getDisplayMediarequirements still apply — secure context, thedisplay-capturePermissions Policy, per-pick consent, and no persistence of the captured surface.
specifications
| Document | Status |
|---|---|
| Screen Capture — W3C Working Draft, 23 July 2026 (audioSelection member, AudioSelectionPreferenceEnum) | Contains the merged feature with rendered text and working fragment anchors; this is the copy this page quotes verbatim |
| Screen Capture — Editor's Draft | Living document. Caution: as of 2026-07-28 the served ED contains the merged audioSelection text but renders the new sections with unexpanded Bikeshed macros and no fragment anchors — the #dom-displaymediastreamoptions-audioselection anchor used by the ChromeStatus record's spec link does not resolve there yet; use the WD links above meanwhile |
| w3c/mediacapture-screen-share PR #332 — audio-preferred captures in getDisplayMedia | Merged 2026-07-16; the change that added the member and enum to the specification |
| Explainer — audioSelection attribute for getDisplayMedia | Design rationale, goals, example, alternatives considered, privacy analysis (proponent: agpalak@google.com) |
see also
- Chrome Platform Status — audioPreferred capture in getDisplayMedia API (API record)
- blink-dev — Intent to Ship: audioPreferred capture in getDisplayMedia API
- MDN — MediaDevices: getDisplayMedia() method (the host method; MDN does not document the
audioSelectionmember — verified 2026-07-28, which is why this page exists) - MDN — Screen Capture API
- WebKit standards-positions #696 — Audio Selection Preference for getDisplayMedia (open)
- w3c/mediacapture-screen-share-extensions #12 — the developer ask behind the feature
- Chromium tracking bug 535514300
- Chrome Platform Showcase — interactive demos for this feature (preferred capture, hint vs default, options inspector)