MarshallOfSound

#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' getUserMedia constraint accepts screen and window source ids only; a web-contents-media-stream:// id there is rejected with "Invalid state".
  • Capturing a WebContents keeps working through chromeMediaSource: 'tab' with an id from webContents.getMediaSourceId() (bound to the requesting contents) and through setDisplayMediaRequestHandler.
  • Spec and a getMediaSourceId doc 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

42-x-y
Merged
PR Number
#53710
Merged At
Sep 7, 2026, 5:08:32 PM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#53707
Merged At
Sep 7, 2026, 5:19:39 PM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#53709
Merged At
Sep 7, 2026, 5:23:04 PM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#53708
Merged At
Sep 7, 2026, 5:05:01 PM
Released In
Not yet
Release Date
Not yet

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