mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-03 06:10:25 +00:00
hide volume controls when volume is not supported by the current output
This commit is contained in:
parent
2b461aafa2
commit
4d30fff4bc
@ -107,7 +107,7 @@
|
||||
></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" role="group">
|
||||
<div class="btn-group" role="group" id="volume-group">
|
||||
<div class="btn btn-toolbar btn-default">
|
||||
<span
|
||||
id="volume-icon"
|
||||
|
@ -952,11 +952,14 @@ function get_appropriate_ws_url() {
|
||||
}
|
||||
|
||||
var updateVolumeIcon = function (volume) {
|
||||
$('#volume-group').removeClass('hide');
|
||||
$('#volume-icon').removeClass('glyphicon-volume-off');
|
||||
$('#volume-icon').removeClass('glyphicon-volume-up');
|
||||
$('#volume-icon').removeClass('glyphicon-volume-down');
|
||||
|
||||
if (volume == 0) {
|
||||
if (volume == -1) {
|
||||
$('#volume-group').addClass('hide');
|
||||
} else if (volume == 0) {
|
||||
$('#volume-icon').addClass('glyphicon-volume-off');
|
||||
} else if (volume < 50) {
|
||||
$('#volume-icon').addClass('glyphicon-volume-down');
|
||||
|
Loading…
Reference in New Issue
Block a user