aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/player.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-10-24 07:40:51 +0200
committermetamuffin <metamuffin@disroot.org>2023-10-24 07:40:51 +0200
commitb462195f2dcfe457eae7791c14e4b834b2d5ab29 (patch)
tree492ba43952fa6798320f2b2bb4d4bd5484e2e4f2 /web/script/player/player.ts
parent6e9ccad881a7f887599bc8f3f6b9ca2424a2cc5e (diff)
parent55f7f06cecd5b6f5661f6f22e8bb3e0448b9713a (diff)
downloadjellything-b462195f2dcfe457eae7791c14e4b834b2d5ab29.tar
jellything-b462195f2dcfe457eae7791c14e4b834b2d5ab29.tar.bz2
jellything-b462195f2dcfe457eae7791c14e4b834b2d5ab29.tar.zst
Merge branch 'master' of codeberg.org:metamuffin/jellything
Diffstat (limited to 'web/script/player/player.ts')
-rw-r--r--web/script/player/player.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/script/player/player.ts b/web/script/player/player.ts
index 4c1d9fc..acf2a19 100644
--- a/web/script/player/player.ts
+++ b/web/script/player/player.ts
@@ -21,7 +21,7 @@ export class Player {
private cancel_buffering_pers: undefined | (() => void)
set_pers(s?: string) {
- if (this.cancel_buffering_pers) this.cancel_buffering_pers()
+ if (this.cancel_buffering_pers) this.cancel_buffering_pers(), this.cancel_buffering_pers = undefined
if (s) this.cancel_buffering_pers = this.logger?.log_persistent(s)
}
@@ -38,6 +38,7 @@ export class Player {
}
this.video.onwaiting = () => {
console.log("waiting");
+ if (this.video.currentTime > this.duration.value - 0.2) return this.set_pers("Playback finished")
this.set_pers("Buffering...")
this.canplay.value = false;
}