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>
|
></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group" id="volume-group">
|
||||||
<div class="btn btn-toolbar btn-default">
|
<div class="btn btn-toolbar btn-default">
|
||||||
<span
|
<span
|
||||||
id="volume-icon"
|
id="volume-icon"
|
||||||
|
@ -952,11 +952,14 @@ function get_appropriate_ws_url() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var updateVolumeIcon = function (volume) {
|
var updateVolumeIcon = function (volume) {
|
||||||
|
$('#volume-group').removeClass('hide');
|
||||||
$('#volume-icon').removeClass('glyphicon-volume-off');
|
$('#volume-icon').removeClass('glyphicon-volume-off');
|
||||||
$('#volume-icon').removeClass('glyphicon-volume-up');
|
$('#volume-icon').removeClass('glyphicon-volume-up');
|
||||||
$('#volume-icon').removeClass('glyphicon-volume-down');
|
$('#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');
|
$('#volume-icon').addClass('glyphicon-volume-off');
|
||||||
} else if (volume < 50) {
|
} else if (volume < 50) {
|
||||||
$('#volume-icon').addClass('glyphicon-volume-down');
|
$('#volume-icon').addClass('glyphicon-volume-down');
|
||||||
|
Loading…
Reference in New Issue
Block a user