otalk / getusermedia Goto Github PK
View Code? Open in Web Editor NEWCross-browser getUserMedia shim with a node.js style error-first API
Cross-browser getUserMedia shim with a node.js style error-first API
From reading the spec, it seems like current Chrome (35) is following the spec now. It sets name
to "PermissionDeniedError" which is what the spec says. Did the spec change since you wrote this?
Permission Failure: Let error be a new MediaStreamError object whose name attribute has the value PermissionDeniedError and jump to the step labeled Error Task below.
Constraint Failure: Let error be a new MediaStreamError object whose name attribute has the value ConstraintNotSatisfiedError and whose constraintName attribute is set to the name of the constraint that caused the error.
What do you think about updating this module?
Hello @fippo!
Thanks for the very handy package!
One question troubles me. In index-browser.js
there is a webrtc-adapter
dependency, which is a sort-of polyfill. That, I believe, unresonably bloats bundle size up to 70kb(!). That is larger than size of some web-applications, and all that is only to provide a bit more convenient way to get user media than default.
How much is it reasonable?
Thanks.
I get a stream if I ask for video only, or video + audio, but asking for just audio gives me PERMISSION_DENIED. Using Chrome version 30.0.1599.66 on Linux.
We had to switch to a different getusermedia library because webrtc-adapter-test
is blowing up on anything that isn't chrome or firefox + mutating a bunch of globals. What's the reason for this library using webrtc-adapter-test
?
nw.js (node-webkit) uses file:// protocol. So this commit triggers the error.
Why is this not supported?
Can we have support for bower as well, apart from npm? Can send you a pull request for it.
Thanks.
The link to the spec in https://github.com/otalk/getUserMedia#handling-errors-summary has an anchor (#mediastreamerror
) that's no longer pointing anywhere in the page.
Electron leverages Node.JS, which has access to the navigator, but seems to be loading index-node.js
, which just throws back an error.
Is there any way to implement mute()? I have been searching for all kind of info but there is none and the source code isn't very clear imo. I would give this package 2 thumbs up if I can manipulate the mute and camera facing features however getting to the userMedia seems to be a mission. Can anyone else provide any instructions? SimpleWebRTC not so simple it seems.
probably has nothing to do with this library, but has anybody noticed that chrome 42 (latest stable as of today) on windows is returning empty black streams from getusermedia?
navigator.mozGetUserMedia replaced by navigator.mediaDevices.getUserMedia
Hello!
If to open a page in browser locally as file://...
, then getusermedia
does not invoke a callback, as if everything is fine, but indeed it is not. Should it?
I think it would be useful to catch error or something, to display that it is not available.
getUserMedia(function (err, stream) {
if (err) {
console.log('failed');
} else {
console.log('got a stream', stream);
}
});
When callback success, we can use stream for a video element:
<video src="stream"></video>
But when callback failure, Can I set a virtual stream for a video element? such as:
getUserMedia(function (err, stream) {
if (err) {
/*
get a virtual stream
the virtual stream comes from a video, or img ...
and the virtual stream can use for a video element
*/
} else {
console.log('got a stream', stream);
}
});
Camera is not working in Chrome
Good: 55.0.2873.0
Bad : 55.0.2875.0
Why not exposing the Promise based standard API of getUserMedia()
?
I know that it is possible to get an array of all the available cameras using some browsers like Chrome. How can I archieve it through your shim?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.