Rename function to toggle mute. Don't need promise to be returned on Mopidy calls.
This commit is contained in:
parent
ac86e1918e
commit
b103d6a8a6
@ -117,7 +117,7 @@
|
||||
</li>
|
||||
<li id="" data-icon="false">
|
||||
<div><!-- slider for volume -->
|
||||
<a href="#" onclick="doMute(); return false;"><span title="Toggle mute"><i id="mutebt" class="fa fa-volume-off"></i></span></a>
|
||||
<a href="#" onclick="toggleMute(); return false;"><span title="Toggle mute"><i id="mutebt" class="fa fa-volume-off"></i></span></a>
|
||||
<label for="volumeslider" class="ui-hidden-accessible">Volume</label>
|
||||
<input id="volumeslider" data-highlight="true" name="volumeslider" data-mini="true" type="range" min="0"
|
||||
value="0" max="100" onchange="doVolume(this.value);"/>
|
||||
|
||||
@ -420,13 +420,13 @@ function doVolume(value) {
|
||||
}
|
||||
|
||||
function triggerVolume() {
|
||||
mopidy.playback.setVolume(parseInt(volumeChanging)).then();
|
||||
mopidy.playback.setVolume(parseInt(volumeChanging));
|
||||
volumeChanging = 0;
|
||||
}
|
||||
|
||||
function doMute() {
|
||||
function toggleMute() {
|
||||
mopidy.mixer.getMute().then(function(mute) {
|
||||
mopidy.mixer.setMute(!mute).then();
|
||||
mopidy.mixer.setMute(!mute);
|
||||
if (!mute) {
|
||||
$("#mutebt").attr('class', 'fa fa-volume-up');
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user