This repository was archived by the owner on May 13, 2024. It is now read-only.

Description
I couldn't find the code for the page https://webrtc.org/getting-started/media-devices in this repo, but in the code block for "Listening for devices changes" instead of the following:
// Listen for changes to media devices and update the list accordingly
navigator.mediaDevices.addEventListener('devicechange', event => {
const newCameraList = getConnectedDevices('video');
updateCameraList(newCameraList);
});
it should be:
// Listen for changes to media devices and update the list accordingly
navigator.mediaDevices.addEventListener('devicechange', async event => {
const newCameraList = await getConnectedDevices('videoinput');
updateCameraList(newCameraList);
});
(Added async and await, and replaced 'video' with 'videoinput'.)