state might not always be provided in a music event
This commit is contained in:
parent
18d2c51b4e
commit
97855b1535
1 changed files with 42 additions and 40 deletions
|
@ -68,6 +68,7 @@ $(document).ready(function() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ('state' in status) {
|
||||||
switch (status.state.toLowerCase()) {
|
switch (status.state.toLowerCase()) {
|
||||||
case 'stop':
|
case 'stop':
|
||||||
$playbackControls.find('button[data-action=pause]').hide();
|
$playbackControls.find('button[data-action=pause]').hide();
|
||||||
|
@ -116,6 +117,7 @@ $(document).ready(function() {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ('volume' in status) {
|
if ('volume' in status) {
|
||||||
$volumeCtrl.val(parseInt(status.volume));
|
$volumeCtrl.val(parseInt(status.volume));
|
||||||
|
|
Loading…
Reference in a new issue