diff --git a/frontend/src/components/audio-player/seekbar/seek-bar.ts b/frontend/src/components/audio-player/seekbar/seek-bar.ts index ba15bcd..8e01de4 100644 --- a/frontend/src/components/audio-player/seekbar/seek-bar.ts +++ b/frontend/src/components/audio-player/seekbar/seek-bar.ts @@ -12,14 +12,14 @@ export class SeekBar extends SignalWatcher(LitElement) { progressIntervalMillis: number = 1000; @property() - isPlaying: boolean = true; + isPlaying: boolean = false; timerID: number = -1; private rangeRef = createRef(); constructor(){ super(); - this.startProgress(); + this.stopProgress(); } static override styles = css` sl-range::part(base) { @@ -33,9 +33,19 @@ export class SeekBar extends SignalWatcher(LitElement) { `; override render() { return html` - + if(this.isPlaying) this.startProgress(); + else this.stopProgress(); + }}" + @sl-input="${() => { + var playing = this.isPlaying; + this.stopProgress(); + this.isPlaying = playing; + }}"> `; }