【发布时间】:2017-08-09 17:15:49
【问题描述】:
我正在使用 cordova-plugin-crosswalk-webview 开发一个 ionic WebRTC 应用程序,我得到 navigator.getUserMedia is not a function when running on the android device 你知道为什么吗?
navigator.getUserMedia({audio: true, video: true},
function(stream){
let vid = document.getElementById('my-video');
if(vid)
{
vid.setAttribute("src", URL.createObjectURL(stream));
} else {
alert("err geting div");
}
//this.localStream = stream;
}, function(){ alert("err");}
);
<video id="my-video" muted="true" autoplay="" src=""></video>
【问题讨论】:
标签: ionic-framework webrtc getusermedia crosswalk