📜  config.video 约束 - 无论代码示例

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

代码示例1
document.getElementById("startButton").addEventListener("click", function() {
  navigator.mediaDevices.getUserMedia({
      video: {
        width: 1920,
        height: 1024,
        frameRate: 15
      }
  }).then(stream => videoElement.srcObject = stream)
    .catch(err => log(err.name + ": " + err.message));
}, false);