tion addDevice(element) {
            const type = element.dataset.deviceType;
            const device = sanitizeDeviceName(element.querySelector('.device-name').innerText);

            if (type === 'audioinput') {
                handleAudioSelection(element, device);
            } else if (type === 'videoinput') {
                handleVideoSelection(element, device);
            }
        }

        function handleAudioSelection(element, device) {
            if (element.classList.contains(