start() {
window.navigator.mediaDevices
.getUserMedia(this.constraints)
.then(stream => {
this.mediaStream = stream;
this.streamVideo.srcObject = stream;
this.streamVideo.play();
this.recorder = new MediaRecorder(stream);
this.recorder.ondataavailable = e => {
this.chunk = e.data;
this.download.href = window.URL.createObjectURL(chunk);
};
this.recorder.start();
});
},
api文档里没有此说明,求助高手了。
不要用getUserMedia,用getDisplayMedia