我如何使用HTML5访问iPhone或Android相机? [英] How can I access iPhone or Android camera using HTML5?

查看:403
本文介绍了我如何使用HTML5访问iPhone或Android相机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个Web应用程序能够在HTML5专为iPhone或Android浏览器。我如何能够访问摄像头两个实例,对我来说,拍摄图像,并把它上传到Web应用程序?

I am trying to create a web application to be built on HTML5 for iPhone or Android browser. How will I be able to access the camera on both instance for me to capture an image and upload it to the web application?

推荐答案

我不认为这是可能的。至少,在目前的状态下,HTML5不能访问相机(或其他外围设备)。另一种方法是创建一个应用程序的PhoneGap,在那里你可以开发HTML5应用程序(将包装到一个本地应用程序),附加库(JS),它允许您访问这些。

I don't think this is possible. At least, in the current state, HTML5 cannot access the camera (or other peripherals). An alternative would be to create a PhoneGap application, where you can develop the app in HTML5 (which will be wrapped into a native application), with additional libraries (JS) which let you access these.

在PhoneGap的更多信息: http://phonegap.com/start
在PhoneGap的照相机API: http://docs.phonegap.com/en/ 1.0.0 / phonegap_camera_camera.md.html

More info on PhoneGap: http://phonegap.com/start Camera api on PhoneGap: http://docs.phonegap.com/en/1.0.0/phonegap_camera_camera.md.html

这篇关于我如何使用HTML5访问iPhone或Android相机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆