LSP average bitrate is now peak bitrate

This commit is contained in:
cat 2015-10-20 14:39:02 +02:00
parent 500cdf6e71
commit d4ca1dab42
2 changed files with 3 additions and 3 deletions

View file

@ -110,7 +110,7 @@ a.src=F+"embed_"+c+".js";a.onerror=function(){y.html('Error loading "'+a.src+'".
a.source[f],h=g.type.split("/"),i=h[0];i.length<6&&(i=i.toUpperCase());switch(h.length){case 1:break;case 2:i=UI.format.capital(h[0])+" v"+h[1];if(h[0]=="flash")switch(h[1]){case "7":i="Progressive ("+i+")";break;case "10":i="RTMP ("+i+")";break;case "11":i="HDS ("+i+")"}break;case 3:switch(h[2]){case "vnd.apple.mpegurl":i=i+" HLS";break;case "vnd.ms-ss":i=i+" Smooth";break;case "mp2t":i=i+" TS";break;default:h[2].length<6&&(h[2]=h[2].toUpperCase());i=i+(" "+h[2]);h[1]!="video"&&(i=i+(" ("+h[1]+")"))}break;
default:i=g.type}i=UI.format.capital(i);d.append($("<option>").text(i).val(g.type).addClass("clear"));e.push({label:i,type:"str",value:g.url,readonly:true,qrcode:true});h=$("<tr>");b.append(h);h.html($("<td>").html($("<input>").attr("type","radio").attr("name","protocolforce").change(function(){y.attr("data-forcetype",$(this).val()).html("Loading embed..");H()}).val(g.type))).append($("<td>").text(i)).append($("<td>").text(g.priority)).append($("<td>").text(g.simul_tracks+"/"+g.total_matches)).append($("<td>").text(g.browser_support?
"yes":"no"));if(a.embedded&&a.embedded.type==g.type){h.css("outline","1px solid rgba(0,0,0,0.5)");h.find("input[type=radio]").prop("checked",true)}}S.html(UI.buildUI(e));var j;if(c in mistvideo)j=mistvideo[c].meta;if(j){a=[];a.push({label:"Type",type:"span",value:j.live?"Live":"Pre-recorded (VoD)"});"format"in j&&a.push({label:"Format",type:"span",value:j.format});j.live&&a.push({label:"Buffer window",type:"span",value:UI.format.addUnit(j.buffer_window,"ms")});b={vheader:"Audio",labels:["Codec","Duration",
"Average bitrate","Channels","Samplerate"],content:[]};f={vheader:"Video",labels:["Codec","Duration","Average bitrate","Size","Framerate"],content:[]};d=Object.keys(j.tracks);d.sort(function(a,b){a=a.split("_").pop();b=b.split("_").pop();return a-b});for(var k in d){e=d[k];g=j.tracks[e];switch(g.type){case "audio":b.content.push({header:"Track "+e.split("_").pop(),body:[g.codec,UI.format.duration((g.lastms-g.firstms)/1E3)+"<br><span class=description>"+UI.format.duration(g.firstms/1E3)+" to "+UI.format.duration(g.lastms/
"Peak bitrate","Channels","Samplerate"],content:[]};f={vheader:"Video",labels:["Codec","Duration","Peak bitrate","Size","Framerate"],content:[]};d=Object.keys(j.tracks);d.sort(function(a,b){a=a.split("_").pop();b=b.split("_").pop();return a-b});for(var k in d){e=d[k];g=j.tracks[e];switch(g.type){case "audio":b.content.push({header:"Track "+e.split("_").pop(),body:[g.codec,UI.format.duration((g.lastms-g.firstms)/1E3)+"<br><span class=description>"+UI.format.duration(g.firstms/1E3)+" to "+UI.format.duration(g.lastms/
1E3)+"</span>",UI.format.bytes(g.bps,1),g.channels,UI.format.addUnit(UI.format.number(g.rate),"Hz")]});break;case "video":f.content.push({header:"Track "+e.split("_").pop(),body:[g.codec,UI.format.duration((g.lastms-g.firstms)/1E3)+"<br><span class=description>"+UI.format.duration(g.firstms/1E3)+" to "+UI.format.duration(g.lastms/1E3)+"</span>",UI.format.bytes(g.bps,1),UI.format.addUnit(g.width,"x ")+UI.format.addUnit(g.height,"px"),UI.format.addUnit(UI.format.number(g.fpks/1E3),"fps")]})}}j=UI.buildVheaderTable(b).css("width",
"auto");k=UI.buildVheaderTable(f).css("width","auto");a.push($("<span>").text("Tracks:"));a.push($("<div>").css({display:"flex","flex-flow":"row wrap","justify-content":"center","font-size":"0.9em"}).append(j).append(k));K.html(UI.buildUI(a))}else K.html("No meta information available.")}};y.html("")[0].appendChild(a)};H();var L=UI.elements.secondary_menu;L.html("").append($("<a>").addClass("button").text("Choose stream").click(function(){UI.navto("Preview")})).append($("<span>").addClass("separator"));
i=["Preview","Embed urls","Meta information"];h=i[0];for(r in i)q=$("<a>").addClass("button").text(i[r]).click(function(){L.find(".active").removeClass("active");$(this).addClass("active");for(r in B)B[r].hide();B[$(this).text()].show()}),L.append(q),i[r]==h&&(q.addClass("active"),B[h].show());break;case "Limits":b.append(UI.buildUI([{type:"help",help:"Here you can see an overview of all the limits you currently have. Limits are an LTS only feature and you can simply add new limits by selecting new, by selecting edit you can edit the existing limit, by selecting delete you can delete the existing limit."}]));

View file

@ -2959,12 +2959,12 @@ var UI = {
}
var audio = {
vheader: 'Audio',
labels: ['Codec','Duration','Average bitrate','Channels','Samplerate'],
labels: ['Codec','Duration','Peak bitrate','Channels','Samplerate'],
content: []
};
var video = {
vheader: 'Video',
labels: ['Codec','Duration','Average bitrate','Size','Framerate'],
labels: ['Codec','Duration','Peak bitrate','Size','Framerate'],
content: []
};
var keys = Object.keys(meta.tracks);