LSP actually remove stream info tab as its now on the preview page

This commit is contained in:
cat 2014-08-21 12:06:33 +02:00 committed by Thulinma
parent 34856509ea
commit b9b62ee744

View file

@ -499,10 +499,6 @@ function showTab(tabName,streamName) {
$('<button>').text('Preview').click(function(){
showTab('preview',$(this).parent().parent().data('stream'))
})
).append(
$('<button>').text('Info').click(function(){
showTab('streaminfo',$(this).parent().parent().data('stream'))
})
)
).append(
$('<td>').html(
@ -663,142 +659,6 @@ 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+'".');
}
else {
$meta = $('<table>').css('width','auto');
if (meta.live) {
$meta.html(
$('<tr>').html(
$('<td>').text('Type:')
).append(
$('<td>').text('Live')
)
);
if (meta.buffer_window) {
$meta.append(
$('<tr>').html(
$('<td>').text('Buffer window:')
).append(
$('<td>').text(meta.buffer_window+' ms')
)
);
}
}
else {
$meta.html(
$('<tr>').html(
$('<td>').text('Type:')
).append(
$('<td>').text('Pre-recorded (VoD)')
)
);
}
for (var index in meta.tracks) {
var track = meta.tracks[index];
if (track.type == '') { continue; }
var $table = $('<table>').html(
$('<tr>').html(
$('<td>').text('Type:')
).append(
$('<td>').text(capFirstChar(track.type))
)
).append(
$('<tr>').html(
$('<td>').text('Codec:')
).append(
$('<td>').text(track.codec)
)
).append(
$('<tr>').html(
$('<td>').text('Duration:')
).append(
$('<td>').html(
formatDuration(track.lastms-track.firstms)+'<br>(from '+formatDuration(track.firstms)+' to '+formatDuration(track.lastms)+')'
)
)
).append(
$('<tr>').html(
$('<td>').text('Average bitrate:')
).append(
$('<td>').text(Math.round(track.bps/1024)+' KiB/s')
)
);
if (track.height) {
$table.append(
$('<tr>').html(
$('<td>').text('Size:')
).append(
$('<td>').text(track.width+'x'+track.height+' px')
)
);
}
if (track.fpks) {
$table.append(
$('<tr>').html(
$('<td>').text('Framerate:')
).append(
$('<td>').text(track.fpks/1000+' fps')
)
);
}
if (track.channels) {
$table.append(
$('<tr>').html(
$('<td>').text('Channels:')
).append(
$('<td>').text(track.channels)
)
);
}
if (track.rate) {
$table.append(
$('<tr>').html(
$('<td>').text('Samplerate:')
).append(
$('<td>').text(seperateThousands(track.rate,' ')+' Hz')
)
);
}
$meta.append(
$('<tr>').html(
$('<td>').text(capFirstChar(index)+':')
).append(
$('<td>').html(
$table
)
)
);
}
$('#page').html(
$('<p>').text('Detailed information about stream "'+streamName+'"')
).append(
$('<div>').css({'width':'100%','display':'table','table-layout':'fixed','min-height':'300px'}).html(
$('<div>').css('display','table-row').html(
$('<div>').attr('id','info-stream-meta').css({'display':'table-cell','max-width':'50%','overflow':'auto'}).html(
$meta
)
).append(
$('<div>').attr('id','info-stream-statistics').css({'display':'table-cell','text-align':'center','min-height':'200px'})
)
)
);
}
$('#page').append(
$('<button>').text('Back').addClass('escape-to-cancel').click(function(){
showTab('streams');
})
);
},{},0,true);
break;
case 'preview':
var httpConnector = false;
for (var index in settings.settings.config.protocols) {