aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/VideoTimer.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2025-02-06 06:41:49 +0300
committerRblSb <msrblsb@gmail.com>2025-02-07 01:12:14 +0300
commitd86f0c30e1726a56e670955c3b995945c1daf834 (patch)
tree2cff6b1c76191df76291f93c5a46810f09181727 /src/server/VideoTimer.hx
parent382f9b2ebedca905028341825350a0fa69d88673 (diff)
Fixes pack
- Fix timer seek on server pause with double timer.pause() calls - Implement multi-caching - Better uploading progress with XMLHttpRequest - Better upload/cache error reporting
Diffstat (limited to 'src/server/VideoTimer.hx')
-rw-r--r--src/server/VideoTimer.hx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/VideoTimer.hx b/src/server/VideoTimer.hx
index fcbb461..311e7f4 100644
--- a/src/server/VideoTimer.hx
+++ b/src/server/VideoTimer.hx
@@ -26,6 +26,11 @@ class VideoTimer {
}
public function pause():Void {
+ if (isPaused()) return;
+ updatePauseTime();
+ }
+
+ function updatePauseTime():Void {
startTime += rateTime() - rateTime() * this.rate;
pauseStartTime = stamp();
rateStartTime = 0;
@@ -47,7 +52,7 @@ class VideoTimer {
public function setTime(secs:Float):Void {
startTime = stamp() - secs;
rateStartTime = stamp();
- if (isPaused()) pause();
+ if (isPaused()) updatePauseTime();
}
public function isPaused():Bool {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage