diff --git a/www/index.html b/www/index.html index 4781b57f..86497bae 100644 --- a/www/index.html +++ b/www/index.html @@ -89,9 +89,7 @@ const templates = [ 'stream', '2-way-aud', - 'mp4', - 'mjpeg', - 'info', + 'links', 'delete', ]; @@ -138,15 +136,17 @@ for (const [name, value] of Object.entries(data)) { const online = value && value.consumers ? value.consumers.length : 0; + const src = encodeURIComponent(name); const links = templates.map(link => { - return link.replace("{name}", encodeURIComponent(name)); + return link.replace("{name}", src); }).join(" "); const tr = document.createElement("tr"); tr.dataset["id"] = name; tr.innerHTML = `` + - `${online}${links}`; + `${online} / info` + + `${links}`; tbody.appendChild(tr); } }); @@ -156,17 +156,9 @@ fetch(url, {cache: 'no-cache'}).then(r => r.json()).then(data => { const info = document.querySelector(".info"); info.innerText = `Version: ${data.version}, Config: ${data.config_path}`; - - try { - const host = data.host.match(/^[^:]+/)[0]; - const port = data.rtsp.listen.match(/[0-9]+$/)[0]; - templates.splice(4, 0, `rtsp`); - } catch (e) { - templates.splice(4, 0, `rtsp`); - } - - reload(); }); + + reload(); \ No newline at end of file diff --git a/www/links.html b/www/links.html new file mode 100644 index 00000000..4c327fed --- /dev/null +++ b/www/links.html @@ -0,0 +1,89 @@ + + + + go2rtc - links + + + + + + + + + +