add replaySpeed query paramerter

This commit is contained in:
Matthias Wirth
2025-03-27 20:59:50 +00:00
parent b8cf5ae2b2
commit 535e917950
2 changed files with 12 additions and 2 deletions

View File

@@ -81,6 +81,7 @@ See the main readme for more examples on how to use the filters
## heatmap / replay (only available with readsb --heatmap parameter)
- replay - replay history of all planes
- replaySpeed - adjust replay speed, 0 loads the replay paused with default speed set
- heatmap - show a heatmap for the last 24h by default (optional: supply the maximum number of dots drawn, default 32000)
- heatDuration - how many hours to show in the heatmap
- heatEnd - how many hours to shift the heatmap time window into the past

View File

@@ -7592,11 +7592,20 @@ function currentExtent(factor) {
function replayDefaults(ts) {
jQuery("#replayPlay").html("Pause");
let playing = true;
let speed = 30;
if (usp.has("replaySpeed")) {
speed = usp.getFloat("replaySpeed");
}
if (speed == 0) {
speed = 30;
playing = false;
}
return {
playing: true,
playing: playing,
ts: ts,
ival: 60 * 1000,
speed: 30,
speed: speed,
dateText: zDateString(ts),
hours: ts.getUTCHours(),
minutes: ts.getUTCMinutes(),