Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getUserMedia() shim for PhoneGap/Cordova?

I have created a web app with Cordova and I need to show a live camera stream in my background. It seems that the Camera/Videos APIs from Cordova just open the native Camera/Video apps instead of returning live camera data. What I really need is something like getUserMedia() which is only available on Opera and Chrome (June 2012).

Is there a shim to use getUserMedia() within Cordova or any Plugins which behave similarly?

like image 440
Pipo Avatar asked Jun 06 '12 07:06

Pipo


1 Answers

There's a plugin for capturing the camera stream, It uses AVCaptureVideoDataOutput to create a capture session. Each frame is base64 encoded and passed to the Cordova UIWebView. Its experimental and is slower than any native approach.

like image 172
David Karlsson Avatar answered Oct 05 '22 00:10

David Karlsson