mirror of
https://github.com/SrIzan10/vdo.ninja.git
synced 2026-05-01 11:05:24 +00:00
Update devices.html
sanitize device names function
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user