More robust frontend reaction in case of race conditions on player state events
This commit is contained in:
parent
9e6c40d393
commit
7947c1031d
1 changed files with 7 additions and 1 deletions
|
@ -295,10 +295,16 @@ Vue.component('media', {
|
|||
delete event.resource;
|
||||
}
|
||||
|
||||
if (status.state !== 'stop') {
|
||||
if (status.state !== 'stop' || event.type.endsWith('.MediaPlayEvent')) {
|
||||
status.title = status.title || this.status[type][player].title;
|
||||
}
|
||||
|
||||
if (event.type.endsWith('.MediaPlayEvent')) {
|
||||
status.state = 'play';
|
||||
} else if (event.type.endsWith('.MediaPauseEvent')) {
|
||||
status.state = 'pause';
|
||||
}
|
||||
|
||||
Vue.set(this.status[type], player, status);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue