0

如何通过 访问深度流轨道的属性getUserMedia()?我试图获得的属性principalPointX, principalPointY, focalLengthX, focalLengthY来自媒体轨道

文档说我需要设置depth为 true,所以当我这样做时,我收到一个错误,迫使我设置 a video

(index):20 Uncaught TypeError: Failed to execute 'getUserMedia' on 'Navigator': At least one of audio and video must be requested

当我尝试这样做时:

navigator.mediaDevices.getUserMedia({video: true, depth: true})
   .then(stream => {

   video.srcObject = stream;
   console.log(stream);

}).catch(console.error)

stream不会返回我想要获得的任何属性principalPointX。任何帮助,将不胜感激。

4

0 回答 0