Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
getscreenmedia
Advanced tools
A browser module for attempting to get access to a MediaStream of a user's screen. With a nice node-like API.
A tiny browser module that gives us a simple API for getting access to a user's screen. It uses https://github.com/HenrikJoreteg/getUserMedia's API.
It gives us a cleaner node.js-style, error-first API and cross-browser handling. No browser support checking necessary, lack of support is treated in the same way as when the user rejects the request: the callback gets passed an error as the first argument.
Suitable for use with browserify/CommonJS on the client.
If you're not using browserify or you want AMD support use getscreenmedia.bundle.js
.
npm install getscreenmedia
With this helper it's clean/simple to get access to a user's camera, mic, etc.
var getScreenMedia = require('getscreenmedia');
getScreenMedia(function (err, stream) {
// if the browser doesn't support user media
// or the user says "no" the error gets passed
// as the first argument.
if (err) {
console.log('failed');
} else {
console.log('got a stream', stream);
}
});
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!
Error handling (denied requests, etc) are handled mostly by the underlying getUserMedia lib. However this adds one more error type:
"HTTPS_REQUIRED"
Because that's a current requirement of Chrome, the only browser that currently supports screensharing.
See the handling errors section of the getUserMedia lib for details about how errors are handled.
MIT
If you like this, follow: @HenrikJoreteg on twitter.
FAQs
A browser module for attempting to get access to a MediaStream of a user's screen. With a nice node-like API.
We found that getscreenmedia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.