enumerate-devices

Trying to capture audio but navigator.mediaDevices.enumerateDevices() is NULL on Safari 12 even with microphone permissions granted

☆樱花仙子☆ 提交于 2019-12-24 00:23:49
问题 See related question: Navigator.mediaDevices.getUserMedia not working on iOS 12 Safari We are trying to capture audio from user input user MediaDevices.getUserMedia and Audio Context When the user clicks a button we check for available devices and then we capture their audio stream let enumDevicePromise = navigator.mediaDevices.enumerateDevices() .then(devices => devices.find(d => d.kind === "audioinput" && d.label !== "" && d.deviceId === "default")) .catch((error) => { // handle error });