I would like to capture video stream of the first monitor with system audio.
I try to set costrains like this, which works well in chrome (with selection window):
navigator.mediaDevices.getDisplayMedia( {
video: { width: 1920, height: 1080, displaySurface: 'monitor', logicalSurface: true, cursor: 'always'},
audio: true,
systemAudio: "include",
});
I tried to make this work in CEF (I use currently 115.3.110 nuget package):
- CEF doesn't support permissions, so I either have to use "enable-media-stream" or "use-fake-ui-for-media-stream" (or both).
- if I use "enable-media-stream", I get this kind of stream for 2 monitors:
aspectRatio: 3.5555555555555554
deviceId:"screen:-1:0"
frameRate: 30
height: 540
resizeMode: "crop-and-scale"
width:1920
- if I use "use-fake-ui-for-media-stream", then I don't get system audio, but:
MediaStreamTrack {kind: 'audio', id: '08bdd568-4e28-4fcf-abaf-f557bf21e58e', label: 'Fake audio', enabled: true, muted: false, …}
contentHint: ""
enabled: true
id: "08bdd568-4e28-4fcf-abaf-f557bf21e58e"
kind: "audio"
label: "Fake audio"
muted: false
oncapturehandlechange: null
onended: null
onmute: null
onunmute: null
readyState: "live"
-I read that "enable-chrome-runtime" solved the problem for some people, but I didn't notice any difference with the above cases, when I added that argument
How could I capture video stream of my first(default) monitor together with system audio?