问题
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