diff --git a/pages/overlay.templ b/pages/overlay.templ
index 680b006..007f512 100644
--- a/pages/overlay.templ
+++ b/pages/overlay.templ
@@ -19,7 +19,7 @@ templ Overlay(lnurl string, lnaddr string) {
-
+
{
const params = new URLSearchParams(window.location.search);
params.set(param, value);
@@ -207,6 +210,26 @@ templ Overlay(lnurl string, lnaddr string) {
}
`;
})
+
+ function updateStreamUrl() {
+ const params = new URLSearchParams();
+ const [qrX,qrY] = localStorage.getItem('qr-position')?.split(',').map(Number) ?? [0,0];
+ params.set("qrX", qrX);
+ params.set("qrY", qrY);
+ const [zapX,zapY] = localStorage.getItem('zap-container-position')?.split(',').map(Number) ?? [0,0];
+ params.set("zapX", zapX);
+ params.set("zapY", zapY);
+ const qrScale = localStorage.getItem('qrScale') ?? 1.0;
+ params.set("qrScale", qrScale);
+ const zapScale = localStorage.getItem('zapScale') ?? 1.0;
+ params.set("zapScale", zapScale);
+ const streamUrl = `${window.location.origin}${window.location.pathname}?${params.toString()}`
+ const element = document.getElementById('stream-url');
+ element.href = streamUrl;
+ element.textContent = '/overlay?' + params.toString();
+ }
+
+ updateStreamUrl();