Update 'Continue' implementation
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user