aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/mod.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/script/player/mod.ts')
-rw-r--r--web/script/player/mod.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/script/player/mod.ts b/web/script/player/mod.ts
index 08193a7..fdb4e4a 100644
--- a/web/script/player/mod.ts
+++ b/web/script/player/mod.ts
@@ -60,8 +60,12 @@ function initialize_player(el: HTMLElement, node_id: string) {
.filter(({ track }) => get_track_kind(track.kind) == kind)
.map(({ track, index }): HTMLElement => {
const active = player.active_tracks.value.find(ts => ts.track_index == index) !== undefined
+ const onclick = (button: HTMLElement) => {
+ button.textContent = "…"
+ player.set_track_enabled(index, !active)
+ }
return e("div",
- e("span", { class: "jsp-track-stae" }, active ? "active" : ""), " ",
+ e("button", { class: "jsp-track-state", onclick }, active ? "-" : "+"), " ",
e("span", { class: "jsp-track-name" }, track.name), " ",
e("span", { class: "jsp-track-lang" }, track.language)
)