aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/player.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-04-14 02:27:14 +0200
committermetamuffin <metamuffin@disroot.org>2024-04-14 02:27:14 +0200
commit11251b63d67625319abfdb7572a9f7f40caf4c02 (patch)
treed109600a2a7de7ae07d5f4d95272a11b04e75bd8 /web/script/player/player.ts
parent03a70f09afae32f1edf59fe9cc19d23908463aac (diff)
downloadjellything-11251b63d67625319abfdb7572a9f7f40caf4c02.tar
jellything-11251b63d67625319abfdb7572a9f7f40caf4c02.tar.bz2
jellything-11251b63d67625319abfdb7572a9f7f40caf4c02.tar.zst
jsp: volume keybinds like mpv
Diffstat (limited to 'web/script/player/player.ts')
-rw-r--r--web/script/player/player.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/script/player/player.ts b/web/script/player/player.ts
index 3d35c49..640a6d6 100644
--- a/web/script/player/player.ts
+++ b/web/script/player/player.ts
@@ -39,6 +39,8 @@ export class Player {
this.volume.value = this.video.volume
let skip_change = false;
this.volume.onchange(v => {
+ if (v > 1.) return this.volume.value = 1;
+ if (v < 0.) return this.volume.value = 0;
if (!skip_change) this.video.volume = v
skip_change = false
})