LSP tweaks
This commit is contained in:
parent
8f02ac216f
commit
c25cd7f3bf
1 changed files with 140 additions and 118 deletions
22
lsp/pages.js
22
lsp/pages.js
|
@ -494,6 +494,15 @@ function showTab(tabName,streamName) {
|
|||
).append(
|
||||
$('<label>').text('Source:').attr('for','settings-streams-'+streamName+'-source').attr('title','The path to the stream, usually "/path/to/filename.dtsc" for files or "push://hostname/streamname" for live streams.').append(
|
||||
$('<input>').attr('type','text').attr('id','settings-streams-'+streamName+'-source').addClass('isSetting').addClass('validate-required').keyup(function(){
|
||||
$('#input-validation-info').remove();
|
||||
if (($(this).val().substring(0,7) != 'push://') && ($(this).val().substring(0,1) != '/')) {
|
||||
$(this).parent().append(
|
||||
$('<div>').attr('id','input-validation-info').html(
|
||||
'The stream source should start with "push://" or "/".'
|
||||
).addClass('orange')
|
||||
);
|
||||
}
|
||||
|
||||
if(isLive($(this).val())){
|
||||
$('.live-only').show();
|
||||
}
|
||||
|
@ -511,6 +520,8 @@ function showTab(tabName,streamName) {
|
|||
)
|
||||
).append(
|
||||
$('<label>').text('Record to:').addClass('live-only').addClass('LTS-only').attr('for','settings-streams-'+streamName+'-record').attr('title','The path to the file to record to. Leave this field blank if you do not wish to record to file.').append(
|
||||
$('<span>').addClass('unit').text('[.dtsc]')
|
||||
).append(
|
||||
$('<input>').attr('type','text').attr('id','settings-streams-'+streamName+'-record').addClass('isSetting')
|
||||
)
|
||||
).append(
|
||||
|
@ -560,6 +571,14 @@ function showTab(tabName,streamName) {
|
|||
delete settings.settings.streams[streamName];
|
||||
}
|
||||
else {
|
||||
var filename = $('#settings-streams-'+streamName+'-record').val()
|
||||
if (filename != '') {
|
||||
filename = filename.split('.');
|
||||
if (filename[filename.length-1] != 'dtsc') {
|
||||
filename.push('dtsc');
|
||||
}
|
||||
$('#settings-streams-'+streamName+'-record').val(filename.join('.'));
|
||||
}
|
||||
if (applyInput() === false) { return; }
|
||||
}
|
||||
saveAndReload('streams');
|
||||
|
@ -589,6 +608,8 @@ function showTab(tabName,streamName) {
|
|||
|
||||
break;
|
||||
case 'streaminfo':
|
||||
getData(function(returnedData){
|
||||
settings.settings.streams = returnedData.streams;
|
||||
var meta = settings.settings.streams[streamName].meta;
|
||||
if (!meta) {
|
||||
$('#page').html('No info available for stream "'+streamName+'".');
|
||||
|
@ -720,6 +741,7 @@ function showTab(tabName,streamName) {
|
|||
showTab('streams');
|
||||
})
|
||||
);
|
||||
},{},0,true);
|
||||
break;
|
||||
case 'preview':
|
||||
var httpConnector = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue