Update devices.html

sanitize device names function
This commit is contained in:
Joel Calado 2021-02-08 21:15:17 +00:00
parent cbc7971fa5
commit f62f31329d

View File

@ -64,6 +64,10 @@
return value.kind === "videoinput";
}
function sanitizeDeviceName(deviceName) {
return String(deviceName).toLowerCase().replace(/[\W]+/g, "_");
}
function addDevice(element) {
const info = element.getElementsByClassName("device-id")[0];
const type = info.dataset.deviceType;