forked from platypush/platypush
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()) {
|
||||
case 'stop':
|
||||
$playbackControls.find('button[data-action=pause]').hide();
|
||||
|
@ -116,6 +117,7 @@ $(document).ready(function() {
|
|||
}, 1000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ('volume' in status) {
|
||||
$volumeCtrl.val(parseInt(status.volume));
|
||||
|
|
Loading…
Reference in a new issue