CC-2771: Liquid soap doesn't support bitrate lower than 48 Kbits for ogg files
- fixed - extra fix: option ogg is disabled when shoutcast is selected
This commit is contained in:
parent
fa929d45a6
commit
361dc4569e
|
@ -9,7 +9,7 @@ function showErrorSections() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function rebuildStreamURL(ele){
|
function rebuildStreamURL(ele){
|
||||||
div = ele.closest("div")
|
var div = ele.closest("div")
|
||||||
host = div.find("input:[id$=-host]").val()
|
host = div.find("input:[id$=-host]").val()
|
||||||
port = div.find("input:[id$=-port]").val()
|
port = div.find("input:[id$=-port]").val()
|
||||||
mount = div.find("input:[id$=-mount]").val()
|
mount = div.find("input:[id$=-mount]").val()
|
||||||
|
@ -27,19 +27,36 @@ function rebuildStreamURL(ele){
|
||||||
}
|
}
|
||||||
div.find("#stream_url").html(streamurl)
|
div.find("#stream_url").html(streamurl)
|
||||||
}
|
}
|
||||||
|
function restrictOggBitrate(ele, on){
|
||||||
|
var div = ele.closest("div")
|
||||||
|
if(on){
|
||||||
|
div.find("select[id$=data-bitrate]").find("option[value='48']").attr('selected','selected');
|
||||||
|
div.find("select[id$=data-bitrate]").find("option[value='24']").attr("disabled","disabled");
|
||||||
|
div.find("select[id$=data-bitrate]").find("option[value='32']").attr("disabled","disabled");
|
||||||
|
}else{
|
||||||
|
div.find("select[id$=data-bitrate]").find("option[value='24']").attr("disabled","");
|
||||||
|
div.find("select[id$=data-bitrate]").find("option[value='32']").attr("disabled","");
|
||||||
|
}
|
||||||
|
}
|
||||||
function hideForShoutcast(ele){
|
function hideForShoutcast(ele){
|
||||||
ele.closest("div").find("#outputMountpoint-label").hide()
|
var div = ele.closest("div")
|
||||||
ele.closest("div").find("#outputMountpoint-element").hide()
|
div.find("#outputMountpoint-label").hide()
|
||||||
ele.closest("div").find("#outputUser-label").hide()
|
div.find("#outputMountpoint-element").hide()
|
||||||
ele.closest("div").find("#outputUser-element").hide()
|
div.find("#outputUser-label").hide()
|
||||||
|
div.find("#outputUser-element").hide()
|
||||||
|
div.find("select[id$=data-type]").find("option[value='mp3']").attr('selected','selected');
|
||||||
|
div.find("select[id$=data-type]").find("option[value='ogg']").attr("disabled","disabled");
|
||||||
|
|
||||||
|
restrictOggBitrate(ele, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
function showForIcecast(ele){
|
function showForIcecast(ele){
|
||||||
ele.closest("div").find("#outputMountpoint-label").show()
|
var div = ele.closest("div")
|
||||||
ele.closest("div").find("#outputMountpoint-element").show()
|
div.find("#outputMountpoint-label").show()
|
||||||
ele.closest("div").find("#outputUser-label").show()
|
div.find("#outputMountpoint-element").show()
|
||||||
ele.closest("div").find("#outputUser-element").show()
|
div.find("#outputUser-label").show()
|
||||||
|
div.find("#outputUser-element").show()
|
||||||
|
div.find("select[id$=data-type]").find("option[value='ogg']").attr("disabled","");
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
@ -62,7 +79,21 @@ $(document).ready(function() {
|
||||||
return false;
|
return false;
|
||||||
}).next().hide();
|
}).next().hide();
|
||||||
|
|
||||||
$("select[id$=-output]").change(function(){
|
$("select[id$=data-type]").change(function(){
|
||||||
|
if($(this).val() == 'ogg'){
|
||||||
|
restrictOggBitrate($(this), true)
|
||||||
|
}else{
|
||||||
|
restrictOggBitrate($(this), false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$("select[id$=data-type]").each(function(){
|
||||||
|
if($(this).val() == 'ogg'){
|
||||||
|
restrictOggBitrate($(this), true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$("select[id$=data-output]").change(function(){
|
||||||
if($(this).val() == 'shoutcast'){
|
if($(this).val() == 'shoutcast'){
|
||||||
hideForShoutcast($(this))
|
hideForShoutcast($(this))
|
||||||
}else{
|
}else{
|
||||||
|
@ -70,7 +101,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$("select[id$=-output]").each(function(){
|
$("select[id$=data-output]").each(function(){
|
||||||
if($(this).val() == 'shoutcast'){
|
if($(this).val() == 'shoutcast'){
|
||||||
hideForShoutcast($(this))
|
hideForShoutcast($(this))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue