remember volume setting across restarts

This commit is contained in:
Drew Weymouth
2023-02-19 14:19:31 -08:00
parent 631ef947e5
commit a83e21d7ea
5 changed files with 27 additions and 7 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ func NewBottomPanel(p *player.Player, nav func(browsing.Route)) *BottomPanel {
p.Seek(fmt.Sprintf("%d", int(f*100)), player.SeekAbsolutePercent)
})
bp.AuxControls = widgets.NewAuxControls()
bp.AuxControls = widgets.NewAuxControls(p.GetVolume())
bp.AuxControls.VolumeControl.OnVolumeChanged = func(v int) {
_ = p.SetVolume(v)
}