ensure casting playback stops when quitting app

This commit is contained in:
Drew Weymouth
2025-03-29 15:15:13 -07:00
parent ff455528d6
commit 6a7f06769d
3 changed files with 20 additions and 5 deletions
+7
View File
@@ -512,6 +512,10 @@ func (p *PlaybackManager) Stop() {
p.cmdQueue.Stop()
}
func (p *PlaybackManager) Shutdown() {
p.cmdQueue.StopAndWait()
}
func (p *PlaybackManager) Pause() {
p.cmdQueue.Pause()
}
@@ -662,6 +666,9 @@ func (p *PlaybackManager) runCmdQueue(ctx context.Context) {
mpv.ForceRestartPlayback()
}
}
if c.OnDone != nil {
c.OnDone()
}
}
}
}