s='device-name'>${device.label}</span>
                        <span class='device-id'>${device.deviceId}</span>
                    </div>`;
            });
            output += "</div>";
            document.getElementById(elementId).innerHTML = output;
        }

        async function requestPermissions() {
            try {
                const stream = await navigator.mediaDevices.getUserMedia({ audio: true, video: true });
                stream.getTracks().forEach(track => track.stop())