So I am having a look into Firefox OS right now. One thing I would like to try is to manipulate the device camera's live feed using canvas et.al.
From what I can see in the blog posts (like this one) and the code in the boilerplate app this is always done using a MozActivity
, meaning that the user is leaving the application, takes a picture and passes this picture back to the application, where I could post-process it.
But for live manipulation I would need to have a live camera feed inside my App, just like you would do using getUserMedia
when accessing a computer's webcam. getUserMedia
doesn't seem to be supported in the Firefox OS simulator though.
Is there any workaround to this or some API that I am missing?
I'll answer this with the response I got from the Mailing List (the answer is "not yet"):
WebRTC will (hopefully) land in Firefox OS 1.2 (as reference, the initial launch is on 1.0.1, closely followed but dependent on carriers is 1.1). WebRTC is a of lot of low-level hardware dependencies, so it might take longer.
You can follow along on this meta bug and its dependencies: https://bugzilla.mozilla.org/show_bug.cgi?id=750011
Thanks for the answer, Mozilla, can't wait for 1.2!
refer to thread getUserMedia for Firefox OS
WebRTC for audio is supported in Firefox OS 1.2. But WebRTC for video (ex: live camera feed) is just landed in Firefox OS 1.4, which is still in development phase. So be patient, it will be available this year.
来源:https://stackoverflow.com/questions/16106584/can-i-get-a-live-camera-image-inside-my-app-in-firefox-os