如何从Mobile Safari访问iPhone的相机 [英] How to access the iPhone's camera from Mobile Safari

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

问题描述

是否有用于从Mobile Safari访问iPhone相机的API或方式?我想创建一个可以在浏览器中读取条形码的应用程序。
提前致谢。

Is there a API or way for accessing the the iPhone's camera from Mobile Safari?I want to create a application that can read barcode within the browser. Thanks in advance.

推荐答案

没有。没有办法做到这一点。没有网页可以访问内部设备。

No. There's no way to do that. No web page can access internal devices.

你可以通过移动safari链接启动一个小的小应用程序,让用户选择条形码图像,然后重定向到将处理的网页(小应用程序也将上传)。就像这个人实际实现的那样(链接提供代码)。

You can do however a small tiny app that its launched via mobile safari link and makes user select the barcode image and then redirect to a web page that will process (the small app will also upload). Like what THIS guys actually implemented (the link provides code).

如果您没有使用Objective C和Cocoa Touch的经验,可以通过 PhoneGap ,如果您正在创建网页。

If you doesn't have experience with Objective C and Cocoa Touch you can create that app via PhoneGap like if you were creating a Web Page.

更新

从iOS 6等开始,您实际可以像官方规格所说,您可以通过上传API使用它作为在这里看到

From iOS 6 and so on you actually can as the official specs says, you can use it via the upload API as seen here.

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

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