我正在为移动设备开发一个网络应用程序。为了拍摄照片,我使用 html5 功能 - input type="file"capture="camera"
<input type="file" accept="image/*" capture="camera" />
问题是它要求在拍摄新照片或选择现有照片之间进行选择。
是否有可能无需询问即可启动相机立即拍摄新照片? 是否可以保存拍摄的照片而不询问“重新拍摄/使用照片”?
最佳答案
Is there a possibility to launch camera for taking a new photo at once without asking this?
是的,但仅限于 Android,,它看起来像这样:
如何:如果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立即捕获照片(<input/>)而不要求选择现有照片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34900303/