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

[Feature Request]: support running desktopCapturer in chrome --headless mode #33494

Closed
3 tasks done
chenzx opened this issue Mar 29, 2022 · 1 comment
Closed
3 tasks done

Comments

@chenzx
Copy link

chenzx commented Mar 29, 2022

Preflight Checklist

Problem Description

I want to use electron simply as a WebRTC stream publishing client to replace crippled ffmpeg/gstreamer.
The ffmpeg/gstreamer's RTP stream publishing cmdline cannot properly deal with WebRTC's RTCP/PLI keyframe request.

That is to say, i need the following code working:

const {app, BrowserWindow} = require('electron')
app.commandLine.appendSwitch('ignore-gpu-blacklist')
app.commandLine.appendSwitch('headless') //<--

  const mainWindow = new BrowserWindow({
    width: 1,
    height: 1,
    //no need to set show:false, since chrome's --headless mode is CLI mode without window...
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false,
      preload: path.join(__dirname, 'preload.js')
    }
  });

Proposed Solution

desktopCapturer api currently needs running in renderer side, but it should be able to run without window system.

Alternatives Considered

If can support, electron will become the best/convenient full-functinal WebRTC client, used in App Window to Video Live Streaming scenario.

Additional Information

No response

@zcbenz
Copy link
Member

zcbenz commented Apr 6, 2022

The problem is Electron does not really support headless mode (see #27052), I'm merging this to #228.

@zcbenz zcbenz closed this as completed Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@chenzx @zcbenz and others