nstraints);
            preview.srcObject = localStream;
            const pc = new RTCPeerConnection(pcConfig);
            window.pc = pc; // for debugging purposes
            for (const track of localStream.getTracks()) { pc.addTransceiver(track, { 'direction': 'sendonly' }) }
            const whip = new WHIPClient();
            await whip.publish(pc, url.value, token.value);
            connStatus.innerHTML = "Connected";
            button.innerHTML = "Disconnect";
            button.onclick = async