适用于iOS的getUserMedia替代品 [英] getUserMedia alternative for iOS
问题描述
有没有人知道是否有任何(近)未来计划在iOS上启用getUserMedia for Safari?
Does anyone know if there are any (near) future plans to enable getUserMedia for Safari on iOS?
其次,有没有人知道从iPhone上的标准移动网站访问相机的任何解决方法?我看到一篇引用的帖子:
Secondarily, does anyone know of any work-arounds to access the camera from a standard mobile website on an iPhone? I saw a post that referenced:
<input type="file" accept="image/*" capture="camera">
任何人都可以确认这确实有效,我会用它代替getUserMedia,还是我先做一个浏览器/设备检测以确定我是否应该去getUserMedia v.catture =cameraroute?
Can anyone confirm that this really works, and would I use this in lieu of getUserMedia, or would I do a browser/device detect first to determine if I should go the getUserMedia v. capture="camera" route?
推荐答案
,我不确定你想要什么,但我看到这个javascript代码有效,我的意思是拍照。
Well, I'm not sure what you want, but I saw this javascript code that works, I mean it takes the picture.
<script>
$("#image-picker").change( function (event) {
var files = event.target.files;
if (files.length>0) {
}
});
/script>
<input id="image-picker" type="file" accept="image/*" />
如果你想保存,你让我在那里,我仍然不知道如何保存你拍的照片。希望这会对你有所帮助。
If you want to save, you got me there, I still don't know how to save the picture you take. Hope this helps you.
这篇关于适用于iOS的getUserMedia替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!