Comments (7)
given the different implementations of the different vendors i'm currently thinking about coding a lib ontop of this lib. the lib i have in mind would be simple
- getUserVideo(success, error)
- getUserAudio(success, error)
but the success callback would not (only) get the stream object, but a ready to use <video>
or <audio>
HTML element.
the callback would be something like this
onSuccess = function(videoEl, stream) {
//do some stuff with the videoEl
//or go low level with the stream thingie
}
<video>
and <audio>
are pretty standardized over all modern browser and every dev. (by now) knows how to use them.
otherwise it will take ages until getUserMedia will get any mainstream adoption.
just my 2c on the usability topic
from getusermedia.js.
@franzenzenhofer If there are any other changes to the overall API that you would like to suggest I'd be happy to consider them for inclusion. At the moment whilst the library itself is very usable, I feel like better abstractions could help people get setup to use it in less time.
from getusermedia.js.
started working on a simple (cross browser but no flash fallback ) getUserVideo function, see https://github.com/franzenzenhofer/Sinne feel free to drop by (the video demo already works https://github.com/franzenzenhofer/Sinne/blob/master/demo/video.html )
from getusermedia.js.
@franzenzenhofer Awesome. I'll take a look! Our projects could work together. e.g eventually if yours was fleshed out enough, could drop the gUM logic in mine to consume yours and just use getUserMedia.js as a bridge to the fallback.
Will try to provide feedback.
from getusermedia.js.
hi, i published https://github.com/franzenzenhofer/Sinne as V1, currently is uses the same logic a getUserMedia.js (rewritten in coffeescript), but yeah in the future it will make sense to use getUserMedia.noFallback.js directly.
in the current implementation i don't see a way to use the flash fallback in an non-"OMG it's flash i have to implement a complete other logic for this"-way.
i was thinking on how making a flash fallback feasible and non-disturbing, but the only way i could imagine was that we have to treat the flash-object as a kind of allow-bar.
- display the flash-thingie
- users clicks on "ok" for the video access
- flash thingie gets hidden
- flash thingie video stream gets funneled into a MediaStream (or whatever stream we need) object
- success callback gets called (with the stream)
as i happily gave up on flash in 2004, i wonder if such a logic "flash thingie video stream -> MediaStream" is feasible?
from getusermedia.js.
Correct me if I've misinterpreted: Do you mean a way to display the Flash fallback in such a way that its completely (as in even from a UI perspective) transparent to the user what you're actually using behind the scenes? :)
If this is correct, there are a few challenges with it:
- Chrome/Other browsers to the best of my knowledge don't support exposing the native notification/permissions bar for re-use. That said one could come up with something quite similar with CSS/HTML.
- There unfortunately isn't a way to override the Flash permissions dialog. People have found workarounds for this in the past, but because there were security implications of it those holes allowing it have been patched. One might be able to hide the permissions dialog button beneath something custom, but I wonder how well that might work.
From a usability perspective, because there's a noFallback version of the shim hosted in the repo at the moment, I'm wondering whether or not to implement the Flash fallback part as a plugin that gets optionally included in the build process. Beyond that I think it'll be down to making gUM more easy to use.
from getusermedia.js.
hi
Do you mean a way to display the Flash fallback in such a way that its completely (as in even from a UI perspective) transparent to the user what you're actually using behind the scenes? :)
no, not "completely", i mean a flow like this
- gerUserMedias.js getUserMedia(options, successCallback, errorCallback) gets called
- detects that there is no native getUserMedia()
- creates flash object
- display (gray rectangle) flash object - with permission dialogue
- user clicks "allow camera"
- hides (gray rectangle) flash object
- the flash (user webcam) video gets funneled into a MediaStream (or a MediaStream like) object
- successCallback(stream) gets called
basically we only display the flash gray rectangle object for the permission dialogue - convert whatever flash gives us into a mediastream like object - call the successCallback
what i don't know, and what i want to find out (but i don't know who to ask), is, if this part "the flash (user webcam) video gets funneled into a MediaStream (or a MediaStream like) object" is in any way feasible?
gUM more easy to use.
working on it
from getusermedia.js.
Related Issues (20)
- Flash callback for allow button? HOT 24
- Object doesn't support property or method 'setTimeout' on IE HOT 5
- some solid documentation and examples HOT 4
- Getting audio and video (question) HOT 1
- Recent Chrome Version 47.0.2526.73 Breaks
- choose front/back camera in IE11 HOT 1
- Fallback Image Capture With Larger Window HOT 2
- Can I just specify height and let width be proportional to the stream size?
- Firefox deprecated navigator.getUserMedia HOT 1
- Support for Promise interface
- Supporting audio in the fallback HOT 8
- Not working in IE 11 HOT 2
- how is it different from adapter.js?
- demo.js assumes that unprefixed MediaStream is Firefox-only
- In Chrome it errors: Uncaught (in promise) DOMException: Failed to load because no supported source was found. HOT 5
- Demo is not working on Chrome, Firefox, Safari! HOT 5
- Example to turn on flash light?
- Not getting any error callback when camera permissions are denied on IE
- cam.capture always undefined
- Questions about Float32Array and Compatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getusermedia.js.