diff --git a/light9/ascoltami/Light9AscoltamiUi.ts b/light9/ascoltami/Light9AscoltamiUi.ts --- a/light9/ascoltami/Light9AscoltamiUi.ts +++ b/light9/ascoltami/Light9AscoltamiUi.ts @@ -7,6 +7,7 @@ import { SyncedGraph } from "../web/Sync export { RdfdbSyncedGraph } from "../web/RdfdbSyncedGraph"; export { Light9TimelineAudio } from "../web/light9-timeline-audio"; import { classMap } from "lit/directives/class-map.js"; +import { TimingUpdate } from "./main"; debug.enable("*"); const log = debug("asco"); @@ -25,9 +26,11 @@ async function postJson(url: string, jsB export class Light9AscoltamiUi extends LitElement { graph!: SyncedGraph; times!: { intro: number; post: number }; - currentDuration: number = 0; @property() nextText: string = ""; @property() isPlaying: boolean = false; + @property() song: NamedNode | null = null; + @property() t: number = 0; + @property() currentDuration: number = 0; render() { return html` @@ -123,17 +126,11 @@ export class Light9AscoltamiUi extends L } byId("updateReq").innerText = "" + updateFreq; - (window as any).finishOldStyleSetup( - this.times, - updateFreq, - this.currentDurationChanged.bind(this), - (t: string) => { - this.nextText = t; - }, - (is: boolean) => { - this.isPlaying = is; - } - ); + (window as any).finishOldStyleSetup(this.times, updateFreq, (data: TimingUpdate) => { + this.nextText = data.next; + this.isPlaying = data.playing; + this.currentDuration = data.duration; + }); } constructor() {