No description, website, or topics provided.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Rename getScreenId.html to index.html Jun 27, 2018
extension Icon access granted Jun 26, 2018
.gitignore Matches domain array extended to github pages repo Jun 26, 2018
LICENSE Initial commit Apr 12, 2018
README.md Update README.md Jun 26, 2018

README.md

License badge Documentation badge Docker badge Support badge

OpenVidu Screen Sharing extension for Google Chrome

This Chrome extension allows web applications to capture desktop windows. It is meant to be used in combination with openvidu-browser and is easily customizable.

How to customize this extension

  • Modify the following manifest.json fields:
    • name, author and description
    • Change the allowed domains in content_scripts.matches array
  • Replace icon.png with your own image

How to use in openvidu-browser

var OV = new OpenVidu();
OV.setAdvancedConfiguration( { screenShareChromeExtension: "https://chrome.google.com/webstore/detail/YOUR_EXTENSION_NAME/YOUR_EXTENSION_ID" } );

var publisher = OV.initPublisher(
    document.getElementById('myTargetElement'),
    { videoSource: "screen" }
);

How to test your extension

First of all, add to array content_scripts.matches in manifest.json the developing URL you are using (for example: "matches": ["https://*.openvidu.io/*", "http://localhost:4200/"])

Then go to chrome://extensions in Google Chrome. Click Load Unpacked and select the extension's folder.

When setting property videoSource in your app, just do it like this:

var OV = new OpenVidu();
OV.setAdvancedConfiguration( { screenShareChromeExtension: "https://chrome.google.com/webstore/detail/not_relevant/DEVELOPING_EXTENSION_ID_CHROME_PROVIDED" } );

var publisher = OV.initPublisher(
    document.getElementById('myTargetElement'),
    { videoSource: "screen" }
);

You're good to go now!

How to publish your extension in Chrome Web Store

https://developer.chrome.com/webstore/publish

Troubleshooting

  • Getting SCREEN_EXTENSION_NOT_INSTALLED or SCREEN_EXTENSION_DISABLED errors even though the extension is already added: this usually means that you are trying to use your extension from a URL not included in matches array of your manifest.json file. Be sure to add any URL where you plan to serve an application using your extension (this includes localhost domains when developing!).

Acknowledgements to Muaz Khan, whose open-source project Chrome-Extensions helped implementing OpenVidu/openvidu-screen-sharing-chrome-extension repository.