Chrome和Firefox无法访问iPhone相机 [英] Chrome and Firefox are not able to access iPhone Camera

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

问题描述

下面的HTML代码

<video id="video" class="video" height="400" width="400" playsinline autoplay muted loop></video>

和JavaScript

and JavaScript

var video = document.getElementById("video");

navigator.mediaDevices.getUserMedia({video: true, audio: false})
    .then(function(s) {
    stream = s;
    video.srcObject = s;
    video.play();
  })

该链接在Android设备上的所有浏览器上都可以正常运行,在iPhone设备的Safari浏览器上也可以正常运行,但是甚至不要求其他浏览器(如iPhone设备上的Chrome和Firefox)获得相机许可.

The link works fine on all Browsers in Android device, also works fine on Safari browser of iPhone devices, but it does not even ask camera permission for other Browsers like Chrome and Firefox on iPhone Devices.

推荐答案

iOS上的Chrome和FireFox仍使用iOS WebKit渲染引擎. getUserMedia仅在Safari中可用,而在iOS上的其他浏览器中不可用.

Chrome and FireFox on iOS still use the iOS WebKit rendering engine. getUserMedia is only available in Safari, not other browsers on iOS.

当前在这里进行跟踪: https://bugs.chromium .org/p/chromium/issues/detail?id = 752458 -但鉴于该报告是一年多前第一次报告的,而就在5天前,它已被更新为尚未修复,因此我没有保留我的呼吸.

This is currently being tracked here: https://bugs.chromium.org/p/chromium/issues/detail?id=752458 - but given it was first reported over a year ago and just 5 days ago it was updated to say it hasn't been fixed, I am not holding my breath.

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

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