");b.append(h);h.html($("").html($(" ").attr("type","radio").attr("name","protocolforce").change(function(){t.attr("data-forcetype",$(this).val()).html("Loading embed..");M()}).val(f.type))).append($(" ").text(i)).append($(" ").text(f.priority)).append($(" ").text(f.simul_tracks+"/"+f.total_matches)).append($(" ").text(f.browser_support?"yes":"no"));if(a.embedded&&a.embedded.type==f.type){h.css("outline","1px solid rgba(0,0,0,0.5)");
-h.find("input[type=radio]").prop("checked",true)}}X.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","Peak bitrate","Channels","Samplerate"],content:[]};g={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 l in d){e=d[l];f=j.tracks[e];switch(f.type){case "audio":b.content.push({header:"Track "+e.split("_").pop(),body:[f.codec,UI.format.duration((f.lastms-f.firstms)/1E3)+""+UI.format.duration(f.firstms/1E3)+" to "+UI.format.duration(f.lastms/1E3)+" ",UI.format.bytes(f.bps,1),f.channels,UI.format.addUnit(UI.format.number(f.rate),
+a.onload=function(){if(typeof mistvideo[c].error!="undefined")t.height("5em").html(mistvideo[c].error+" ").append($("").text("Try again").click(function(){M()}));else{var a=mistvideo[c],b=UI.buildUI([{label:"Protocol stream url",type:"str",readonly:true,value:a.embedded?a.embedded.url:"",qrcode:true},{label:"Autoplay (from now on)",type:"checkbox",value:mist.stored.get().autoplay,"function":function(){mist.stored.set("autoplay",$(this).getval()?1:0)}}]);t.height(Math.min(a.height,t.height()));
+b.find(".help_container").remove();L.append(b);var d=$("").css("font-size","0.9em").html($("").html($("").html($("")).append($(" ").text("Type")).append($(" ").text("Priority")).append($(" ").text("Simul. tracks")).append($(" ").html("Your browser support"))));Y.html(d);b=$(" ");d.append(b);var d=$(".embed_code_forceprotocol"),e=[];d.find(".clear").remove();for(var g in a.source){var f=a.source[g],h=f.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=f.type}i=UI.format.capital(i);d.append($("").text(i).val(f.type).addClass("clear"));
+e.push({label:i,type:"str",value:f.url,readonly:true,qrcode:true});h=$("");b.append(h);h.html($("").html($(" ").attr("type","radio").attr("name","protocolforce").change(function(){t.attr("data-forcetype",$(this).val()).html("Loading embed..");M()}).val(f.type))).append($(" ").text(i)).append($(" ").text(f.priority)).append($(" ").text(f.simul_tracks+"/"+f.total_matches)).append($(" ").text(f.browser_support?"yes":"no"));if(a.embedded&&a.embedded.type==f.type){h.css("outline",
+"1px solid rgba(0,0,0,0.5)");h.find("input[type=radio]").prop("checked",true)}}X.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","Peak bitrate","Channels","Samplerate"],content:[]};g={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 l in d){e=d[l];f=j.tracks[e];switch(f.type){case "audio":b.content.push({header:"Track "+e.split("_").pop(),body:[f.codec,UI.format.duration((f.lastms-f.firstms)/1E3)+""+UI.format.duration(f.firstms/1E3)+" to "+UI.format.duration(f.lastms/1E3)+" ",UI.format.bytes(f.bps,1),f.channels,UI.format.addUnit(UI.format.number(f.rate),
"Hz")]});break;case "video":g.content.push({header:"Track "+e.split("_").pop(),body:[f.codec,UI.format.duration((f.lastms-f.firstms)/1E3)+""+UI.format.duration(f.firstms/1E3)+" to "+UI.format.duration(f.lastms/1E3)+" ",UI.format.bytes(f.bps,1),UI.format.addUnit(f.width,"x ")+UI.format.addUnit(f.height,"px"),UI.format.addUnit(UI.format.number(f.fpks/1E3),"fps")]})}}j=UI.buildVheaderTable(b).css("width","auto");l=UI.buildVheaderTable(g).css("width","auto");a.push($("").text("Tracks:"));
a.push($("