More robust frontend reaction in case of race conditions on player state events

This commit is contained in:
Fabio Manganiello 2020-09-29 15:58:23 +02:00
parent 9e6c40d393
commit 7947c1031d

View file

@ -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);
},