Fix mute/unmute functionality: now also works if user unmutes by sliding volume manually.
This commit is contained in:
parent
c9cec74f35
commit
fb3f8dda3f
@ -63,6 +63,7 @@ v2.0.1 (UNRELEASED)
|
||||
- Increase volume slider handle by 30% to make it easier to grab on mobile devices
|
||||
- Add application cache manifest file for quicker loads and to allow client devices to detect when local caches should be invalidated.
|
||||
- Fix vertical alignment of playback control buttons in footer.
|
||||
- Swop mute/unmute icons and apply fix to restore volume levels after unmute.
|
||||
|
||||
v2.0.0 (26-3-2015)
|
||||
------------------
|
||||
|
||||
BIN
mopidy_musicbox_webclient/static/images/icons/play_alt_12x12.png
Normal file
BIN
mopidy_musicbox_webclient/static/images/icons/play_alt_12x12.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 275 B |
BIN
mopidy_musicbox_webclient/static/images/icons/play_alt_16x16.png
Normal file
BIN
mopidy_musicbox_webclient/static/images/icons/play_alt_16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 283 B |
@ -117,7 +117,7 @@
|
||||
</li>
|
||||
<li id="" data-icon="false">
|
||||
<div><!-- slider for volume -->
|
||||
<a href="#" onclick="doMute(); return false;"><i class="fa fa-volume-up" id="mutebt"></i></a>
|
||||
<a href="#" onclick="doMute(); return false;"><i class="fa fa-volume-off" id="mutebt"></i></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);"/>
|
||||
|
||||
21
mopidy_musicbox_webclient/static/js/controls.js
vendored
21
mopidy_musicbox_webclient/static/js/controls.js
vendored
@ -423,19 +423,28 @@ function doVolume(value) {
|
||||
}
|
||||
|
||||
function triggerVolume() {
|
||||
mopidy.playback.setVolume(parseInt(volumeChanging));
|
||||
if (volumeChanging > 0) {
|
||||
$("#mutebt").attr('class', 'fa fa-volume-off');
|
||||
muteVolume = -1;
|
||||
} else {
|
||||
$("#mutebt").attr('class', 'fa fa-volume-up');
|
||||
muteVolume = currentVolume;
|
||||
}
|
||||
mopidy.playback.setVolume(parseInt(volumeChanging)).then();
|
||||
currentVolume = volumeChanging
|
||||
volumeChanging = 0;
|
||||
}
|
||||
|
||||
function doMute() {
|
||||
//only emit the event, not the status
|
||||
if (muteVolume == -1) {
|
||||
$("#mutebt").attr('src', 'images/icons/volume_mute_24x18.png');
|
||||
muteVolume = currentVolume;
|
||||
mopidy.playback.setVolume(0).then();
|
||||
$("#mutebt").attr('class', 'fa fa-volume-up');
|
||||
volumeChanging = 0;
|
||||
triggerVolume();
|
||||
} else {
|
||||
$("#mutebt").attr('src', 'images/icons/volume_24x18.png');
|
||||
mopidy.playback.setVolume(muteVolume).then();
|
||||
$("#mutebt").attr('class', 'fa fa-volume-off');
|
||||
volumeChanging = muteVolume;
|
||||
triggerVolume();
|
||||
muteVolume = -1;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
CACHE MANIFEST
|
||||
|
||||
# 2016-01-24:v1
|
||||
# 2016-01-24:v2
|
||||
|
||||
CACHE:
|
||||
index.html
|
||||
@ -41,6 +41,8 @@ images/icons/musicbox32.png
|
||||
images/icons/musicbox57.png
|
||||
images/icons/musicbox72.png
|
||||
images/icons/musicbox114.png
|
||||
images/icons/play_alt_12x12.png
|
||||
images/icons/play_alt_16x16.png
|
||||
|
||||
images/default_cover.png
|
||||
images/empty.png
|
||||
|
||||
Loading…
Reference in New Issue
Block a user