click', async ev => {
        ev.target.nextElementSibling.style.display = 'block';
    });

    document.getElementById('stream-form').addEventListener('submit', async ev => {
        ev.preventDefault();

        const url = new URL('api/streams', location.href);
        url.searchParams.set('name', ev.target.elements['name'].value);
        url.searchParams.set('src', ev.target.elements['src'].value);

        const r = await fetch(url, {method: 'PUT'});
        alert(r.ok ? 'OK' : 'ERROR: ' + await r.te