CC-2607: Ability to adjust stream bitrate, type, etc from UI
- removed debug code from NowPlayingController - New Form for streamsetting - Action created in PreferenceController
This commit is contained in:
parent
4f2b2dba6d
commit
cf55e92aa3
17 changed files with 701 additions and 103 deletions
|
@ -1,13 +1,38 @@
|
|||
$(document).ready(function() {
|
||||
function showErrorSections() {
|
||||
|
||||
$('#change_setting').click(function(){
|
||||
var url;
|
||||
|
||||
url = "/Preference/change-stream-setting";
|
||||
|
||||
$.post(url,
|
||||
{format: "json"}
|
||||
);
|
||||
$(".errors").each(function(i){
|
||||
if($(this).length > 0){
|
||||
$(this).closest("div").show();
|
||||
$(window).scrollTop($(this).position().top);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function buildStreamUrl(){
|
||||
|
||||
$("input:[id$=-host], input:[id$=-port], input:[id$=-mount], select:[id$=-type]").change(function(){
|
||||
div = $(this).closest("div")
|
||||
host = div.find("input:[id$=-host]").val()
|
||||
port = div.find("input:[id$=-port]").val()
|
||||
mount = div.find("input:[id$=-mount]").val()
|
||||
type = div.find("select:[id$=-type]").val()
|
||||
div.find("#stream_url").html("http://"+host+":"+port+"/"+mount+"."+type)
|
||||
if($(this).attr('id').indexOf('type') != -1){
|
||||
div.find("#mount_ext").html("."+type)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.collapsible-header').click(function() {
|
||||
$(this).next().toggle('fast');
|
||||
$(this).toggleClass("close");
|
||||
return false;
|
||||
}).next().hide();
|
||||
|
||||
showErrorSections()
|
||||
|
||||
buildStreamUrl()
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue