Phonegap : Camera view with background image

淺唱寂寞╮ 提交于 2020-01-11 06:10:49

问题


I am using Phonegap with Sencha Touch to get camera functionality. But instead of the default camera view, I want a picture with transparent background to be overlaid upon the live camera view. Similar to below example where a dinosaur image has been overlaid upon the camera view image.

Can you tell me whether this feature can be achieved with Phonegap or in any other way?


回答1:


It can be achieved but it requires a bit of native code and a simple trick.

You need to set the phonegap container to transparent, and also add a surface behind your phonegap container.

You use native code to initialize the camera view and then phonegap renders atop of it.

A good example can be found at: http://git.libresoft.es/ARviewer-phoneGap/



来源:https://stackoverflow.com/questions/8268669/phonegap-camera-view-with-background-image

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