handle switch players while in pendingLoadPaused state
This commit is contained in:
@@ -196,9 +196,13 @@ func (p *playbackEngine) SetPlayer(pl player.BasePlayer) error {
|
|||||||
needToUnpause := false
|
needToUnpause := false
|
||||||
|
|
||||||
stat := p.CurrentPlayer().GetStatus()
|
stat := p.CurrentPlayer().GetStatus()
|
||||||
if p.pendingPlayerChange {
|
if p.pendingPlayerChange || p.pendingLoadPaused {
|
||||||
stat.State = player.Paused
|
stat.State = player.Paused
|
||||||
}
|
}
|
||||||
|
if p.pendingLoadPaused {
|
||||||
|
stat.TimePos = p.pendingLoadStartTime
|
||||||
|
stat.Duration = p.curTrackDuration
|
||||||
|
}
|
||||||
|
|
||||||
switch stat.State {
|
switch stat.State {
|
||||||
case player.Stopped:
|
case player.Stopped:
|
||||||
|
|||||||
Reference in New Issue
Block a user