Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

getscreenmedia

Package Overview
Dependencies
Maintainers
6
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getscreenmedia - npm Package Compare versions

Comparing version 1.5.5 to 1.5.6

11

chrome-extension-sample/README.md

@@ -7,3 +7,10 @@ This is an example app which implements the extension-side of [getscreenmedia](https://github.com/henrikjoreteg/getscreenmedia).

Running (for testing):
google-chrome --load-and-launch-app=/path/to/this/directory
## How to build your own extension
1. Download this code
2. Replace `simplewebrtc.com` with your domain in `manifest.json`
3. If necessary change name and description
4. Create a zip file
5. [Publish in the Chrome Web Store](https://developer.chrome.com/webstore/publish)
Running (for testing without packing):
`google-chrome --load-and-launch-app=/path/to/this/directory`

13

firefox-extension-sample/README.md
Mozilla Firefox added support for screensharing in Firefox 33. The feature is currently only enabled for a small number of whitelisted domains which can be specified in the preferences.
This extension is a [bootstrapped extension](https://developer.mozilla.org/en/Add-ons/Bootstrapped_extensions) that adds and removes [simplewebrtc.com](https://simplewebrtc.com) from the screensharing whitelist preference without user interaction.
## building the XPI
```
zip simplewebrtc-screenshare.xpi bootstrap.js install.rdf
```
Firefox 52 [will drop](https://www.mozilla.org/en-US/firefox/52.0a2/auroranotes/) the use of a whitelist and therefore also the need for a domain-specific extension.
## How to build your own extension
1. Download this code
2. Replace `simplewebrtc.com` with your domain in `bootstrap.js`
3. If necessary change name and description
4. Create the XPI: `zip screenshare.xpi bootstrap.js install.rdf`
4. [Publish your extension](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Publishing_your_WebExtension)
## License

@@ -9,0 +14,0 @@ MPL 2.0

@@ -133,3 +133,3 @@ // getScreenMedia helper by @HenrikJoreteg

window.addEventListener('message', function (event) {
typeof window !== 'undefined' && window.addEventListener('message', function (event) {
if (event.origin != window.location.origin) {

@@ -136,0 +136,0 @@ return;

{
"name": "getscreenmedia",
"version": "1.5.5",
"version": "1.5.6",
"description": "A browser module for attempting to get access to a MediaStream of a user's screen. With a nice node-like API.",

@@ -8,3 +8,3 @@ "main": "getscreenmedia.js",

"type": "git",
"url": "https://github.com/HenrikJoreteg/getScreenMedia"
"url": "https://github.com/otalk/getScreenMedia"
},

@@ -11,0 +11,0 @@ "keywords": [

@@ -9,3 +9,3 @@ # getScreenMedia

Suitable for use with browserify/CommonJS on the client.
Suitable for use with browserify/CommonJS on the client.

@@ -23,5 +23,5 @@ If you're not using browserify or you want AMD support use `getscreenmedia.bundle.js`. Note that if no module system is detected it will attach a function called `getScreenMedia` to `window`.

First build and install a domain-specific extension for [Chrome](https://github.com/otalk/getScreenMedia/tree/master/chrome-extension-sample) or/and [Firefox](https://github.com/otalk/getScreenMedia/tree/master/firefox-extension-sample).
With this helper it's clean/simple to get access to a user's camera, mic, etc.
Use the snippet below to get a screen stream, similar to [getUserMedia](https://github.com/otalk/getUserMedia).
```js

@@ -45,3 +45,3 @@ var getScreenMedia = require('getscreenmedia');

It's ugly and annoying to check for support without this tool. Node-style (error-first) APIs that are cross-browser, installable with npm and runnable on the client === win!
All supported browsers require the use of an extension and don't offer an cross-browser API which is annoying and error-prone. Node-style (error-first) APIs that are cross-browser, installable with npm and runnable on the client === win!

@@ -56,3 +56,3 @@ ## Error handling

See the [handling errors section of the getUserMedia lib](https://github.com/HenrikJoreteg/getUserMedia#handling-errors-summary) for details about how errors are handled.
See the [handling errors section of the getUserMedia lib](https://github.com/HenrikJoreteg/getUserMedia#handling-errors-summary) for details about how errors are handled.

@@ -59,0 +59,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc