嗨,我尝试在 getUserMedia API 下面捕获 android 屏幕,但它没有任何帮助?
const constraints = {
audio: false, // mandatory.
video: {'mandatory': {'chromeMediaSource':'screen'}}
};
const successCallback = (stream) => {
var video = document.querySelector('video');
video.srcObject = stream;
video.onloadedmetadata = function(e) {
video.play();
};
};
const errorCallback = (error) => {
// We don't have access to the API
console.log("sadd"+error);
};
navigator.getUserMedia(constraints, successCallback, errorCallback);
我收到错误未找到请求的设备