seeking, layout update

This commit is contained in:
Drew Weymouth
2025-07-24 19:26:54 -07:00
parent 43f6d501c9
commit 7dae735d10
6 changed files with 82 additions and 38 deletions
+2 -1
View File
@@ -160,6 +160,7 @@ func (pc *PlayerControls) OnSeek(f func(float64)) {
f(pos)
}
}
pc.waveform.OnSeeked = f
}
func (pc *PlayerControls) OnSeekPrevious(f func()) {
@@ -208,10 +209,10 @@ func (pc *PlayerControls) UpdatePlayTime(curTime, totalTime float64) {
pc.curTimeLabel.SetText(ct)
updated = true
}
pc.waveform.SetProgress(v)
if updated {
// Only update slider once a second when time label changes
pc.slider.SetValue(v)
pc.waveform.SetProgress(v)
}
}
}