Skip non-ready state of player in nowPlayingBar

When nowPlayingBar receives an `init` event, some propertes of `state` are not
yet defined. Wait for `playbackstart`.
This commit is contained in:
Dmitry Lyzo 2022-02-01 00:33:42 +03:00
parent d997d63d11
commit 2d5e7f745f

View File

@ -658,6 +658,11 @@ import { appRouter } from '../appRouter';
}
function onStateChanged(event, state) {
if (event.type === 'init') {
// skip non-ready state
return;
}
console.debug('nowplaying event: ' + event.type);
const player = this;