Search code examples
browserwebrtc

Achieve screen sharing through browser


How to achieve screen sharing using web browsers ? Can any one helps me to give a best solution for achieving the screen sharing.


Solution

  • You can use getUserMedia and set the option so that it captures screen

    video: {
       mandatory: {
          chromeMediaSource: 'screen',
          maxWidth: 1280,
          maxHeight: 720
       },
       optional: []
    }
    

    A good example: http://bloggeek.me/implement-screen-sharing-webrtc/

    And don't forget to enable the screen capture in Chrome. Also I'm not that sure about the support on other browsers than chrome.

    The screen can then be transfered to another user using RTCPeerConnection