Mercurial > code > home > repos > light9
diff web/ascoltami/main.ts @ 2427:cc69faa87c27
tear up and rewrite ascoltami to emit player state into the graph. web ui works but displays nothing but songs
author | drewp@bigasterisk.com |
---|---|
date | Sat, 25 May 2024 15:44:11 -0700 |
parents | 4556eebe5d73 |
children |
line wrap: on
line diff
--- a/web/ascoltami/main.ts Sat May 25 15:41:27 2024 -0700 +++ b/web/ascoltami/main.ts Sat May 25 15:44:11 2024 -0700 @@ -2,6 +2,7 @@ return document.getElementById(id)!; } +// obsolete: watch the graph instead export interface TimingUpdate { // GET /ascoltami/time response duration: number; @@ -18,7 +19,7 @@ // let lastPlaying = false; - const events = new EventSource("../service/ascoltami/time/stream"); + const events = new EventSource("/service/ascoltami/time/stream"); events.addEventListener("message", (m)=>{ const update = JSON.parse(m.data) as TimingUpdate updateCurrent(update)