New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Capturing the screen is broken in the newer version (desktopCapturer) #41988
Comments
Hello @YouDJapp. Thanks for reporting this and helping to make Electron better! Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use. Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests. Now adding the
blocked/need-repro
|
nevermind, I was sending not sending the wrong source ID, it works now |
Glad it works! Thanks for letting us know! |
Preflight Checklist
Electron Version
30.0.1
What operating system are you using?
macOS
Operating System Version
MacOS Sonoma 14.1.1
What arch are you using?
x64
Last Known Working Electron version
25.2.0
Expected Behavior
Capturing the screen of the app (desktopCapturer.getSources / mediaDevices.getUserMedia) and recording it (MediaRecorder) works well, like in v25.2.0, here is a working video : https://youtu.be/0fmZNy6Jo84.
var video_settings = { mandatory: { chromeMediaSource: 'desktop'}};
video_settings.mandatory.chromeMediaSourceId = video_sourceid; // ID from the desktopCapturer electron API
navigator.mediaDevices.getUserMedia({audio: false, video: video_settings}).then(function(stream) {
recorder_chunks = [];
var recorder = new MediaRecorder(stream, { mimeType: 'video/webm; codecs=vp9', audioBitsPerSecond : 192e3, videoBitsPerSecond : 8e6});
recorder.ondataavailable = function(e) { recorder_chunks.push(e.data); };
recorder.start(100);
});
Actual Behavior
Updating my app to v30, the screen capture is frozen at the first frame, but only the mouse is moving. Same code... Here is a video of the recording showing the issue : https://youtu.be/hHx2q9JqMNM.
Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: