📜  屏幕捕获 api 替代方案 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:24.059000             🧑  作者: Mango

代码示例1
var constraints = {video: {mediaSource: "screen", width: 320, height: 200}};

navigator.mediaDevices.getUserMedia(constraints)
  .then(stream => video.srcObject = stream)
  .catch(e => console.log(e.message));