3

I am trying to create a web application which can share the desktop with the system audio using webrtc from chrome browser and if I set the constraints :

const constraints = {
audio: {
mandatory: {
  chromeMediaSource: 'desktop'
}
 },
video: {
mandatory: {
  chromeMediaSource: 'desktop'
}
}
 }

I get this error "DOMException: Requested device not found" or "DOMException: Invalid state"

here is the demo: https://codepen.io/EbramTawfik/pen/xQozaE

Ebram
  • 1,042
  • 1
  • 13
  • 26
  • 1
    In Chrome, this can currently only be achieved from `chrome://` scripts (i.e extensions) – Kaiido Dec 06 '18 at 06:05
  • 1
    You need chrome extensions for screen sharing. Check this repo for examples: https://github.com/muaz-khan/Chrome-Extensions – enricop89 Dec 06 '18 at 14:32

0 Answers0