android - html5立即捕获照片(<input/>)而不要求选择现有照片

标签 android ios html mobile

我正在为移动设备开发一个网络应用程序。为了拍摄照片,我使用 html5 功能 - input type="file"capture="camera"

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

问题是它要求在拍摄新照片或选择现有照片之间进行选择。

Image

是否有可能无需询问即可启动相机立即拍摄新照片? 是否可以保存拍摄的照片而不询问“重新拍摄/使用照片”?

最佳答案

Is there a possibility to launch camera for taking a new photo at once without asking this?

是的,但仅限于 Android,,它看起来像这样:

enter image description here

如何:如果capture="capture"(在规范中替换capture="camera")是输入的一部分属性表明您想要直接从相机捕获。 Android支持,iOS忽略,见this article了解详情。

And is it possible to save photo which was taken without asking "Retake/Use photo"?

不,进程和 UI 由操作系统控制。

免责声明:图片由Pipe提供,我是一家公司的首席技术官,负责视频录制。

关于android - html5立即捕获照片(&lt;input/>)而不要求选择现有照片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34900303/

相关文章:

android - 我自己的类中的 ClassDefNotFoundError

java - Android应用程序中的全局方法?

ios - 如何根据 UICollectionView 中的单元格数量更改 View 的大小

html - 标题 onHover 的 CSS 不起作用

java - 是否可以创建一个引用图片的数组

android - 处理 Google Play 服务更新消息

iOS:切换到第二个 ViewController

ios - 从 AppDelegate 调用委托(delegate)函数不起作用

javascript - 如何从 document.form 获取 html 元素

PHP 删除重复的 XML 提要条目