Skip to content
This repository has been archived by the owner. It is now read-only.
[Deprecated] This is a library for easy implementation of screen sharing for WebRTC.
Branch: master
Clone or download
Latest commit 411a2f8 May 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
chrome-extension fix typo Nov 8, 2017
examples make error message english Aug 31, 2017
src Fix comments Mar 23, 2018
.babelrc Init Aug 18, 2017
.eslintrc Init Aug 18, 2017
.gitignore Add zip extension cmd Aug 21, 2017
LICENSE Change Lisence Sep 5, 2017 Update May 15, 2019 add comment about "matches" Sep 12, 2017
package-lock.json Change ver from 1.0.0 to 1.0.1 Mar 26, 2018
package.json Change ver from 1.0.0 to 1.0.1 Mar 26, 2018
webpack.config.js revert the name back to skyway Aug 31, 2017

⚠️ Deprecated

This project is no longer maintained.

Since Chrome 72 and Firefox 66, navigator.mediaDevices.getDisplayMedia() is available. You can get the screen stream through this API without any dependencies.

Screen Capture

SkyWay ScreenShare Library

This is a library for easy implementation of screen sharing in WebRTC applications. This repository includes source code for the Chrome extension.


1. Library

  • Using the CDN

     <script src=""></script>
  • Building it yourself

    Clone a copy of the skyway-screenshare git repo:

     git clone

    Enter the skyway-screenshare directory and run the build script of JavaScript library:

     cd skyway-screenshare && npm install && npm run build:lib

    Use the generated libraries:


2. Chrome extension

Modify the manifest.json <chrome-extension/manifest.json>:

  "name": "Your extension name here",
  "short_name": "Your extension short_name here",
  "version": "Your extension version number here",
  "manifest_version": 2,
  "description": "Your extension description here",
  "icons": {
    "16": "icon16.png",
    "48": "icon48.png",
    "128": "icon128.png"
  "permissions": [
  "background": {
    "scripts": ["background.js"],
    "persistent": false
  "content_scripts": [{
    "matches": [""],
    "js": ["content.js"],
    "all_frames": true,
    "run_at": "document_end"

Essential modification items are as follows:

Item Comment
name Your extension name here.
short_name Your extension short_name here.
version Your extension version number here.
description Your extension description here.
icons Your extension icon files name here.
Icon files should be located here <chrome-extension/>.
matches The site urls that will use this extension.
Wildcards are accepted.
It is recommended to add * at the end of urls because the match type is exact match.
Ex: "matches": ["https://**"]

Run the build script for the Chrome extension:

mkdir dist
npm install && npm run build:ext

Test the extension on Chrome:

  1. Access to chrome://extensions/
  2. Enable 'Developer mode'
  3. Click the 'Load unpacked extension...' and specify the following directory

Publish the extension: In order to publish the extension to the Chrome store, upload the following zip file.


3. Firefox add-on

As of Firefox 52, no installation is needed to use screenshare on firefox.

API reference

var screenshare = ScreenShare.create({ debug: true });
  • options (This argument is optional)
    • debug (boolean)
      • Output the debug log on the browser developer console.


  • Start the screen share.
  width: <number>,
  height: <number>,
  frameRate: <number>,
  mediaSource: <string>, // Firefox only
  .then(function(stream) {
     // success callback
     // Get the media stream for the screen share
  .catch(function(error) {
     // error callback

Firefox only, you can specify one of window, application or screen to mediaSource.


  • Stop tracks of stream obtained from start()


  • Chrome: Check whether the extension is installed or not. <true or false>
  • Firefox: Returns true.
  • Others: Returns false.
var result = screenshare.isScreenShareAvailable();



  • When using inline installation for the Chrome extension, this event is fired when the script finishes loading. By handling this event, you can start ScreenShare feature automatically. Please note that you have to change config.hostname in chrome-extension/background.js.
window.addEventListner('message', function(ev) {
  if( === "ScreenShareInjected") {
    console.log('screen share extension is injected, get ready to start');
}, false);


SkyWay ScreenShare Sample App


Make sure you have nodejs installed. Run npm install to get started.

After making changes in src/, chrome-extension/ run

  • npm run lint to validate

then run build commands

  • npm run build:lib to build screenshare(.min).js
  • npm run build:ext to build

the files are stored in the dist directory!

LICENSE & Copyright


You can’t perform that action at this time.