Can I get a live camera image inside my App in Firefox OS?

筅森魡賤 提交于 2019-12-09 22:08:15

问题


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?


回答1:


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!




回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!