getScreenId | Capture Screen on Any Domain!

HOME © Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?

YouTube video:

  1. Install this:
  2. Now use below codes on any HTTPs domain.
  3. Remember, HTTPs is required.
  4. getScreenId gives you "MediaStream" object; you can share that object with other users using AppRTC demo, SimpleWebRTC or EasyRTC or PeerJs libraries, or any standalone peer-to-peer demo.
  5. In simple words, you have to use RTCPeerConnection API along with getScreenId to share screen with other users.


  1. Chrome? Store / Source Code
  2. Firefox? Requires version 52 or higher; and HTTPs.

How to use getScreenId.js?

<script src=""></script>
getScreenId(function (error, sourceId, screen_constraints) {
    // error    == null || 'permission-denied' || 'not-installed' || 'installed-disabled' || 'not-chrome'
    // sourceId == null || 'string' || 'firefox'

    navigator.getUserMedia = navigator.mozGetUserMedia || navigator.webkitGetUserMedia;
    navigator.getUserMedia(screen_constraints, function (stream) {
        document.querySelector('video').src = URL.createObjectURL(stream);

        // share this "MediaStream" object using RTCPeerConnection API
    }, function (error) {

How to detect whether extension is installed or not?

<script src=""></script>
getChromeExtensionStatus(function(status) {
    if (status === 'installed-enabled') alert('installed');
    if (status === 'installed-disabled') alert('installed but disabled');
    // etc.


Enter your email too; if you want "direct" reply!

Latest Updates