我使用getUserMedia()在iOS 11的Safari上捕获相机流。当我使用MediaDevices API获取相机列表时,标签为空白。有没有办法可靠地确定哪个摄像头指向哪个方向?
navigator.mediaDevices.enumerateDevices().then(function(devices) {
devices.forEach(function(device) {
if(device.kind === 'videoinput') {
console.log(device);
// Labels for both cameras are blank:
// MediaDeviceInfo { deviceId: "123ABC", groupId: "", kind: "videoinput", label: "" }
}
});
});