← Chrome 152 reference

v152 · enabled by default · screen capture

audioPreferred capture in getDisplayMedia API

Limited availability

  • Chrome · desktop 152
  • Edge · not separately reported
  • Firefox · no position recorded
  • Safari · no signal (spec PR approved)

Not on the Baseline register: a webstatus.dev query for audioSelection returns zero results, and the parent screen-capture web-feature is Baseline limited (2026-07-28). BCD has no entry for the new member (see browser compatibility); the ship rows below are compiled from primary sources and labelled interim.

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).

Name mismatch — the shipped member is audioSelection, not audioPreferred

“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

At a glance
Milestone listingChrome 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 surfaceOne 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 doesSteers 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
PlatformDesktop 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 featureGetDisplayMediaAudioSelection, status stable, in runtime_enabled_features.json5 (trunk, fetched 2026-07-28)
Normative textW3C Screen Capture, Working Draft 23 July 2026 (merged via PR #332, 2026-07-16)
ChromeStatus5085785343787008 — audioPreferred capture in getDisplayMedia API (blink component Blink>GetDisplayMedia)
Source: ChromeStatus API record; milestone=152 listing; runtime_enabled_features.json5; Screen Capture WD 2026-07-23

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.

Source: ChromeStatus API record (name/summary); Screen Capture WD — audioSelection member; media_stream_constraints.idl; explainer

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 #12

how 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):

Picker behavior with audioSelection: "preferred"
BehaviorContract
Audio pre-selected for screen/windowThe “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 bannerIf 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 buttonThe OK button label follows the toggle: “Share with Audio” when audio is on, “Share” when off (UpdateOkButtonLabel)
Restyled audio controlThe audio toggle renders in the boxed style with simplified labels (“Share with system audio” / “Share with tab audio”) introduced by the UI change
getDisplayMedia onlyThe 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 requestedWith 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.

Source: desktop_media_picker_views.cc (trunk); UI change: CL 8116406 — audio-preferred screen share: Chrome UI/Browser changes; blink plumbing: CL 8107082 — audio-preferred captures in getDisplayMedia; launch: CL 8138688 — Launch GetDisplayMediaAudioSelection to stable

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

Source: Screen Capture WD — DisplayMediaStreamOptions IDL; Screen Capture WD — AudioSelectionPreferenceEnum IDL; Chromium IDL: media_stream_constraints.idl (member gated [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" };
Live example from the Chrome Platform Showcase (route HEAD-checked 200, 2026-07-28). Companion demos: hint vs default picker behavior and options inspector.Source: chrome-platform-showcase — this feature
Source: usage pattern per the explainer example and the spec member semantics; demo: chrome-platform-showcase

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.

audioSelection support (interim, primary-source compiled)
BrowserSupportEvidence
Chrome (desktop)152 — enabled by defaultmilestone=152 listing (“Enabled by default”); launch CL 8138688; flag stable in runtime_enabled_features.json5
Chrome (Android / WebView)Not recordedThe ChromeStatus record lists no Android/WebView milestone, and the modified picker is Chrome's desktop Views dialog
EdgeNot separately reportedChromium-based; no separate position on the ChromeStatus record
FirefoxNo position recordedThe ChromeStatus record carries no Mozilla view entry; the member is ignored (WebIDL dictionary semantics) in browsers without support
SafariNo signalWebKit 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.

Source: BCD api/MediaDevices.json; ChromeStatus API record; WebKit standards-positions #696

security and privacy

Source: explainer — privacy and security considerations; Screen Capture WD — member text (“MAY ignore”); CL 8116406 (banner behavior)

specifications

Specifications
DocumentStatus
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 DraftLiving 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 getDisplayMediaMerged 2026-07-16; the change that added the member and enum to the specification
Explainer — audioSelection attribute for getDisplayMediaDesign rationale, goals, example, alternatives considered, privacy analysis (proponent: agpalak@google.com)
Source: documents as linked; render state of the Editor's Draft verified by fetching it 2026-07-28

see also