I am using a WebRTC demo application for screen sharing. The demo works perfectly fine but when I try to run the same code in localhost or my own remote server, the code doesn't run. Any ideas on how can I fix this issue?
Asked
Active
Viewed 2,204 times
7
-
1ScreenSharing only works on an SSL connection. Is your local web server hosting it as such? – Benjamin Trent Sep 06 '14 at 15:18
-
no I don't have an ssl connection on my web server. @BenjaminTrent – kartik Sep 06 '14 at 15:24
-
Try that. You can even use a self signed cert but it will not work unless SSL – Benjamin Trent Sep 06 '14 at 16:02
1 Answers
5
Screensharing in Chrome only works over an SSL connection(). You can use a self-signed cert and simply accept it in your browser(this is for Chrome < M36).
Also, for Chrome >M36 you must now use the Chrome.desktopcapture API and the usual way of modifying media constraints and enabling screen-sharing in Chrome internals will not work in newer versions of chrome.
The API is farely simple and MUCH more robust than the previous given option in the media constraints.

Benjamin Trent
- 7,378
- 3
- 31
- 41