#53687: fix: require a registered source id for webContents capture via getUserMedia
Merged
Created: Sep 7, 2026, 10:59:53 AM
Merged: Sep 7, 2026, 2:43:12 PM
5 comments
Target: main
- The legacy
chromeMediaSource: 'desktop'getUserMediaconstraint accepts screen and window source ids only; aweb-contents-media-stream://id there is rejected with "Invalid state". - Capturing a WebContents keeps working through
chromeMediaSource: 'tab'with an id fromwebContents.getMediaSourceId()(bound to the requesting contents) and throughsetDisplayMediaRequestHandler. - Spec and a
getMediaSourceIddoc note.
Notes: getUserMedia with chromeMediaSource: 'desktop' no longer accepts WebContents source ids; use chromeMediaSource: 'tab' with webContents.getMediaSourceId() or setDisplayMediaRequestHandler to capture a WebContents.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron