aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/player.ts
diff options
context:
space:
mode:
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;
}