getUserMedia iOS问题? [英] getUserMedia iOS issue?
本文介绍了getUserMedia iOS问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在HTML5页面中使用以下代码。当我在Android和PC(chrome)上运行我的页面时,代码工作正常,我得到正确的javascript alert();
但是当我在ios上运行相同的页面时像iPhone或iPad这样的设备,我什么都没得到(根本没有 alert()
。)
I'm using the following code in an HTML5 page. when i run my page on Android and PC (chrome), the code works fine and I get the correct javascript alert();
but when I run the same page on an ios device like iPhone or iPad, I don't get anything (no alert()
at all).
这个是我的代码:
navigator.getUserMedia = ( navigator.getUserMedia || // use the proper vendor prefix
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia);
navigator.getUserMedia({video: true}, function() {
alert('camera is supported in your browser');
}, function() {
alert('camera is not supported in your browser!');
});
我有什么遗漏?
推荐答案
它将于2017年秋季上市,一旦 iOS11 已发布。
It will work in fall 2017, once iOS11 is released.
这篇关于getUserMedia iOS问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文