您可以从 Mobile Safari 访问 iPhone 相机吗? [英] Can you access the iPhone camera from Mobile Safari?

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

问题描述

是否有用于从 Mobile Safari 访问 iPhone 相机的 JavaScript API?

Is there a JavaScript API for accessing the the iPhone's camera from Mobile Safari?

推荐答案

由于iOS6,可以使用

<input type="file" accept="image/*" capture="camera">
<input type="file" accept="video/*" capture="camera">

它的作用类似于常规文件上传,但它会打开 iPhone 相机并上传图片或视频.

It will act like a regular file upload, but instead, it will open the iPhone camera and upload a picture or a video.

希望这对某人有所帮助.

Hope this help someone.

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

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