Update 'Continue' implementation

This commit is contained in:
zackslash
2023-10-20 10:24:36 +01:00
parent 5175c5cae4
commit 90ecdf242f
+6
View File
@@ -419,11 +419,17 @@ func (p *Player) Pause() error {
// Continue playback and update the player state // Continue playback and update the player state
func (p *Player) Continue() error { func (p *Player) Continue() error {
if p.status.State == Paused {
err := p.setPaused(false) err := p.setPaused(false)
if err == nil { if err == nil {
p.setState(p.prePausedState) p.setState(p.prePausedState)
} }
return err return err
} else if p.status.State == Stopped {
return p.PlayFromBeginning()
}
return nil
} }
// Get the loop mode of the player. // Get the loop mode of the player.