mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-22 03:29:31 -07:00
fix auto-start when first display is disabled
This commit is contained in:
@@ -100,8 +100,11 @@ const updateStatus = (value) => {
|
|||||||
if (!progress) return;
|
if (!progress) return;
|
||||||
progress.drawCanvas(displays, countLoadedDisplays());
|
progress.drawCanvas(displays, countLoadedDisplays());
|
||||||
|
|
||||||
|
// calculate first enabled display
|
||||||
|
const firstDisplayIndex = displays.findIndex((display) => display.enabled);
|
||||||
|
|
||||||
// if this is the first display and we're playing, load it up so it starts playing
|
// if this is the first display and we're playing, load it up so it starts playing
|
||||||
if (isPlaying() && value.id === 0 && value.status === STATUS.loaded) {
|
if (isPlaying() && value.id === firstDisplayIndex && value.status === STATUS.loaded) {
|
||||||
navTo(msg.command.firstFrame);
|
navTo(msg.command.firstFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user