Skip to content
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

Closed
3 tasks done
YouDJapp opened this issue Apr 28, 2024 · 3 comments
Closed
3 tasks done

Comments

@YouDJapp
Copy link

YouDJapp commented Apr 28, 2024

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

@YouDJapp YouDJapp changed the title [Bug]: Capturing the screen is broken is the newer version [Bug]: Capturing the screen is broken in the newer version (desktopCapturer) Apr 28, 2024
@VerteDinde VerteDinde added the blocked/need-repro Needs a test case to reproduce the bug label Apr 29, 2024
@electron-issue-triage
Copy link

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 Needs a test case to reproduce the bug label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

@YouDJapp
Copy link
Author

YouDJapp commented May 3, 2024

nevermind, I was sending not sending the wrong source ID, it works now

@VerteDinde
Copy link
Member

Glad it works! Thanks for letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🛠️ Fixed for Next Release
Development

No branches or pull requests

3 participants