2016-05-16 126 views
5

我在HTML5页面中使用以下代码。当我在Android和PC(chrome)上运行我的页面时,代码工作正常,并且我得到正确的javascript alert();,但是当我在iPhone或iPad等ios设备上运行相同的页面时,我没有收到任何内容(没有alert()所有)。getUserMedia iOS问题?

这是我的代码:

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!'); 
}); 

是没有办法,我失去了一些东西?

任何帮助,将不胜感激。

+1

[WebApp使用webRTC在iOS浏览器和Android Chrome浏览器中跨平台视频聊天](http://stackoverflow.com/questions/23374806/webapp-using-webrtc-for-cross-platform-videochat-in -ios-browser-and-android-chro) –

+0

[请不要在标题中加标签](https://stackoverflow.com/help/tagging) – Liam

+0

'getUserMedia'是WebRTC的一部分,不支持Safari/Apple在这个时间点。请参阅:http://iswebrtcreadyyet.com/请参阅此问题以获取更多信息:https://stackoverflow.com/questions/23374806/webapp-using-webrtc-for-cross-platform-videochat-in-ios-browser- and-android-chro/23391401#23391401 – nineteeneightyeight

回答

1

它将在2017年秋季工作,一旦iOS11发布。

+0

你能显示一篇文章或资料来源吗? –