Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2016-09-22 16:42:04 +02:00
commit 08813dcd9b
50 changed files with 6288 additions and 970 deletions

View file

@ -440,8 +440,18 @@ endif()
# Embed Code #
########################################
add_custom_target(embedcode
./sourcery ${SOURCE_DIR}/src/embed.js embed_js ${BINARY_DIR}/embed.js.h
DEPENDS sourcery ${SOURCE_DIR}/src/embed.js
COMMAND ./sourcery ${SOURCE_DIR}/src/embed.js embed_js ${BINARY_DIR}/embed.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/html5.js html5_js ${BINARY_DIR}/html5.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/flash_strobe.js flash_strobe_js ${BINARY_DIR}/flash_strobe.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/silverlight.js silverlight_js ${BINARY_DIR}/silverlight.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/theoplayer.js theoplayer_js ${BINARY_DIR}/theoplayer.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/jwplayer.js jwplayer_js ${BINARY_DIR}/jwplayer.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/polytrope.js polytrope_js ${BINARY_DIR}/polytrope.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/dashjs.js dash_js ${BINARY_DIR}/dashjs.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/dash.js playerdash_js ${BINARY_DIR}/playerdash.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/core.js core_js ${BINARY_DIR}/core.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/mist.css mist_css ${BINARY_DIR}/mist.css.h
DEPENDS sourcery ${SOURCE_DIR}/src/embed.js ${SOURCE_DIR}/embed/wrappers/html5.js ${SOURCE_DIR}/embed/wrappers/flash_strobe.js ${SOURCE_DIR}/embed/wrappers/silverlight.js ${SOURCE_DIR}/embed/wrappers/theoplayer.js ${SOURCE_DIR}/embed/wrappers/jwplayer.js ${SOURCE_DIR}/embed/wrappers/polytrope.js ${SOURCE_DIR}/embed/wrappers/dashjs.js ${SOURCE_DIR}/embed/players/dash.js ${SOURCE_DIR}/embed/core.js ${SOURCE_DIR}/embed/mist.css
VERBATIM
)

813
embed/core.js Normal file
View file

@ -0,0 +1,813 @@
/////////////////////////////////////
// DECLARE MISTPLAYER BASE CLASS //
/////////////////////////////////////
var mistplayers = {};
function MistPlayer() {};
MistPlayer.prototype.sendEvent = function(type,message,target) {
try {
var event = new Event(type,{
bubbles: true,
cancelable: true
});
event.message = message;
target.dispatchEvent(event);
}
catch (e) {
try {
var event = document.createEvent('Event');
event.initEvent(type,true,true);
event.message = message;
target.dispatchEvent(event);
}
catch (e) { return false; }
}
return true;
}
MistPlayer.prototype.addlog = function(msg) {
this.sendEvent('log',msg,this.target);
}
MistPlayer.prototype.adderror = function(msg) {
this.sendEvent('error',msg,this.target);
}
MistPlayer.prototype.build = function () {
this.addlog('Error in player implementation');
var err = document.createElement('div');
var msgnode = document.createTextNode(msg);
err.appendChild(msgnode);
err.className = 'error';
return err;
}
//creates the player element, including custom functions
MistPlayer.prototype.element = function(tag){
var ele = document.createElement(tag);
ele.className = 'mistplayer';
this.element = ele;
return ele;
};
MistPlayer.prototype.play = false;
MistPlayer.prototype.pause = false;
MistPlayer.prototype.volume = false;
MistPlayer.prototype.loop = false;
MistPlayer.prototype.fullscreen = false;
MistPlayer.prototype.setTracks = false;
MistPlayer.prototype.resize = false;
MistPlayer.prototype.buildMistControls = function(){
if (!('flex' in document.head.style) || (['iPad','iPod','iPhone'].indexOf(navigator.platform) != -1)) {
//this browser does not support MistControls
this.addlog('Mist controls are not supported');
return false;
}
this.addlog('Building Mist controls..');
var ele = this.element;
var options = this.options;
var me = this; //to allow nested functions to access the player class itself
function formatTime(secs) {
var hours = Math.floor(secs / 3600);
secs = secs - hours * 3600;
var mins = Math.floor(secs / 60);
secs = Math.floor(secs - mins * 60);
var str = [];
if (hours) {
var h = '0'+hours;
if (hours < 100) {
h.slice(-2);
}
str.push(h);
}
str.push(('0'+mins).slice(-2));
str.push(('0'+secs).slice(-2));
return str.join(':');
}
function whilePlaying() {
timestampValue.nodeValue = formatTime(ele.currentTime);
bar.style.width = ((ele.currentTime-ele.startTime)/ele.duration*100)+'%';
setTimeout(function(){
if (!ele.paused) {
whilePlaying();
}
},0.1e3);
};
function whileLivePlaying(track) {
var playtime = (new Date()) - options.initTime;
timestampValue.nodeValue = formatTime((playtime + track.lastms)/1e3);
setTimeout(function(){
if (!ele.paused) {
whileLivePlaying(track);
}
},0.1e3);
};
var controls = document.createElement('div');
ele.parentNode.appendChild(controls);
controls.className = 'controls';
controls.onclick = function(e){ e.stopPropagation(); };
//if the video is very small, zoom the controls
var zoom = options.width/480;
if (zoom < 1) {
zoom = Math.max(zoom,0.5);
controls.style.zoom = zoom;
}
else { zoom = 1; }
ele.style['min-width'] = zoom*400+'px';
ele.style['min-height'] = zoom*160+'px';
var play = document.createElement('div');
controls.appendChild(play);
play.className = 'button play';
play.title = 'Play / Pause';
play.setAttribute('data-state','paused');
play.onclick = function(){
if (ele.paused) {
me.play();
}
else {
me.pause();
}
};
var progressCont = document.createElement('div');
controls.appendChild(progressCont);
progressCont.className = 'progress_container';
if (!options.live) {
var progress = document.createElement('div');
progressCont.appendChild(progress);
progress.className = 'button progress';
progress.getPos = function(e){
if (!isFinite(ele.duration)) { return 0; }
var style = e.target.currentStyle || window.getComputedStyle(e.target, null);
return Math.max(0,e.clientX - progress.getBoundingClientRect().left - parseInt(style.borderLeftWidth,10)) / progress.offsetWidth * ele.duration;
}
progress.onmousemove = function(e) {
if (ele.duration) {
var pos = this.getPos(e);
hintValue.nodeValue = formatTime(pos);
hint.style.display = 'block';
hint.style.left = (pos / ele.duration)*100+'%';
}
};
progress.onmouseout = function() {
hint.style.display = 'none';
};
progress.onmouseup = function(e) {
ele.currentTime = this.getPos(e);
ele.startTime = ele.currentTime;
bar.style.left = (ele.startTime/ele.duration*100)+'%';
};
progress.ondragstart = function() { return false; };
var bar = document.createElement('div');
progress.appendChild(bar);
bar.className = 'bar';
var buffers = [];
var hint = document.createElement('div');
progressCont.appendChild(hint);
hint.className = 'hint';
var hintValue = document.createTextNode('-:--');
hint.appendChild(hintValue);
ele.addEventListener('seeking',function(){
me.target.setAttribute('data-loading','');
});
ele.addEventListener('canplay',function(){
me.target.removeAttribute('data-loading');
});
ele.addEventListener('playing',function(){
me.target.removeAttribute('data-loading');
});
ele.addEventListener('progress',function(){
me.target.removeAttribute('data-loading');
});
}
var timestamp = document.createElement('div');
controls.appendChild(timestamp);
timestamp.className = 'button timestamp';
var timestampValue = document.createTextNode('-:--');
timestamp.title = 'Time';
timestamp.appendChild(timestampValue);
var sound = document.createElement('div');
controls.appendChild(sound);
sound.className = 'button sound';
var volume = document.createElement('div');
sound.appendChild(volume);
sound.getPos = function(ypos){
var style = this.currentStyle || window.getComputedStyle(this, null);
return 1 - Math.min(1,Math.max(0,(ypos - sound.getBoundingClientRect().top - parseInt(style.borderTopWidth,10)) / sound.offsetHeight));
}
volume.className = 'volume';
sound.title = 'Volume';
if ('mistVolume' in localStorage) {
ele.volume = localStorage['mistVolume'];
volume.style.height = ele.volume*100+'%';
}
var mousedown = function(e){
var mousemove = function(e){
ele.volume = sound.getPos(e.clientY);
};
var mouseup = function(e){
document.removeEventListener('mousemove',mousemove);
document.removeEventListener('touchmove',mousemove);
document.removeEventListener('mouseup',mouseup);
document.removeEventListener('touchend',mouseup);
try {
localStorage['mistVolume'] = ele.volume;
}
catch (e) {}
};
document.addEventListener('mousemove',mousemove);
document.addEventListener('touchmove',mousemove);
document.addEventListener('mouseup',mouseup);
document.addEventListener('touchend',mouseup);
ele.volume = sound.getPos(e.clientY);
};
sound.onmousedown = mousedown;
sound.ontouchstart = mousedown;
sound.ondragstart = function() { return false; };
sound.onclick = function(e){
ele.volume = sound.getPos(e.clientY);
try {
localStorage['mistVolume'] = ele.volume;
}
catch (e) {}
};
var speaker = document.createElement('div');
speaker.title = 'Mute / Unmute';
sound.appendChild(speaker);
speaker.className = 'button speaker';
speaker.onclick = function(e) {
if (ele.volume) {
lastvolume = ele.volume;
ele.volume = 0;
}
else {
ele.volume = lastvolume;
}
e.stopPropagation();
};
speaker.onmousedown = function(e){
e.stopPropagation();
};
var buttons = document.createElement('div');
buttons.className = 'column';
controls.appendChild(buttons);
if ((this.setTracks) && ((this.tracks.audio.length) || (this.tracks.video.length) || (this.tracks.subtitle.length)) && (this.source.type != 'application/vnd.apple.mpegurl')) {
/*
- the player supports setting tracks;
- there is something to choose
- it's not HLS, which would have to use a different way of switching tracks than this script currently uses
*/
var tracks = this.tracks;
var tracksc = document.createElement('div');
tracksc.innerHTML = 'Tracks';
tracksc.className = 'button tracks';
buttons.appendChild(tracksc);
var settings = document.createElement('div');
tracksc.appendChild(settings);
settings.className = 'settings';
me.trackselects = {};
for (var i in tracks) {
if (tracks[i].length) {
var l = document.createElement('label');
settings.appendChild(l);
var p = document.createElement('span');
l.appendChild(p);
var t = document.createTextNode(i+':');
p.appendChild(t);
var s = document.createElement('select');
l.appendChild(s);
me.trackselects[i] = s;
s.setAttribute('data-type',i);
for (var j in tracks[i]) {
var o = document.createElement('option');
s.appendChild(o);
o.value = tracks[i][j].trackid;
var name;
if ('name' in tracks[i][j]) {
name = tracks[i][j].name;
}
else if ('lang' in tracks[i][j]) {
name = tracks[i][j].lang;
o.setAttribute('data-lang',tracks[i][j].lang);
}
else {
name = 'Track '+(Number(j)+1);
}
o.appendChild(document.createTextNode(name));
}
var o = document.createElement('option');
s.appendChild(o);
o.value = 0;
var t = document.createTextNode('No '+i);
o.appendChild(t);
s.onchange = function(){
var usetracks = {};
if (this.getAttribute('data-type') == 'subtitle') {
usetracks.subtitle = this.value;
try {
localStorage['mistSubtitle'] = this.querySelector('[value="'+this.value+'"]').getAttribute('data-lang');
}
catch (e) {}
}
else {
for (var i in me.trackselects) {
usetracks[me.trackselects[i].getAttribute('data-type')] = me.trackselects[i].value
}
}
me.setTracks(usetracks);
}
if (i == 'subtitle') {
s.value = 0;
if ('mistSubtitle' in localStorage) {
var option = s.querySelector('[data-lang="'+localStorage['mistSubtitle']+'"]');
if (option) {
s.value = option.value;
s.onchange();
}
}
}
}
}
var l = document
}
var buttons2 = document.createElement('div');
buttons2.className = 'row';
buttons.appendChild(buttons2);
if ((me.loop) && (!options.live)) {
var loop = document.createElement('div');
buttons2.appendChild(loop);
loop.className = 'button loop';
loop.title = 'Loop';
if (me.loop()) { loop.setAttribute('data-on',''); }
loop.onclick = function(){
if (me.loop()) {
this.removeAttribute('data-on');
me.loop(false);
}
else {
this.setAttribute('data-on','');
me.loop(true);
if ((me.element.paused) && (me.element.currentTime == me.element.duration)) {
me.play();
}
}
};
}
if (me.fullscreen) {
var fullscreen = document.createElement('div');
buttons2.appendChild(fullscreen);
fullscreen.className = 'button fullscreen';
fullscreen.title = 'Fullscreen'
fullscreen.onclick = function(){
me.fullscreen();
};
}
ele.addEventListener('play',function(){
play.setAttribute('data-state','playing');
});
ele.addEventListener('pause',function(){
play.setAttribute('data-state','paused');
});
ele.addEventListener('ended',function(){
play.setAttribute('data-state','paused');
});
ele.addEventListener('volumechange',function(){
volume.style.height = ele.volume*100+'%';
if (ele.volume == 0) {
speaker.setAttribute('data-muted','');
}
else {
speaker.removeAttribute('data-muted','');
}
});
if (options.live) {
ele.addEventListener('playing',function(){
var track = {
firstms: 0,
lastms: 0
};
for (var i in options.meta.tracks) {
track = options.meta.tracks[i];
break;
}
whileLivePlaying(track);
});
}
else {
ele.addEventListener('playing',function(){
whilePlaying();
});
ele.addEventListener('durationchange',function(){
timestampValue.nodeValue = formatTime(ele.duration);
});
ele.addEventListener('progress',function(){
for (var i in buffers) {
progress.removeChild(buffers[i]);
}
buffers = [];
var start,end;
for (var i = 0; i < ele.buffered.length; i++) {
var b = document.createElement('div');
b.className = 'buffer';
progress.appendChild(b);
buffers.push(b);
start = ele.buffered.start(i);
end = ele.buffered.end(i);
b.setAttribute('style','left:'+(start/ele.duration*100)+'%; width:'+((end-start)/ele.duration*100 )+'%');
}
});
}
//hide the cursor and controls if it is over the video (not the controls) and hasn't moved for 5 secs
var position = {
x: 0,
y: 0,
lastpos: { x: 0, y: 0 },
counter: 0,
element: false,
interval: setInterval(function(){
if (position.element == 'video') {
if ((position.x == position.lastpos.x) && (position.y == position.lastpos.y)) {
position.counter++;
if (position.counter >= 5) {
position.element = false;
ele.parentNode.setAttribute('data-hide','');
return;
}
}
position.lastpos.x = position.x;
position.lastpos.y = position.y;
return;
}
position.counter = 0;
},1e3)
};
ele.addEventListener('mousemove',function(e){
position.x = e.pageX;
position.y = e.pageY;
position.element = 'video';
ele.parentNode.removeAttribute('data-hide');
});
controls.addEventListener('mousemove',function(e){
position.element = 'controls';
e.stopPropagation();
});
ele.addEventListener('mouseout',function(e){
position.element = false;
});
return true;
}
/////////////////////////////////////////////////
// SELECT AND ADD A VIDEO PLAYER TO THE TARGET //
/////////////////////////////////////////////////
function mistPlay(streamName,options) {
var protoplay = new MistPlayer();
function embedLog(msg) {
protoplay.sendEvent('log',msg,options.target);
}
function mistError(msg) {
var info = mistvideo[streamName];
var displaymsg = msg;
if ('on_error' in info) { displaymsg = info.on_error; }
var err = document.createElement('div');
err.innerHTML = displaymsg.replace(new RegExp("\n",'g'),'<br>')+'<br>';
err.className = 'error';
var button = document.createElement('button');
var t = document.createTextNode('Reload');
button.appendChild(t);
err.appendChild(button);
button.onclick = function(){
options.target.removeChild(err);
mistPlay(streamName,options);
}
options.target.appendChild(err);
protoplay.sendEvent('error',msg,options.target);
return err;
}
//merge local and global options
var local = options;
var global = (typeof mistoptions == 'undefined' ? {} : mistoptions);
var options = {
host: null,
autoplay: true,
controls: true,
loop: false,
poster: null
};
for (var i in global) {
options[i] = global[i];
}
for (var i in local) {
options[i] = local[i];
}
if (!options.host) {
mistError('MistServer host undefined.');
return;
}
options.target.setAttribute('data-loading','');
//check if the css is loaded
if (!document.getElementById('mist_player_css')) {
var css = document.createElement('link');
css.rel = 'stylesheet';
css.href = options.host+'/player.css';
css.id = 'mist_player_css';
//prepend it to the head: don't use append, because the customer might want to override our default css
if (document.head.children.length) {
document.head.insertBefore(css,document.head.firstChild);
}
else {
document.head.appendChild(css);
}
}
//get info js
var info = document.createElement('script');
info.src = options.host+'/info_'+encodeURIComponent(streamName)+'.js';
embedLog('Retrieving stream info from '+info.src);
document.head.appendChild(info);
info.onerror = function(){
options.target.removeAttribute('data-loading');
mistError('Error while loading stream info.');
}
info.onload = function(){
options.target.removeAttribute('data-loading');
embedLog('Stream info was loaded succesfully');
//clean up info script
document.head.removeChild(info);
//get streaminfo data
var streaminfo = mistvideo[streamName];
//embedLog('Stream info contents: '+JSON.stringify(streaminfo));
streaminfo.initTime = new Date();
var mistPlayer = false;
var source;
var forceType = false;
if (('forceType' in options) && (options.forceType)) {
embedLog('Forcing '+options.forceType);
forceType = options.forceType;
}
var forceSupportCheck = false;
if (('forceSupportCheck' in options) && (options.forceSupportCheck)) {
embedLog('Forcing a full support check');
forceSupportCheck = true;
}
var forcePlayer = false;
if (('forcePlayer' in options) && (options.forcePlayer) && (options.forcePlayer in mistplayers)) {
embedLog('Forcing '+mistplayers[options.forcePlayer].name);
forcePlayer = options.forcePlayer;
}
embedLog('Checking available players..');
var source = false;
var mistPlayer = false;
function checkPlayer(p_shortname) {
embedLog('Checking '+mistplayers[p_shortname].name+' (priority: '+mistplayers[p_shortname].priority+') ..');
streaminfo.working[p_shortname] = [];
if (forceType) {
if ((mistplayers[p_shortname].mimes.indexOf(forceType) > -1) && (checkMime(p_shortname,forceType))) {
return p_shortname;
}
}
else {
for (var m in mistplayers[p_shortname].mimes) {
if ((checkMime(p_shortname,mistplayers[p_shortname].mimes[m])) && (!forceSupportCheck)) {
return p_shortname;
}
}
}
return false;
}
function checkMime(p_shortname,mime) {
embedLog('Checking if Mist broadcasts '+mime+'..');
for (var s in streaminfo.source) {
if (streaminfo.source[s].type == mime) {
embedLog('Yup! Checking browser support..');
if (mistplayers[p_shortname].isBrowserSupported(mime)) {
embedLog('Yup! This is a working player/source combo.');
streaminfo.working[p_shortname].push(mime);
if (!source) {
mistPlayer = p_shortname;
source = streaminfo.source[s];
}
if (!forceSupportCheck) {
return source;
}
}
}
}
return false;
}
streaminfo.working = {};
if (forcePlayer) {
checkPlayer(forcePlayer);
}
else {
//sort the players
var sorted = Object.keys(mistplayers);
sorted.sort(function(a,b){
return mistplayers[a].priority - mistplayers[b].priority;
});
for (var n in sorted) {
var p_shortname = sorted[n];
if (checkPlayer(p_shortname)) { break; }
}
}
if (mistPlayer) {
embedLog('Preparing to build '+mistplayers[mistPlayer].name);
//create the options to send to the player
var playerOpts = {
src: source.url+(('urlappend' in options) && (options.urlappend) ? options.urlappend : '' ),
live: (streaminfo.type == 'live' ? true : false),
initTime: streaminfo.initTime,
meta: streaminfo.meta,
source: source
};
//pass player options and handle defaults
playerOpts.autoplay = options.autoplay;
playerOpts.controls = options.controls;
playerOpts.loop = options.loop;
playerOpts.poster = options.poster;
function calcSize() {
//calculate desired width and height
var fw = ('width' in options && options.width ? options.width : false ); //force this width
var fh = ('height' in options && options.height ? options.height : false ); //force this height
if (!(fw && fh)) {
var ratio = streaminfo.width / streaminfo.height;
if (fw || fh) {
if (fw) {
fh = fw/ratio;
}
else {
fw = fh*ratio;
}
}
else {
//neither width or height are being forced. Set them to the minimum of video and target size
var cw = ('maxwidth' in options && options.maxwidth ? options.maxwidth : options.target.clientWidth || window.innerWidth);
var ch = ('maxheight' in options && options.maxheight ? options.maxheight : options.target.clientHeight || window.innerHeight);
var fw = streaminfo.width;
var fh = streaminfo.height;
var factor; //resize factor
if ((cw) && (fw > cw)) { //rescale if video width is larger than the target
factor = fw / cw;
fw /= factor;
fh /= factor;
}
if ((ch) && (fh > ch)) { //rescale if video height is (still?) larger than the target
factor = fh / ch;
fw /= factor;
fh /= factor;
}
}
}
return {
width: fw,
height: fh
};
}
var lastsize = calcSize();
playerOpts.width = lastsize.width;
playerOpts.height = lastsize.height;
//save the objects for future reference
var player = new mistplayers[mistPlayer].player();
player.target = options.target;
if (!('embedded' in streaminfo)) { streaminfo.embedded = []; }
streaminfo.embedded.push({
options: options,
selectedPlayer: mistPlayer,
player: player,
playerOptions: playerOpts
});
if (player.setTracks) {
//gather track info
//tracks
var tracks = {
video: [],
audio: [],
subtitle: []
};
for (var i in streaminfo.meta.tracks) {
var t = streaminfo.meta.tracks[i];
switch (t.type) {
case 'video':
t.desc = ['['+t.codec+']',t.width+'x'+t.height,Math.round(t.bps/1024)+'kbps',t.fpks/1e3+'fps',t.lang];
break;
case 'audio':
t.desc = ['['+t.codec+']',t.channels+' channels',Math.round(t.bps/1024)+'kbps',t.rate+'Hz',t.lang];
break;
case 'subtitle':
t.desc = ['['+t.codec+']',t.lang];
break;
}
t.desc = t.desc.join(', ');
tracks[t.type].push(t);
}
player.tracks = tracks;
if (tracks.subtitle.length) {
var vttsrc = false;
player.subtitle = false;
for (var i in streaminfo.source) {
if (streaminfo.source[i].type == 'html5/text/vtt') {
vttsrc = streaminfo.source[i].url;
break;
}
}
if (vttsrc) {
player.subtitle = vttsrc.replace(/.srt$/,'.vtt');
}
}
var usetracks = {};
for (var i in tracks) {
if (i == 'subtitle') { continue; }
if (tracks[i].length) {
tracks[i].sort(function(a,b){
return a.trackid - b.trackid;
});
usetracks[i] = tracks[i][0].trackid;
}
}
}
//build the player
player.options = playerOpts;
var element = player.build(playerOpts);
options.target.appendChild(element);
element.setAttribute('data-player',mistPlayer);
element.setAttribute('data-mime',source.type);
if (player.setTracks) {
player.setTracks(usetracks);
if ('setTracks' in options) { player.setTracks(options.setTracks); }
}
if (player.resize) {
//monitor for resizes and fire if needed
window.addEventListener('resize',function(){
player.resize(calcSize());
});
}
protoplay.sendEvent('initialized','',options.target);
}
else {
if (streaminfo.error) {
var str = streaminfo.error;
}
else if (('source' in streaminfo) && (streaminfo.source.length)) {
var str = 'Could not find a compatible player and protocol combination for this stream and browser. ';
if (forceType) { str += "\n"+'The mimetype '+forceType+' was enforced. '; }
if (forcePlayer) { str += "\n"+'The player '+mistplayers[forcePlayer].name+' was enforced. '; }
}
else {
var str = 'Stream not found.';
}
mistError(str);
}
}
}

85
embed/imgs/edit.svg Normal file
View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
viewBox="0 0 64 64"
id="svg3405"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="edit.svg">
<defs
id="defs3407" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="-33.836577"
inkscape:cy="68.407425"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1918"
inkscape:window-height="1040"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="1" />
<metadata
id="metadata3410">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-188.74231,-507.66538)">
<g
id="g3377"
transform="translate(-359.77798,-59.246938)">
<path
id="path4207"
d="m 552.98827,579.64923 c 2.53906,2.49023 4.93163,4.85352 7.33887,7.20215 1.54785,1.50391 3.16894,1.50879 4.71191,0.0293 0.98144,-0.94727 1.96778,-1.89941 2.93457,-2.86621 1.36231,-1.36719 1.36231,-3.00782 -0.0244,-4.37012 -2.54394,-2.5 -5.1123,-4.98535 -7.73437,-7.53906 5.39551,-1.92384 10.26367,-1.17676 14.32617,2.51953 3.19824,2.90527 4.86327,6.63086 3.96972,11.06445 -0.16601,0.84473 0.41017,1.21093 0.88379,1.67481 9.03809,8.81836 18.07129,17.63671 27.11914,26.44531 2.22168,2.16309 2.96387,4.80469 1.93848,7.60743 -1.00098,2.71972 -2.95898,4.64355 -6.15235,5.18553 -2.80273,0.47364 -5.05858,-0.34667 -6.97753,-2.21191 -8.90625,-8.64746 -17.80761,-17.30956 -26.65039,-26.0205 -1.05468,-1.03516 -2.0752,-1.5088 -3.57422,-1.44044 -5.60546,0.26368 -10.77636,-3.90625 -12.2998,-8.69629 -0.89844,-2.81738 -0.97169,-5.61523 0.19042,-8.58398"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path4209"
d="m 588.90624,592.90606 c -2.39259,-2.34375 -2.39259,-2.34375 -0.0489,-4.6289 4.10645,-4.00391 8.21778,-8.00293 12.30958,-12.01659 0.4834,-0.47853 1.50391,-0.94728 0.63476,-1.78712 -0.91309,-0.88867 -1.44531,0.11713 -1.97754,0.62988 -4.57031,4.4336 -9.1748,8.8379 -13.64746,13.35937 -1.05469,1.06934 -1.38671,0.32228 -2.07031,-0.20995 -0.86425,-0.67871 -0.8496,-1.11817 -0.0293,-1.89942 4.67772,-4.47265 9.27245,-9.02832 13.92577,-13.53026 2.13379,-2.06544 4.68261,-2.13868 7.04101,-1.23048 2.3584,0.91309 3.87697,3.39844 3.87697,5.71778 0.005,2.05566 -0.74708,3.66698 -2.1875,5.06836 -4.40919,4.29198 -8.8086,8.59375 -13.22755,12.88573 -0.38085,0.37111 -0.74706,1.10841 -1.38671,0.68848 -0.6836,-0.4541 -1.28907,-1.09862 -1.73829,-1.77734 -0.20019,-0.30762 0.43946,-0.63477 0.72755,-0.91309 4.55077,-4.45312 9.11132,-8.89648 13.66698,-13.33984 0.30274,-0.29786 0.67872,-0.56153 0.84962,-0.91797 0.13671,-0.30274 0.24902,-0.72266 -0.19532,-1.04981 -0.38086,-0.27831 -0.70312,-0.25879 -1.0254,-0.0244 -0.37597,0.27343 -0.73241,0.58106 -1.06445,0.90332 -4.79003,4.66309 -9.57031,9.33105 -14.43358,14.07226"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path4211"
d="m 571.15233,604.91779 c 1.09375,0.97656 2.15332,1.91894 3.21288,2.86621 -0.96191,0.91308 -2.0166,1.75782 -2.8662,2.75879 -1.09374,1.29394 -2.19727,2.54883 -3.62793,3.49609 -1.90918,1.26953 -2.48046,3.21288 -2.75879,5.27832 -0.0489,0.38574 -0.0928,0.72754 -0.41504,0.93261 -3.35937,2.14357 -6.73828,4.2627 -10.07812,6.43556 -0.39551,0.25389 -0.4248,-0.0341 -0.57618,-0.15137 -2.40233,-1.78224 -2.38281,-2.06055 -0.72753,-4.56055 1.49413,-2.25586 3.25195,-4.35058 4.44823,-6.78711 0.66407,-1.34765 1.9336,-1.61133 3.24708,-1.68945 1.1084,-0.0684 1.91895,-0.52735 2.67579,-1.2793 2.49511,-2.48046 5.03417,-4.92676 7.46581,-7.2998"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path4213"
d="m 605.3662,619.50275 c -0.28321,2.36328 -1.81641,3.82324 -4.05762,3.92089 -2.07519,0.0879 -4.40918,-2.16796 -4.22363,-4.0625 0.23925,-2.37793 1.64063,-4.02344 4.28223,-3.9746 2.31933,0.039 3.95507,1.87988 3.99902,4.11621"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg3405" viewBox="0 0 64 64" height="64" width="64"> <defs id="defs3407" /> <metadata id="metadata3410"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g transform="translate(-188.74231,-507.66538)" id="layer1"> <g transform="translate(-359.77798,-59.246938)" id="g3377"> <path style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none" d="m 552.98827,579.64923 c 2.53906,2.49023 4.93163,4.85352 7.33887,7.20215 1.54785,1.50391 3.16894,1.50879 4.71191,0.0293 0.98144,-0.94727 1.96778,-1.89941 2.93457,-2.86621 1.36231,-1.36719 1.36231,-3.00782 -0.0244,-4.37012 -2.54394,-2.5 -5.1123,-4.98535 -7.73437,-7.53906 5.39551,-1.92384 10.26367,-1.17676 14.32617,2.51953 3.19824,2.90527 4.86327,6.63086 3.96972,11.06445 -0.16601,0.84473 0.41017,1.21093 0.88379,1.67481 9.03809,8.81836 18.07129,17.63671 27.11914,26.44531 2.22168,2.16309 2.96387,4.80469 1.93848,7.60743 -1.00098,2.71972 -2.95898,4.64355 -6.15235,5.18553 -2.80273,0.47364 -5.05858,-0.34667 -6.97753,-2.21191 -8.90625,-8.64746 -17.80761,-17.30956 -26.65039,-26.0205 -1.05468,-1.03516 -2.0752,-1.5088 -3.57422,-1.44044 -5.60546,0.26368 -10.77636,-3.90625 -12.2998,-8.69629 -0.89844,-2.81738 -0.97169,-5.61523 0.19042,-8.58398" id="path4207" /> <path style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none" d="m 588.90624,592.90606 c -2.39259,-2.34375 -2.39259,-2.34375 -0.0489,-4.6289 4.10645,-4.00391 8.21778,-8.00293 12.30958,-12.01659 0.4834,-0.47853 1.50391,-0.94728 0.63476,-1.78712 -0.91309,-0.88867 -1.44531,0.11713 -1.97754,0.62988 -4.57031,4.4336 -9.1748,8.8379 -13.64746,13.35937 -1.05469,1.06934 -1.38671,0.32228 -2.07031,-0.20995 -0.86425,-0.67871 -0.8496,-1.11817 -0.0293,-1.89942 4.67772,-4.47265 9.27245,-9.02832 13.92577,-13.53026 2.13379,-2.06544 4.68261,-2.13868 7.04101,-1.23048 2.3584,0.91309 3.87697,3.39844 3.87697,5.71778 0.005,2.05566 -0.74708,3.66698 -2.1875,5.06836 -4.40919,4.29198 -8.8086,8.59375 -13.22755,12.88573 -0.38085,0.37111 -0.74706,1.10841 -1.38671,0.68848 -0.6836,-0.4541 -1.28907,-1.09862 -1.73829,-1.77734 -0.20019,-0.30762 0.43946,-0.63477 0.72755,-0.91309 4.55077,-4.45312 9.11132,-8.89648 13.66698,-13.33984 0.30274,-0.29786 0.67872,-0.56153 0.84962,-0.91797 0.13671,-0.30274 0.24902,-0.72266 -0.19532,-1.04981 -0.38086,-0.27831 -0.70312,-0.25879 -1.0254,-0.0244 -0.37597,0.27343 -0.73241,0.58106 -1.06445,0.90332 -4.79003,4.66309 -9.57031,9.33105 -14.43358,14.07226" id="path4209" /> <path style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none" d="m 571.15233,604.91779 c 1.09375,0.97656 2.15332,1.91894 3.21288,2.86621 -0.96191,0.91308 -2.0166,1.75782 -2.8662,2.75879 -1.09374,1.29394 -2.19727,2.54883 -3.62793,3.49609 -1.90918,1.26953 -2.48046,3.21288 -2.75879,5.27832 -0.0489,0.38574 -0.0928,0.72754 -0.41504,0.93261 -3.35937,2.14357 -6.73828,4.2627 -10.07812,6.43556 -0.39551,0.25389 -0.4248,-0.0341 -0.57618,-0.15137 -2.40233,-1.78224 -2.38281,-2.06055 -0.72753,-4.56055 1.49413,-2.25586 3.25195,-4.35058 4.44823,-6.78711 0.66407,-1.34765 1.9336,-1.61133 3.24708,-1.68945 1.1084,-0.0684 1.91895,-0.52735 2.67579,-1.2793 2.49511,-2.48046 5.03417,-4.92676 7.46581,-7.2998" id="path4211" /> <path style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none" d="m 605.3662,619.50275 c -0.28321,2.36328 -1.81641,3.82324 -4.05762,3.92089 -2.07519,0.0879 -4.40918,-2.16796 -4.22363,-4.0625 0.23925,-2.37793 1.64063,-4.02344 4.28223,-3.9746 2.31933,0.039 3.95507,1.87988 3.99902,4.11621" id="path4213" /> </g> </g></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

69
embed/imgs/embed.svg Normal file
View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg3937"
height="64"
width="64"
inkscape:version="0.91 r13725"
sodipodi:docname="embed.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1232"
inkscape:window-height="1040"
id="namedview8"
showgrid="false"
inkscape:zoom="3.6875"
inkscape:cx="34.169492"
inkscape:cy="33.627119"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="0"
inkscape:current-layer="svg3937" />
<defs
id="defs3939" />
<metadata
id="metadata3942">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="g4136"
transform="matrix(1.1499985,0,0,1.1499985,-4.7999525,-4.7999514)">
<path
d="m 26.443358,46.804687 8.300781,-29.609375 2.8125,0 -8.28125,29.609375 -2.832031,0 z"
style="fill:#8db3d1;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4159"
inkscape:connector-curvature="0" />
<path
d="m 59.826123,34.387695 -18.964844,12.158204 0,-5.244141 15.019531,-9.345704 -15.019531,-9.257812 0,-5.244141 18.964844,12.011719 0,4.921875 z"
style="fill:#5490ba;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4161"
inkscape:connector-curvature="0" />
<path
d="m 4.1738772,34.387695 18.9648438,12.158204 0,-5.244141 -15.0195307,-9.345704 15.0195307,-9.257812 0,-5.244141 -18.9648437,12.011719 0,4.921875 z"
style="fill:#5490ba;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4161-2"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="64" height="64" id="svg3937" version="1.1"> <defs id="defs3939" /> <metadata id="metadata3942"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g transform="matrix(1.1499985,0,0,1.1499985,-4.7999525,-4.7999514)" id="g4136"> <path id="path4159" style="fill:#8db3d1;fill-opacity:1;" d="m 26.443358,46.804687 8.300781,-29.609375 2.8125,0 -8.28125,29.609375 -2.832031,0 z" /> <path id="path4161" style="fill:#5490ba;fill-opacity:1;" d="m 59.826123,34.387695 -18.964844,12.158204 0,-5.244141 15.019531,-9.345704 -15.019531,-9.257812 0,-5.244141 18.964844,12.011719 0,4.921875 z" /> <path id="path4161-2" style="fill:#5490ba;fill-opacity:1;" d="m 4.1738772,34.387695 18.9648438,12.158204 0,-5.244141 -15.0195307,-9.345704 15.0195307,-9.257812 0,-5.244141 -18.9648437,12.011719 0,4.921875 z" /> </g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

96
embed/imgs/folder.svg Normal file
View file

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="45"
height="45"
viewBox="0 0 45 45"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="folder.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#3ddd72"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="7.919596"
inkscape:cx="23.09878"
inkscape:cy="13.633711"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
showguides="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-intersection-paths="true"
inkscape:object-paths="true"
inkscape:object-nodes="true"
inkscape:window-width="1059"
inkscape:window-height="723"
inkscape:window-x="233"
inkscape:window-y="206"
inkscape:window-maximized="0">
<sodipodi:guide
position="0,0"
orientation="0,16"
id="guide4149" />
<sodipodi:guide
position="0,16"
orientation="16,0"
id="guide4155" />
<sodipodi:guide
position="0,0"
orientation="0,45"
id="guide4138" />
<sodipodi:guide
position="45,0"
orientation="-45,0"
id="guide4140" />
<sodipodi:guide
position="45,45"
orientation="0,-45"
id="guide4142" />
<sodipodi:guide
position="0,45"
orientation="45,0"
id="guide4144" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1007.3622)">
<path
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 26.500001,1014.2997 -5.333334,5.9271 -18.666667,0 0,29.6354 24,0 16,0 c 0,-11.8542 0,-23.7083 0,-35.5625 z"
id="rect4147"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg2" viewBox="0 0 45 45" height="45" width="45"> <defs id="defs4" /> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g transform="translate(0,-1007.3622)" id="layer1"> <path id="rect4147" d="m 26.500001,1014.2997 -5.333334,5.9271 -18.666667,0 0,29.6354 24,0 16,0 c 0,-11.8542 0,-23.7083 0,-35.5625 z" style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> </g></svg>

After

Width:  |  Height:  |  Size: 1,005 B

110
embed/imgs/fullscreen.svg Normal file
View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="45"
height="45"
id="svg3937"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="New document 8">
<defs
id="defs3939" />
<sodipodi:namedview
id="base"
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="7.9195959"
inkscape:cx="28.131736"
inkscape:cy="23.298993"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:window-width="1185"
inkscape:window-height="659"
inkscape:window-x="426"
inkscape:window-y="164"
inkscape:window-maximized="0" />
<metadata
id="metadata3942">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1007.3622)">
<g
id="g4563"
transform="translate(0,-1.109375)">
<g
id="g4558">
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="M 5.15625,10 C 3.6913461,10 2.5,11.191346 2.5,12.65625 l 0,19.6875 C 2.5,33.808654 3.6913461,35 5.15625,35 l 34.6875,0 C 41.308654,35 42.5,33.808654 42.5,32.34375 l 0,-19.6875 C 42.5,11.191346 41.308654,10 39.84375,10 L 5.15625,10 z M 5,12.53125 l 35,0 0,20 -35,0 0,-20 z"
transform="translate(0,1007.3622)"
id="rect3945"
inkscape:connector-curvature="0" />
<rect
style="fill:#ffffff;fill-opacity:0.39215686;stroke:none"
id="rect3947"
width="35"
height="20"
x="5"
y="1019.8622"
ry="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 18.78125,35.40625 c -1.53661,0.379809 -2.971465,0.991557 -4.28125,1.8125 l 15.65625,0 c -1.313005,-0.822961 -2.762825,-1.432953 -4.3125,-1.8125 l -7.0625,0 z"
transform="translate(0,1007.3622)"
id="path3949"
inkscape:connector-curvature="0" />
</g>
<g
style="fill:#000000"
transform="matrix(2.0353985,0,0,1.1630828,-99.321734,-141.54581)"
id="g4007">
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 65.533646,1001.4758 -2.032932,0 0.662913,0.6629 -2.253903,2.2539 0.707107,0.7071 2.253903,-2.2539 0.662912,0.6629 0,-2.0329 z"
id="rect3958"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 65.533646,1012.84 0,-2.033 -0.662836,0.6629 -2.253901,-2.2539 -0.707104,0.7071 2.253902,2.2539 -0.662906,0.6629 2.032845,1e-4 z"
id="rect3958-5"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 54.16943,1001.4758 2.032932,0 -0.662913,0.6629 2.253903,2.2539 -0.707107,0.7071 -2.253903,-2.2539 -0.662912,0.6629 0,-2.0329 z"
id="rect3958-51"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 54.16943,1012.84 0,-2.033 0.662836,0.6629 2.253901,-2.2539 0.707104,0.7071 -2.253902,2.2539 0.662906,0.6629 -2.032845,1e-4 z"
id="rect3958-5-7"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg3937" height="45" width="45"><defs id="defs3939" /><metadata id="metadata3942"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><g transform="translate(0,-1007.3622)" id="layer1"><g transform="translate(0,-1.109375)" id="g4563"><g id="g4558"><path id="rect3945" transform="translate(0,1007.3622)" d="M 5.15625,10 C 3.6913461,10 2.5,11.191346 2.5,12.65625 l 0,19.6875 C 2.5,33.808654 3.6913461,35 5.15625,35 l 34.6875,0 C 41.308654,35 42.5,33.808654 42.5,32.34375 l 0,-19.6875 C 42.5,11.191346 41.308654,10 39.84375,10 L 5.15625,10 z M 5,12.53125 l 35,0 0,20 -35,0 0,-20 z" style="fill:#fff;fill-opacity:1;stroke:none" /><rect ry="0" y="1019.8622" x="5" height="20" width="35" id="rect3947" style="fill:#fff;fill-opacity:0.39215686;stroke:none" /><path id="path3949" transform="translate(0,1007.3622)" d="m 18.78125,35.40625 c -1.53661,0.379809 -2.971465,0.991557 -4.28125,1.8125 l 15.65625,0 c -1.313005,-0.822961 -2.762825,-1.432953 -4.3125,-1.8125 l -7.0625,0 z" style="fill:#fff;fill-opacity:1;stroke:none" /></g><g id="g4007" transform="matrix(2.0353985,0,0,1.1630828,-99.321734,-141.54581)" style="fill:#000"><path id="rect3958" d="m 65.533646,1001.4758 -2.032932,0 0.662913,0.6629 -2.253903,2.2539 0.707107,0.7071 2.253903,-2.2539 0.662912,0.6629 0,-2.0329 z" style="fill:#fff;fill-opacity:1;stroke:none" /><path id="rect3958-5" d="m 65.533646,1012.84 0,-2.033 -0.662836,0.6629 -2.253901,-2.2539 -0.707104,0.7071 2.253902,2.2539 -0.662906,0.6629 2.032845,1e-4 z" style="fill:#fff;fill-opacity:1;stroke:none" /><path id="rect3958-51" d="m 54.16943,1001.4758 2.032932,0 -0.662913,0.6629 2.253903,2.2539 -0.707107,0.7071 -2.253903,-2.2539 -0.662912,0.6629 0,-2.0329 z" style="fill:#fff;fill-opacity:1;stroke:none" /><path id="rect3958-5-7" d="m 54.16943,1012.84 0,-2.033 0.662836,0.6629 2.253901,-2.2539 0.707104,0.7071 -2.253902,2.2539 0.662906,0.6629 -2.032845,1e-4 z" style="fill:#fff;fill-opacity:1;stroke:none" /></g></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

96
embed/imgs/loop.svg Normal file
View file

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg3937"
height="45"
width="45"
inkscape:version="0.91 r13725"
sodipodi:docname="loop.svg">
<sodipodi:namedview
pagecolor="#8bff39"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1055"
id="namedview3591"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="false"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:guide-bbox="true"
inkscape:snap-object-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-midpoints="true"
inkscape:zoom="14.833529"
inkscape:cx="30.216329"
inkscape:cy="21.135445"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg3937">
<sodipodi:guide
position="0,0"
orientation="0,45"
id="guide3615" />
<sodipodi:guide
position="45,0"
orientation="-45,0"
id="guide3617" />
<sodipodi:guide
position="45,45"
orientation="0,-45"
id="guide3619" />
<sodipodi:guide
position="0,45"
orientation="45,0"
id="guide3621" />
<sodipodi:guide
position="0,0"
orientation="-0.70710678,0.70710678"
id="guide3624" />
<sodipodi:guide
position="0,45"
orientation="0.70710678,0.70710678"
id="guide4491" />
</sodipodi:namedview>
<defs
id="defs3939" />
<metadata
id="metadata3942">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<path
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 0 0 L 0 45 L 45 45 L 45 0 L 0 0 z M 22.5 11.25 A 11.25 11.25 0 0 1 33.75 22.5 A 11.25 11.25 0 0 1 22.5 33.75 A 11.25 11.25 0 0 1 14.550781 30.449219 L 12.714844 32.285156 L 12.714844 25.785156 L 19.214844 25.785156 L 17.376953 27.623047 A 7.25 7.25 0 0 0 22.5 29.75 A 7.25 7.25 0 0 0 29.75 22.5 A 7.25 7.25 0 0 0 22.5 15.25 A 7.25 7.25 0 0 0 17.376953 17.376953 L 14.550781 14.550781 A 11.25 11.25 0 0 1 22.5 11.25 z "
id="rect4511" />
<path
style="opacity:1;fill:none;fill-opacity:0.8584475;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 22.5 11.25 A 11.25 11.25 0 0 0 14.550781 14.550781 L 17.376953 17.376953 A 7.25 7.25 0 0 1 22.5 15.25 A 7.25 7.25 0 0 1 29.75 22.5 A 7.25 7.25 0 0 1 22.5 29.75 A 7.25 7.25 0 0 1 17.376953 27.623047 L 19.214844 25.785156 L 12.714844 25.785156 L 12.714844 32.285156 L 14.550781 30.449219 A 11.25 11.25 0 0 0 22.5 33.75 A 11.25 11.25 0 0 0 33.75 22.5 A 11.25 11.25 0 0 0 22.5 11.25 z "
id="path4495" />
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="45" height="45" id="svg3937" version="1.1"> <defs id="defs3939" /> <metadata id="metadata3942"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <path id="rect4511" d="M 0 0 L 0 45 L 45 45 L 45 0 L 0 0 z M 22.5 11.25 A 11.25 11.25 0 0 1 33.75 22.5 A 11.25 11.25 0 0 1 22.5 33.75 A 11.25 11.25 0 0 1 14.550781 30.449219 L 12.714844 32.285156 L 12.714844 25.785156 L 19.214844 25.785156 L 17.376953 27.623047 A 7.25 7.25 0 0 0 22.5 29.75 A 7.25 7.25 0 0 0 29.75 22.5 A 7.25 7.25 0 0 0 22.5 15.25 A 7.25 7.25 0 0 0 17.376953 17.376953 L 14.550781 14.550781 A 11.25 11.25 0 0 1 22.5 11.25 z " style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> <path id="path4495" d="M 22.5 11.25 A 11.25 11.25 0 0 0 14.550781 14.550781 L 17.376953 17.376953 A 7.25 7.25 0 0 1 22.5 15.25 A 7.25 7.25 0 0 1 29.75 22.5 A 7.25 7.25 0 0 1 22.5 29.75 A 7.25 7.25 0 0 1 17.376953 27.623047 L 19.214844 25.785156 L 12.714844 25.785156 L 12.714844 32.285156 L 14.550781 30.449219 A 11.25 11.25 0 0 0 22.5 33.75 A 11.25 11.25 0 0 0 33.75 22.5 A 11.25 11.25 0 0 0 22.5 11.25 z " style="opacity:1;fill:none;fill-opacity:0.8584475;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

141
embed/imgs/mist.svg Normal file
View file

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="202.52017"
height="150"
id="svg5280"
inkscape:version="0.48.5 r10040"
sodipodi:docname="MistServer_logo.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1025"
id="namedview24"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.4374431"
inkscape:cx="422.85672"
inkscape:cy="28.852269"
inkscape:window-x="-2"
inkscape:window-y="-3"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
units="pt" />
<defs
id="defs5282" />
<metadata
id="metadata5285">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-48.726234,-449.75204)"
id="layer1">
<path
d="m 69.082153,534.25314 81.028637,43.26488 81.02605,-43.26488 -30.50707,-69.00894 -101.039068,0 -30.508549,69.00894 0,0 z m 81.028637,50.11732 -88.826486,-47.43088 34.369418,-77.74079 108.913568,0 34.36905,77.74079 -88.82555,47.43088 0,0"
id="path46"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 234.87352,538.03959 -166.751519,0 0,-6.04541 166.751519,0 0,6.04541"
id="path48"
style="fill:#b5d3e2;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 83.487009,535.52082 c 0,9.59968 -7.78108,17.38075 -17.379651,17.38075 -9.599122,0 -17.381124,-7.78106 -17.381124,-17.38075 0,-9.59784 7.782002,-17.38076 17.381124,-17.38076 9.598571,0 17.379651,7.78292 17.379651,17.38076"
id="path50"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 251.2464,535.52082 c 0,9.59968 -7.78107,17.38075 -17.38074,17.38075 -9.59968,0 -17.37892,-7.78106 -17.37892,-17.38075 0,-9.59784 7.77924,-17.38076 17.37892,-17.38076 9.59967,0 17.38074,7.78292 17.38074,17.38076"
id="path52"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 155.78768,537.1828 -5.05228,-3.32212 49.37108,-75.06356 5.05043,3.32211 -49.36923,75.06357 0,0"
id="path54"
style="fill:#b5d3e2;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 148.786,537.78162 -52.896977,-74.05569 4.919417,-3.51558 52.89533,74.05754 -4.91777,3.51373 0,0"
id="path56"
style="fill:#b5d3e2;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 214.59628,462.59829 c 0,7.0975 -5.75242,12.8481 -12.84624,12.8481 -7.09565,0 -12.84625,-5.7506 -12.84625,-12.8481 0,-7.09381 5.7506,-12.84625 12.84625,-12.84625 7.09382,0 12.84624,5.75244 12.84624,12.84625"
id="path58"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 111.82484,462.59829 c 0,7.0975 -5.75133,12.8481 -12.845873,12.8481 -7.095285,0 -12.847532,-5.7506 -12.847532,-12.8481 0,-7.09381 5.752247,-12.84625 12.847532,-12.84625 7.094543,0 12.845873,5.75244 12.845873,12.84625"
id="path60"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 168.87714,487.53535 c 0,9.39145 -7.61157,17.00487 -17.00119,17.00487 -9.38963,0 -17.00304,-7.61342 -17.00304,-17.00487 0,-9.38962 7.61341,-17.0012 17.00304,-17.0012 9.38962,0 17.00119,7.61158 17.00119,17.0012"
id="path62"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 165.85536,536.40156 c 0,7.72396 -6.25913,13.98126 -13.97941,13.98126 -7.72029,0 -13.98126,-6.2573 -13.98126,-13.98126 0,-7.72029 6.26097,-13.97941 13.98126,-13.97941 7.72028,0 13.97941,6.25912 13.97941,13.97941"
id="path64"
style="fill:#b5d3e2;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 68.335736,537.40574 -2.945866,-5.28074 83.87888,-47.98547 4.45712,6.79162 -85.390134,46.47459 0,0"
id="path66"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 149.46958,490.65477 -52.141724,-25.31476 2.545669,-5.48159 53.653355,23.80204 -3.30185,6.23887 -0.75545,0.75544"
id="path68"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 149.4143,484.06397 51.00726,-23.80203 2.6551,5.42999 -49.49635,25.31477"
id="path70"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 233.09362,538.50758 -83.88016,-47.98547 4.56768,-6.72714 82.36743,49.49637 -3.05495,5.21624 0,0"
id="path72"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 154.52001,580.48452 -6.80084,0 -2.26634,-93.70278 11.33536,0 -2.26818,93.70278 0,0"
id="path74"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
d="m 168.12169,582.37313 c 0,9.59968 -7.78107,17.37891 -17.38075,17.37891 -9.59784,0 -17.37891,-7.77923 -17.37891,-17.37891 0,-9.59968 7.78107,-17.38076 17.37891,-17.38076 9.59968,0 17.38075,7.78108 17.38075,17.38076"
id="path76"
style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" id="svg5280" height="150" width="202.52017" version="1.1"><defs id="defs5282" /><metadata id="metadata5285"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><g id="layer1" transform="translate(-48.726234,-449.75204)"><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path46" d="m 69.082153,534.25314 81.028637,43.26488 81.02605,-43.26488 -30.50707,-69.00894 -101.039068,0 -30.508549,69.00894 0,0 z m 81.028637,50.11732 -88.826486,-47.43088 34.369418,-77.74079 108.913568,0 34.36905,77.74079 -88.82555,47.43088 0,0" /><path style="fill:#b5d3e2;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path48" d="m 234.87352,538.03959 -166.751519,0 0,-6.04541 166.751519,0 0,6.04541" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path50" d="m 83.487009,535.52082 c 0,9.59968 -7.78108,17.38075 -17.379651,17.38075 -9.599122,0 -17.381124,-7.78106 -17.381124,-17.38075 0,-9.59784 7.782002,-17.38076 17.381124,-17.38076 9.598571,0 17.379651,7.78292 17.379651,17.38076" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path52" d="m 251.2464,535.52082 c 0,9.59968 -7.78107,17.38075 -17.38074,17.38075 -9.59968,0 -17.37892,-7.78106 -17.37892,-17.38075 0,-9.59784 7.77924,-17.38076 17.37892,-17.38076 9.59967,0 17.38074,7.78292 17.38074,17.38076" /><path style="fill:#b5d3e2;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path54" d="m 155.78768,537.1828 -5.05228,-3.32212 49.37108,-75.06356 5.05043,3.32211 -49.36923,75.06357 0,0" /><path style="fill:#b5d3e2;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path56" d="m 148.786,537.78162 -52.896977,-74.05569 4.919417,-3.51558 52.89533,74.05754 -4.91777,3.51373 0,0" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path58" d="m 214.59628,462.59829 c 0,7.0975 -5.75242,12.8481 -12.84624,12.8481 -7.09565,0 -12.84625,-5.7506 -12.84625,-12.8481 0,-7.09381 5.7506,-12.84625 12.84625,-12.84625 7.09382,0 12.84624,5.75244 12.84624,12.84625" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path60" d="m 111.82484,462.59829 c 0,7.0975 -5.75133,12.8481 -12.845873,12.8481 -7.095285,0 -12.847532,-5.7506 -12.847532,-12.8481 0,-7.09381 5.752247,-12.84625 12.847532,-12.84625 7.094543,0 12.845873,5.75244 12.845873,12.84625" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path62" d="m 168.87714,487.53535 c 0,9.39145 -7.61157,17.00487 -17.00119,17.00487 -9.38963,0 -17.00304,-7.61342 -17.00304,-17.00487 0,-9.38962 7.61341,-17.0012 17.00304,-17.0012 9.38962,0 17.00119,7.61158 17.00119,17.0012" /><path style="fill:#b5d3e2;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path64" d="m 165.85536,536.40156 c 0,7.72396 -6.25913,13.98126 -13.97941,13.98126 -7.72029,0 -13.98126,-6.2573 -13.98126,-13.98126 0,-7.72029 6.26097,-13.97941 13.98126,-13.97941 7.72028,0 13.97941,6.25912 13.97941,13.97941" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path66" d="m 68.335736,537.40574 -2.945866,-5.28074 83.87888,-47.98547 4.45712,6.79162 -85.390134,46.47459 0,0" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path68" d="m 149.46958,490.65477 -52.141724,-25.31476 2.545669,-5.48159 53.653355,23.80204 -3.30185,6.23887 -0.75545,0.75544" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path70" d="m 149.4143,484.06397 51.00726,-23.80203 2.6551,5.42999 -49.49635,25.31477" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path72" d="m 233.09362,538.50758 -83.88016,-47.98547 4.56768,-6.72714 82.36743,49.49637 -3.05495,5.21624 0,0" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path74" d="m 154.52001,580.48452 -6.80084,0 -2.26634,-93.70278 11.33536,0 -2.26818,93.70278 0,0" /><path style="fill:#8cb3cf;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path76" d="m 168.12169,582.37313 c 0,9.59968 -7.78107,17.37891 -17.38075,17.37891 -9.59784,0 -17.37891,-7.77923 -17.37891,-17.37891 0,-9.59968 7.78107,-17.38076 17.37891,-17.38076 9.59968,0 17.38075,7.78108 17.38075,17.38076" /></g></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

97
embed/imgs/pause.svg Normal file
View file

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="45"
height="45"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="1.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="5.3283681"
inkscape:cx="36.324499"
inkscape:cy="19.316553"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-global="true"
showguides="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="false"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
inkscape:snap-page="true"
inkscape:object-nodes="true"
inkscape:snap-nodes="false"
inkscape:window-width="981"
inkscape:window-height="709"
inkscape:window-x="856"
inkscape:window-y="240"
inkscape:window-maximized="0">
<sodipodi:guide
position="0,0"
orientation="0,45"
id="guide3785" />
<sodipodi:guide
position="45,0"
orientation="-45,0"
id="guide3787" />
<sodipodi:guide
position="45,45"
orientation="0,-45"
id="guide3789" />
<sodipodi:guide
position="0,45"
orientation="45,0"
id="guide3791" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1007.3622)">
<g
id="g3779"
transform="translate(3.0304575,47.729705)"
style="fill:#ffffff">
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 4.4695429,998.16377 a 4.0011916,4.0011916 0 0 0 3.749999,3.96873 l 2.2812501,0 a 4.0011916,4.0011916 0 0 0 3.96875,-3.75003 l 0,-32.28123 a 4.0011916,4.0011916 0 0 0 -3.75,-3.96875 l -2.2812501,0 a 4.0011916,4.0011916 0 0 0 -3.968749,3.75 l 0,32.28128 z"
id="path3823-7"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 24.469542,998.1638 a 4.0011916,4.0011916 0 0 0 3.75,3.9687 l 2.28125,0 a 4.0011916,4.0011916 0 0 0 3.96875,-3.75 l 0,-32.28126 a 4.0011916,4.0011916 0 0 0 -3.75,-3.96875 l -2.28125,0 a 4.0011916,4.0011916 0 0 0 -3.96875,3.75 l 0,32.28131 z"
id="path3823-7-4"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg2" height="45" width="45"><defs id="defs4" /><metadata id="metadata7"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><g transform="translate(0,-1007.3622)" id="layer1"><g style="fill:#fff" transform="translate(3.0304575,47.729705)" id="g3779"><path id="path3823-7" d="m 4.4695429,998.16377 a 4.0011916,4.0011916 0 0 0 3.749999,3.96873 l 2.2812501,0 a 4.0011916,4.0011916 0 0 0 3.96875,-3.75003 l 0,-32.28123 a 4.0011916,4.0011916 0 0 0 -3.75,-3.96875 l -2.2812501,0 a 4.0011916,4.0011916 0 0 0 -3.968749,3.75 l 0,32.28128 z" style="fill:#fff;fill-opacity:1;stroke:none" /><path id="path3823-7-4" d="m 24.469542,998.1638 a 4.0011916,4.0011916 0 0 0 3.75,3.9687 l 2.28125,0 a 4.0011916,4.0011916 0 0 0 3.96875,-3.75 l 0,-32.28126 a 4.0011916,4.0011916 0 0 0 -3.75,-3.96875 l -2.28125,0 a 4.0011916,4.0011916 0 0 0 -3.96875,3.75 l 0,32.28131 z" style="fill:#fff;fill-opacity:1;stroke:none" /></g></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

90
embed/imgs/play.svg Normal file
View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="45"
height="45"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="New document 1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="5.3283681"
inkscape:cx="36.324499"
inkscape:cy="19.316553"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-global="true"
showguides="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="false"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
inkscape:snap-page="true"
inkscape:object-nodes="true"
inkscape:snap-nodes="false"
inkscape:window-width="981"
inkscape:window-height="709"
inkscape:window-x="856"
inkscape:window-y="240"
inkscape:window-maximized="0">
<sodipodi:guide
position="0,0"
orientation="0,45"
id="guide3785" />
<sodipodi:guide
position="45,0"
orientation="-45,0"
id="guide3787" />
<sodipodi:guide
position="45,45"
orientation="0,-45"
id="guide3789" />
<sodipodi:guide
position="0,45"
orientation="45,0"
id="guide3791" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1007.3622)">
<path
sodipodi:type="inkscape:offset"
inkscape:radius="0"
inkscape:original="M 10.3125 -6.34375 A 2.9416186 2.9416186 0 0 0 7.90625 -4.875 L -6.21875 19.625 A 2.9416186 2.9416186 0 0 0 -3.65625 24.03125 L 24.625 24.03125 A 2.9416186 2.9416186 0 0 0 27.15625 19.625 L 13 -4.875 A 2.9416186 2.9416186 0 0 0 10.3125 -6.34375 z "
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
id="path3809"
d="M 10.3125,-6.34375 A 2.9416186,2.9416186 0 0 0 7.90625,-4.875 l -14.125,24.5 a 2.9416186,2.9416186 0 0 0 2.5625,4.40625 l 28.28125,0 A 2.9416186,2.9416186 0 0 0 27.15625,19.625 L 13,-4.875 a 2.9416186,2.9416186 0 0 0 -2.6875,-1.46875 z"
transform="matrix(1.0141827,-0.58553867,0.58553867,1.0141827,-0.48419831,1022.8893)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="45"
height="45"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="play_outline.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#20bb3c"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="7.985616"
inkscape:cy="19.316553"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-global="true"
showguides="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="false"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
inkscape:snap-page="true"
inkscape:object-nodes="true"
inkscape:snap-nodes="false"
inkscape:window-width="981"
inkscape:window-height="709"
inkscape:window-x="856"
inkscape:window-y="240"
inkscape:window-maximized="0">
<sodipodi:guide
position="0,0"
orientation="0,45"
id="guide3785" />
<sodipodi:guide
position="45,0"
orientation="-45,0"
id="guide3787" />
<sodipodi:guide
position="45,45"
orientation="0,-45"
id="guide3789" />
<sodipodi:guide
position="0,45"
orientation="45,0"
id="guide3791" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1007.3622)">
<path
sodipodi:type="inkscape:offset"
inkscape:radius="0"
inkscape:original="M 10.3125 -6.34375 A 2.9416186 2.9416186 0 0 0 7.90625 -4.875 L -6.21875 19.625 A 2.9416186 2.9416186 0 0 0 -3.65625 24.03125 L 24.625 24.03125 A 2.9416186 2.9416186 0 0 0 27.15625 19.625 L 13 -4.875 A 2.9416186 2.9416186 0 0 0 10.3125 -6.34375 z "
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1"
id="path3809"
d="M 10.3125,-6.34375 A 2.9416186,2.9416186 0 0 0 7.90625,-4.875 l -14.125,24.5 a 2.9416186,2.9416186 0 0 0 2.5625,4.40625 l 28.28125,0 A 2.9416186,2.9416186 0 0 0 27.15625,19.625 L 13,-4.875 a 2.9416186,2.9416186 0 0 0 -2.6875,-1.46875 z"
transform="matrix(1.0141827,-0.58553867,0.58553867,1.0141827,-0.48419831,1022.8893)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg2"
height="45"
width="45">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-1007.3622)"
id="layer1">
<path
transform="matrix(1.0141827,-0.58553867,0.58553867,1.0141827,-0.48419831,1022.8893)"
d="M 10.3125,-6.34375 A 2.9416186,2.9416186 0 0 0 7.90625,-4.875 l -14.125,24.5 a 2.9416186,2.9416186 0 0 0 2.5625,4.40625 l 28.28125,0 A 2.9416186,2.9416186 0 0 0 27.15625,19.625 L 13,-4.875 a 2.9416186,2.9416186 0 0 0 -2.6875,-1.46875 z"
id="path3809"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg2" height="45" width="45"><defs id="defs4" /><metadata id="metadata7"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><g transform="translate(0,-1007.3622)" id="layer1"><path transform="matrix(1.0141827,-0.58553867,0.58553867,1.0141827,-0.48419831,1022.8893)" d="M 10.3125,-6.34375 A 2.9416186,2.9416186 0 0 0 7.90625,-4.875 l -14.125,24.5 a 2.9416186,2.9416186 0 0 0 2.5625,4.40625 l 28.28125,0 A 2.9416186,2.9416186 0 0 0 27.15625,19.625 L 13,-4.875 a 2.9416186,2.9416186 0 0 0 -2.6875,-1.46875 z" id="path3809" style="fill:#fff;fill-opacity:1;fill-rule:evenodd;stroke:none" /></g></svg>

After

Width:  |  Height:  |  Size: 1,022 B

89
embed/imgs/player.svg Normal file
View file

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg4429"
viewBox="0 0 64.000002 64.000002"
height="64"
width="64"
inkscape:version="0.91 r13725"
sodipodi:docname="player.svg">
<sodipodi:namedview
pagecolor="#dbe64a"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0.63529412"
inkscape:pageshadow="2"
inkscape:window-width="1918"
inkscape:window-height="1040"
id="namedview24"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
units="px"
inkscape:zoom="6.0250756"
inkscape:cx="8.9812567"
inkscape:cy="43.244086"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="0"
inkscape:current-layer="g3383" />
<defs
id="defs4431" />
<metadata
id="metadata4434">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-617.80121,-674.1592)"
id="layer1">
<g
id="g3383"
transform="translate(-85.69681,111.42941)">
<g
id="g4143"
transform="matrix(1.3405403,0,0,1.3405403,-250.53223,-201.71523)">
<path
id="path5535"
transform="translate(703.49802,562.72979)"
d="m 12.708984,13.941406 c -2.50489,0 -4.5312496,1.874993 -4.5312496,4.189453 l 0,26.523438 c 0,2.30958 2.0263596,4.189453 4.5312496,4.189453 l 38.679688,0 c 2.50489,0 4.53125,-1.879873 4.53125,-4.189453 l 0,-26.523438 c 0,-2.31446 -2.02636,-4.189453 -4.53125,-4.189453 l -38.679688,0 z m -1.203125,7.064453 41.314453,0 0,18.19336 -41.314453,0 0,-18.19336 z m 0,20.386719 41.314453,0 0,5.009766 -41.314453,0 0,-5.009766 z"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 730.84958,587.51544 9.95606,5.31739 -9.95606,5.31737 z m 0,0"
id="path5541" />
<path
inkscape:connector-curvature="0"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 718.88669,606.93439 33.56934,0 0,-0.61524 -33.56934,0 z m 0,0"
id="path5543" />
<path
inkscape:connector-curvature="0"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 727.99801,606.62676 c 0,0.88868 -0.78125,1.61622 -1.74803,1.61622 -0.9668,0 -1.74805,-0.72754 -1.74805,-1.61622 0,-0.89355 0.78125,-1.61619 1.74805,-1.61619 0.96678,0 1.74803,0.72264 1.74803,1.61619"
id="path5545" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64.000002 64.000002" id="svg4429" version="1.1"> <defs id="defs4431" /> <metadata id="metadata4434"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id="layer1" transform="translate(-617.80121,-674.1592)"> <g transform="translate(-85.69681,111.42941)" id="g3383"> <g transform="matrix(1.3405403,0,0,1.3405403,-250.53223,-201.71523)" id="g4143"> <path style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none" d="m 12.708984,13.941406 c -2.50489,0 -4.5312496,1.874993 -4.5312496,4.189453 l 0,26.523438 c 0,2.30958 2.0263596,4.189453 4.5312496,4.189453 l 38.679688,0 c 2.50489,0 4.53125,-1.879873 4.53125,-4.189453 l 0,-26.523438 c 0,-2.31446 -2.02636,-4.189453 -4.53125,-4.189453 l -38.679688,0 z m -1.203125,7.064453 41.314453,0 0,18.19336 -41.314453,0 0,-18.19336 z m 0,20.386719 41.314453,0 0,5.009766 -41.314453,0 0,-5.009766 z" transform="translate(703.49802,562.72979)" id="path5535" /> <path id="path5541" d="m 730.84958,587.51544 9.95606,5.31739 -9.95606,5.31737 z m 0,0" style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none" /> <path id="path5543" d="m 718.88669,606.93439 33.56934,0 0,-0.61524 -33.56934,0 z m 0,0" style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none" /> <path id="path5545" d="m 727.99801,606.62676 c 0,0.88868 -0.78125,1.61622 -1.74803,1.61622 -0.9668,0 -1.74805,-0.72754 -1.74805,-1.61622 0,-0.89355 0.78125,-1.61619 1.74805,-1.61619 0.96678,0 1.74803,0.72264 1.74803,1.61619" style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none" /> </g> </g> </g></svg>

After

Width:  |  Height:  |  Size: 2 KiB

84
embed/imgs/preview.svg Normal file
View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg4429"
viewBox="0 0 64.000008 64.000006"
height="64"
width="64"
inkscape:version="0.91 r13725"
sodipodi:docname="preview.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="958"
inkscape:window-height="1040"
id="namedview17"
showgrid="false"
units="px"
inkscape:zoom="2.2585352"
inkscape:cx="59.600694"
inkscape:cy="49.739631"
inkscape:window-x="960"
inkscape:window-y="19"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" />
<defs
id="defs4431" />
<metadata
id="metadata4434">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-582.95054,-557.8903)"
id="layer1">
<path
inkscape:connector-curvature="0"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 592.82603,621.89028 c -0.4815,0.009 -1.04972,-0.29907 -1.57906,-0.65496 -1.25609,-0.84635 -2.49422,-1.71963 -3.73235,-2.5929 -1.51327,-1.06767 -1.77047,-2.46131 -0.68785,-3.89683 2.4972,-3.31665 5.0273,-6.60936 7.51254,-9.93199 0.74168,-0.9929 1.49533,-1.93495 2.67065,-2.50019 0.48151,-0.23029 0.81347,-0.19141 1.22917,0.16747 1.73159,1.51029 3.59178,2.86505 5.68524,3.89384 0.53234,0.26318 0.68487,0.62206 0.60412,1.14244 -0.1286,0.79552 -0.39178,1.54617 -0.89122,2.20113 -2.73944,3.62169 -5.48187,7.23739 -8.23328,10.85011 -0.58318,0.76861 -1.31291,1.32188 -2.57796,1.32188"
id="path4265" />
<path
inkscape:connector-curvature="0"
style="fill:#f3f3f3;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 597.85932,608.22595 c 0.006,0.46953 -0.15253,0.75365 -0.3529,1.01981 -1.46244,1.93197 -2.90394,3.87291 -4.39328,5.78693 -0.81646,1.04374 -1.42356,1.01982 -2.80823,0.0119 -1.00187,-0.72972 -1.10057,-1.33683 -0.36188,-2.31478 1.41758,-1.8871 2.83515,-3.77421 4.26768,-5.65234 0.40374,-0.52935 0.96898,-0.96599 1.65084,-0.61309 0.8344,0.43066 1.85122,0.76561 1.99777,1.7615"
id="path4267" />
<path
inkscape:connector-curvature="0"
style="fill:#f3f3f3;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 591.35164,617.09027 c -0.0359,1.01084 -1.19926,1.67477 -2.18617,1.15738 -0.42767,-0.22729 -0.84039,-0.50244 -1.20225,-0.81346 -0.66991,-0.57719 -0.7058,-1.19626 -0.17047,-1.87216 0.48748,-0.61906 1.23813,-0.76261 1.95589,-0.32 0.71178,0.43964 1.55814,0.79253 1.603,1.84824"
id="path4269" />
<path
inkscape:connector-curvature="0"
style="fill:#8cb3d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 617.27468,608.4353 c -14.58843,0 -26.46137,-11.33761 -26.46137,-25.27409 0,-13.93349 11.87294,-25.27108 26.46137,-25.27108 14.59144,0 26.46137,11.33759 26.46137,25.27108 0,13.93648 -11.86993,25.27409 -26.46137,25.27409 m 0,-46.83376 c -12.44712,0 -22.5735,9.6718 -22.5735,21.55967 0,11.89088 10.12638,21.56267 22.5735,21.56267 12.44714,0 22.5765,-9.67179 22.5765,-21.56267 0,-11.88787 -10.12936,-21.55967 -22.5765,-21.55967"
id="path4271" />
<path
sodipodi:type="inkscape:offset"
inkscape:radius="0"
inkscape:original="M 10.3125 -6.34375 A 2.9416186 2.9416186 0 0 0 7.90625 -4.875 L -6.21875 19.625 A 2.9416186 2.9416186 0 0 0 -3.65625 24.03125 L 24.625 24.03125 A 2.9416186 2.9416186 0 0 0 27.15625 19.625 L 13 -4.875 A 2.9416186 2.9416186 0 0 0 10.3125 -6.34375 z "
style="fill:#5490ba;fill-opacity:1;fill-rule:evenodd;stroke:none"
id="path3809"
d="M 10.3125,-6.34375 A 2.9416186,2.9416186 0 0 0 7.90625,-4.875 l -14.125,24.5 a 2.9416186,2.9416186 0 0 0 2.5625,4.40625 l 28.28125,0 A 2.9416186,2.9416186 0 0 0 27.15625,19.625 L 13,-4.875 a 2.9416186,2.9416186 0 0 0 -2.6875,-1.46875 z"
transform="matrix(0.76064273,-0.43915731,0.43915731,0.76064273,604.05764,577.92667)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

68
embed/imgs/return.svg Normal file
View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg3937"
height="64"
width="64"
inkscape:version="0.91 r13725"
sodipodi:docname="blue_loop.svg">
<sodipodi:namedview
pagecolor="#8bff39"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="958"
inkscape:window-height="1040"
id="namedview3591"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="false"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:guide-bbox="true"
inkscape:snap-object-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-midpoints="true"
inkscape:zoom="3.7083823"
inkscape:cx="27.868935"
inkscape:cy="45.77058"
inkscape:window-x="960"
inkscape:window-y="19"
inkscape:window-maximized="0"
inkscape:current-layer="svg3937" />
<defs
id="defs3939" />
<metadata
id="metadata3942">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<path
style="opacity:1;fill:#8db3d1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.437499,8 a 24,24 0 0 0 -16.958333,7.041667 l 6.029167,6.029167 A 15.466666,15.466666 0 0 1 30.437499,16.533334 15.466666,15.466666 0 0 1 45.904165,32 15.466666,15.466666 0 0 1 30.437499,47.466666 15.466666,15.466666 0 0 1 19.508333,42.929166 l 3.920833,-3.920833 -13.866665,0 0,13.866665 3.916665,-3.916665 A 24,24 0 0 0 30.437499,56 a 24,24 0 0 0 24,-24 24,24 0 0 0 -24,-24 z"
id="path4495"
inkscape:connector-curvature="0" />
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="64" height="64" id="svg3937" version="1.1"> <defs id="defs3939" /> <metadata id="metadata3942"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <path id="path4495" d="m 30.437499,8 a 24,24 0 0 0 -16.958333,7.041667 l 6.029167,6.029167 A 15.466666,15.466666 0 0 1 30.437499,16.533334 15.466666,15.466666 0 0 1 45.904165,32 15.466666,15.466666 0 0 1 30.437499,47.466666 15.466666,15.466666 0 0 1 19.508333,42.929166 l 3.920833,-3.920833 -13.866665,0 0,13.866665 3.916665,-3.916665 A 24,24 0 0 0 30.437499,56 a 24,24 0 0 0 24,-24 24,24 0 0 0 -24,-24 z" style="opacity:1;fill:#8db3d1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

83
embed/imgs/speaker.svg Normal file
View file

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="25"
height="25"
id="svg4659"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="speaker.svg">
<defs
id="defs4661" />
<sodipodi:namedview
id="base"
pagecolor="#de43da"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="19.289873"
inkscape:cx="7.9448655"
inkscape:cy="14.079113"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1181"
inkscape:window-height="865"
inkscape:window-x="64"
inkscape:window-y="102"
inkscape:window-maximized="0">
<sodipodi:guide
position="0,0"
orientation="0,25"
id="guide4151" />
<sodipodi:guide
position="25,0"
orientation="-25,0"
id="guide4153" />
<sodipodi:guide
position="25,25"
orientation="0,-25"
id="guide4155" />
<sodipodi:guide
position="0,25"
orientation="25,0"
id="guide4157" />
</sodipodi:namedview>
<metadata
id="metadata4664">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1027.3622)">
<path
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 0 0 L 0 25 L 25 25 L 25 0 L 0 0 z M 17.789062 0.74609375 C 18.295139 0.76779043 18.796936 0.91543438 19.25 1.1855469 L 19.25 23.8125 C 18.041512 24.5346 16.481832 24.377494 15.445312 23.308594 L 10.341797 18.046875 L 8.0878906 18.046875 C 6.7997976 18.046875 5.75 16.963266 5.75 15.634766 L 5.75 9.3632812 C 5.75 8.0348812 6.7997976 6.9511719 8.0878906 6.9511719 L 10.341797 6.9511719 L 15.445312 1.6894531 C 16.092759 1.0217031 16.945602 0.70993262 17.789062 0.74609375 z "
transform="translate(0,1027.3622)"
id="rect4159" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 19.25,1028.5473 c -1.20817,-0.7203 -2.769599,-0.564 -3.805513,0.5044 l -5.102362,5.2622 -2.2535418,0 c -1.288093,0 -2.3385832,1.0834 -2.3385832,2.4118 l 0,6.2709 c 0,1.3285 1.0504902,2.4119 2.3385832,2.4119 l 2.2535418,0 5.102362,5.2623 c 1.03652,1.0689 2.597025,1.2263 3.805513,0.5042 l 0,-22.6277 z"
id="rect4574"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg4659" height="25" width="25"><defs id="defs4661" /><metadata id="metadata4664"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><g transform="translate(0,-1027.3622)" id="layer1"><path id="rect4159" transform="translate(0,1027.3622)" d="M 0 0 L 0 25 L 25 25 L 25 0 L 0 0 z M 17.789062 0.74609375 C 18.295139 0.76779043 18.796936 0.91543438 19.25 1.1855469 L 19.25 23.8125 C 18.041512 24.5346 16.481832 24.377494 15.445312 23.308594 L 10.341797 18.046875 L 8.0878906 18.046875 C 6.7997976 18.046875 5.75 16.963266 5.75 15.634766 L 5.75 9.3632812 C 5.75 8.0348812 6.7997976 6.9511719 8.0878906 6.9511719 L 10.341797 6.9511719 L 15.445312 1.6894531 C 16.092759 1.0217031 16.945602 0.70993262 17.789062 0.74609375 z " style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /><path id="rect4574" d="m 19.25,1028.5473 c -1.20817,-0.7203 -2.769599,-0.564 -3.805513,0.5044 l -5.102362,5.2622 -2.2535418,0 c -1.288093,0 -2.3385832,1.0834 -2.3385832,2.4118 l 0,6.2709 c 0,1.3285 1.0504902,2.4119 2.3385832,2.4119 l 2.2535418,0 5.102362,5.2623 c 1.03652,1.0689 2.597025,1.2263 3.805513,0.5042 l 0,-22.6277 z" style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

73
embed/imgs/volume.svg Normal file
View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="30"
height="65"
id="svg3937"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="volume.svg">
<defs
id="defs3939" />
<sodipodi:namedview
id="base"
pagecolor="#dc39f7"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="4"
inkscape:cx="-36.653402"
inkscape:cy="38.029112"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-bbox="true"
inkscape:bbox-paths="false"
inkscape:window-width="1920"
inkscape:window-height="1055"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:bbox-nodes="true"
inkscape:object-paths="true"
inkscape:snap-page="true"
inkscape:snap-global="true"
borderlayer="true" />
<metadata
id="metadata3942">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-987.3622)">
<path
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;enable-background:accumulate"
d="m 0,1052.3622 0,-65 5,0 c -0.172588,0 -0.337256,0.0295 -0.5,0.0625 -0.489111,0.1 -0.942345,0.31725 -1.28125,0.65625 -0.226206,0.2262 -0.404743,0.5135 -0.53125,0.8125 -0.126507,0.2991 -0.1875,0.62365 -0.1875,0.96875 0,0 0.075978,0.44705 0.1875,0.78125 l 19.84375,59.49995 c 0.142777,1.2451 1.185414,2.2188 2.46875,2.2188 l -25,0 z m 25,0 c 0.877549,0 1.647663,-0.441 2.09375,-1.125 0.06381,-0.098 0.1062,-0.2046 0.15625,-0.3125 0.02962,-0.062 0.06926,-0.1225 0.09375,-0.1875 0.04501,-0.1212 0.06741,-0.2459 0.09375,-0.375 0.009,-0.044 0.02457,-0.08 0.03125,-0.125 0.01878,-0.1235 0.03125,-0.2462 0.03125,-0.375 l 0,-60 c 0,-1.385 -1.114999,-2.5 -2.5,-2.5 l 5,0 0,65 -5,0 z"
id="rect4674"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 25,1052.3617 c -1.283336,0 -2.325973,-0.9737 -2.46875,-2.2187 L 2.6875,990.6429 C 2.575978,990.3087 2.5,989.8617 2.5,989.8617 c 0,-0.3451 0.060993,-0.6697 0.1875,-0.9688 0.126507,-0.299 0.305044,-0.5863 0.53125,-0.8125 0.338905,-0.339 0.792139,-0.5562 1.28125,-0.6562 0.162744,-0.033 0.327412,-0.062 0.5,-0.062 l 20,0 c 1.385001,0 2.5,1.115 2.5,2.5 l 0,60 c 0,0.1288 -0.01247,0.2515 -0.03125,0.375 -0.0067,0.045 -0.02225,0.081 -0.03125,0.125 -0.02634,0.1292 -0.04874,0.2538 -0.09375,0.375 -0.02449,0.065 -0.06413,0.1252 -0.09375,0.1875 -0.05005,0.1079 -0.09244,0.2145 -0.15625,0.3125 -0.446087,0.684 -1.216201,1.125 -2.09375,1.125 z m 0,-1.2187 c 0.474106,0 0.864734,-0.2114 1.09375,-0.5625 -0.02112,0.032 -0.0059,-0.01 0.0625,-0.1563 a 1.204452,1.204452 0 0 1 0,-0.031 c 0.0235,-0.049 0.05198,-0.052 0.0625,-0.062 0.0055,-0.016 0.0094,-0.035 0,-0.031 0.0017,-0.01 0.0055,-0.061 0.03125,-0.1875 0.008,-0.039 0.02555,-0.039 0.03125,-0.062 0.0098,-0.066 0.0055,-0.1027 0,-0.094 -0.0016,-0.03 0,-0.068 0,-0.094 l 0,-60 c 0,-0.7386 -0.542617,-1.2813 -1.28125,-1.2813 l -20,0 c -0.035353,0 -0.105322,0 -0.25,0.031 -0.296863,0.061 -0.546343,0.1713 -0.6875,0.3125 -0.089394,0.089 -0.205263,0.258 -0.28125,0.4375 -0.055315,0.1308 -0.058661,0.2832 -0.0625,0.4687 -2.52e-4,0.012 0,0.019 0,0.031 0.027982,0.1353 0.082499,0.2789 0.125,0.4062 l 19.84375,59.5005 a 1.204452,1.204452 0 0 1 0.03125,0.25 c 0.07527,0.6564 0.607054,1.125 1.28125,1.125 z"
id="path4697-6"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg3937"
height="65"
width="30">
<defs
id="defs3939" />
<metadata
id="metadata3942">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-987.3622)"
id="layer1">
<path
id="rect4674"
d="m 0,1052.3622 0,-65 5,0 c -0.172588,0 -0.337256,0.0295 -0.5,0.0625 -0.489111,0.1 -0.942345,0.31725 -1.28125,0.65625 -0.226206,0.2262 -0.404743,0.5135 -0.53125,0.8125 -0.126507,0.2991 -0.1875,0.62365 -0.1875,0.96875 0,0 0.075978,0.44705 0.1875,0.78125 l 19.84375,59.49995 c 0.142777,1.2451 1.185414,2.2188 2.46875,2.2188 l -25,0 z m 25,0 c 0.877549,0 1.647663,-0.441 2.09375,-1.125 0.06381,-0.098 0.1062,-0.2046 0.15625,-0.3125 0.02962,-0.062 0.06926,-0.1225 0.09375,-0.1875 0.04501,-0.1212 0.06741,-0.2459 0.09375,-0.375 0.009,-0.044 0.02457,-0.08 0.03125,-0.125 0.01878,-0.1235 0.03125,-0.2462 0.03125,-0.375 l 0,-60 c 0,-1.385 -1.114999,-2.5 -2.5,-2.5 l 5,0 0,65 -5,0 z"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;enable-background:accumulate" />
<path
id="path4697-6"
d="m 25,1052.3617 c -1.283336,0 -2.325973,-0.9737 -2.46875,-2.2187 L 2.6875,990.6429 C 2.575978,990.3087 2.5,989.8617 2.5,989.8617 c 0,-0.3451 0.060993,-0.6697 0.1875,-0.9688 0.126507,-0.299 0.305044,-0.5863 0.53125,-0.8125 0.338905,-0.339 0.792139,-0.5562 1.28125,-0.6562 0.162744,-0.033 0.327412,-0.062 0.5,-0.062 l 20,0 c 1.385001,0 2.5,1.115 2.5,2.5 l 0,60 c 0,0.1288 -0.01247,0.2515 -0.03125,0.375 -0.0067,0.045 -0.02225,0.081 -0.03125,0.125 -0.02634,0.1292 -0.04874,0.2538 -0.09375,0.375 -0.02449,0.065 -0.06413,0.1252 -0.09375,0.1875 -0.05005,0.1079 -0.09244,0.2145 -0.15625,0.3125 -0.446087,0.684 -1.216201,1.125 -2.09375,1.125 z m 0,-1.2187 c 0.474106,0 0.864734,-0.2114 1.09375,-0.5625 -0.02112,0.032 -0.0059,-0.01 0.0625,-0.1563 a 1.204452,1.204452 0 0 1 0,-0.031 c 0.0235,-0.049 0.05198,-0.052 0.0625,-0.062 0.0055,-0.016 0.0094,-0.035 0,-0.031 0.0017,-0.01 0.0055,-0.061 0.03125,-0.1875 0.008,-0.039 0.02555,-0.039 0.03125,-0.062 0.0098,-0.066 0.0055,-0.1027 0,-0.094 -0.0016,-0.03 0,-0.068 0,-0.094 l 0,-60 c 0,-0.7386 -0.542617,-1.2813 -1.28125,-1.2813 l -20,0 c -0.035353,0 -0.105322,0 -0.25,0.031 -0.296863,0.061 -0.546343,0.1713 -0.6875,0.3125 -0.089394,0.089 -0.205263,0.258 -0.28125,0.4375 -0.055315,0.1308 -0.058661,0.2832 -0.0625,0.4687 -2.52e-4,0.012 0,0.019 0,0.031 0.027982,0.1353 0.082499,0.2789 0.125,0.4062 l 19.84375,59.5005 a 1.204452,1.204452 0 0 1 0.03125,0.25 c 0.07527,0.6564 0.607054,1.125 1.28125,1.125 z"
style="fill:#ffffff;fill-opacity:1;stroke:none" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

269
embed/mist.css Normal file

File diff suppressed because one or more lines are too long

31
embed/players/dash.js Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,902 @@
<!DOCTYPE html>
<html lang="en" class=" is-copy-enabled is-u2f-enabled">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
<meta charset='utf-8'>
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-a56791f00ea569012c620526e115f9be8d519034262393f82c045116a52b0817.css" integrity="sha256-pWeR8A6laQEsYgUm4RX5vo1RkDQmI5P4LARRFqUrCBc=" media="all" rel="stylesheet" />
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-5deed352941c0958fa4fa1d6f62607987d97095b986d6994657867ea4d843cbd.css" integrity="sha256-Xe7TUpQcCVj6T6HW9iYHmH2XCVuYbWmUZXhn6k2EPL0=" media="all" rel="stylesheet" />
<link as="script" href="https://assets-cdn.github.com/assets/frameworks-149d9338c2665172870825c78fa48fdcca4d431d067cbf5fda7120d9e39cc738.js" rel="preload" />
<link as="script" href="https://assets-cdn.github.com/assets/github-109daf4a404ee43b316c94cbb025dd5c390990eacc3b1d807ec6e1150039af02.js" rel="preload" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Language" content="en">
<meta name="viewport" content="width=device-width">
<title>dash.js/LICENSE.md at development · Dash-Industry-Forum/dash.js</title>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<meta property="fb:app_id" content="1401488693436528">
<meta content="https://avatars3.githubusercontent.com/u/2762280?v=3&amp;s=400" name="twitter:image:src" /><meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="Dash-Industry-Forum/dash.js" name="twitter:title" /><meta content="dash.js - A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers." name="twitter:description" />
<meta content="https://avatars3.githubusercontent.com/u/2762280?v=3&amp;s=400" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="Dash-Industry-Forum/dash.js" property="og:title" /><meta content="https://github.com/Dash-Industry-Forum/dash.js" property="og:url" /><meta content="dash.js - A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers." property="og:description" />
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<link rel="assets" href="https://assets-cdn.github.com/">
<link rel="web-socket" href="wss://live.github.com/_sockets/Mjk4MDcwNTphZTZkYTAwNTEzNGY3MDQ0NjZiNzcwOTYwMzlmM2JmNjo3YmM0Y2RkNTYzOTVjOWZlOTUxOTM0NDU5MzNkZjM0MmIxYzhjOTk5OGY1MWZkZThjNTk3ZTg2ODljMDE3MmFl--dfbe7e220e7abcec65b5a48721918ce1ab85a3c6">
<meta name="pjax-timeout" content="1000">
<link rel="sudo-modal" href="/sessions/sudo_modal">
<meta name="msapplication-TileImage" content="/windows-tile.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="selected-link" value="repo_source" data-pjax-transient>
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-analytics" content="UA-3769691-2">
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="5C44947A:2B25:14702F7A:578354FD" name="octolytics-dimension-request_id" /><meta content="2980705" name="octolytics-actor-id" /><meta content="thoronwen" name="octolytics-actor-login" /><meta content="9dae7495ad90123d0cea295f73d352139e0239dc9ba7463110880f318df82c83" name="octolytics-actor-hash" />
<meta content="/&lt;user-name&gt;/&lt;repo-name&gt;/blob/show" data-pjax-transient="true" name="analytics-location" />
<meta class="js-ga-set" name="dimension1" content="Logged In">
<meta name="hostname" content="github.com">
<meta name="user-login" content="thoronwen">
<meta name="expected-hostname" content="github.com">
<meta name="js-proxy-site-detection-payload" content="YWMzZjEyOWU1ZjQxNTA3ZTU0ODFjZjQ3N2Y1N2IxNTBiYzYyYTA5YjBjZjg3OGViYjlkZWZjN2NiZDBjZmE0OHx7InJlbW90ZV9hZGRyZXNzIjoiOTIuNjguMTQ4LjEyMiIsInJlcXVlc3RfaWQiOiI1QzQ0OTQ3QToyQjI1OjE0NzAyRjdBOjU3ODM1NEZEIiwidGltZXN0YW1wIjoxNDY4MjI0NzY2fQ==">
<link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#4078c0">
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
<meta name="html-safe-nonce" content="9d724374e791efca9d9e0daa13addd3144fb9062">
<meta content="e31b8b36558bb93709d07c04a8282c2434e31128" name="form-nonce" />
<meta http-equiv="x-pjax-version" content="6b9c431dbe5856e2eed898e3470e5eb3">
<meta name="description" content="dash.js - A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.">
<meta name="go-import" content="github.com/Dash-Industry-Forum/dash.js git https://github.com/Dash-Industry-Forum/dash.js.git">
<meta content="2762280" name="octolytics-dimension-user_id" /><meta content="Dash-Industry-Forum" name="octolytics-dimension-user_login" /><meta content="6621471" name="octolytics-dimension-repository_id" /><meta content="Dash-Industry-Forum/dash.js" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="6621471" name="octolytics-dimension-repository_network_root_id" /><meta content="Dash-Industry-Forum/dash.js" name="octolytics-dimension-repository_network_root_nwo" />
<link href="https://github.com/Dash-Industry-Forum/dash.js/commits/development.atom" rel="alternate" title="Recent Commits to dash.js:development" type="application/atom+xml">
<link rel="canonical" href="https://github.com/Dash-Industry-Forum/dash.js/blob/development/LICENSE.md" data-pjax-transient>
</head>
<body class="logged-in env-production linux vis-public page-blob">
<div id="js-pjax-loader-bar" class="pjax-loader-bar"></div>
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
<div class="header header-logged-in true" role="banner">
<div class="container clearfix">
<a class="header-logo-invertocat" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
<svg aria-hidden="true" class="octicon octicon-mark-github" height="28" version="1.1" viewBox="0 0 16 16" width="28"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<div class="header-search scoped-search site-scoped-search js-site-search" role="search">
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/search" class="js-site-search-form" data-scoped-search-url="/Dash-Industry-Forum/dash.js/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<label class="form-control header-search-wrapper js-chromeless-input-container">
<div class="header-search-scope">This repository</div>
<input type="text"
class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
data-hotkey="s"
name="q"
placeholder="Search"
aria-label="Search this repository"
data-unscoped-placeholder="Search GitHub"
data-scoped-placeholder="Search"
tabindex="1"
autocapitalize="off">
</label>
</form></div>
<ul class="header-nav left" role="navigation">
<li class="header-nav-item">
<a href="/pulls" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:pulls context:user" data-hotkey="g p" data-selected-links="/pulls /pulls/assigned /pulls/mentioned /pulls">
Pull requests
</a> </li>
<li class="header-nav-item">
<a href="/issues" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:issues context:user" data-hotkey="g i" data-selected-links="/issues /issues/assigned /issues/mentioned /issues">
Issues
</a> </li>
<li class="header-nav-item">
<a class="header-nav-link" href="https://gist.github.com/" data-ga-click="Header, go to gist, text:gist">Gist</a>
</li>
</ul>
<ul class="header-nav user-nav right" id="user-links">
<li class="header-nav-item">
<a href="/notifications" aria-label="You have unread notifications" class="header-nav-link notification-indicator tooltipped tooltipped-s js-socket-channel js-notification-indicator" data-channel="tenant:1:notification-changed:2980705" data-ga-click="Header, go to notifications, icon:unread" data-hotkey="g n">
<span class="mail-status unread"></span>
<svg aria-hidden="true" class="octicon octicon-bell" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 12v1H0v-1l.73-.58c.77-.77.81-2.55 1.19-4.42C2.69 3.23 6 2 6 2c0-.55.45-1 1-1s1 .45 1 1c0 0 3.39 1.23 4.16 5 .38 1.88.42 3.66 1.19 4.42l.66.58H14zm-7 4c1.11 0 2-.89 2-2H5c0 1.11.89 2 2 2z"></path></svg>
</a>
</li>
<li class="header-nav-item dropdown js-menu-container">
<a class="header-nav-link tooltipped tooltipped-s js-menu-target" href="/new"
aria-label="Create new…"
data-ga-click="Header, create new, icon:add">
<svg aria-hidden="true" class="octicon octicon-plus left" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 9H7v5H5V9H0V7h5V2h2v5h5z"></path></svg>
<span class="dropdown-caret"></span>
</a>
<div class="dropdown-menu-content js-menu-content">
<ul class="dropdown-menu dropdown-menu-sw">
<a class="dropdown-item" href="/new" data-ga-click="Header, create new repository">
New repository
</a>
<a class="dropdown-item" href="/new/import" data-ga-click="Header, import a repository">
Import repository
</a>
<a class="dropdown-item" href="/organizations/new" data-ga-click="Header, create new organization">
New organization
</a>
<div class="dropdown-divider"></div>
<div class="dropdown-header">
<span title="Dash-Industry-Forum/dash.js">This repository</span>
</div>
<a class="dropdown-item" href="/Dash-Industry-Forum/dash.js/issues/new" data-ga-click="Header, create new issue">
New issue
</a>
</ul>
</div>
</li>
<li class="header-nav-item dropdown js-menu-container">
<a class="header-nav-link name tooltipped tooltipped-sw js-menu-target" href="/thoronwen"
aria-label="View profile and more"
data-ga-click="Header, show menu, icon:avatar">
<img alt="@thoronwen" class="avatar" height="20" src="https://avatars2.githubusercontent.com/u/2980705?v=3&amp;s=40" width="20" />
<span class="dropdown-caret"></span>
</a>
<div class="dropdown-menu-content js-menu-content">
<div class="dropdown-menu dropdown-menu-sw">
<div class="dropdown-header header-nav-current-user css-truncate">
Signed in as <strong class="css-truncate-target">thoronwen</strong>
</div>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/thoronwen" data-ga-click="Header, go to profile, text:your profile">
Your profile
</a>
<a class="dropdown-item" href="/stars" data-ga-click="Header, go to starred repos, text:your stars">
Your stars
</a>
<a class="dropdown-item" href="/explore" data-ga-click="Header, go to explore, text:explore">
Explore
</a>
<a class="dropdown-item" href="/integrations" data-ga-click="Header, go to integrations, text:integrations">
Integrations
</a>
<a class="dropdown-item" href="https://help.github.com" data-ga-click="Header, go to help, text:help">
Help
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/settings/profile" data-ga-click="Header, go to settings, icon:settings">
Settings
</a>
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/logout" class="logout-form" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="HnZks7yM48r7+We6aFWR9F8uqBnEZDm3239GCmMBDhcgJcKQjTfjY4EynwssOH/JX19SG5CDKQN/UkpbkNpwgw==" /></div>
<button class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout">
Sign out
</button>
</form> </div>
</div>
</li>
</ul>
</div>
</div>
<div id="start-of-content" class="accessibility-aid"></div>
<div id="js-flash-container">
</div>
<div role="main" class="main-content">
<div itemscope itemtype="http://schema.org/SoftwareSourceCode">
<div id="js-repo-pjax-container" data-pjax-container>
<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
<div class="container repohead-details-container">
<ul class="pagehead-actions">
<li>
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/notifications/subscribe" class="js-social-container" data-autosubmit="true" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="dyaT7hDPcpgNqbi0PGF35WwGx6Yrti4is82pVLEuH8kHuMSxLn+Q/C4PUT4i2/1V5VOOiQsPC0Qv64zDYBMwEQ==" /></div> <input class="form-control" id="repository_id" name="repository_id" type="hidden" value="6621471" />
<div class="select-menu js-menu-container js-select-menu">
<a href="/Dash-Industry-Forum/dash.js/subscription"
class="btn btn-sm btn-with-count select-menu-button js-menu-target" role="button" tabindex="0" aria-haspopup="true"
data-ga-click="Repository, click Watch settings, action:blob#show">
<span class="js-select-button">
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
Watch
</span>
</a>
<a class="social-count js-social-count" href="/Dash-Industry-Forum/dash.js/watchers">
206
</a>
<div class="select-menu-modal-holder">
<div class="select-menu-modal subscription-menu-modal js-menu-content" aria-hidden="true">
<div class="select-menu-header js-navigation-enable" tabindex="-1">
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
<span class="select-menu-title">Notifications</span>
</div>
<div class="select-menu-list js-navigation-container" role="menu">
<div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<div class="select-menu-item-text">
<input checked="checked" id="do_included" name="do" type="radio" value="included" />
<span class="select-menu-item-heading">Not watching</span>
<span class="description">Be notified when participating or @mentioned.</span>
<span class="js-select-button-text hidden-select-button-text">
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
Watch
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<div class="select-menu-item-text">
<input id="do_subscribed" name="do" type="radio" value="subscribed" />
<span class="select-menu-item-heading">Watching</span>
<span class="description">Be notified of all conversations.</span>
<span class="js-select-button-text hidden-select-button-text">
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
Unwatch
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<div class="select-menu-item-text">
<input id="do_ignore" name="do" type="radio" value="ignore" />
<span class="select-menu-item-heading">Ignoring</span>
<span class="description">Never be notified.</span>
<span class="js-select-button-text hidden-select-button-text">
<svg aria-hidden="true" class="octicon octicon-mute" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8 2.81v10.38c0 .67-.81 1-1.28.53L3 10H1c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h2l3.72-3.72C7.19 1.81 8 2.14 8 2.81zm7.53 3.22l-1.06-1.06-1.97 1.97-1.97-1.97-1.06 1.06L11.44 8 9.47 9.97l1.06 1.06 1.97-1.97 1.97 1.97 1.06-1.06L13.56 8l1.97-1.97z"></path></svg>
Stop ignoring
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</li>
<li>
<div class="js-toggler-container js-social-container starring-container ">
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/unstar" class="starred" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="b6D5S9lSA12ygF/oSCL24/lYMn/Q84qaiAIBEaufxBoCI1j8EdPKP25z+NWHRY7lhEmg8+R6kcj+X07nayVX3A==" /></div>
<button
class="btn btn-sm btn-with-count js-toggler-target"
aria-label="Unstar this repository" title="Unstar Dash-Industry-Forum/dash.js"
data-ga-click="Repository, click unstar button, action:blob#show; text:Unstar">
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"></path></svg>
Unstar
</button>
<a class="social-count js-social-count" href="/Dash-Industry-Forum/dash.js/stargazers">
1,253
</a>
</form>
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/star" class="unstarred" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="Y7mapw0zGwQxg3i6cCOK5gmYQnzvckuzkx935P6UWnb9R/BCrVuk+Uf9BkvXj+lz5ksTA4y88uKm+lwMtRGl9A==" /></div>
<button
class="btn btn-sm btn-with-count js-toggler-target"
aria-label="Star this repository" title="Star Dash-Industry-Forum/dash.js"
data-ga-click="Repository, click star button, action:blob#show; text:Star">
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"></path></svg>
Star
</button>
<a class="social-count js-social-count" href="/Dash-Industry-Forum/dash.js/stargazers">
1,253
</a>
</form> </div>
</li>
<li>
<a href="#fork-destination-box" class="btn btn-sm btn-with-count"
title="Fork your own copy of Dash-Industry-Forum/dash.js to your account"
aria-label="Fork your own copy of Dash-Industry-Forum/dash.js to your account"
rel="facebox"
data-ga-click="Repository, show fork modal, action:blob#show; text:Fork">
<svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
Fork
</a>
<div id="fork-destination-box" style="display: none;">
<h2 class="facebox-header" data-facebox-id="facebox-header">Where should we fork this repository?</h2>
<include-fragment src=""
class="js-fork-select-fragment fork-select-fragment"
data-url="/Dash-Industry-Forum/dash.js/fork?fragment=1">
<img alt="Loading" height="64" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-128.gif" width="64" />
</include-fragment>
</div>
<a href="/Dash-Industry-Forum/dash.js/network" class="social-count">
589
</a>
</li>
</ul>
<h1 class="public ">
<svg aria-hidden="true" class="octicon octicon-repo" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"></path></svg>
<span class="author" itemprop="author"><a href="/Dash-Industry-Forum" class="url fn" rel="author">Dash-Industry-Forum</a></span><!--
--><span class="path-divider">/</span><!--
--><strong itemprop="name"><a href="/Dash-Industry-Forum/dash.js" data-pjax="#js-repo-pjax-container">dash.js</a></strong>
</h1>
</div>
<div class="container">
<nav class="reponav js-repo-nav js-sidenav-container-pjax"
itemscope
itemtype="http://schema.org/BreadcrumbList"
role="navigation"
data-pjax="#js-repo-pjax-container">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/Dash-Industry-Forum/dash.js" aria-selected="true" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /Dash-Industry-Forum/dash.js" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"></path></svg>
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/Dash-Industry-Forum/dash.js/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /Dash-Industry-Forum/dash.js/issues" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-issue-opened" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
<span itemprop="name">Issues</span>
<span class="counter">122</span>
<meta itemprop="position" content="2">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/Dash-Industry-Forum/dash.js/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /Dash-Industry-Forum/dash.js/pulls" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
<span itemprop="name">Pull requests</span>
<span class="counter">3</span>
<meta itemprop="position" content="3">
</a> </span>
<a href="/Dash-Industry-Forum/dash.js/wiki" class="js-selected-navigation-item reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /Dash-Industry-Forum/dash.js/wiki">
<svg aria-hidden="true" class="octicon octicon-book" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg>
Wiki
</a>
<a href="/Dash-Industry-Forum/dash.js/pulse" class="js-selected-navigation-item reponav-item" data-selected-links="pulse /Dash-Industry-Forum/dash.js/pulse">
<svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8z"></path></svg>
Pulse
</a>
<a href="/Dash-Industry-Forum/dash.js/graphs" class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors /Dash-Industry-Forum/dash.js/graphs">
<svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"></path></svg>
Graphs
</a>
</nav>
</div>
</div>
<div class="container new-discussion-timeline experiment-repo-nav">
<div class="repository-content">
<a href="/Dash-Industry-Forum/dash.js/blob/7a65bce3dc97c003dbe64012a7f567bb57c2f4b7/LICENSE.md" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a>
<!-- blob contrib key: blob_contributors:v21:764190169e735619c08db6ec1167107a -->
<div class="file-navigation js-zeroclipboard-container">
<div class="select-menu branch-select-menu js-menu-container js-select-menu left">
<button class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
title="development"
type="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
<i>Branch:</i>
<span class="js-select-button css-truncate-target">development</span>
</button>
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true">
<div class="select-menu-modal">
<div class="select-menu-header">
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
<span class="select-menu-title">Switch branches/tags</span>
</div>
<div class="select-menu-filters">
<div class="select-menu-text-filter">
<input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="form-control js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
</div>
<div class="select-menu-tabs">
<ul>
<li class="select-menu-tab">
<a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a>
</li>
<li class="select-menu-tab">
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a>
</li>
</ul>
</div>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/blob/Public_Release_v1.6.0/LICENSE.md"
data-name="Public_Release_v1.6.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="Public_Release_v1.6.0">
Public_Release_v1.6.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open selected"
href="/Dash-Industry-Forum/dash.js/blob/development/LICENSE.md"
data-name="development"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="development">
development
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/blob/gh-pages/LICENSE.md"
data-name="gh-pages"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="gh-pages">
gh-pages
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/blob/master/LICENSE.md"
data-name="master"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="master">
master
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/blob/revert-1387-fix-1362/LICENSE.md"
data-name="revert-1387-fix-1362"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="revert-1387-fix-1362">
revert-1387-fix-1362
</span>
</a>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v2.2.0/LICENSE.md"
data-name="v2.2.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.2.0">
v2.2.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v2.1.1/LICENSE.md"
data-name="v2.1.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.1.1">
v2.1.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v2.1.0/LICENSE.md"
data-name="v2.1.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.1.0">
v2.1.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v2.0.0/LICENSE.md"
data-name="v2.0.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.0.0">
v2.0.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.6.0/LICENSE.md"
data-name="v1.6.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.6.0">
v1.6.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.5.1/LICENSE.md"
data-name="v1.5.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.5.1">
v1.5.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.5.0/LICENSE.md"
data-name="v1.5.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.5.0">
v1.5.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.4/LICENSE.md"
data-name="v1.4"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.4">
v1.4
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.3.0/LICENSE.md"
data-name="v1.3.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.3.0">
v1.3.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.2.0/LICENSE.md"
data-name="v1.2.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.2.0">
v1.2.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.1.2/LICENSE.md"
data-name="v1.1.2"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.1.2">
v1.1.2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v0.2.4/LICENSE.md"
data-name="v0.2.4"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.2.4">
v0.2.4
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/V0.1/LICENSE.md"
data-name="V0.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="V0.1">
V0.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/1.0.0/LICENSE.md"
data-name="1.0.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="1.0.0">
1.0.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/0.2.5/LICENSE.md"
data-name="0.2.5"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="0.2.5">
0.2.5
</span>
</a>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
</div>
</div>
</div>
<div class="btn-group right">
<a href="/Dash-Industry-Forum/dash.js/find/development"
class="js-pjax-capture-input btn btn-sm"
data-pjax
data-hotkey="t">
Find file
</a>
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button">Copy path</button>
</div>
<div class="breadcrumb js-zeroclipboard-target">
<span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/Dash-Industry-Forum/dash.js"><span>dash.js</span></a></span></span><span class="separator">/</span><strong class="final-path">LICENSE.md</strong>
</div>
</div>
<div class="commit-tease">
<span class="right">
<a class="commit-tease-sha" href="/Dash-Industry-Forum/dash.js/commit/e01ae7f9363253c2d29d8d636c92c338bd1c450b" data-pjax>
e01ae7f
</a>
<relative-time datetime="2015-01-20T19:38:53Z">Jan 20, 2015</relative-time>
</span>
<div>
<img alt="@AkamaiDASH" class="avatar" height="20" src="https://avatars0.githubusercontent.com/u/7864462?v=3&amp;s=40" width="20" />
<a href="/AkamaiDASH" class="user-mention" rel="contributor">AkamaiDASH</a>
<a href="/Dash-Industry-Forum/dash.js/commit/e01ae7f9363253c2d29d8d636c92c338bd1c450b" class="message" data-pjax="true" title="modified license.md">modified license.md</a>
</div>
<div class="commit-tease-contributors">
<button type="button" class="btn-link muted-link contributors-toggle" data-facebox="#blob_contributors_box">
<strong>1</strong>
contributor
</button>
</div>
<div id="blob_contributors_box" style="display:none">
<h2 class="facebox-header" data-facebox-id="facebox-header">Users who have contributed to this file</h2>
<ul class="facebox-user-list" data-facebox-id="facebox-description">
<li class="facebox-user-list-item">
<img alt="@AkamaiDASH" height="24" src="https://avatars2.githubusercontent.com/u/7864462?v=3&amp;s=48" width="24" />
<a href="/AkamaiDASH">AkamaiDASH</a>
</li>
</ul>
</div>
</div>
<div class="file">
<div class="file-header">
<div class="file-actions">
<div class="btn-group">
<a href="/Dash-Industry-Forum/dash.js/raw/development/LICENSE.md" class="btn btn-sm " id="raw-url">Raw</a>
<a href="/Dash-Industry-Forum/dash.js/blame/development/LICENSE.md" class="btn btn-sm js-update-url-with-hash">Blame</a>
<a href="/Dash-Industry-Forum/dash.js/commits/development/LICENSE.md" class="btn btn-sm " rel="nofollow">History</a>
</div>
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/edit/development/LICENSE.md" class="inline-form js-update-url-with-hash" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="rQy0aX/nhsMc/AQdK4Yc2vaT+cM+NWUCjNBPQkgI/D9N30aZ8bC02XdjhGWmRtcbGYw21KgsASThCoRWvhYdPg==" /></div>
<button class="btn-octicon tooltipped tooltipped-nw" type="submit"
aria-label="Fork this project and edit the file" data-hotkey="e" data-disable-with>
<svg aria-hidden="true" class="octicon octicon-pencil" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"></path></svg>
</button>
</form> <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/delete/development/LICENSE.md" class="inline-form" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="pxfnBgN4PKYQqT0ZX3hy9FUxDAvLC4d4dNerfRk0zPIdAb0beNMQpFuhdlLBqhrdHMSy9IYnQmg02N0MSVigtg==" /></div>
<button class="btn-octicon btn-octicon-danger tooltipped tooltipped-nw" type="submit"
aria-label="Fork this project and delete the file" data-disable-with>
<svg aria-hidden="true" class="octicon octicon-trashcan" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"></path></svg>
</button>
</form> </div>
<div class="file-info">
14 lines (9 sloc)
<span class="file-info-divider"></span>
1.74 KB
</div>
</div>
<div id="readme" class="readme blob instapaper_body">
<article class="markdown-body entry-content" itemprop="text"><h1><a id="user-content-dashjs-bsd-license-agreement" class="anchor" href="#dashjs-bsd-license-agreement" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>dash.js BSD License Agreement</h1>
<p>The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license.</p>
<p><strong>Copyright (c) 2015, Dash Industry Forum.
**All rights reserved.</strong></p>
<ul>
<li>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</li>
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
<li>Neither the name of the Dash Industry Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</li>
</ul>
<p><strong>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</strong></p>
</article>
</div>
</div>
<button type="button" data-facebox="#jump-to-line" data-facebox-class="linejump" data-hotkey="l" class="hidden">Jump to Line</button>
<div id="jump-to-line" style="display:none">
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<input class="form-control linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line&hellip;" aria-label="Jump to line" autofocus>
<button type="submit" class="btn">Go</button>
</form></div>
</div>
<div class="modal-backdrop js-touch-events"></div>
</div>
</div>
</div>
</div>
<div class="container site-footer-container">
<div class="site-footer" role="contentinfo">
<ul class="site-footer-links right">
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
</ul>
<a href="https://github.com" aria-label="Homepage" class="site-footer-mark" title="GitHub">
<svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<ul class="site-footer-links">
<li>&copy; 2016 <span title="0.12132s from github-fe157-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li>
<li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
</ul>
</div>
</div>
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"></path></svg>
<button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
</button>
Something went wrong with that request. Please try again.
</div>
<script crossorigin="anonymous" integrity="sha256-FJ2TOMJmUXKHCCXHj6SP3MpNQx0GfL9f2nEg2eOcxzg=" src="https://assets-cdn.github.com/assets/frameworks-149d9338c2665172870825c78fa48fdcca4d431d067cbf5fda7120d9e39cc738.js"></script>
<script async="async" crossorigin="anonymous" integrity="sha256-EJ2vSkBO5DsxbJTLsCXdXDkJkOrMOx2AfsbhFQA5rwI=" src="https://assets-cdn.github.com/assets/github-109daf4a404ee43b316c94cbb025dd5c390990eacc3b1d807ec6e1150039af02.js"></script>
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner hidden">
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"></path></svg>
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<div class="facebox" id="facebox" style="display:none;">
<div class="facebox-popup">
<div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
</div>
<button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
</button>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

BIN
embed/players/polytrope.swf Normal file

Binary file not shown.

153
embed/test.html Normal file
View file

@ -0,0 +1,153 @@
<html>
<head>
<title>Embed test</title>
<!--
include script for paid players
- jwplayer
- theoplayer
-->
<!--<script type='text/javascript' src='//cdn.theoplayer.com/latest/41718edc-cc2d-40d0-83d4-67c50c60f68f/theoplayer.loader.js'></script>-->
<!--<script src=players/jwplayer.js></script>
<script>jwplayer.key="2z0zTRsxD2HkL6m/LgDqvtUy2EThVn+gk1gN1Q==";</script>-->
<script>
// global options can be set here
var mistoptions = {
host: 'http://cattop:8080'
};
</script>
<script src=core.js></script>
<script src=wrappers/theoplayer.js></script>
<script src=wrappers/jwplayer.js></script>
<script src=wrappers/html5.js></script>
<script src=wrappers/dashjs.js></script>
<script src=wrappers/flash_strobe.js></script>
<script src=wrappers/silverlight.js></script>
<script src=wrappers/polytrope.js></script>
<script src=players/dash.js></script>
<link rel=stylesheet href=mist.css id=mist_player_css>
<style>
/* the website can override the css at will */
body {
padding: 0;
margin: 0;
max-width: 100vw;
max-height: 100vh;
}
.mistvideo {
margin: 1px;
}
</style>
<script>
function mistinit(){
document.addEventListener('error',function(e){
console.log('[Error] '+e.message,e.target);
},true);
document.addEventListener('log',function(e){
console.log('[log] '+e.message)
var msg = document.createTextNode('['+(new Date()).toTimeString().split(' ')[0]+'] '+e.message);
var div = document.createElement('div');
div.appendChild(msg);
document.body.appendChild(div);
},true);
//tryplayers = Object.keys(mistplayers);
tryplayers = [];
tryplayers.push('html5');
//tryplayers.push('dashjs');
//tryplayers.push('flash_strobe');
//tryplayers.push('silverlight');
for (var i in tryplayers) {
var c = document.createElement('div');
c.className = 'mistvideo';
c.title = tryplayers[i];
document.body.appendChild(c);
//mistPlay('live',{
//mistPlay('vids+mist.mp4',{
//mistPlay('lama',{
mistPlay('bunny',{
target: c,
forcePlayer: tryplayers[i],
loop: true
});
}
};
/*
thumbnailing :')
document.addEventListener('initialized',function(e){
var canvas = document.createElement('canvas');
canvas.width = 180;
document.body.appendChild(canvas);
var context = canvas.getContext('2d');
var embedded;
for (var i in mistvideo) {
embedded = mistvideo[i].embedded[0];
break;
}
var video = embedded.player.element;
var f = video.width / canvas.width;
canvas.height = video.height / f;
video.addEventListener('canplay',function(){
context.drawImage(video,0,0,canvas.width,canvas.height);
var img = canvas.toDataURL('image/jpeg');
document.write('<img src="'+img+'">');
});
});
*/
</script>
</head>
<body onload=mistinit()>
<h1>Sup</h1>
<!--
<div class='mistvideo' id='bunny_84yt98eh9g8ht'>
<noscript>
<video controls autoplay>
<source src='http://localhost:8080/bunny.mp4' type='video/mp4'>
<a href='http://localhost:8080/bunny.html' target='_blank'>
Click here to play video
</a>
</video>
</noscript>
<script>
(function(){
var play = function(){
mistPlay('vids+subtel.mp4',{
//mistPlay('bunny',{
target: document.getElementById('bunny_84yt98eh9g8ht'),
//forcePlayer: 'dashjs'
});
}
if (!window.mistplayers) { //import shit
var p = document.createElement('script');
p.src = 'http://localhost:8080/player.js';
document.head.appendChild(p);
p.onload = function(){
play();
}
}
else {
play();
}
})();
</script>
</div>-->
</body>
</html>

100
embed/wrappers/dashjs.js Normal file
View file

@ -0,0 +1,100 @@
mistplayers.dashjs = {
name: 'Dash.js Player',
mimes: ['dash/video/mp4'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
},
isBrowserSupported: function (mimetype) {
return (('dashjs' in window) && ('MediaSource' in window) && (location.protocol != 'file:'));
},
player: function(){}
};
var p = mistplayers.dashjs.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options,callback) {
var cont = document.createElement('div');
cont.className = 'mistplayer';
var me = this;
var ele = this.element('video');
ele.className = '';
cont.appendChild(ele);
ele.width = options.width;
ele.height = options.height;
if (options.autoplay) {
ele.setAttribute('autoplay','');
}
if (options.loop) {
ele.setAttribute('loop','');
}
if (options.poster) {
ele.setAttribute('poster',options.poster);
}
if (options.controls) {
if (options.controls == 'stock') {
ele.setAttribute('controls','');
}
else {
this.buildMistControls();
}
}
ele.addEventListener('error',function(e){
var n = {
0: 'NETWORK_EMPTY',
1: 'NETWORK_IDLE',
2: 'NETWORK_LOADING',
3: 'NETWORK_NO_SOURCE'
}
var r = {
0: 'HAVE_NOTHING',
1: 'HAVE_METADATA',
2: 'HAVE_CURRENT_DATA',
3: 'HAVE_FUTURE_DATA',
4: 'HAVE_ENOUGH_DATA'
};
me.adderror("Player event fired: error\nnetworkState: "+n[this.networkState]+"\nreadyState: "+r[this.readyState]);
},true);
var events = ['abort','canplay','canplaythrough','durationchange','emptied','ended','interruptbegin','interruptend','loadeddata','loadedmetadata','loadstart','pause','play','playing','ratechange','seeked','seeking','stalled','volumechange','waiting'];
for (var i in events) {
ele.addEventListener(events[i],function(e){
me.addlog('Player event fired: '+e.type);
},true);
}
var player = dashjs.MediaPlayer().create();
player.getDebug().setLogToBrowserConsole(false);
player.initialize(ele,options.src,true);
this.dash = player;
this.src = options.src;
this.addlog('Built html');
return cont;
}
p.prototype.play = function(){ return this.element.play(); };
p.prototype.pause = function(){ return this.element.pause(); };
p.prototype.volume = function(level){
if (typeof level == 'undefined' ) { return this.element.volume; }
return this.element.volume = level;
};
p.prototype.play = function(){ return this.element.play(); };
p.prototype.load = function(){ return this.element.load(); };
if (document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) {
p.prototype.fullscreen = function(){
if(this.element.requestFullscreen) {
return this.element.requestFullscreen();
} else if(this.element.mozRequestFullScreen) {
return this.element.mozRequestFullScreen();
} else if(this.element.webkitRequestFullscreen) {
return this.element.webkitRequestFullscreen();
} else if(this.element.msRequestFullscreen) {
return this.element.msRequestFullscreen();
}
};
}
p.prototype.resize = function(size){
this.element.width = size.width;
this.element.height = size.height;
};

View file

@ -0,0 +1,62 @@
mistplayers.flash_strobe = {
name: 'Strobe Flash Media Playback',
mimes: ['flash/11','flash/10','flash/7'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
},
isBrowserSupported: function (mimetype) {
var version = 0;
try {
// check in the mimeTypes
version = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin.description.replace(/([^0-9\.])/g, '').split('.')[0];
} catch(e){}
try {
// for our special friend IE
version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable("$version").replace(/([^0-9\,])/g, '').split(',')[0];
} catch(e){}
var mimesplit = mimetype.split('/');
return Number(version) >= Number(mimesplit[mimesplit.length-1]);
},
player: function(){}
};
var p = mistplayers.flash_strobe.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
function createParam(name,value) {
var p = document.createElement('param');
p.setAttribute('name',name);
p.setAttribute('value',value);
return p;
}
var ele = this.element('object');
ele.setAttribute('width',options.width);
ele.setAttribute('height',options.height);
ele.appendChild(createParam('movie',options.source.player_url));
var flashvars = 'src='+encodeURIComponent(options.src)+'&controlBarMode='+(options.controls ? 'floating' : 'none')+'&initialBufferTime=0.5&expandedBufferTime=5&minContinuousPlaybackTime=3'+(options.live ? '&streamType=live' : '')+(options.autoplay ? '&autoPlay=true' : '' );
ele.appendChild(createParam('flashvars',flashvars));
ele.appendChild(createParam('allowFullScreen','true'));
ele.appendChild(createParam('wmode','direct'));
if (options.autoplay) {
ele.appendChild(createParam('autoPlay','true'));
}
var e = document.createElement('embed');
ele.appendChild(e);
e.setAttribute('src',options.source.player_url);
e.setAttribute('type','application/x-shockwave-flash');
e.setAttribute('allowfullscreen','true');
e.setAttribute('width',options.width);
e.setAttribute('height',options.height);
e.setAttribute('flashvars',flashvars);
this.addlog('Built html');
return ele;
}

240
embed/wrappers/html5.js Normal file
View file

@ -0,0 +1,240 @@
mistplayers.html5 = {
name: 'HTML5 video player',
mimes: ['html5/application/vnd.apple.mpegurl','html5/video/mp4','html5/video/ogg','html5/video/webm','html5/audio/mp3','html5/audio/webm','html5/audio/ogg','html5/audio/wav'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
},
isBrowserSupported: function (mimetype) {
if ((['iPad','iPhone','iPod','MacIntel'].indexOf(navigator.platform) != -1) && (mimetype == 'html5/video/mp4')) { return false; }
var support = false;
var shortmime = mimetype.split('/');
shortmime.shift();
try {
var v = document.createElement((shortmime[0] == 'audio' ? 'audio' : 'video'));
shortmime = shortmime.join('/')
if ((v) && (v.canPlayType(shortmime) != "")) {
support = v.canPlayType(shortmime);
}
} catch(e){}
return support;
},
player: function(){},
mistControls: true
};
var p = mistplayers.html5.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options,callback) {
var cont = document.createElement('div');
cont.className = 'mistplayer';
var me = this; //to allow nested functions to access the player class itself
var shortmime = options.source.type.split('/');
shortmime.shift();
var ele = this.element((shortmime[0] == 'audio' ? 'audio' : 'video'));
ele.className = '';
cont.appendChild(ele);
ele.crossOrigin = 'anonymous';
if (shortmime[0] == 'audio') {
this.setTracks = false;
this.fullscreen = false;
cont.className += ' audio';
}
this.addlog('Building HTML5 player..');
var source = document.createElement('source');
source.setAttribute('src',options.src);
this.source = source;
ele.appendChild(source);
source.type = shortmime.join('/');
this.addlog('Adding '+source.type+' source @ '+options.src);
if ((this.tracks.subtitle.length) && (this.subtitle)) {
for (var i in this.tracks.subtitle) {
var t = document.createElement('track');
ele.appendChild(t);
t.kind = 'subtitles';
t.label = this.tracks.subtitle[i].desc;
t.srclang = this.tracks.subtitle[i].lang;
t.src = this.subtitle+'?track='+this.tracks.subtitle[i].trackid;
}
}
ele.width = options.width;
ele.height = options.height;
ele.style.width = options.width+'px';
ele.style.height = options.height+'px';
ele.startTime = 0;
if (options.autoplay) {
ele.setAttribute('autoplay','');
}
if (options.loop) {
ele.setAttribute('loop','');
}
if (options.poster) {
ele.setAttribute('poster',options.poster);
}
if (options.controls) {
if ((options.controls == 'stock') || (!this.buildMistControls())) {
//MistControls have failed to build in the if condition
ele.setAttribute('controls','');
}
}
cont.onclick = function(){
if (ele.paused) { ele.play(); }
else { ele.pause(); }
};
if (options.live) {
ele.addEventListener('error',function(e){
if ((ele.error) && (ele.error.code == 3)) {
ele.load();
me.addlog('Decoding error: reloading..');
}
},true);
var errorstate = false;
function dced(e) {
if (errorstate) { return; }
errorstate = true;
me.adderror('Connection lost..');
var err = document.createElement('div');
var msgnode = document.createTextNode('Connection lost..');
err.appendChild(msgnode);
err.className = 'error';
var button = document.createElement('button');
var t = document.createTextNode('Reload');
button.appendChild(t);
err.appendChild(button);
button.onclick = function(){
errorstate = false;
ele.parentNode.removeChild(err);
ele.load();
ele.style.opacity = '';
}
err.style.position = 'absolute';
err.style.top = 0;
err.style.width = '100%';
err.style['margin-left'] = 0;
ele.parentNode.appendChild(err);
ele.style.opacity = '0.2';
function nolongerdced(){
ele.removeEventListener('progress',nolongerdced);
errorstate = false;
ele.parentNode.removeChild(err);
ele.style.opacity = '';
}
ele.addEventListener('progress',nolongerdced);
}
//ele.addEventListener('stalled',dced,true);
ele.addEventListener('ended',dced,true);
}
this.addlog('Built html');
//forward events
ele.addEventListener('error',function(e){
me.adderror(e.message);
},true);
var events = ['abort','canplay','canplaythrough','durationchange','emptied','ended','interruptbegin','interruptend','loadeddata','loadedmetadata','loadstart','pause','play','playing','ratechange','seeked','seeking','stalled','volumechange','waiting'];
for (var i in events) {
ele.addEventListener(events[i],function(e){
me.addlog('Player event fired: '+e.type);
},true);
}
return cont;
}
p.prototype.play = function(){ return this.element.play(); };
p.prototype.pause = function(){ return this.element.pause(); };
p.prototype.volume = function(level){
if (typeof level == 'undefined' ) { return this.element.volume; }
return this.element.volume = level;
};
p.prototype.loop = function(bool){
if (typeof bool == 'undefined') {
return this.element.loop;
}
return this.element.loop = bool;
};
p.prototype.load = function(){ return this.element.load(); };
if (document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) {
p.prototype.fullscreen = function(){
if(this.element.requestFullscreen) {
return this.element.requestFullscreen();
} else if(this.element.mozRequestFullScreen) {
return this.element.mozRequestFullScreen();
} else if(this.element.webkitRequestFullscreen) {
return this.element.webkitRequestFullscreen();
} else if(this.element.msRequestFullscreen) {
return this.element.msRequestFullscreen();
}
};
}
p.prototype.setTracks = function(usetracks){
function urlAddParam(url,params) {
var spliturl = url.split('?');
var ret = [spliturl.shift()];
var splitparams = [];
if (spliturl.length) {
splitparams = spliturl[0].split('&');
}
for (var i in params) {
splitparams.push(i+'='+params[i]);
}
if (splitparams.length) { ret.push(splitparams.join('&')); }
return ret.join('?');
}
if ('subtitle' in usetracks) {
//remove previous subtitles
var ts = this.element.getElementsByTagName('track');
for (var i = ts.length - 1; i >= 0; i--) {
this.element.removeChild(ts[i]);
}
var tracks = this.tracks.subtitle;
for (var i in tracks) {
if (tracks[i].trackid == usetracks.subtitle) {
var t = document.createElement('track');
this.element.appendChild(t);
t.kind = 'subtitles';
t.label = tracks[i].desc;
t.srclang = tracks[i].lang;
t.src = this.subtitle+'?track='+tracks[i].trackid;
t.setAttribute('default','');
break;
}
}
delete usetracks.subtitle;
if (Object.keys(usetracks).length == 0) { return true; }
}
var time = this.element.currentTime;
this.source.setAttribute('src',urlAddParam(this.options.src,usetracks));
if (this.element.readyState) {
this.element.load();
}
this.element.currentTime = time;
if ('trackselects' in this) {
for (var i in usetracks) {
if (i in this.trackselects) { this.trackselects[i].value = usetracks[i]; }
}
}
return true;
}
p.prototype.resize = function(size){
this.element.width = size.width;
this.element.height = size.height;
};

View file

@ -0,0 +1,39 @@
mistplayers.jwplayer = {
name: 'JWPlayer',
mimes: ['html5/video/mp4','html5/video/webm','dash/video/mp4','flash/10','flash/7','html5/application/vnd.apple.mpegurl','html5/audio/mp3','html5/audio/aac'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
},
isBrowserSupported: function (mimetype) {
//TODO like, actually check the browser or something?
if (typeof jwplayer == 'function') {
return true;
}
return false;
},
player: function(){}
};
var p = mistplayers.jwplayer.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
var ele = this.element('div');
this.jw = jwplayer(ele).setup({
file: options.src,
width: options.width,
height: options.height,
autostart: options.autoplay,
image: options.poster,
controls: options.controls
});
this.addlog('Built html');
return ele;
}
p.prototype.play = function(){ return this.jw.play(); };
p.prototype.pause = function(){ return this.jw.pause(); };
p.prototype.volume = function(level){
if (typeof level == 'undefined' ) { return this.jw.getVolume/100; }
return this.jw.setVolume(level*100);
};

100
embed/wrappers/polytrope.js Normal file
View file

@ -0,0 +1,100 @@
mistplayers.polytrope = {
name: 'Polytrope Flash Player',
mimes: ['flash/11','flash/10','flash/7'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
},
isBrowserSupported: function (mimetype) {
return false;
var version = 0;
try {
// check in the mimeTypes
version = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin.description.replace(/([^0-9\.])/g, '').split('.')[0];
} catch(e){}
try {
// for our special friend IE
version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable("$version").replace(/([^0-9\,])/g, '').split(',')[0];
} catch(e){}
var mimesplit = mimetype.split('/');
return Number(version) >= Number(mimesplit[mimesplit.length-1]);
},
player: function(){}
};
var p = mistplayers.polytrope.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
function createParam(name,value) {
var p = document.createElement('param');
p.setAttribute('name',name);
p.setAttribute('value',value);
return p;
}
//TODO its not working.
/*
this.swf = this.video_instance_el.flash({
swf: "/shared/swf/videoplayer.swf?" + (new Date).getTime(),
width: "100%",
height: parseInt(this.options.element.height()),
wmode: "opaque",
menu: "false",
allowFullScreen: "true",
allowFullScreenInteractive: "true",
allowScriptAccess: "always",
id: "cucumbertv-swf-" + this.guid,
expressInstall: "/shared/swf/expressInstall.swf",
flashvars: {
rtmp_url: "rtmp://" + this.options.stream_host + "/play/",
stream_name: this.options.stream_name,
poster: this.options.poster,
autoplay: this.options.autoplay,
color_1: "0x1d1d1d",
color_2: "0xffffff",
buffer_time: .1,
is_streaming_url: "/api/user/is_streaming",
username: this.options.username,
mode: "v" == this.options.type ? "archive" : "live",
guid: this.guid
}
})
<div>
<object data="/shared/swf/videoplayer.swf?1468312898591" type="application/x-shockwave-flash" id="cucumbertv-swf-4dc64c18-59af-91a2-d0c5-ab8df4f45c65" width="100%" height="660">
<param name="wmode" value="opaque">
<param name="menu" value="false">
<param name="allowFullScreen" value="true">
<param name="allowFullScreenInteractive" value="true">
<param name="allowScriptAccess" value="always">
<param name="expressInstall" value="/shared/swf/expressInstall.swf">
<param name="flashvars" value="rtmp_url=rtmp://www.stickystage.com/play/&amp;stream_name=stickystage_archive+SrA-2016.07.08.23.54.08&amp;poster=/stickystage/users/SrA/archive/SrA-2016.07.08.23.54.08.jpg&amp;autoplay=true&amp;color_1=0x1d1d1d&amp;color_2=0xffffff&amp;buffer_time=0.1&amp;is_streaming_url=/api/user/is_streaming&amp;username=SrA&amp;mode=archive&amp;guid=4dc64c18-59af-91a2-d0c5-ab8df4f45c65">
<param name="movie" value="/shared/swf/videoplayer.swf?1468312898591">
</object>
</div>
*/
var ele = this.element('object');
ele.data = 'players/polytrope.swf';
ele.type = 'application/x-shockwave-flash';
ele.width = options.width;
ele.height = options.height;
/*
ele.appendChild(createParam('allowFullScreen','true'));
ele.appendChild(createParam('allowScriptAccess','always'));
var flashvars = 'rtmp_url=rtmp://www.stickystage.com/play/&amp;stream_name=stickystage_archive+SrA-2016.07.08.23.54.08&amp;poster=/stickystage/users/SrA/archive/SrA-2016.07.08.23.54.08.jpg&amp;autoplay=true&amp;color_1=0x1d1d1d&amp;color_2=0xffffff&amp;buffer_time=0.1&amp;is_streaming_url=/api/user/is_streaming&amp;username=SrA&amp;mode=archive&amp;guid=4dc64c18-59af-91a2-d0c5-ab8df4f45c65';
ele.appendChild(createParam('flashvars',flashvars));
ele.appendChild(createParam('movie','players/polytrope.swf'));
*/
ele.innerHTML = '<param name="wmode" value="opaque"> <param name="menu" value="false"> <param name="allowFullScreen" value="true"> <param name="allowFullScreenInteractive" value="true"> <param name="allowScriptAccess" value="always"> <param name="expressInstall" value="/shared/swf/expressInstall.swf"> <param name="flashvars" value="rtmp_url=rtmp://www.stickystage.com/play/&amp;stream_name=stickystage_archive+SrA-2016.07.08.23.54.08&amp;poster=http://stickystage.com/stickystage/users/SrA/archive/SrA-2016.07.08.23.54.08.jpg&amp;autoplay=true&amp;color_1=0x1d1d1d&amp;color_2=0xffffff&amp;buffer_time=0.1&amp;is_streaming_url=/api/user/is_streaming&amp;username=SrA&amp;mode=archive&amp;guid=4dc64c18-59af-91a2-d0c5-ab8df4f45c65"> <param name="movie" value="players/polytrope.swf">';
this.addlog('Built html');
return ele;
}

View file

@ -0,0 +1,55 @@
mistplayers.silverlight = {
name: 'Silverlight',
mimes: ['silverlight'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
},
isBrowserSupported: function (mimetype) {
var plugin;
try {
// check in the mimeTypes
plugin = navigator.plugins["Silverlight Plug-In"];
return !!plugin;
} catch(e){}
try {
// for our special friend IE
plugin = new ActiveXObject('AgControl.AgControl');
return true;
} catch(e){}
return false;
},
player: function(){}
};
var p = mistplayers.silverlight.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
function createParam(name,value) {
var p = document.createElement('param');
p.setAttribute('name',name);
p.setAttribute('value',value);
return p;
}
var ele = this.element('object');
ele.setAttribute('data','data:application/x-silverlight,');
ele.setAttribute('type','application/x-silverlight');
ele.setAttribute('width',options.width);
ele.setAttribute('height',options.height);
ele.appendChild(createParam('source',encodeURI(options.src)+'/player.xap'));
ele.appendChild(createParam('initparams','autoload=false,'+(options.autoplay ? 'autoplay=true' : 'autoplay=false')+',displaytimecode=false,enablecaptions=true,joinLive=true,muted=false'));
var a = document.createElement('a');
ele.appendChild(a);
a.setAttribute('href','http://go.microsoft.com/fwlink/?LinkID=124807');
a.setAttribute('style','text-decoration: none;');
var img = document.createElement('img');
a.appendChild(img);
img.setAttribute('src','http://go.microsoft.com/fwlink/?LinkId=108181');
img.setAttribute('alt','Get Microsoft Silverlight');
img.setAttribute('style','border-style: none;')
this.addlog('Built html');
return ele;
}

View file

@ -0,0 +1,23 @@
mistplayers.myplayer = {
name: 'My video player',
mimes: ['my/mime/types'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
},
isBrowserSupported: function (mimetype) {
//TODO your code here
return false;
},
player: function(){}
};
var p = mistplayers.myplayer.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
var ele = this.element('object');
//TODO your code here
this.addlog('Built html');
return ele;
}

View file

@ -0,0 +1,52 @@
mistplayers.theoplayer = {
name: 'TheoPlayer',
mimes: ['html5/application/vnd.apple.mpegurl','dash/video/mp4'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
},
isBrowserSupported: function (mimetype) {
//TODO like, actually check the browser or something?
if (typeof theoplayer == 'function') {
return true;
}
return false;
},
player: function(){}
};
var p = mistplayers.theoplayer.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
var ele = this.element('video');
ele.src = options.src;
ele.width = options.width;
ele.height = options.height;
if (options.controls) {
ele.setAttribute('controls','');
}
if (options.autoplay) {
ele.setAttribute('autoplay','');
}
if (options.loop) {
ele.setAttribute('loop','');
}
if (options.poster) {
ele.setAttribute('poster',options.poster);
}
this.theoplayer = theoplayer(ele);
this.addlog('Built html');
return ele;
}
p.prototype.play = function(){ return this.theoplayer.play(); };
p.prototype.pause = function(){ return this.theoplayer.pause(); };
p.prototype.volume = function(level){
if (typeof level == 'undefined' ) { return this.theoplayer.volume; }
return this.theoplayer.volume = level;
};
p.prototype.fullscreen = function(){
return this.theoplayer.requestFullscreen();
};

View file

@ -1,11 +1,10 @@
</head>
<body>
<nav>
<a href='#' class=logo>Server</a>
<a href='#' class=logo>MistServer</a>
<div class=menu>
</div>
</nav>
<div class=scroller>
<div class=filler>
<header>
<h1>Management Interface</h1>
@ -15,13 +14,11 @@
<span id='message'></span>
</aside>
</header>
<nav class=secondary_menu></nav>
<main>
Loading..
<noscript>Please enable JavaScript.</noscript>
</main>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -1,174 +1,191 @@
var MD5=function(a){function c(a,c){var b,e,d,h,g;d=a&2147483648;h=c&2147483648;b=a&1073741824;e=c&1073741824;g=(a&1073741823)+(c&1073741823);return b&e?g^2147483648^d^h:b|e?g&1073741824?g^3221225472^d^h:g^1073741824^d^h:g^d^h}function e(a,b,d,e,h,g,f){a=c(a,c(c(b&d|~b&e,h),f));return c(a<<g|a>>>32-g,b)}function b(a,b,d,e,h,g,f){a=c(a,c(c(b&e|d&~e,h),f));return c(a<<g|a>>>32-g,b)}function d(a,b,d,e,h,g,f){a=c(a,c(c(b^d^e,h),f));return c(a<<g|a>>>32-g,b)}function i(a,b,d,e,h,g,f){a=c(a,c(c(d^(b|~e),
h),f));return c(a<<g|a>>>32-g,b)}function n(a){var c="",b="",d;for(d=0;3>=d;d++)b=a>>>8*d&255,b="0"+b.toString(16),c+=b.substr(b.length-2,2);return c}var f=[],p,m,s,l,g,h,k,j,f=a.replace(/\r\n/g,"\n"),a="";for(p=0;p<f.length;p++)m=f.charCodeAt(p),128>m?a+=String.fromCharCode(m):(127<m&&2048>m?a+=String.fromCharCode(m>>6|192):(a+=String.fromCharCode(m>>12|224),a+=String.fromCharCode(m>>6&63|128)),a+=String.fromCharCode(m&63|128));f=a;a=f.length;p=a+8;m=16*((p-p%64)/64+1);s=Array(m-1);for(g=l=0;g<a;)p=
(g-g%4)/4,l=8*(g%4),s[p]|=f.charCodeAt(g)<<l,g++;p=(g-g%4)/4;s[p]|=128<<8*(g%4);s[m-2]=a<<3;s[m-1]=a>>>29;f=s;g=1732584193;h=4023233417;k=2562383102;j=271733878;for(a=0;a<f.length;a+=16)p=g,m=h,s=k,l=j,g=e(g,h,k,j,f[a+0],7,3614090360),j=e(j,g,h,k,f[a+1],12,3905402710),k=e(k,j,g,h,f[a+2],17,606105819),h=e(h,k,j,g,f[a+3],22,3250441966),g=e(g,h,k,j,f[a+4],7,4118548399),j=e(j,g,h,k,f[a+5],12,1200080426),k=e(k,j,g,h,f[a+6],17,2821735955),h=e(h,k,j,g,f[a+7],22,4249261313),g=e(g,h,k,j,f[a+8],7,1770035416),
j=e(j,g,h,k,f[a+9],12,2336552879),k=e(k,j,g,h,f[a+10],17,4294925233),h=e(h,k,j,g,f[a+11],22,2304563134),g=e(g,h,k,j,f[a+12],7,1804603682),j=e(j,g,h,k,f[a+13],12,4254626195),k=e(k,j,g,h,f[a+14],17,2792965006),h=e(h,k,j,g,f[a+15],22,1236535329),g=b(g,h,k,j,f[a+1],5,4129170786),j=b(j,g,h,k,f[a+6],9,3225465664),k=b(k,j,g,h,f[a+11],14,643717713),h=b(h,k,j,g,f[a+0],20,3921069994),g=b(g,h,k,j,f[a+5],5,3593408605),j=b(j,g,h,k,f[a+10],9,38016083),k=b(k,j,g,h,f[a+15],14,3634488961),h=b(h,k,j,g,f[a+4],20,3889429448),
g=b(g,h,k,j,f[a+9],5,568446438),j=b(j,g,h,k,f[a+14],9,3275163606),k=b(k,j,g,h,f[a+3],14,4107603335),h=b(h,k,j,g,f[a+8],20,1163531501),g=b(g,h,k,j,f[a+13],5,2850285829),j=b(j,g,h,k,f[a+2],9,4243563512),k=b(k,j,g,h,f[a+7],14,1735328473),h=b(h,k,j,g,f[a+12],20,2368359562),g=d(g,h,k,j,f[a+5],4,4294588738),j=d(j,g,h,k,f[a+8],11,2272392833),k=d(k,j,g,h,f[a+11],16,1839030562),h=d(h,k,j,g,f[a+14],23,4259657740),g=d(g,h,k,j,f[a+1],4,2763975236),j=d(j,g,h,k,f[a+4],11,1272893353),k=d(k,j,g,h,f[a+7],16,4139469664),
h=d(h,k,j,g,f[a+10],23,3200236656),g=d(g,h,k,j,f[a+13],4,681279174),j=d(j,g,h,k,f[a+0],11,3936430074),k=d(k,j,g,h,f[a+3],16,3572445317),h=d(h,k,j,g,f[a+6],23,76029189),g=d(g,h,k,j,f[a+9],4,3654602809),j=d(j,g,h,k,f[a+12],11,3873151461),k=d(k,j,g,h,f[a+15],16,530742520),h=d(h,k,j,g,f[a+2],23,3299628645),g=i(g,h,k,j,f[a+0],6,4096336452),j=i(j,g,h,k,f[a+7],10,1126891415),k=i(k,j,g,h,f[a+14],15,2878612391),h=i(h,k,j,g,f[a+5],21,4237533241),g=i(g,h,k,j,f[a+12],6,1700485571),j=i(j,g,h,k,f[a+3],10,2399980690),
k=i(k,j,g,h,f[a+10],15,4293915773),h=i(h,k,j,g,f[a+1],21,2240044497),g=i(g,h,k,j,f[a+8],6,1873313359),j=i(j,g,h,k,f[a+15],10,4264355552),k=i(k,j,g,h,f[a+6],15,2734768916),h=i(h,k,j,g,f[a+13],21,1309151649),g=i(g,h,k,j,f[a+4],6,4149444226),j=i(j,g,h,k,f[a+11],10,3174756917),k=i(k,j,g,h,f[a+2],15,718787259),h=i(h,k,j,g,f[a+9],21,3951481745),g=c(g,p),h=c(h,m),k=c(k,s),j=c(j,l);return(n(g)+n(h)+n(k)+n(j)).toLowerCase()};(function(a){a.fn.stupidtable=function(){a(this).on("click","thead th",function(){a(this).stupidsort()})};a.fn.stupidsort=function(){function c(c){var b=0,d;a(c).children("td,th").each(function(){if(b==p)return d=a(this),!1;var c=a(this).attr("colspan");b+=c?Number(c):1});c="undefined"!=typeof d.data("sort-value")?d.data("sort-value"):"undefined"!=typeof d.attr("data-sort-value")?d.attr("data-sort-value"):d.text();switch(n){case "string":case "string-ins":c=String(c).toLowerCase();break;case "int":c=
parseInt(Number(c));break;case "float":c=Number(c)}return c}var e=a(this),b=e.closest("table"),d=b.children("tbody"),i=d.children("tr"),n=e.attr("data-sort-type");if(n){var f=!0;e.hasClass("sorting-asc")&&(f=!1);var p=0;e.prevAll().each(function(){var c=a(this).attr("colspan");p+=c?Number(c):1});i.sort(function(a,b){var d=f?1:-1,a=c(a),b=c(b);return a>b?1*d:a<b?-1*d:0});d.append(i);b.find("thead th").removeClass("sorting-asc").removeClass("sorting-desc");e.addClass(f?"sorting-asc":"sorting-desc")}}})(jQuery);$(function(){UI.elements={menu:$("nav > .menu"),secondary_menu:$("nav.secondary_menu"),main:$("main"),connection:{status:$("#connection"),user_and_host:$("#user_and_host"),msg:$("#message")}};UI.buildMenu();UI.stored.getOpts();if(location.hash){var a=decodeURIComponent(location.hash).substring(1).split("@")[0].split("&");mist.user.name=a[0];a[1]&&(mist.user.host=a[1])}mist.send(function(){$(window).trigger("hashchange")},{},{timeout:5,hide:!0})});
$(window).on("hashchange",function(){var a=decodeURIComponent(location.hash).substring(1).split("@");a[1]||(a[1]="");a=a[1].split("&");""==a[0]&&(a[0]="Overview");UI.showTab(a[0],a[1])});
var UI={debug:!1,elements:{},stored:{getOpts:function(){var a=localStorage.stored;a&&(a=JSON.parse(a));$.extend(!0,this.vars,a);return this.vars},saveOpt:function(a,c){this.vars[a]=c;localStorage.stored=JSON.stringify(this.vars);return this.vars},vars:{helpme:!0}},interval:{clear:function(){"undefined"!=typeof this.opts&&(clearInterval(this.opts.id),delete this.opts)},set:function(a,c){this.opts&&log("[interval]","Set called on interval, but an interval is already active.");this.opts={delay:c,callback:a};
this.opts.id=setInterval(a,c)}},returnTab:["Overview"],countrylist:{AF:"Afghanistan",AX:"&Aring;land Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",
BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"C&ocirc;te d'Ivoire",
HR:"Croatia",CU:"Cuba",CW:"Cura&ccedil;ao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",
GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",
KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",
MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"R&eacute;union",
RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barth&eacute;lemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",
ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",
UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},tooltip:{show:function(a,c){$tooltip=this.element;$.contains(document.body,$tooltip[0])||$("body").append($tooltip);$tooltip.html(c);clearTimeout(this.hiding);
delete this.hiding;var e=$(document).height()-$tooltip.outerHeight(),b=$(document).width()-$tooltip.outerWidth();$tooltip.css("left",Math.min(a.pageX+10,b-10));$tooltip.css("top",Math.min(a.pageY+25,e-10));$tooltip.show().addClass("show")},hide:function(){$tooltip=this.element;$tooltip.removeClass("show");this.hiding=setTimeout(function(){$tooltip.hide()},500)},element:$("<div>").attr("id","tooltip")},popup:{element:null,show:function(a){this.element=$("<div>").attr("id","popup").append($("<button>").text("Close").addClass("close").click(function(){UI.popup.element.fadeOut("fast",
function(){UI.popup.element.remove();UI.popup.element=null})})).append(a);$("body").append(this.element)}},menu:[{Overview:{},Protocols:{},Streams:{},Preview:{},Push:{LTSonly:!0},Triggers:{LTSonly:!1},Logs:{},Statistics:{},"Server Stats":{}},{Disconnect:{classes:["red"]}},{Guides:{link:"http://mistserver.org/documentation#Userdocs"},Tools:{submenu:{"Release notes":{link:"http://mistserver.org/documentation#Devdocs"},"Mist Shop":{link:"http://mistserver.org/products"},"Email for Help":{},"Terms & Conditions":{link:"http://mistserver.org/documentation#Legal"}}}}],
buildMenu:function(){function a(a,c){var b=$("<a>").addClass("button");b.html($("<span>").addClass("plain").text(a)).append($("<span>").addClass("highlighted").text(a));for(var d in c.classes)b.addClass(c.classes[d]);"LTSonly"in c&&b.addClass("LTSonly");"link"in c?b.attr("href",c.link).attr("target","_blank"):"submenu"in c||b.click(function(c){$(this).closest(".menu").hasClass("hide")||(UI.navto(a),c.stopPropagation())});return b}var c=UI.elements.menu,e;for(e in UI.menu){0<e&&c.append($("<br>"));
for(var b in UI.menu[e]){var d=UI.menu[e][b],i=a(b,d);c.append(i);if("submenu"in d){var n=$("<span>").addClass("submenu");i.addClass("arrowdown").append(n);for(var f in d.submenu)n.append(a(f,d.submenu[f]))}}}e=$("<div>").attr("id","ih_button").text("?").click(function(){$("body").toggleClass("helpme");UI.stored.saveOpt("helpme",$("body").hasClass("helpme"))}).attr("title","Click to toggle the display of integrated help");UI.stored.getOpts().helpme&&$("body").addClass("helpme");c.after(e).after($("<div>").addClass("separator"))},
buildUI:function(a){var c=$("<div>").addClass("input_container"),e;for(e in a){var b=a[e];if(b instanceof jQuery)c.append(b);else if("help"==b.type){var d=$("<span>").addClass("text_container").append($("<span>").addClass("description").append(b.help));c.append(d);if("classes"in b)for(var i in b.classes)d.addClass(b.classes[i])}else if("text"==b.type)c.append($("<span>").addClass("text_container").append($("<span>").addClass("text").append(b.text)));else if("custom"==b.type)c.append(b.custom);else if("buttons"==
b.type)for(i in d=$("<span>").addClass("button_container").on("keydown",function(a){a.stopPropagation()}),"css"in b&&d.css(b.css),c.append(d),b.buttons){var n=b.buttons[i],f=$("<button>").text(n.label).data("opts",n);"css"in n&&f.css(n.css);d.append(f);switch(n.type){case "cancel":f.addClass("cancel").click(n["function"]);break;case "save":f.addClass("save").click(function(){var a=$(this).closest(".input_container"),c=!1;a.find(".hasValidate").each(function(){if(c=$(this).data("validate")(this,!0))return!1});
c||(a.find(".isSetting").each(function(){var a=$(this).getval(),c=$(this).data("pointer");if(""==a)if("default"in $(this).data("opts"))a=$(this).data("opts")["default"];else return delete c.main[c.index],!0;c.main[c.index]=a}),(a=$(this).data("opts")["function"])&&a(this))});break;default:f.click(n["function"])}}else{n=$("<label>").addClass("UIelement");c.append(n);"css"in b&&n.css(b.css);n.append($("<span>").addClass("label").html("label"in b?b.label+":":""));f=$("<span>").addClass("field_container");
n.append(f);switch(b.type){case "password":d=$("<input>").attr("type","password");break;case "int":d=$("<input>").attr("type","number");"min"in b&&d.attr("min",b.min);"max"in b&&d.attr("max",b.min);"validate"in b?b.validate.push("int"):b.validate=["int"];break;case "span":d=$("<span>");break;case "debug":b.select=[["","Default"],[0,"0 - All debugging messages disabled"],[1,"1 - Messages about failed operations"],[2,"2 - Previous level, and error messages"],[3,"3 - Previous level, and warning messages"],
[4,"4 - Previous level, and status messages for development"],[5,"5 - Previous level, and more status messages for development"],[6,"6 - Previous level, and verbose debugging messages"],[7,"7 - Previous level, and very verbose debugging messages"],[8,"8 - Report everything in extreme detail"],[9,"9 - Report everything in insane detail"],[10,"10 - All messages enabled"]];case "select":d=$("<select>");for(i in b.select){var p=$("<option>");"string"==typeof b.select[i]?p.text(b.select[i]):p.val(b.select[i][0]).text(b.select[i][1]);
d.append(p)}break;case "textarea":d=$("<textarea>").on("keydown",function(a){a.stopPropagation()});break;case "checkbox":d=$("<input>").attr("type","checkbox");break;case "hidden":d=$("<input>").attr("type","hidden");n.hide();break;case "email":d=$("<input>").attr("type","email").attr("autocomplete","on").attr("required","");break;case "browse":d=$("<input>").attr("type","text");"filetypes"in b&&d.data("filetypes",b.filetypes);break;case "geolimited":case "hostlimited":d=$("<input>").attr("type",
"hidden");break;case "radioselect":d=$("<div>").addClass("radioselect");for(e in b.radioselect){var m=$("<input>").attr("type","radio").val(b.radioselect[e][0]).attr("name",b.label);("LTSonly"in b&&!mist.data.LTS||b.readonly)&&m.prop("disabled",!0);p=$("<label>").append(m).append($("<span>").html(b.radioselect[e][1]));d.append(p);if(2<b.radioselect[e].length)for(i in m=$("<select>").change(function(){$(this).parent().find("input[type=radio]:enabled").prop("checked","true")}),p.append(m),("LTSonly"in
b&&!mist.data.LTS||b.readonly)&&m.prop("disabled",!0),b.radioselect[e][2])p=$("<option>"),m.append(p),b.radioselect[e][2][i]instanceof Array?p.val(b.radioselect[e][2][i][0]).html(b.radioselect[e][2][i][1]):p.html(b.radioselect[e][2][i])}break;case "checklist":d=$("<div>").addClass("checkcontainer");$controls=$("<div>").addClass("controls");$checklist=$("<div>").addClass("checklist");d.append($controls).append($checklist);$controls.append($("<label>").text("All").prepend($("<input>").attr("type","checkbox").click(function(){$(this).is(":checked")?
$(this).closest(".checkcontainer").find("input[type=checkbox]").prop("checked",!0):$(this).closest(".checkcontainer").find("input[type=checkbox]").prop("checked",!1)})));for(e in b.checklist)"string"==typeof b.checklist[e]&&(b.checklist[e]=[b.checklist[e],b.checklist[e]]),$checklist.append($("<label>").text(b.checklist[e][1]).prepend($("<input>").attr("type","checkbox").attr("name",b.checklist[e][0])));break;case "DOMfield":d=b.DOMfield;break;default:d=$("<input>").attr("type","text")}d.addClass("field").data("opts",
b);"pointer"in b&&d.attr("name",b.pointer.index);f.append(d);if("classes"in b)for(i in b.classes)d.addClass(b.classes[i]);"placeholder"in b&&d.attr("placeholder",b.placeholder);"default"in b&&d.attr("placeholder",b["default"]);"unit"in b&&f.append($("<span>").addClass("unit").html(b.unit));"readonly"in b&&(d.attr("readonly","readonly"),d.click(function(){$(this).select()}));"qrcode"in b&&f.append($("<span>").addClass("unit").html($("<button>").text("QR").on("keydown",function(a){a.stopPropagation()}).click(function(){var a=
String($(this).closest(".field_container").find(".field").getval()),c=$("<div>").addClass("qrcode");UI.popup.show($("<span>").addClass("qr_container").append($("<p>").text(a)).append(c));c.qrcode({text:a,size:Math.min(c.width(),c.height())})})));"rows"in b&&d.attr("rows",b.rows);"LTSonly"in b&&!mist.data.LTS&&(f.addClass("LTSonly"),d.prop("disabled",!0));switch(b.type){case "browse":m=$("<div>").addClass("grouper").append(n);c.append(m);m=$("<button>").text("Browse").on("keydown",function(a){a.stopPropagation()});
f.append(m);m.click(function(){function a(c){i.text("Loading..");mist.send(function(a){n.text(a.browse.path[0]);mist.data.LTS&&d.setval(a.browse.path[0]+"/");i.html(m.clone(true).text("..").attr("title","Folder up"));if(a.browse.subdirectories){a.browse.subdirectories.sort();for(var c in a.browse.subdirectories){var f=a.browse.subdirectories[c];i.append(m.clone(true).attr("title",n.text()+o+f).text(f))}}if(a.browse.files){a.browse.files.sort();for(c in a.browse.files){var f=a.browse.files[c],j=n.text()+
o+f,f=$("<a>").text(f).addClass("file").attr("title",j);i.append(f);if(p){var l=true,s;for(s in p)if(typeof p[s]!="undefined"&&mist.inputMatch(p[s],j)){l=false;break}l&&f.hide()}f.click(function(){var a=$(this).attr("title");d.setval(a).removeAttr("readonly").css("opacity",1);e.show();b.remove()})}}},{browse:c})}var c=$(this).closest(".grouper"),b=$("<div>").addClass("browse_container"),d=c.find(".field").attr("readonly","readonly").css("opacity",0.5),e=$(this),f=$("<button>").text("Stop browsing").click(function(){e.show();
b.remove();d.removeAttr("readonly").css("opacity",1)}),n=$("<span>").addClass("field"),i=$("<div>").addClass("browse_contents"),m=$("<a>").addClass("folder"),p=d.data("filetypes");c.append(b);b.append($("<label>").addClass("UIelement").append($("<span>").addClass("label").text("Current folder:")).append($("<span>").addClass("field_container").append(n).append(f))).append(i);var o="/";mist.data.config.version.indexOf("indows")>-1&&(o="\\");m.click(function(){var c=n.text()+o+$(this).text();a(c)});
c=d.getval();f=c.split("://");f.length>1&&(c=f[0]=="file"?f[1]:"");o=="\\"&&(c="/cygdrive/C/");c=c.split(o);c.pop();c=c.join(o);e.hide();a(c)});break;case "geolimited":case "hostlimited":m={field:d};m.blackwhite=$("<select>").append($("<option>").val("-").text("Blacklist")).append($("<option>").val("+").text("Whitelist"));m.values=$("<span>").addClass("limit_value_list");switch(b.type){case "geolimited":m.prototype=$("<select>").append($("<option>").val("").text("[Select a country]"));for(e in UI.countrylist)m.prototype.append($("<option>").val(e).html(UI.countrylist[e]));
break;case "hostlimited":m.prototype=$("<input>").attr("type","text").attr("placeholder","type a host")}m.prototype.on("change keyup",function(){$(this).closest(".field_container").data("subUI").blackwhite.trigger("change")});m.blackwhite.change(function(){var a=$(this).closest(".field_container").data("subUI"),c=[],b=false;a.values.children().each(function(){b=$(this).val();b!=""?c.push(b):$(this).remove()});a.values.append(a.prototype.clone(true));c.length>0?a.field.val($(this).val()+c.join(" ")):
a.field.val("");a.field.trigger("change")});"LTSonly"in b&&!mist.data.LTS&&(m.blackwhite.prop("disabled",!0),m.prototype.prop("disabled",!0));m.values.append(m.prototype.clone(!0));f.data("subUI",m).addClass("limit_list").append(m.blackwhite).append(m.values)}"pointer"in b&&(d.data("pointer",b.pointer).addClass("isSetting"),m=b.pointer.main[b.pointer.index],"undefined"!=m&&d.setval(m));"value"in b&&d.setval(b.value);if("datalist"in b)for(e in m="datalist_"+e+MD5(d[0].outerHTML),d.attr("list",m),m=
$("<datalist>").attr("id",m),f.append(m),b.datalist)m.append($("<option>").val(b.datalist[e]));f=$("<span>").addClass("help_container");n.append(f);"help"in b&&(f.append($("<span>").addClass("ih_balloon").html(b.help)),d.on("focus mouseover",function(){$(this).closest("label").addClass("active")}).on("blur mouseout",function(){$(this).closest("label").removeClass("active")}));if("validate"in b){n=[];for(i in b.validate){m=b.validate[i];if("function"!=typeof m)switch(m){case "required":m=function(a){return a==
""?{msg:"This is a required field.",classes:["red"]}:false};break;case "int":m=function(a,c){var b=$(c).data("opts");if(!$(c)[0].validity.valid){var d=[];"min"in b&&d.push(" greater than or equal to "+b.min);"max"in b&&d.push(" smaller than or equal to "+b.max);return{msg:"Please enter an integer"+d.join(" and")+".",classes:["red"]}}if(parseInt(Number(a))!=a)return{msg:"Please enter an integer.",classes:["red"]}};break;case "streamname":m=function(a,c){if(!isNaN(a.charAt(0)))return{msg:"The first character may not be a number.",
classes:["red"]};if(a.toLowerCase()!=a)return{msg:"Uppercase letters are not allowed.",classes:["red"]};if(a.replace(/[^\da-z_]/g,"")!=a)return{msg:"Special characters (except for underscores) are not allowed.",classes:["red"]};if("streams"in mist.data&&a in mist.data.streams&&$(c).data("pointer").main.name!=a)return{msg:"This streamname already exists.<br>If you want to edit an existing stream, please click edit on the the streams tab.",classes:["red"]}};break;default:m=function(){}}n.push(m)}d.data("validate_functions",
n).data("help_container",f).data("validate",function(a,c){var b=$(a).getval(),d=$(a).data("validate_functions"),e=$(a).data("help_container");e.find(".err_balloon").remove();for(var f in d){var n=d[f](b,a);if(n){$err=$("<span>").addClass("err_balloon").html(n.msg);for(var i in n.classes)$err.addClass(n.classes[i]);e.prepend($err);c&&$(a).focus();return true}}return false}).addClass("hasValidate").on("change keyup",function(){$(this).data("validate")($(this))});""!=d.getval()&&d.trigger("change")}"function"in
b&&(d.on("change keyup",b["function"]),d.trigger("change"))}}c.on("keydown",function(a){switch(a.which){case 13:$(this).find("button.save").trigger("click");break;case 27:$(this).find("button.cancel").trigger("click")}});return c},buildVheaderTable:function(a){var c=$("<table>").css("margin","0.2em"),e=$("<tr>").addClass("header").append($("<td>").addClass("vheader").attr("rowspan",a.labels.length+1).append($("<span>").text(a.vheader))),b=[];e.append($("<td>"));for(var d in a.labels)b.push($("<tr>").append($("<td>").html(""==
a.labels[d]?"&nbsp;":a.labels[d]+":")));for(var i in a.content)for(d in e.append($("<td>").html(a.content[i].header)),a.content[i].body)b[d].append($("<td>").html(a.content[i].body[d]));c.append($("<tbody>").append(e).append(b));return c},plot:{addGraph:function(a,c){var e={id:a.id,xaxis:a.xaxis,datasets:[],elements:{cont:$("<div>").addClass("graph"),plot:$("<div>").addClass("plot"),legend:$("<div>").addClass("legend").attr("draggable","true")}};UI.draggable(e.elements.legend);e.elements.cont.append(e.elements.plot).append(e.elements.legend);
c.append(e.elements.cont);return e},go:function(a){if(!(1>Object.keys(a).length)){var c={totals:[],clients:[]},e;for(e in a)for(var b in a[e].datasets){var d=a[e].datasets[b];switch(d.datatype){case "clients":case "upbps":case "downbps":switch(d.origin[0]){case "total":c.totals.push({fields:[d.datatype],end:-15});break;case "stream":c.totals.push({fields:[d.datatype],streams:[d.origin[1]],end:-15});break;case "protocol":c.totals.push({fields:[d.datatype],protocols:[d.origin[1]],end:-15})}break;case "cpuload":case "memload":c.capabilities=
{}}}0==c.totals.length&&delete c.totals;0==c.clients.length&&delete c.clients;mist.send(function(){for(var c in a){var b=a[c];if(1>b.datasets.length){b.elements.plot.html("");b.elements.legend.html("");break}switch(b.xaxis){case "time":var d=[];b.yaxes={};var e=[],m;for(m in b.datasets){var s=b.datasets[m];s.display&&(s.getdata(),s.yaxistype in b.yaxes||(d.push(UI.plot.yaxes[s.yaxistype]),b.yaxes[s.yaxistype]=d.length),s.yaxis=b.yaxes[s.yaxistype],e.push(s))}d[0]&&(d[0].color=0);b.plot=$.plot(b.elements.plot,
e,{legend:{show:!1},xaxis:UI.plot.xaxes[b.xaxis],yaxes:d,grid:{hoverable:!0,borderWidth:{top:0,right:0,bottom:1,left:1},color:"black",backgroundColor:{colors:["rgba(0,0,0,0)","rgba(0,0,0,0.025)"]}},crosshair:{mode:"x"}});d=$("<table>").addClass("legend-list").addClass("nolay").html($("<tr>").html($("<td>").html($("<h3>").text(b.id))).append($("<td>").css("padding-right","2em").css("text-align","right").html($("<span>").addClass("value")).append($("<button>").data("opts",b).text("X").addClass("close").click(function(){var c=
$(this).data("opts");if(confirm("Are you sure you want to remove "+c.id+"?")){c.elements.cont.remove();var b=$(".graph_ids option:contains("+c.id+")"),d=b.parent();b.remove();UI.plot.del(c.id);delete a[c.id];d.trigger("change");UI.plot.go(a)}}))));b.elements.legend.html(d);var l=function(a){var c=b.elements.legend.find(".value"),d=1;if(typeof a=="undefined")c.eq(0).html("Latest:");else{var e=b.plot.getXAxes()[0],a=Math.min(e.max,a),a=Math.max(e.min,a);c.eq(0).html(UI.format.time(a/1E3))}for(var f in b.datasets){var g=
"&nbsp;";if(b.datasets[f].display){var e=UI.plot.yaxes[b.datasets[f].yaxistype].tickFormatter,i=b.datasets[f].data;if(a)for(var l in i){if(i[l][0]==a){g=e(i[l][1]);break}if(i[l][0]>a){if(l!=0){g=i[l];i=i[l-1];g=e(g[1]+(a-g[0])*(i[1]-g[1])/(i[0]-g[0]))}break}}else g=e(b.datasets[f].data[b.datasets[f].data.length-1][1])}c.eq(d).html(g);d++}};b.plot.getOptions();for(m in b.datasets)e=$("<input>").attr("type","checkbox").data("index",m).data("graph",b).click(function(){var a=$(this).data("graph");$(this).is(":checked")?
a.datasets[$(this).data("index")].display=true:a.datasets[$(this).data("index")].display=false;var c={};c[a.id]=a;UI.plot.go(c)}),b.datasets[m].display&&e.attr("checked","checked"),d.append($("<tr>").html($("<td>").html($("<label>").html(e).append($("<div>").addClass("series-color").css("background-color",b.datasets[m].color)).append(b.datasets[m].label))).append($("<td>").css("padding-right","2em").css("text-align","right").html($("<span>").addClass("value")).append($("<button>").text("X").addClass("close").data("index",
m).data("graph",b).click(function(){var c=$(this).data("index"),b=$(this).data("graph");if(confirm("Are you sure you want to remove "+b.datasets[c].label+" from "+b.id+"?")){b.datasets.splice(c,1);if(b.datasets.length==0){b.elements.cont.remove();var c=$(".graph_ids option:contains("+b.id+")"),d=c.parent();c.remove();d.trigger("change");UI.plot.del(b.id);delete a[b.id];UI.plot.go(a)}else{UI.plot.save(b);c={};c[b.id]=b;UI.plot.go(c)}}}))));l();var g=!1;b.elements.plot.on("plothover",function(a,c,b){if(c.x!=
g){l(c.x);g=c.x}if(b){a=$("<span>").append($("<h3>").text(b.series.label).prepend($("<div>").addClass("series-color").css("background-color",b.series.color))).append($("<table>").addClass("nolay").html($("<tr>").html($("<td>").text("Time:")).append($("<td>").html(UI.format.dateTime(b.datapoint[0]/1E3,"long")))).append($("<tr>").html($("<td>").text("Value:")).append($("<td>").html(b.series.yaxis.tickFormatter(b.datapoint[1],b.series.yaxis)))));UI.tooltip.show(c,a.children())}else UI.tooltip.hide()}).on("mouseout",
function(){l()})}}},c)}},save:function(a){var c={id:a.id,xaxis:a.xaxis,datasets:[]},e;for(e in a.datasets)c.datasets.push({origin:a.datasets[e].origin,datatype:a.datasets[e].datatype});a=mist.stored.get().graphs||{};a[c.id]=c;mist.stored.set("graphs",a)},del:function(a){var c=mist.stored.get().graphs||{};delete c[a];mist.stored.set("graphs",c)},datatype:{getOptions:function(a){var c=$.extend(!0,{},UI.plot.datatype.templates.general),e=$.extend(!0,{},UI.plot.datatype.templates[a.datatype]),a=$.extend(!0,
e,a),a=$.extend(!0,c,a);switch(a.origin[0]){case "total":switch(a.datatype){case "cpuload":case "memload":break;default:a.label+=" (total)"}break;case "stream":case "protocol":a.label+=" ("+a.origin[1]+")"}var c=[],b;for(b in a.basecolor)e=a.basecolor[b],e+=50*(0.5-Math.random()),e=Math.round(e),e=Math.min(255,Math.max(0,e)),c.push(e);a.color="rgb("+c.join(",")+")";return a},templates:{general:{display:!0,datatype:"general",label:"",yaxistype:"amount",data:[],lines:{show:!0},points:{show:!1},getdata:function(){var a=
mist.data.totals["stream"==this.origin[0]?this.origin[1]:"all_streams"]["protocol"==this.origin[0]?this.origin[1]:"all_protocols"][this.datatype];return this.data=a}},cpuload:{label:"CPU use",yaxistype:"percentage",basecolor:[237,194,64],cores:1,getdata:function(){var a=!1,c;for(c in this.data)this.data[c][0]<1E3*(mist.data.config.time-600)&&(a=c);!1!==a&&this.data.splice(0,Number(a)+1);this.data.push([1E3*mist.data.config.time,mist.data.capabilities.cpu_use/10]);return this.data}},memload:{label:"Memory load",
yaxistype:"percentage",basecolor:[175,216,248],getdata:function(){var a=!1,c;for(c in this.data)this.data[c][0]<1E3*(mist.data.config.time-600)&&(a=c);!1!==a&&this.data.splice(0,Number(a)+1);this.data.push([1E3*mist.data.config.time,mist.data.capabilities.load.memory]);return this.data}},clients:{label:"Connections",basecolor:[203,75,75]},upbps:{label:"Bandwidth up",yaxistype:"bytespersec",basecolor:[77,167,77]},downbps:{label:"Bandwidth down",yaxistype:"bytespersec",basecolor:[148,64,237]}}},yaxes:{percentage:{name:"percentage",
color:"black",tickColor:0,tickDecimals:0,tickFormatter:function(a){return UI.format.addUnit(UI.format.number(a),"%")},tickLength:0,min:0,max:100},amount:{name:"amount",color:"black",tickColor:0,tickDecimals:0,tickFormatter:function(a){return UI.format.number(a)},tickLength:0,min:0},bytespersec:{name:"bytespersec",color:"black",tickColor:0,tickDecimals:1,tickFormatter:function(a){return UI.format.bytes(a,!0)},tickLength:0,ticks:function(a){var c=0.3*Math.sqrt($(".graph").first().height()),c=(a.max-
a.min)/c,e=Math.floor(Math.log(Math.abs(c))/Math.log(1024)),b=c/Math.pow(1024,e),d=-Math.floor(Math.log(b)/Math.LN10),i=a.tickDecimals;null!=i&&d>i&&(d=i);var n=Math.pow(10,-d),b=b/n,f;if(1.5>b)f=1;else if(3>b){if(f=2,2.25<b&&(null==i||d+1<=i))f=2.5,++d}else f=7.5>b?5:10;f=f*n*Math.pow(1024,e);null!=a.minTickSize&&f<a.minTickSize&&(f=a.minTickSize);a.delta=c;a.tickDecimals=Math.max(0,null!=i?i:d);a.tickSize=f;c=[];e=a.tickSize*Math.floor(a.min/a.tickSize);d=0;i=Number.NaN;do n=i,i=e+d*a.tickSize,
c.push(i),++d;while(i<a.max&&i!=n);return c},min:0}},xaxes:{time:{name:"time",mode:"time",timezone:"browser",ticks:5}}},draggable:function(a){a.attr("draggable",!0);a.on("dragstart",function(a){$(this).css("opacity",0.4).data("dragstart",{click:{x:a.originalEvent.pageX,y:a.originalEvent.pageY},ele:{x:this.offsetLeft,y:this.offsetTop}})}).on("dragend",function(a){var e=$(this).data("dragstart"),b=e.ele.x-e.click.x+a.originalEvent.pageX,a=e.ele.y-e.click.y+a.originalEvent.pageY;$(this).css({opacity:1,
top:a,left:b,right:"auto",bottom:"auto"})});a.parent().on("dragleave",function(){})},format:{time:function(a,c){var e=new Date(1E3*a),b=[];b.push(("0"+e.getHours()).slice(-2));b.push(("0"+e.getMinutes()).slice(-2));"short"!=c&&b.push(("0"+e.getSeconds()).slice(-2));return b.join(":")},date:function(a,c){var e=new Date(1E3*a),b="Sun Mon Tue Wed Thu Fri Sat".split(" "),d=[];"long"==c&&d.push(b[e.getDay()]);d.push(("0"+e.getDate()).slice(-2));d.push("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")[e.getMonth()]);
"short"!=c&&d.push(e.getFullYear());return d.join(" ")},dateTime:function(a,c){return UI.format.date(a,c)+", "+UI.format.time(a,c)},duration:function(a){var c=[0.001,1E3,60,60,24,7,1E9],e="ms sec min hr day week".split(" "),b={},d;for(d in e){var a=a/c[d],i=Math.round(a%c[Number(d)+1]);b[e[d]]=i;a-=i}var n;for(d=e.length-1;0<=d;d--)if(0<b[e[d]]){n=e[d];break}c=$("<span>");switch(n){case "week":c.append(UI.format.addUnit(b.week,"wks, ")).append(UI.format.addUnit(b.day,"days"));break;case "day":c.append(UI.format.addUnit(b.day,
"days, ")).append(UI.format.addUnit(b.hr,"hrs"));break;default:c.append([("0"+b.hr).slice(-2),("0"+b.min).slice(-2),("0"+b.sec).slice(-2)+(b.ms?"."+b.ms:"")].join(":"))}return c[0].innerHTML},number:function(a){if(isNaN(Number(a))||0==a)return a;var c=Math.pow(10,3-Math.floor(Math.log(a)/Math.LN10)-1),a=Math.round(a*c)/c;if(1E4<a){number=a.toString().split(".");for(a=/(\d+)(\d{3})/;a.test(number[0]);)number[0]=number[0].replace(a,"$1 $2");a=number.join(".")}return a},status:function(a){var c=$("<span>");
if("undefined"==typeof a.online)return c.text("Unknown, checking.."),"undefined"!=typeof a.error&&c.text(a.error),c;switch(a.online){case -1:c.text("Enabling");break;case 0:c.text("Unavailable").addClass("red");break;case 1:c.text("Active").addClass("green");break;case 2:c.text("Standby").addClass("orange");break;default:c.text(a.online)}"error"in a&&c.text(a.error);return c},capital:function(a){return a.charAt(0).toUpperCase()+a.substring(1)},addUnit:function(a,c){var e=$("<span>").html(a);e.append($("<span>").addClass("unit").html(c));
return e[0].innerHTML},bytes:function(a,c){var e="bytes KiB MiB GiB TiB PiB".split(" ");if(0==a)unit=e[0];else{var b=Math.floor(Math.log(Math.abs(a))/Math.log(1024));0>b?unit=e[0]:(a/=Math.pow(1024,b),unit=e[b])}return UI.format.addUnit(UI.format.number(a),unit+(c?"/s":""))}},navto:function(a,c){var e=location.hash,b=e.split("@");b[0]=[mist.user.name,mist.user.host].join("&");b[1]=[a,c].join("&");"undefined"!=typeof screenlog&&screenlog.navto(b[1]);location.hash=b.join("@");location.hash==e&&$(window).trigger("hashchange")},
showTab:function(a,c){var e,b,d=UI.elements.main;if(mist.user.loggedin&&!("ui_settings"in mist.data))d.html("Loading.."),mist.send(function(){UI.showTab(a,c)},{ui_settings:!0});else switch(e=UI.elements.menu.removeClass("hide").find(".button").filter(function(){if($(this).find(".plain").text()==a)return!0}),0<e.length&&(UI.elements.menu.find(".button.active").removeClass("active"),e.addClass("active")),UI.elements.secondary_menu.html(""),UI.interval.clear(),d.html($("<h2>").text(a)),a){case "Login":if(mist.user.loggedin){UI.navto("Overview");
break}UI.elements.menu.addClass("hide");UI.elements.connection.status.text("Disconnected").removeClass("green").addClass("red");d.append(UI.buildUI([{type:"help",help:"Please provide your account details.<br>You were asked to set these when MistController was started for the first time. If you did not yet set any account details, log in with your desired credentials to create a new account."},{label:"Host",help:"Url location of the MistServer API. Generally located at http://MistServerIP:4242/api",
"default":"http://localhost:4242/api",pointer:{main:mist.user,index:"host"}},{label:"Username",help:"Please enter your username here.",validate:["required"],pointer:{main:mist.user,index:"name"}},{label:"Password",type:"password",help:"Please enter your password here.",validate:["required"],pointer:{main:mist.user,index:"password"}},{type:"buttons",buttons:[{label:"Login",type:"save","function":function(){mist.send(function(){UI.navto("Overview")})}}]}]));break;case "Create a new account":UI.elements.menu.addClass("hide");
d.append($("<p>").text("No account has been created yet in the MistServer at ").append($("<i>").text(mist.user.host)).append("."));d.append(UI.buildUI([{type:"buttons",buttons:[{label:"Select other host",type:"cancel",css:{"float":"left"},"function":function(){UI.navto("Login")}}]},{type:"custom",custom:$("<br>")},{label:"Desired username",type:"str",validate:["required"],help:"Enter your desired username. In the future, you will need this to access the Management Interface.",pointer:{main:mist.user,
index:"name"}},{label:"Desired password",type:"password",validate:["required",function(a,c){$(".match_password").not($(c)).trigger("change");return false}],help:"Enter your desired password. In the future, you will need this to access the Management Interface.",pointer:{main:mist.user,index:"password"},classes:["match_password"]},{label:"Repeat password",type:"password",validate:["required",function(a,c){return a!=$(".match_password").not($(c)).val()?{msg:'The fields "Desired password" and "Repeat password" do not match.',
classes:["red"]}:false}],help:"Repeat your desired password.",classes:["match_password"]},{type:"buttons",buttons:[{type:"save",label:"Create new account","function":function(){mist.send(function(){UI.navto("Account created")},{authorize:{new_username:mist.user.name,new_password:mist.user.password}})}}]}]));break;case "Account created":UI.elements.menu.addClass("hide");d.append($("<p>").text("Your account has been created succesfully.")).append(UI.buildUI([{type:"text",text:"Would you like to enable all (currently) available protocols with their default settings?"},
{type:"buttons",buttons:[{label:"Enable protocols",type:"save","function":function(){if(mist.data.config.protocols)d.append("Unable to enable all protocols as protocol settings already exist.<br>");else{d.append("Retrieving available protocols..<br>");mist.send(function(a){var c=[],b;for(b in a.capabilities.connectors)if(a.capabilities.connectors[b].required)d.append('Could not enable protocol "'+b+'" because it has required settings.<br>');else{c.push({connector:b});d.append('Enabled protocol "'+
b+'".<br>')}d.append("Saving protocol settings..<br>");mist.send(function(){d.append("Protocols enabled. Redirecting..");setTimeout(function(){UI.navto("Overview")},5E3)},{config:{protocols:c}})},{capabilities:true})}}},{label:"Skip",type:"cancel","function":function(){UI.navto("Overview")}}]}]));break;case "Overview":var i=$("<span>").text("Loading.."),n=$("<span>"),f=$("<span>"),p=$("<span>");d.append(UI.buildUI([{type:"help",help:"You can find most basic information about your MistServer here.<br>You can also set the debug level and force a save to the config.json file that MistServer uses to save your settings. "},
{type:"span",label:"Version",pointer:{main:mist.data.config,index:"version"}},{type:"span",label:"Version check",value:i,LTSonly:!0},{type:"span",label:"Server time",value:p},{type:"span",label:"Current streams",value:n},{type:"span",label:"Current connections",value:f},$("<br>"),{type:"str",label:"Human readable name",pointer:{main:mist.data.config,index:"name"},help:"You can name your MistServer here for personal use. You'll still need to set host name within your network yourself."},{type:"debug",
var MD5=function(a){function b(a,b){var c,d,g,f,i;g=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;i=(a&1073741823)+(b&1073741823);return c&d?i^2147483648^g^f:c|d?i&1073741824?i^3221225472^g^f:i^1073741824^g^f:i^g^f}function c(a,c,d,g,f,i,j){a=b(a,b(b(c&d|~c&g,f),j));return b(a<<i|a>>>32-i,c)}function d(a,c,d,g,f,i,j){a=b(a,b(b(c&g|d&~g,f),j));return b(a<<i|a>>>32-i,c)}function e(a,c,d,g,f,i,j){a=b(a,b(b(c^d^g,f),j));return b(a<<i|a>>>32-i,c)}function l(a,c,d,g,f,i,j){a=b(a,b(b(d^(c|~g),
f),j));return b(a<<i|a>>>32-i,c)}function n(a){var b="",c="",d;for(d=0;3>=d;d++)c=a>>>8*d&255,c="0"+c.toString(16),b+=c.substr(c.length-2,2);return b}var h=[],q,p,f,t,g,i,j,k,h=a.replace(/\r\n/g,"\n"),a="";for(q=0;q<h.length;q++)p=h.charCodeAt(q),128>p?a+=String.fromCharCode(p):(127<p&&2048>p?a+=String.fromCharCode(p>>6|192):(a+=String.fromCharCode(p>>12|224),a+=String.fromCharCode(p>>6&63|128)),a+=String.fromCharCode(p&63|128));h=a;a=h.length;q=a+8;p=16*((q-q%64)/64+1);f=Array(p-1);for(g=t=0;g<a;)q=
(g-g%4)/4,t=8*(g%4),f[q]|=h.charCodeAt(g)<<t,g++;q=(g-g%4)/4;f[q]|=128<<8*(g%4);f[p-2]=a<<3;f[p-1]=a>>>29;h=f;g=1732584193;i=4023233417;j=2562383102;k=271733878;for(a=0;a<h.length;a+=16)q=g,p=i,f=j,t=k,g=c(g,i,j,k,h[a+0],7,3614090360),k=c(k,g,i,j,h[a+1],12,3905402710),j=c(j,k,g,i,h[a+2],17,606105819),i=c(i,j,k,g,h[a+3],22,3250441966),g=c(g,i,j,k,h[a+4],7,4118548399),k=c(k,g,i,j,h[a+5],12,1200080426),j=c(j,k,g,i,h[a+6],17,2821735955),i=c(i,j,k,g,h[a+7],22,4249261313),g=c(g,i,j,k,h[a+8],7,1770035416),
k=c(k,g,i,j,h[a+9],12,2336552879),j=c(j,k,g,i,h[a+10],17,4294925233),i=c(i,j,k,g,h[a+11],22,2304563134),g=c(g,i,j,k,h[a+12],7,1804603682),k=c(k,g,i,j,h[a+13],12,4254626195),j=c(j,k,g,i,h[a+14],17,2792965006),i=c(i,j,k,g,h[a+15],22,1236535329),g=d(g,i,j,k,h[a+1],5,4129170786),k=d(k,g,i,j,h[a+6],9,3225465664),j=d(j,k,g,i,h[a+11],14,643717713),i=d(i,j,k,g,h[a+0],20,3921069994),g=d(g,i,j,k,h[a+5],5,3593408605),k=d(k,g,i,j,h[a+10],9,38016083),j=d(j,k,g,i,h[a+15],14,3634488961),i=d(i,j,k,g,h[a+4],20,3889429448),
g=d(g,i,j,k,h[a+9],5,568446438),k=d(k,g,i,j,h[a+14],9,3275163606),j=d(j,k,g,i,h[a+3],14,4107603335),i=d(i,j,k,g,h[a+8],20,1163531501),g=d(g,i,j,k,h[a+13],5,2850285829),k=d(k,g,i,j,h[a+2],9,4243563512),j=d(j,k,g,i,h[a+7],14,1735328473),i=d(i,j,k,g,h[a+12],20,2368359562),g=e(g,i,j,k,h[a+5],4,4294588738),k=e(k,g,i,j,h[a+8],11,2272392833),j=e(j,k,g,i,h[a+11],16,1839030562),i=e(i,j,k,g,h[a+14],23,4259657740),g=e(g,i,j,k,h[a+1],4,2763975236),k=e(k,g,i,j,h[a+4],11,1272893353),j=e(j,k,g,i,h[a+7],16,4139469664),
i=e(i,j,k,g,h[a+10],23,3200236656),g=e(g,i,j,k,h[a+13],4,681279174),k=e(k,g,i,j,h[a+0],11,3936430074),j=e(j,k,g,i,h[a+3],16,3572445317),i=e(i,j,k,g,h[a+6],23,76029189),g=e(g,i,j,k,h[a+9],4,3654602809),k=e(k,g,i,j,h[a+12],11,3873151461),j=e(j,k,g,i,h[a+15],16,530742520),i=e(i,j,k,g,h[a+2],23,3299628645),g=l(g,i,j,k,h[a+0],6,4096336452),k=l(k,g,i,j,h[a+7],10,1126891415),j=l(j,k,g,i,h[a+14],15,2878612391),i=l(i,j,k,g,h[a+5],21,4237533241),g=l(g,i,j,k,h[a+12],6,1700485571),k=l(k,g,i,j,h[a+3],10,2399980690),
j=l(j,k,g,i,h[a+10],15,4293915773),i=l(i,j,k,g,h[a+1],21,2240044497),g=l(g,i,j,k,h[a+8],6,1873313359),k=l(k,g,i,j,h[a+15],10,4264355552),j=l(j,k,g,i,h[a+6],15,2734768916),i=l(i,j,k,g,h[a+13],21,1309151649),g=l(g,i,j,k,h[a+4],6,4149444226),k=l(k,g,i,j,h[a+11],10,3174756917),j=l(j,k,g,i,h[a+2],15,718787259),i=l(i,j,k,g,h[a+9],21,3951481745),g=b(g,q),i=b(i,p),j=b(j,f),k=b(k,t);return(n(g)+n(i)+n(j)+n(k)).toLowerCase()};(function(a){a.fn.stupidtable=function(){a(this).on("click","thead th",function(){a(this).stupidsort()})};a.fn.stupidsort=function(){function b(b){var c=0,d;a(b).children("td,th").each(function(){if(c==q)return d=a(this),!1;var b=a(this).attr("colspan");c+=b?Number(b):1});b="undefined"!=typeof d.data("sort-value")?d.data("sort-value"):"undefined"!=typeof d.attr("data-sort-value")?d.attr("data-sort-value"):d.text();switch(n){case "string":case "string-ins":b=String(b).toLowerCase();break;case "int":b=
parseInt(Number(b));break;case "float":b=Number(b)}return b}var c=a(this),d=c.closest("table"),e=d.children("tbody"),l=e.children("tr"),n=c.attr("data-sort-type");if(n){var h=!0;c.hasClass("sorting-asc")&&(h=!1);var q=0;c.prevAll().each(function(){var b=a(this).attr("colspan");q+=b?Number(b):1});l.sort(function(a,c){var d=h?1:-1,a=b(a),c=b(c);return a>c?1*d:a<c?-1*d:0});e.append(l);d.find("thead th").removeClass("sorting-asc").removeClass("sorting-desc");c.addClass(h?"sorting-asc":"sorting-desc")}}})(jQuery);$(function(){UI.elements={menu:$("nav > .menu"),main:$("main"),header:$("header"),connection:{status:$("#connection"),user_and_host:$("#user_and_host"),msg:$("#message")}};UI.buildMenu();UI.stored.getOpts();try{if("mistLogin"in sessionStorage){var a=JSON.parse(sessionStorage.mistLogin);mist.user.name=a.name;mist.user.password=a.password;mist.user.host=a.host}}catch(b){}location.hash&&(a=decodeURIComponent(location.hash).substring(1).split("@")[0].split("&"),mist.user.name=a[0],a[1]&&(mist.user.host=
a[1]));mist.send(function(){$(window).trigger("hashchange")},{},{timeout:5,hide:!0});var c=0;$("body > div.filler").on("scroll",function(){var a=$(this).scrollLeft();a!=c&&UI.elements.header.css("margin-right",-1*a+"px");c=a})});$(window).on("hashchange",function(){var a=decodeURIComponent(location.hash).substring(1).split("@");a[1]||(a[1]="");a=a[1].split("&");""==a[0]&&(a[0]="Overview");UI.showTab(a[0],a[1])});
var otherhost=!1,UI={debug:!1,elements:{},stored:{getOpts:function(){var a=localStorage.stored;a&&(a=JSON.parse(a));$.extend(!0,this.vars,a);return this.vars},saveOpt:function(a,b){this.vars[a]=b;localStorage.stored=JSON.stringify(this.vars);return this.vars},vars:{helpme:!0}},interval:{clear:function(){"undefined"!=typeof this.opts&&(clearInterval(this.opts.id),delete this.opts)},set:function(a,b){this.opts&&log("[interval]","Set called on interval, but an interval is already active.");this.opts=
{delay:b,callback:a};this.opts.id=setInterval(a,b)}},returnTab:["Overview"],countrylist:{AF:"Afghanistan",AX:"&Aring;land Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",
BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",
CR:"Costa Rica",CI:"C&ocirc;te d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Cura&ccedil;ao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",
GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",
KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",
MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",
QA:"Qatar",RE:"R&eacute;union",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barth&eacute;lemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",
SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",
TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},tooltip:{show:function(a,b){$tooltip=this.element;$.contains(document.body,$tooltip[0])||$("body").append($tooltip);$tooltip.html(b);
clearTimeout(this.hiding);delete this.hiding;var c=$(document).height()-$tooltip.outerHeight(),d=$(document).width()-$tooltip.outerWidth();$tooltip.css("left",Math.min(a.pageX+10,d-10));$tooltip.css("top",Math.min(a.pageY+25,c-10));$tooltip.show().addClass("show")},hide:function(){$tooltip=this.element;$tooltip.removeClass("show");this.hiding=setTimeout(function(){$tooltip.hide()},500)},element:$("<div>").attr("id","tooltip")},humanMime:function(a){var b=!1;switch(a){case "html5/application/vnd.apple.mpegurl":b=
"HLS";break;case "html5/video/mp4":b="MP4";break;case "dash/video/mp4":b="DASH";break;case "flash/11":b="HDS";break;case "flash/10":b="RTMP";break;case "flash/7":b="Progressive";break;case "html5/audio/mp3":b="MP3";break;case "html5/video/mp2t":b="TS";break;case "html5/application/vnd.ms-ss":b="Smooth";break;case "html5/text/vtt":b="VTT Subtitles";break;case "html5/text/plain":b="SRT Subtitles";break;case "html5/text/javascript":b="JSON Subtitles"}return b},popup:{element:null,show:function(a){this.element=
$("<div>").attr("id","popup").append($("<button>").text("Close").addClass("close").click(function(){UI.popup.element.fadeOut("fast",function(){UI.popup.element.remove();UI.popup.element=null})})).append(a);$("body").append(this.element)}},menu:[{Overview:{},Protocols:{},Streams:{hiddenmenu:{Edit:{},Preview:{},Embed:{}}},Push:{LTSonly:!0},Triggers:{LTSonly:!1},Logs:{},Statistics:{},"Server Stats":{}},{Disconnect:{classes:["red"]}},{Guides:{link:"http://mistserver.org/documentation#Userdocs"},Tools:{submenu:{"Release notes":{link:"http://mistserver.org/documentation#Devdocs"},
"Mist Shop":{link:"http://mistserver.org/products"},"Email for Help":{},ToS:{link:"http://mistserver.org/documentation#Legal"}}}}],buildMenu:function(){function a(a,b){var c=$("<a>").addClass("button");c.html($("<span>").addClass("plain").text(a)).append($("<span>").addClass("highlighted").text(a));for(var d in b.classes)c.addClass(b.classes[d]);"LTSonly"in b&&c.addClass("LTSonly");"link"in b?c.attr("href",b.link).attr("target","_blank"):"submenu"in b||c.click(function(b){$(this).closest(".menu").hasClass("hide")||
(UI.navto(a),b.stopPropagation())});return c}var b=UI.elements.menu,c;for(c in UI.menu){0<c&&b.append($("<br>"));for(var d in UI.menu[c]){var e=UI.menu[c][d],l=a(d,e);b.append(l);if("submenu"in e){var n=$("<span>").addClass("submenu");l.addClass("arrowdown").append(n);for(var h in e.submenu)n.append(a(h,e.submenu[h]))}else if("hiddenmenu"in e)for(h in n=$("<span>").addClass("hiddenmenu"),l.append(n),e.hiddenmenu)n.append(a(h,e.hiddenmenu[h]))}}c=$("<div>").attr("id","ih_button").text("?").click(function(){$("body").toggleClass("helpme");
UI.stored.saveOpt("helpme",$("body").hasClass("helpme"))}).attr("title","Click to toggle the display of integrated help");UI.stored.getOpts().helpme&&$("body").addClass("helpme");b.after(c).after($("<div>").addClass("separator"))},buildUI:function(a){var b=$("<div>").addClass("input_container"),c;for(c in a){var d=a[c];if(d instanceof jQuery)b.append(d);else if("help"==d.type){var e=$("<span>").addClass("text_container").append($("<span>").addClass("description").append(d.help));b.append(e);if("classes"in
d)for(var l in d.classes)e.addClass(d.classes[l])}else if("text"==d.type)b.append($("<span>").addClass("text_container").append($("<span>").addClass("text").append(d.text)));else if("custom"==d.type)b.append(d.custom);else if("buttons"==d.type)for(l in e=$("<span>").addClass("button_container").on("keydown",function(a){a.stopPropagation()}),"css"in d&&e.css(d.css),b.append(e),d.buttons){var n=d.buttons[l],h=$("<button>").text(n.label).data("opts",n);"css"in n&&h.css(n.css);if("classes"in n)for(var q in n.classes)h.addClass(n.classes[q]);
e.append(h);switch(n.type){case "cancel":h.addClass("cancel").click(n["function"]);break;case "save":h.addClass("save").click(function(){var a=$(this).closest(".input_container"),b=!1;a.find(".hasValidate").each(function(){if(b=$(this).data("validate")(this,!0))return!1});b||(a.find(".isSetting").each(function(){var a=$(this).getval(),b=$(this).data("pointer");if(""==a)if("default"in $(this).data("opts"))a=$(this).data("opts")["default"];else return delete b.main[b.index],!0;b.main[b.index]=a}),(a=
$(this).data("opts")["function"])&&a(this))});break;default:h.click(n["function"])}}else{n=$("<label>").addClass("UIelement");b.append(n);"css"in d&&n.css(d.css);n.append($("<span>").addClass("label").html("label"in d?d.label+":":""));h=$("<span>").addClass("field_container");n.append(h);switch(d.type){case "password":e=$("<input>").attr("type","password");break;case "int":e=$("<input>").attr("type","number");"min"in d&&e.attr("min",d.min);"max"in d&&e.attr("max",d.min);"validate"in d?d.validate.push("int"):
d.validate=["int"];break;case "span":e=$("<span>");break;case "debug":d.select=[["","Default"],[0,"0 - All debugging messages disabled"],[1,"1 - Messages about failed operations"],[2,"2 - Previous level, and error messages"],[3,"3 - Previous level, and warning messages"],[4,"4 - Previous level, and status messages for development"],[5,"5 - Previous level, and more status messages for development"],[6,"6 - Previous level, and verbose debugging messages"],[7,"7 - Previous level, and very verbose debugging messages"],
[8,"8 - Report everything in extreme detail"],[9,"9 - Report everything in insane detail"],[10,"10 - All messages enabled"]];case "select":e=$("<select>");for(l in d.select){var p=$("<option>");"string"==typeof d.select[l]?p.text(d.select[l]):p.val(d.select[l][0]).text(d.select[l][1]);e.append(p)}break;case "textarea":e=$("<textarea>").on("keydown",function(a){a.stopPropagation()});break;case "checkbox":e=$("<input>").attr("type","checkbox");break;case "hidden":e=$("<input>").attr("type","hidden");
n.hide();break;case "email":e=$("<input>").attr("type","email").attr("autocomplete","on").attr("required","");break;case "browse":e=$("<input>").attr("type","text");"filetypes"in d&&e.data("filetypes",d.filetypes);break;case "geolimited":case "hostlimited":e=$("<input>").attr("type","hidden");break;case "radioselect":e=$("<div>").addClass("radioselect");for(c in d.radioselect){var f=$("<input>").attr("type","radio").val(d.radioselect[c][0]).attr("name",d.label);("LTSonly"in d&&!mist.data.LTS||d.readonly)&&
f.prop("disabled",!0);p=$("<label>").append(f).append($("<span>").html(d.radioselect[c][1]));e.append(p);if(2<d.radioselect[c].length)for(l in f=$("<select>").change(function(){$(this).parent().find("input[type=radio]:enabled").prop("checked","true")}),p.append(f),("LTSonly"in d&&!mist.data.LTS||d.readonly)&&f.prop("disabled",!0),d.radioselect[c][2])p=$("<option>"),f.append(p),d.radioselect[c][2][l]instanceof Array?p.val(d.radioselect[c][2][l][0]).html(d.radioselect[c][2][l][1]):p.html(d.radioselect[c][2][l])}break;
case "checklist":e=$("<div>").addClass("checkcontainer");$controls=$("<div>").addClass("controls");$checklist=$("<div>").addClass("checklist");e.append($controls).append($checklist);$controls.append($("<label>").text("All").prepend($("<input>").attr("type","checkbox").click(function(){$(this).is(":checked")?$(this).closest(".checkcontainer").find("input[type=checkbox]").prop("checked",!0):$(this).closest(".checkcontainer").find("input[type=checkbox]").prop("checked",!1)})));for(c in d.checklist)"string"==
typeof d.checklist[c]&&(d.checklist[c]=[d.checklist[c],d.checklist[c]]),$checklist.append($("<label>").text(d.checklist[c][1]).prepend($("<input>").attr("type","checkbox").attr("name",d.checklist[c][0])));break;case "DOMfield":e=d.DOMfield;break;default:e=$("<input>").attr("type","text")}e.addClass("field").data("opts",d);"pointer"in d&&e.attr("name",d.pointer.index);h.append(e);if("classes"in d)for(l in d.classes)e.addClass(d.classes[l]);"placeholder"in d&&e.attr("placeholder",d.placeholder);"default"in
d&&e.attr("placeholder",d["default"]);"unit"in d&&h.append($("<span>").addClass("unit").html(d.unit));"readonly"in d&&(e.attr("readonly","readonly"),e.click(function(){$(this).select()}));"qrcode"in d&&h.append($("<span>").addClass("unit").html($("<button>").text("QR").on("keydown",function(a){a.stopPropagation()}).click(function(){var a=String($(this).closest(".field_container").find(".field").getval()),b=$("<div>").addClass("qrcode");UI.popup.show($("<span>").addClass("qr_container").append($("<p>").text(a)).append(b));
b.qrcode({text:a,size:Math.min(b.width(),b.height())})})));"clipboard"in d&&document.queryCommandSupported("copy")&&h.append($("<span>").addClass("unit").html($("<button>").text("Copy").on("keydown",function(a){a.stopPropagation()}).click(function(){var a=String($(this).closest(".field_container").find(".field").getval()),b=document.createElement("textarea");b.value=a;document.body.appendChild(b);b.select();var c=false;try{c=document.execCommand("copy")}catch(d){}if(c){$(this).text("Copied to clipboard!");
document.body.removeChild(b);var f=$(this);setTimeout(function(){f.text("Copy")},5E3)}else{document.body.removeChild(b);alert("Failed to copy:\n"+a)}})));"rows"in d&&e.attr("rows",d.rows);"LTSonly"in d&&!mist.data.LTS&&(h.addClass("LTSonly"),e.prop("disabled",!0));switch(d.type){case "browse":f=$("<div>").addClass("grouper").append(n);b.append(f);f=$("<button>").text("Browse").on("keydown",function(a){a.stopPropagation()});h.append(f);f.click(function(){function a(b){n.text("Loading..");mist.send(function(a){e.text(a.browse.path[0]);
mist.data.LTS&&d.setval(a.browse.path[0]+"/");n.html(l.clone(true).text("..").attr("title","Folder up"));if(a.browse.subdirectories){a.browse.subdirectories.sort();for(var b in a.browse.subdirectories){var g=a.browse.subdirectories[b];n.append(l.clone(true).attr("title",e.text()+q+g).text(g))}}if(a.browse.files){a.browse.files.sort();for(b in a.browse.files){var g=a.browse.files[b],h=e.text()+q+g,g=$("<a>").text(g).addClass("file").attr("title",h);n.append(g);if(p){var t=true,E;for(E in p)if(typeof p[E]!=
"undefined"&&mist.inputMatch(p[E],h)){t=false;break}t&&g.hide()}g.click(function(){var a=$(this).attr("title");d.setval(a).removeAttr("readonly").css("opacity",1);f.show();c.remove()})}}},{browse:b})}var b=$(this).closest(".grouper"),c=$("<div>").addClass("browse_container"),d=b.find(".field").attr("readonly","readonly").css("opacity",0.5),f=$(this),h=$("<button>").text("Stop browsing").click(function(){f.show();c.remove();d.removeAttr("readonly").css("opacity",1)}),e=$("<span>").addClass("field"),
n=$("<div>").addClass("browse_contents"),l=$("<a>").addClass("folder"),p=d.data("filetypes");b.append(c);c.append($("<label>").addClass("UIelement").append($("<span>").addClass("label").text("Current folder:")).append($("<span>").addClass("field_container").append(e).append(h))).append(n);var q="/";mist.data.config.version.indexOf("indows")>-1&&(q="\\");l.click(function(){var b=e.text()+q+$(this).text();a(b)});b=d.getval();h=b.split("://");h.length>1&&(b=h[0]=="file"?h[1]:"");b=b.split(q);b.pop();
b=b.join(q);f.hide();a(b)});break;case "geolimited":case "hostlimited":f={field:e};f.blackwhite=$("<select>").append($("<option>").val("-").text("Blacklist")).append($("<option>").val("+").text("Whitelist"));f.values=$("<span>").addClass("limit_value_list");switch(d.type){case "geolimited":f.prototype=$("<select>").append($("<option>").val("").text("[Select a country]"));for(c in UI.countrylist)f.prototype.append($("<option>").val(c).html(UI.countrylist[c]));break;case "hostlimited":f.prototype=$("<input>").attr("type",
"text").attr("placeholder","type a host")}f.prototype.on("change keyup",function(){$(this).closest(".field_container").data("subUI").blackwhite.trigger("change")});f.blackwhite.change(function(){var a=$(this).closest(".field_container").data("subUI"),b=[],c=false;a.values.children().each(function(){c=$(this).val();c!=""?b.push(c):$(this).remove()});a.values.append(a.prototype.clone(true));b.length>0?a.field.val($(this).val()+b.join(" ")):a.field.val("");a.field.trigger("change")});"LTSonly"in d&&
!mist.data.LTS&&(f.blackwhite.prop("disabled",!0),f.prototype.prop("disabled",!0));f.values.append(f.prototype.clone(!0));h.data("subUI",f).addClass("limit_list").append(f.blackwhite).append(f.values)}"pointer"in d&&(e.data("pointer",d.pointer).addClass("isSetting"),f=d.pointer.main[d.pointer.index],"undefined"!=f&&e.setval(f));"value"in d&&e.setval(d.value);if("datalist"in d)for(c in f="datalist_"+c+MD5(e[0].outerHTML),e.attr("list",f),f=$("<datalist>").attr("id",f),h.append(f),d.datalist)f.append($("<option>").val(d.datalist[c]));
h=$("<span>").addClass("help_container");n.append(h);"help"in d&&(h.append($("<span>").addClass("ih_balloon").html(d.help)),e.on("focus mouseover",function(){$(this).closest("label").addClass("active")}).on("blur mouseout",function(){$(this).closest("label").removeClass("active")}));if("validate"in d){n=[];for(l in d.validate){f=d.validate[l];if("function"!=typeof f)switch(f){case "required":f=function(a){return a==""?{msg:"This is a required field.",classes:["red"]}:false};break;case "int":f=function(a,
b){var c=$(b).data("opts");if(!$(b)[0].validity.valid){var d=[];"min"in c&&d.push(" greater than or equal to "+c.min);"max"in c&&d.push(" smaller than or equal to "+c.max);return{msg:"Please enter an integer"+d.join(" and")+".",classes:["red"]}}if(parseInt(Number(a))!=a)return{msg:"Please enter an integer.",classes:["red"]}};break;case "streamname":f=function(a,b){if(!isNaN(a.charAt(0)))return{msg:"The first character may not be a number.",classes:["red"]};if(a.toLowerCase()!=a)return{msg:"Uppercase letters are not allowed.",
classes:["red"]};if(a.replace(/[^\da-z_]/g,"")!=a)return{msg:"Special characters (except for underscores) are not allowed.",classes:["red"]};if("streams"in mist.data&&a in mist.data.streams&&$(b).data("pointer").main.name!=a)return{msg:"This streamname already exists.<br>If you want to edit an existing stream, please click edit on the the streams tab.",classes:["red"]}};break;default:f=function(){}}n.push(f)}e.data("validate_functions",n).data("help_container",h).data("validate",function(a,b){var c=
$(a).getval(),d=$(a).data("validate_functions"),f=$(a).data("help_container");f.find(".err_balloon").remove();for(var h in d){var e=d[h](c,a);if(e){$err=$("<span>").addClass("err_balloon").html(e.msg);for(var n in e.classes)$err.addClass(e.classes[n]);f.prepend($err);b&&$(a).focus();return true}}return false}).addClass("hasValidate").on("change keyup",function(){$(this).data("validate")($(this))});""!=e.getval()&&e.trigger("change")}"function"in d&&(e.on("change keyup",d["function"]),e.trigger("change"))}}b.on("keydown",
function(a){switch(a.which){case 13:$(this).find("button.save").first().trigger("click");break;case 27:$(this).find("button.cancel").first().trigger("click")}});return b},buildVheaderTable:function(a){var b=$("<table>").css("margin","0.2em"),c=$("<tr>").addClass("header").append($("<td>").addClass("vheader").attr("rowspan",a.labels.length+1).append($("<span>").text(a.vheader))),d=[];c.append($("<td>"));for(var e in a.labels)d.push($("<tr>").append($("<td>").html(""==a.labels[e]?"&nbsp;":a.labels[e]+
":")));for(var l in a.content)for(e in c.append($("<td>").html(a.content[l].header)),a.content[l].body)d[e].append($("<td>").html(a.content[l].body[e]));b.append($("<tbody>").append(c).append(d));return b},plot:{addGraph:function(a,b){var c={id:a.id,xaxis:a.xaxis,datasets:[],elements:{cont:$("<div>").addClass("graph"),plot:$("<div>").addClass("plot"),legend:$("<div>").addClass("legend").attr("draggable","true")}};UI.draggable(c.elements.legend);c.elements.cont.append(c.elements.plot).append(c.elements.legend);
b.append(c.elements.cont);return c},go:function(a){if(!(1>Object.keys(a).length)){var b={totals:[],clients:[]},c;for(c in a)for(var d in a[c].datasets){var e=a[c].datasets[d];switch(e.datatype){case "clients":case "upbps":case "downbps":switch(e.origin[0]){case "total":b.totals.push({fields:[e.datatype],end:-15});break;case "stream":b.totals.push({fields:[e.datatype],streams:[e.origin[1]],end:-15});break;case "protocol":b.totals.push({fields:[e.datatype],protocols:[e.origin[1]],end:-15})}break;case "cpuload":case "memload":b.capabilities=
{}}}0==b.totals.length&&delete b.totals;0==b.clients.length&&delete b.clients;mist.send(function(){for(var b in a){var c=a[b];if(1>c.datasets.length){c.elements.plot.html("");c.elements.legend.html("");break}switch(c.xaxis){case "time":var d=[];c.yaxes={};var e=[],p;for(p in c.datasets){var f=c.datasets[p];f.display&&(f.getdata(),f.yaxistype in c.yaxes||(d.push(UI.plot.yaxes[f.yaxistype]),c.yaxes[f.yaxistype]=d.length),f.yaxis=c.yaxes[f.yaxistype],e.push(f))}d[0]&&(d[0].color=0);c.plot=$.plot(c.elements.plot,
e,{legend:{show:!1},xaxis:UI.plot.xaxes[c.xaxis],yaxes:d,grid:{hoverable:!0,borderWidth:{top:0,right:0,bottom:1,left:1},color:"black",backgroundColor:{colors:["rgba(0,0,0,0)","rgba(0,0,0,0.025)"]}},crosshair:{mode:"x"}});d=$("<table>").addClass("legend-list").addClass("nolay").html($("<tr>").html($("<td>").html($("<h3>").text(c.id))).append($("<td>").css("padding-right","2em").css("text-align","right").html($("<span>").addClass("value")).append($("<button>").data("opts",c).text("X").addClass("close").click(function(){var b=
$(this).data("opts");if(confirm("Are you sure you want to remove "+b.id+"?")){b.elements.cont.remove();var c=$(".graph_ids option:contains("+b.id+")"),d=c.parent();c.remove();UI.plot.del(b.id);delete a[b.id];d.trigger("change");UI.plot.go(a)}}))));c.elements.legend.html(d);var t=function(a){var b=c.elements.legend.find(".value"),d=1;if(typeof a=="undefined")b.eq(0).html("Latest:");else{var f=c.plot.getXAxes()[0],a=Math.min(f.max,a),a=Math.max(f.min,a);b.eq(0).html(UI.format.time(a/1E3))}for(var e in c.datasets){var g=
"&nbsp;";if(c.datasets[e].display){var f=UI.plot.yaxes[c.datasets[e].yaxistype].tickFormatter,h=c.datasets[e].data;if(a)for(var l in h){if(h[l][0]==a){g=f(h[l][1]);break}if(h[l][0]>a){if(l!=0){g=h[l];h=h[l-1];g=f(g[1]+(a-g[0])*(h[1]-g[1])/(h[0]-g[0]))}break}}else g=f(c.datasets[e].data[c.datasets[e].data.length-1][1])}b.eq(d).html(g);d++}};c.plot.getOptions();for(p in c.datasets)e=$("<input>").attr("type","checkbox").data("index",p).data("graph",c).click(function(){var a=$(this).data("graph");$(this).is(":checked")?
a.datasets[$(this).data("index")].display=true:a.datasets[$(this).data("index")].display=false;var b={};b[a.id]=a;UI.plot.go(b)}),c.datasets[p].display&&e.attr("checked","checked"),d.append($("<tr>").html($("<td>").html($("<label>").html(e).append($("<div>").addClass("series-color").css("background-color",c.datasets[p].color)).append(c.datasets[p].label))).append($("<td>").css("padding-right","2em").css("text-align","right").html($("<span>").addClass("value")).append($("<button>").text("X").addClass("close").data("index",
p).data("graph",c).click(function(){var b=$(this).data("index"),c=$(this).data("graph");if(confirm("Are you sure you want to remove "+c.datasets[b].label+" from "+c.id+"?")){c.datasets.splice(b,1);if(c.datasets.length==0){c.elements.cont.remove();var b=$(".graph_ids option:contains("+c.id+")"),d=b.parent();b.remove();d.trigger("change");UI.plot.del(c.id);delete a[c.id];UI.plot.go(a)}else{UI.plot.save(c);b={};b[c.id]=c;UI.plot.go(b)}}}))));t();var g=!1;c.elements.plot.on("plothover",function(a,b,c){if(b.x!=
g){t(b.x);g=b.x}if(c){a=$("<span>").append($("<h3>").text(c.series.label).prepend($("<div>").addClass("series-color").css("background-color",c.series.color))).append($("<table>").addClass("nolay").html($("<tr>").html($("<td>").text("Time:")).append($("<td>").html(UI.format.dateTime(c.datapoint[0]/1E3,"long")))).append($("<tr>").html($("<td>").text("Value:")).append($("<td>").html(c.series.yaxis.tickFormatter(c.datapoint[1],c.series.yaxis)))));UI.tooltip.show(b,a.children())}else UI.tooltip.hide()}).on("mouseout",
function(){t()})}}},b)}},save:function(a){var b={id:a.id,xaxis:a.xaxis,datasets:[]},c;for(c in a.datasets)b.datasets.push({origin:a.datasets[c].origin,datatype:a.datasets[c].datatype});a=mist.stored.get().graphs||{};a[b.id]=b;mist.stored.set("graphs",a)},del:function(a){var b=mist.stored.get().graphs||{};delete b[a];mist.stored.set("graphs",b)},datatype:{getOptions:function(a){var b=$.extend(!0,{},UI.plot.datatype.templates.general),c=$.extend(!0,{},UI.plot.datatype.templates[a.datatype]),a=$.extend(!0,
c,a),a=$.extend(!0,b,a);switch(a.origin[0]){case "total":switch(a.datatype){case "cpuload":case "memload":break;default:a.label+=" (total)"}break;case "stream":case "protocol":a.label+=" ("+a.origin[1]+")"}var b=[],d;for(d in a.basecolor)c=a.basecolor[d],c+=50*(0.5-Math.random()),c=Math.round(c),c=Math.min(255,Math.max(0,c)),b.push(c);a.color="rgb("+b.join(",")+")";return a},templates:{general:{display:!0,datatype:"general",label:"",yaxistype:"amount",data:[],lines:{show:!0},points:{show:!1},getdata:function(){var a=
mist.data.totals["stream"==this.origin[0]?this.origin[1]:"all_streams"]["protocol"==this.origin[0]?this.origin[1]:"all_protocols"][this.datatype];return this.data=a}},cpuload:{label:"CPU use",yaxistype:"percentage",basecolor:[237,194,64],cores:1,getdata:function(){var a=!1,b;for(b in this.data)this.data[b][0]<1E3*(mist.data.config.time-600)&&(a=b);!1!==a&&this.data.splice(0,Number(a)+1);this.data.push([1E3*mist.data.config.time,mist.data.capabilities.cpu_use/10]);return this.data}},memload:{label:"Memory load",
yaxistype:"percentage",basecolor:[175,216,248],getdata:function(){var a=!1,b;for(b in this.data)this.data[b][0]<1E3*(mist.data.config.time-600)&&(a=b);!1!==a&&this.data.splice(0,Number(a)+1);this.data.push([1E3*mist.data.config.time,mist.data.capabilities.load.memory]);return this.data}},clients:{label:"Connections",basecolor:[203,75,75]},upbps:{label:"Bandwidth up",yaxistype:"bytespersec",basecolor:[77,167,77]},downbps:{label:"Bandwidth down",yaxistype:"bytespersec",basecolor:[148,64,237]}}},yaxes:{percentage:{name:"percentage",
color:"black",tickColor:0,tickDecimals:0,tickFormatter:function(a){return UI.format.addUnit(UI.format.number(a),"%")},tickLength:0,min:0,max:100},amount:{name:"amount",color:"black",tickColor:0,tickDecimals:0,tickFormatter:function(a){return UI.format.number(a)},tickLength:0,min:0},bytespersec:{name:"bytespersec",color:"black",tickColor:0,tickDecimals:1,tickFormatter:function(a){return UI.format.bytes(a,!0)},tickLength:0,ticks:function(a){var b=0.3*Math.sqrt($(".graph").first().height()),b=(a.max-
a.min)/b,c=Math.floor(Math.log(Math.abs(b))/Math.log(1024)),d=b/Math.pow(1024,c),e=-Math.floor(Math.log(d)/Math.LN10),l=a.tickDecimals;null!=l&&e>l&&(e=l);var n=Math.pow(10,-e),d=d/n,h;if(1.5>d)h=1;else if(3>d){if(h=2,2.25<d&&(null==l||e+1<=l))h=2.5,++e}else h=7.5>d?5:10;h=h*n*Math.pow(1024,c);null!=a.minTickSize&&h<a.minTickSize&&(h=a.minTickSize);a.delta=b;a.tickDecimals=Math.max(0,null!=l?l:e);a.tickSize=h;b=[];c=a.tickSize*Math.floor(a.min/a.tickSize);e=0;l=Number.NaN;do n=l,l=c+e*a.tickSize,
b.push(l),++e;while(l<a.max&&l!=n);return b},min:0}},xaxes:{time:{name:"time",mode:"time",timezone:"browser",ticks:5}}},draggable:function(a){a.attr("draggable",!0);a.on("dragstart",function(a){$(this).css("opacity",0.4).data("dragstart",{click:{x:a.originalEvent.pageX,y:a.originalEvent.pageY},ele:{x:this.offsetLeft,y:this.offsetTop}})}).on("dragend",function(a){var c=$(this).data("dragstart"),d=c.ele.x-c.click.x+a.originalEvent.pageX,a=c.ele.y-c.click.y+a.originalEvent.pageY;$(this).css({opacity:1,
top:a,left:d,right:"auto",bottom:"auto"})});a.parent().on("dragleave",function(){})},format:{time:function(a,b){var c=new Date(1E3*a),d=[];d.push(("0"+c.getHours()).slice(-2));d.push(("0"+c.getMinutes()).slice(-2));"short"!=b&&d.push(("0"+c.getSeconds()).slice(-2));return d.join(":")},date:function(a,b){var c=new Date(1E3*a),d="Sun Mon Tue Wed Thu Fri Sat".split(" "),e=[];"long"==b&&e.push(d[c.getDay()]);e.push(("0"+c.getDate()).slice(-2));e.push("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")[c.getMonth()]);
"short"!=b&&e.push(c.getFullYear());return e.join(" ")},dateTime:function(a,b){return UI.format.date(a,b)+", "+UI.format.time(a,b)},duration:function(a){var b=[0.001,1E3,60,60,24,7,1E9],c="ms sec min hr day week".split(" "),d={},e;for(e in c){var a=a/b[e],l=Math.round(a%b[Number(e)+1]);d[c[e]]=l;a-=l}var n;for(e=c.length-1;0<=e;e--)if(0<d[c[e]]){n=c[e];break}b=$("<span>");switch(n){case "week":b.append(UI.format.addUnit(d.week,"wks, ")).append(UI.format.addUnit(d.day,"days"));break;case "day":b.append(UI.format.addUnit(d.day,
"days, ")).append(UI.format.addUnit(d.hr,"hrs"));break;default:b.append([("0"+d.hr).slice(-2),("0"+d.min).slice(-2),("0"+d.sec).slice(-2)+(d.ms?"."+d.ms:"")].join(":"))}return b[0].innerHTML},number:function(a){if(isNaN(Number(a))||0==a)return a;var b=Math.pow(10,3-Math.floor(Math.log(a)/Math.LN10)-1),a=Math.round(a*b)/b;if(1E4<a){number=a.toString().split(".");for(a=/(\d+)(\d{3})/;a.test(number[0]);)number[0]=number[0].replace(a,"$1 $2");a=number.join(".")}return a},status:function(a){var b=$("<span>");
if("undefined"==typeof a.online)return b.text("Unknown, checking.."),"undefined"!=typeof a.error&&b.text(a.error),b;switch(a.online){case -1:b.text("Enabling");break;case 0:b.text("Unavailable").addClass("red");break;case 1:b.text("Active").addClass("green");break;case 2:b.text("Standby").addClass("orange");break;default:b.text(a.online)}"error"in a&&b.text(a.error);return b},capital:function(a){return a.charAt(0).toUpperCase()+a.substring(1)},addUnit:function(a,b){var c=$("<span>").html(a);c.append($("<span>").addClass("unit").html(b));
return c[0].innerHTML},bytes:function(a,b){var c="bytes KiB MiB GiB TiB PiB".split(" ");if(0==a)unit=c[0];else{var d=Math.floor(Math.log(Math.abs(a))/Math.log(1024));0>d?unit=c[0]:(a/=Math.pow(1024,d),unit=c[d])}return UI.format.addUnit(UI.format.number(a),unit+(b?"/s":""))}},navto:function(a,b){var c=location.hash,d=c.split("@");d[0]=[mist.user.name,mist.user.host].join("&");d[1]=[a,b].join("&");"undefined"!=typeof screenlog&&screenlog.navto(d[1]);location.hash=d.join("@");location.hash==c&&$(window).trigger("hashchange")},
showTab:function(a,b){var c=UI.elements.main;if(mist.user.loggedin&&!("ui_settings"in mist.data))c.html("Loading.."),mist.send(function(){UI.showTab(a,b)},{ui_settings:!0});else{var d=UI.elements.menu.removeClass("hide").find('.plain:contains("'+a+'")').closest(".button");0<d.length&&(UI.elements.menu.find(".button.active").removeClass("active"),d.addClass("active"));UI.interval.clear();c.html($("<h2>").text(a));switch(a){case "Login":if(mist.user.loggedin){UI.navto("Overview");break}UI.elements.menu.addClass("hide");
UI.elements.connection.status.text("Disconnected").removeClass("green").addClass("red");c.append(UI.buildUI([{type:"help",help:"Please provide your account details.<br>You were asked to set these when MistController was started for the first time. If you did not yet set any account details, log in with your desired credentials to create a new account."},{label:"Host",help:"Url location of the MistServer API. Generally located at http://MistServerIP:4242/api","default":"http://localhost:4242/api",
pointer:{main:mist.user,index:"host"}},{label:"Username",help:"Please enter your username here.",validate:["required"],pointer:{main:mist.user,index:"name"}},{label:"Password",type:"password",help:"Please enter your password here.",validate:["required"],pointer:{main:mist.user,index:"rawpassword"}},{type:"buttons",buttons:[{label:"Login",type:"save","function":function(){mist.user.password=MD5(mist.user.rawpassword);delete mist.user.rawpassword;mist.send(function(){UI.navto("Overview")})}}]}]));break;
case "Create a new account":UI.elements.menu.addClass("hide");c.append($("<p>").text("No account has been created yet in the MistServer at ").append($("<i>").text(mist.user.host)).append("."));c.append(UI.buildUI([{type:"buttons",buttons:[{label:"Select other host",type:"cancel",css:{"float":"left"},"function":function(){UI.navto("Login")}}]},{type:"custom",custom:$("<br>")},{label:"Desired username",type:"str",validate:["required"],help:"Enter your desired username. In the future, you will need this to access the Management Interface.",
pointer:{main:mist.user,index:"name"}},{label:"Desired password",type:"password",validate:["required",function(a,b){$(".match_password").not($(b)).trigger("change");return false}],help:"Enter your desired password. In the future, you will need this to access the Management Interface.",pointer:{main:mist.user,index:"password"},classes:["match_password"]},{label:"Repeat password",type:"password",validate:["required",function(a,b){return a!=$(".match_password").not($(b)).val()?{msg:'The fields "Desired password" and "Repeat password" do not match.',
classes:["red"]}:false}],help:"Repeat your desired password.",classes:["match_password"]},{type:"buttons",buttons:[{type:"save",label:"Create new account","function":function(){mist.send(function(){UI.navto("Account created")},{authorize:{new_username:mist.user.name,new_password:mist.user.password}})}}]}]));break;case "Account created":UI.elements.menu.addClass("hide");c.append($("<p>").text("Your account has been created succesfully.")).append(UI.buildUI([{type:"text",text:"Would you like to enable all (currently) available protocols with their default settings?"},
{type:"buttons",buttons:[{label:"Enable protocols",type:"save","function":function(){if(mist.data.config.protocols)c.append("Unable to enable all protocols as protocol settings already exist.<br>");else{c.append("Retrieving available protocols..<br>");mist.send(function(a){var b=[],d;for(d in a.capabilities.connectors)if(a.capabilities.connectors[d].required)c.append('Could not enable protocol "'+d+'" because it has required settings.<br>');else{b.push({connector:d});c.append('Enabled protocol "'+
d+'".<br>')}c.append("Saving protocol settings..<br>");mist.send(function(){c.append("Protocols enabled. Redirecting..");setTimeout(function(){UI.navto("Overview")},5E3)},{config:{protocols:b}})},{capabilities:true})}}},{label:"Skip",type:"cancel","function":function(){UI.navto("Overview")}}]}]));break;case "Overview":var e=$("<span>").text("Loading.."),l=$("<span>"),n=$("<span>"),h=$("<span>");c.append(UI.buildUI([{type:"help",help:"You can find most basic information about your MistServer here.<br>You can also set the debug level and force a save to the config.json file that MistServer uses to save your settings. "},
{type:"span",label:"Version",pointer:{main:mist.data.config,index:"version"}},{type:"span",label:"Version check",value:e,LTSonly:!0},{type:"span",label:"Server time",value:h},{type:"span",label:"Current streams",value:l},{type:"span",label:"Current connections",value:n},$("<br>"),{type:"str",label:"Human readable name",pointer:{main:mist.data.config,index:"name"},help:"You can name your MistServer here for personal use. You'll still need to set host name within your network yourself."},{type:"debug",
label:"Debug level",pointer:{main:mist.data.config,index:"debug"},help:"You can set the amount of debug information MistServer saves in the log. A full reboot of MistServer is required before some components of MistServer can post debug information."},{type:"checkbox",label:"Force configurations save",pointer:{main:mist.data,index:"save"},help:"Tick the box in order to force an immediate save to the config.json MistServer uses to save your settings. Saving will otherwise happen upon closing MistServer. Don't forget to press save after ticking the box."},
{type:"buttons",buttons:[{type:"save",label:"Save","function":function(){var a={config:mist.data.config};if(mist.data.save)a.save=mist.data.save;mist.send(function(){UI.navto("Overview")},a)}}]}]));if(mist.data.LTS){var m=function(){var a=mist.stored.get().update||{};"uptodate"in a?a.error?i.addClass("red").text(a.error):a.uptodate?i.text("Your version is up to date.").addClass("green"):i.addClass("red").text("Version outdated!").append($("<button>").text("Update").css({"font-size":"1em","margin-left":"1em"}).click(function(){if(confirm("Are you sure you want to execute a rolling update?")){i.addClass("orange").removeClass("red").text("Rolling update command sent..");
mist.stored.del("update");mist.send(function(){UI.navto("Overview")},{autoupdate:true})}})):i.text("Unknown")};if(!mist.stored.get().update||36E5<(new Date).getTime()-mist.stored.get().update.lastchecked){var s=mist.stored.get().update||{};s.lastchecked=(new Date).getTime();mist.send(function(a){mist.stored.set("update",$.extend(true,s,a.update));m()},{checkupdate:!0})}else m()}else i.text("");var l=function(){mist.send(function(){g()},{totals:{fields:["clients"],start:-10},active_streams:true})},
g=function(){n.text(("active_streams"in mist.data?mist.data.active_streams?mist.data.active_streams.length:0:"?")+" active, "+(mist.data.streams?Object.keys(mist.data.streams).length:0)+" configured");if("totals"in mist.data&&"all_streams"in mist.data.totals)var a=mist.data.totals.all_streams.all_protocols.clients,a=a.length?UI.format.number(a[a.length-1][1]):0;else a="Loading..";f.text(a);p.text(UI.format.dateTime(mist.data.config.time,"long"))};l();g();UI.interval.set(l,3E4);break;case "Protocols":if("undefined"==
typeof mist.data.capabilities){mist.send(function(){UI.navto(a)},{capabilities:!0});d.append("Loading..");break}var h=$("<tbody>");d.append(UI.buildUI([{type:"help",help:"You can find an overview of all the protocols and their relevant information here. You can add, edit or delete protocols."}])).append($("<button>").text("New protocol").click(function(){UI.navto("Edit Protocol")})).append($("<table>").html($("<thead>").html($("<tr>").html($("<th>").text("Protocol")).append($("<th>").text("Status")).append($("<th>").text("Settings")).append($("<th>")))).append(h));
var k=function(){function a(c){var b=mist.data.capabilities.connectors[c.connector];if(!b)return"";var d=[],e=["required","optional"],f;for(f in e)for(var t in b[e[f]])c[t]&&c[t]!=""?d.push(t+": "+c[t]):b[e[f]][t]["default"]&&d.push(t+": "+b[e[f]][t]["default"]);return $("<span>").addClass("description").text(d.join(", "))}h.html("");for(var c in mist.data.config.protocols){var b=mist.data.config.protocols[c];h.append($("<tr>").data("index",c).append($("<td>").text(b.connector)).append($("<td>").html(UI.format.status(b))).append($("<td>").html(a(b))).append($("<td>").css("text-align",
"right").html($("<button>").text("Edit").click(function(){UI.navto("Edit Protocol",$(this).closest("tr").data("index"))})).append($("<button>").text("Delete").click(function(){var a=$(this).closest("tr").data("index");if(confirm('Are you sure you want to delete the protocol "'+mist.data.config.protocols[a].connector+'"?')){mist.data.config.protocols.splice(a,1);mist.send(function(){UI.navto("Protocols")},{config:mist.data.config})}}))))}};k();UI.interval.set(function(){mist.send(function(){k()})},
3E4);break;case "Edit Protocol":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a,c)},{capabilities:!0});d.append("Loading..");break}var j=!1;""!=c&&0<=c&&(j=!0);var A={},q;for(q in mist.data.config.protocols)A[mist.data.config.protocols[q].connector]=1;var F=function(a){var b=mist.data.capabilities.connectors[a],d=mist.convertBuildOptions(b,o);d.push({type:"hidden",pointer:{main:o,index:"connector"},value:a});d.push({type:"buttons",buttons:[{type:"save",label:"Save",
"function":function(){if(j)mist.data.config.protocols[c]=o;else{if(!mist.data.config.protocols)mist.data.config.protocols=[];mist.data.config.protocols.push(o)}mist.send(function(){UI.navto("Protocols")},{config:mist.data.config})}},{type:"cancel",label:"Cancel","function":function(){UI.navto("Protocols")}}]});if("deps"in b&&b.deps!=""){$t=$("<span>").text("Dependencies:");$ul=$("<ul>");$t.append($ul);if(typeof b.deps=="string")b.deps=b.deps.split(", ");for(var e in b.deps){a=$("<li>").text(b.deps[e]+
" ");$ul.append(a);typeof A[b.deps[e]]!="undefined"||typeof A[b.deps[e]+".exe"]!="undefined"?a.append($("<span>").addClass("green").text("(Configured)")):a.append($("<span>").addClass("red").text("(Not yet configured)"))}d.unshift({type:"text",text:$t[0].innerHTML})}return UI.buildUI(d)},A={};for(q in mist.data.config.protocols)A[mist.data.config.protocols[q].connector]=1;if(j){var r=mist.data.config.protocols[c],o=r;d.find("h2").append(' "'+r.connector+'"');d.append(F(r.connector))}else{d.html($("<h2>").text("New Protocol"));
var o={},x=[];for(q in mist.data.capabilities.connectors)x.push([q,q]);var V=$("<span>");d.append(UI.buildUI([{label:"Protocol",type:"select",select:x,"function":function(){V.html(F($(this).getval()))}}])).append(V)}break;case "Streams":if(!("capabilities"in mist.data)){d.html("Loading..");mist.send(function(){UI.navto(a)},{capabilities:!0});break}h=$("<tbody>").append($("<tr>").append("<td>").attr("colspan",6).text("Loading.."));e=$("<table>").html($("<thead>").html($("<tr>").html($("<th>").text("Stream name").attr("data-sort-type",
"string").addClass("sorting-asc")).append($("<th>").text("Source").attr("data-sort-type","string")).append($("<th>").text("Status").attr("data-sort-type","int")).append($("<th>").css("text-align","right").text("Connections").attr("data-sort-type","int")).append($("<th>")).append($("<th>")))).append(h);d.append(UI.buildUI([{type:"help",help:"Here you can create, edit or delete new and existing streams. Immidiately go to the stream preview or view the information available about the stream with the info button."}])).append($("<button>").text("New stream").click(function(){UI.navto("Edit Stream")})).append(e);
e.stupidtable();var E=function(){var a=[],c;for(c in mist.data.active_streams)a.push({streams:[mist.data.active_streams[c]],fields:["clients"],start:-2});mist.send(function(){$.extend(true,z,mist.data.streams);var a=0;h.html("");if(mist.data.LTS)for(a in mist.data.active_streams){var c=mist.data.active_streams[a].split("+");if(!(c.length<2)&&c[0]in mist.data.streams){c=W(mist.data.active_streams[a],mist.data.streams[c[0]]);c.online=1;z[mist.data.active_streams[a]]=c}}c=Object.keys(z);c.sort();for(var b in c){var d=
c[b],e;e=d in mist.data.streams?mist.data.streams[d]:z[d];var f=$("<td>").css("text-align","right").html($("<span>").addClass("description").text("Loading..")),g=0;if(typeof mist.data.totals!="undefined"&&typeof mist.data.totals[d]!="undefined"){var t=mist.data.totals[d].all_protocols.clients,g=0;if(t.length){for(a in t)g=g+t[a][1];g=Math.round(g/t.length)}}f.html(UI.format.number(g));if(g==0&&e.online==1)e.online=2;g=$("<td>").css("text-align","right").css("white-space","nowrap");(!("ischild"in e)||
!e.ischild)&&g.html($("<button>").text("Edit").click(function(){UI.navto("Edit Stream",$(this).closest("tr").data("index"))})).append($("<button>").text("Delete").click(function(){var a=$(this).closest("tr").data("index");if(confirm('Are you sure you want to delete the stream "'+a+'"?')){delete mist.data.streams[a];var c={};mist.data.LTS?c.deletestream=[a]:c.streams=mist.data.streams;mist.send(function(){UI.navto("Streams")},c)}}));t=$("<span>").text(d);e.ischild&&t.css("padding-left","1em");var i=
UI.format.status(e),j=$("<button>").text("Preview").click(function(){UI.navto("Preview",$(this).closest("tr").data("index"))});if(e.filesfound){i.html("");j="";f.html("")}h.append($("<tr>").data("index",d).html($("<td>").html(t).attr("title",d).addClass("overflow_ellipsis")).append($("<td>").text(e.source).attr("title",e.source).addClass("description").addClass("overflow_ellipsis").css("max-width","20em")).append($("<td>").data("sort-value",e.online).html(i)).append(f).append($("<td>").html(j)).append(g));
a++}},{totals:a,active_streams:true})},z=$.extend(!0,{},mist.data.streams),W=function(a,c){var b=$.extend({},c);delete b.meta;delete b.error;b.online=2;b.name=a;b.ischild=true;return b};if(mist.data.LTS){var C=0,G=0;for(l in mist.data.streams)r=mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"],mist.inputMatch(r.source_match,mist.data.streams[l].source)&&(z[l].source+="*",mist.send(function(a,c){var b=c.stream,d;for(d in a.browse.files)for(var e in mist.data.capabilities.inputs)if(!(e.indexOf("Buffer")>=
0||e.indexOf("Folder")>=0)&&mist.inputMatch(mist.data.capabilities.inputs[e].source_match,"/"+a.browse.files[d])){var f=b+"+"+a.browse.files[d];z[f]=W(f,mist.data.streams[b]);z[f].source=mist.data.streams[b].source+a.browse.files[d]}"files"in a.browse&&a.browse.files.length?z[b].filesfound=true:mist.data.streams[b].filesfound=false;G++;if(C==G){mist.send(function(){E()},{active_streams:true});UI.interval.set(function(){E()},1E4)}},{browse:mist.data.streams[l].source},{stream:l}),C++);0==C&&(mist.send(function(){E()},
{active_streams:!0}),UI.interval.set(function(){E()},3E4))}else mist.send(function(){E()},{active_streams:!0}),UI.interval.set(function(){E()},1E4);break;case "Edit Stream":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a,c)},{capabilities:!0});d.append("Loading..");break}j=!1;""!=c&&(j=!0);j?(l=c,o=mist.data.streams[l],d.find("h2").append(' "'+l+'"')):(d.html($("<h2>").text("New Stream")),o={});l=[];for(q in mist.data.capabilities.inputs)l.push(mist.data.capabilities.inputs[q].source_match);
var J=$("<div>");d.append(UI.buildUI([{label:"Stream name",type:"str",validate:["required","streamname"],pointer:{main:o,index:"name"},help:"Set the name this stream will be recognised by for players and/or stream pushing."},{label:"Source",type:"browse",validate:["required"],filetypes:l,pointer:{main:o,index:"source"},help:'Set the stream source.<table><tr><td>VoD:</td><td>You can browse to the file or folder as a source or simply enter the path to the file.</td></tr><tr><td>Live:</td><td>You\'ll need to enter "push://IP" with the IP of the machine pushing towards MistServer.<br>You can use "push://" to accept any source.</td></tr><tr><td>(Pro only)</td><td>Use "push://(IP)@password" to set a password protection for pushes.</td></tr></table>If you\'re unsure how to set the source properly, please view our Live pushing guide at the tools section.',
"function":function(){var a=$(this).val();if(a!=""){var c=null,b;for(b in mist.data.capabilities.inputs)if(typeof mist.data.capabilities.inputs[b].source_match!="undefined"&&mist.inputMatch(mist.data.capabilities.inputs[b].source_match,a)){c=b;break}if(c===null)J.html($("<h3>").text("Unrecognized input").addClass("red")).append($("<span>").text("Please edit the stream source.").addClass("red"));else{c=mist.data.capabilities.inputs[c];J.html($("<h3>").text(c.name+" Input options"));c=mist.convertBuildOptions(c,
o);"always_match"in mist.data.capabilities.inputs[b]&&mist.inputMatch(mist.data.capabilities.inputs[b].always_match,a)&&c.push({label:"Always on",type:"checkbox",help:"Keep this input available at all times, even when there are no active viewers.",pointer:{main:o,index:"always_on"}});J.append(UI.buildUI(c))}}}},{label:"Stop sessions",type:"checkbox",help:"When saving these stream settings, kill this stream's current connections.",pointer:{main:o,index:"stop_sessions"}},$("<br>"),{type:"custom",custom:J},
$("<br>"),$("<h3>").text("Encryption"),{type:"help",help:"To enable encryption, the licence acquisition url must be entered, as well as either the content key or the key ID and seed.<br>Unsure how you should fill in your encryption or missing your preferred encryption? Please contact us."},{label:"License acquisition url",type:"str",LTSonly:!0,pointer:{main:o,index:"la_url"}},$("<br>"),{label:"Content key",type:"str",LTSonly:!0,pointer:{main:o,index:"contentkey"}},{type:"text",text:" - or - "},{label:"Key ID",
type:"str",LTSonly:!0,pointer:{main:o,index:"keyid"}},{label:"Key seed",type:"str",LTSonly:!0,pointer:{main:o,index:"keyseed"}},{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Streams")}},{type:"save",label:"Save","function":function(){if(!mist.data.streams)mist.data.streams={};mist.data.streams[o.name]=o;c!=o.name&&delete mist.data.streams[c];var a={};if(mist.data.LTS){a.addstream={};a.addstream[o.name]=o;if(c!=o.name)a.deletestream=[c]}else a.streams=mist.data.streams;
if(o.stop_sessions&&c!=""){a.stop_sessions=c;delete o.stop_sessions}mist.send(function(){delete mist.data.streams[o.name].online;delete mist.data.streams[o.name].error;UI.navto("Streams")},a)}}]}]));break;case "Preview":if(""==c){d.append("Loading..");var N=function(c){var b={};c.sort();d.html($("<h2>").text(a)).append(UI.buildUI([{label:"Select a stream",type:"select",select:c,pointer:{main:b,index:"stream"}},{type:"buttons",buttons:[{type:"save",label:"Go","function":function(){UI.navto(a,b.stream)}}]}]));
UI.elements.secondary_menu.html("").append($("<a>").addClass("button").addClass("active").text("Choose stream").click(function(){UI.navto("Preview")}));var e=$("<div>").addClass("preview_icons");d.append($("<span>").addClass("description").text("Or, click a stream from the list below.")).append(e);for(var f in c){var g=c[f],h="";if(g.indexOf("+")>-1){h=g.split("+");h=mist.data.streams[h[0]].source+h[1]}else h=mist.data.streams[g].source;e.append($("<button>").append($("<span>").text(g)).append($("<span>").addClass("description").text(h)).attr("title",
g).attr("data-stream",g).click(function(){UI.navto("Preview",$(this).attr("data-stream"))}))}};if(mist.data.LTS){if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a,c)},{capabilities:!0});d.append("Loading..");break}G=C=0;x={};for(l in mist.data.streams)r=mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"],mist.inputMatch(r.source_match,mist.data.streams[l].source)&&(mist.send(function(a,c){var b=c.stream,d;for(d in a.browse.files)for(var e in mist.data.capabilities.inputs)e.indexOf("Buffer")>=
0||e.indexOf("Folder")>=0||mist.inputMatch(mist.data.capabilities.inputs[e].source_match,"/"+a.browse.files[d])&&(x[b+"+"+a.browse.files[d]]=true);G++;C==G&&mist.send(function(){for(var a in mist.data.active_streams){var c=mist.data.active_streams[a].split("+");c.length>1&&c[0]in mist.data.streams&&(x[mist.data.active_streams[a]]=true)}x=Object.keys(x);x=x.concat(Object.keys(mist.data.streams));x.sort();N(x)},{active_streams:true})},{browse:mist.data.streams[l].source},{stream:l}),C++);0==C&&mist.send(function(){var c=
[],b;for(b in mist.data.active_streams){var e=mist.data.active_streams[b].split("+");e.length>1&&e[0]in mist.data.streams&&(c[mist.data.active_streams[b]]=true)}mist.data.streams&&(c=c.concat(Object.keys(mist.data.streams)));if(c.length==0)d.html($("<h2>").text(a)).append("Please set up a stream first.");else{c.sort();N(c)}},{active_streams:!0})}else N(Object.keys(mist.data.streams));break}d.find("h2").append(' of "'+c+'"');l=":8080";for(q in mist.data.config.protocols)if(r=mist.data.config.protocols[q],
"HTTP"==r.connector||"HTTP.exe"==r.connector)l=r.port?":"+r.port:":8080";var D={},r=$("<span>").hide();D["Embed urls"]=r;d.append(r);e=mist.user.host;b=document.createElement("a");b.href=e;e=b.protocol+"//";b=b.hostname;var H=e+b+l+"/",y={autoplay:!0},K=function(a){var b=["div"],d='\n <script src="'+H+"embed_"+encodeURIComponent(c)+'.js"><\/script>\n';a.autoplay||b.push("data-noautoplay");a.forceprotocol&&a.forceprotocol!=""&&b.push('data-forcetype="'+a.forceprotocol+'"');a.urlappend&&a.urlappend!=
""&&b.push('data-urlappend="'+a.urlappend.replace(/\"/g,'\\"')+'"');return"<"+b.join(" ")+">"+d+"</div>"},X=$("<span>");r.append($("<h3>").text("Embed urls")).append(UI.buildUI([{label:"Embedable script",type:"str",value:H+"embed_"+encodeURIComponent(c)+".js",readonly:!0},{label:"Stream info script",type:"str",value:H+"info_"+encodeURIComponent(c)+".js",readonly:!0},{label:"Autodetect player",type:"str",value:H+encodeURIComponent(c)+".html",readonly:!0,qrcode:!0},$("<h3>").text("Embed code"),{label:"Embed code",
type:"textarea",value:K(y),rows:4,readonly:!0,classes:["embed_code"]},$("<h4>").text("Embed code options").css("margin-top",0),{label:"Autoplay",type:"checkbox",value:!0,pointer:{main:y,index:"autoplay"},"function":function(){y.autoplay=$(this).getval();$(".embed_code").setval(K(y))}},{label:"Force protocol",type:"select",select:[["","Automatic"]],pointer:{main:y,index:"protocol"},classes:["embed_code_forceprotocol"],"function":function(){y.forceprotocol=$(this).getval();$(".embed_code").setval(K(y))}},
{label:"Video URL addition",type:"str",pointer:{main:y,index:"urlappend"},help:"The embed script will append this string to the video url, useful for sending through params.",classes:["embed_code_forceprotocol"],"function":function(){y.urlappend=$(this).getval();$(".embed_code").setval(K(y))}},$("<h3>").text("Protocol stream urls"),X]));l=$("<span>").append($("<h3>").text("Meta information")).hide();D["Meta information"]=l;var O=$("<span>");l.append(O);d.append(l);l=$("<span>").hide();D.Preview=l;
d.append(l);var L=$("<div>").css({"float":"left","margin-right":"1em",width:"100%"}),u=$("<div>").addClass("video_container").attr("data-forcesupportcheck","");L.html(u);var Y=$("<div>").css("float","left");l.append(L).append(Y);mist.stored.get().autoplay||u.attr("data-noautoplay","");var M=function(){u.text("Loading..");L.children(".input_container").remove();var a=document.createElement("script");a.src=H+"embed_"+encodeURIComponent(c)+".js";a.onerror=function(){u.html('Error loading "'+a.src+'".<br>').append($("<button>").text("Try again").click(function(){M()}))};
a.onload=function(){if(typeof mistvideo[c].error!="undefined")u.height("5em").html(mistvideo[c].error+"<br>").append($("<button>").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)}}]);u.height(Math.min(a.height,u.height()));
b.find(".help_container").remove();L.append(b);var d=$("<table>").css("font-size","0.9em").html($("<thead>").html($("<tr>").html($("<th>")).append($("<th>").text("Type")).append($("<th>").text("Priority")).append($("<th>").text("Simul. tracks")).append($("<th>").html("Your browser<br>support"))));Y.html(d);b=$("<tbody>");d.append(b);var d=$(".embed_code_forceprotocol"),e=[];d.find(".clear").remove();for(var f in a.source){var g=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(){u.attr("data-forcetype",$(this).val()).html("Loading embed..");M()}).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)}}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:[]};f={vheader:"Video",
labels:["Codec","Duration","Peak bitrate","Size","Framerate"],content:[]};d=Object.keys(j.tracks);d.sort(function(a,c){a=a.split("_").pop();c=c.split("_").pop();return a-c});for(var t in d){e=d[t];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");t=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(t));O.html(UI.buildUI(a))}else O.html("No meta information available.")}};u.html("")[0].appendChild(a)};M();var P=UI.elements.secondary_menu;P.html("").append($("<a>").addClass("button").text("Choose stream").click(function(){UI.navto("Preview")})).append($("<span>").addClass("separator"));l=["Preview","Embed urls","Meta information"];A=l[0];for(q in l)r=$("<a>").addClass("button").text(l[q]).click(function(){P.find(".active").removeClass("active");
$(this).addClass("active");for(q in D)D[q].hide();D[$(this).text()].show()}),P.append(r),l[q]==A&&(r.addClass("active"),D[A].show());break;case "Push":u=$("<div>").text("Loading..");d.append(u);mist.send(function(a){function c(a){setTimeout(function(){mist.send(function(b){var d=false;if("push_list"in b&&b.push_list&&b.push_list.length){var d=true,g;for(g in b.push_list)if(a.indexOf(b.push_list[g][0])>-1){d=false;break}}else d=true;if(d)for(g in a)e.find("tr[data-pushid="+a[g]+"]").remove();else c()},
{push_list:1})},1E3)}function b(d,g){var f=$("<span>");d.length>=4&&d[2]!=d[3]?f.append($("<span>").text(d[2])).append($("<span>").html("&#187").addClass("unit").css("margin","0 0.5em")).append($("<span>").text(d[3])):f.append($("<span>").text(d[2]));var h=$("<td>").append($("<button>").text(g=="Automatic"?"Remove":"Stop").click(function(){if(confirm("Are you sure you want to "+$(this).text().toLowerCase()+" this push?\n"+d[1]+" to "+d[2])){var a=$(this).closest("tr");a.html($("<td colspan=99>").html($("<span>").addClass("red").text(g==
"Automatic"?"Removing..":"Stopping..")));g=="Automatic"?mist.send(function(){a.remove()},{push_auto_remove:{stream:d[1],target:d[2]}}):mist.send(function(){c([d[0]])},{push_stop:[d[0]]})}}));g=="Automatic"&&h.append($("<button>").text("Remove and stop pushes").click(function(){if(confirm("Are you sure you want to remove this automatic push, and also stop all pushes matching it?\n"+d[1]+" to "+d[2])){var b=$(this).closest("tr");b.html($("<td colspan=99>").html($("<span>").addClass("red").text("Removing and stopping..")));
var g=[],f;for(f in a.push_list)if(d[1]==a.push_list[f][1]&&d[2]==a.push_list[f][2]){g.push(a.push_list[f][0]);e.find("tr[data-pushid="+a.push_list[f][0]+"]").html($("<td colspan=99>").html($("<span>").addClass("red").text("Stopping..")))}mist.send(function(){b.remove();c(g)},{push_auto_remove:{stream:d[1],target:d[2]},push_stop:g})}}));return $("<tr>").attr("data-pushid",d[0]).append($("<td>").text(d[1])).append($("<td>").append(f.children())).append(h)}u.html("");var d=a.push_settings;d||(d={});
u.append(UI.buildUI([{type:"help",help:"You can push streams to files or other servers, allowing them to broadcast your stream as well."},$("<h3>").text("Settings"),{label:"Delay before retry",unit:"s",type:"int",min:0,help:"How long the delay should be before MistServer retries an automatic push.<br>If set to 0, it does not retry.","default":0,pointer:{main:d,index:"wait"},LTSonly:1},{label:"Maximum retries",unit:"/s",type:"int",min:0,help:"The maximum amount of retries per second (for all automatic pushes).<br>If set to 0, there is no limit.",
"default":0,pointer:{main:d,index:"maxspeed"},LTSonly:1},{type:"buttons",buttons:[{type:"save",label:"Save","function":function(){mist.send(function(){UI.navto("Push")},{push_settings:d})}}]}]));var e=$("<table>").append($("<tr>").append($("<th>").text("Stream")).append($("<th>").text("Target")).append($("<th>"))),g=e.clone();if("push_list"in a)for(var f in a.push_list)e.append(b(a.push_list[f],"Manual"));if("push_auto_list"in a)for(f in a.push_auto_list)g.append(b([-1,a.push_auto_list[f][0],a.push_auto_list[f][1]],
"Automatic"));u.append($("<h3>").text("Automatic pushes")).append($("<button>").text("Add an automatic push").click(function(){UI.navto("Start Push","auto")}));g.find("tr").length==1?u.append($("<div>").text("No automatic pushes have been configured.").addClass("text").css("margin-top","0.5em")):u.append(g);u.append($("<h3>").text("Pushes")).append($("<button>").text("Start a push").click(function(){UI.navto("Start Push")}));if(e.find("tr").length==1)u.append($("<div>").text("No pushes are active.").addClass("text").css("margin-top",
"0.5em"));else{var g=[],h=[],i=$("<select>").css("margin-left","0.5em").append($("<option>").text("Any stream").val("")),j=$("<select>").css("margin-left","0.5em").append($("<option>").text("Any target").val(""));for(f in a.push_list){g.indexOf(a.push_list[f][1])==-1&&g.push(a.push_list[f][1]);h.indexOf(a.push_list[f][2])==-1&&h.push(a.push_list[f][2])}g.sort();h.sort();for(f in g)i.append($("<option>").text(g[f]));for(f in h)j.append($("<option>").text(h[f]));u.append($("<button>").text("Stop all pushes").click(function(){var b=
[],d;for(d in a.push_list)b.push(a.push_list[d][0]);if(b.length!=0&&confirm("Are you sure you want to stop all pushes?")){mist.send(function(){c(b)},{push_stop:b});e.find("tr:not(:first-child)").html($("<td colspan=99>").append($("<span>").addClass("red").text("Stopping..")));$(this).remove()}})).append($("<label>").css("margin-left","1em").append($("<span>").text("Stop all pushes that match: ").css("font-size","0.9em")).append(i).append($("<span>").css("margin-left","0.5em").text("and").css("font-size",
"0.9em")).append(j).append($("<button>").css("margin-left","0.5em").text("Apply").click(function(){var b=i.val(),d=j.val();if(b==""&&d=="")return alert("Looks like you want to stop all pushes. Maybe you should use that button?");var g={},f;for(f in a.push_list)if((b==""||a.push_list[f][1]==b)&&(d==""||a.push_list[f][2]==d))g[a.push_list[f][0]]=a.push_list[f];if(Object.keys(g).length==0)return alert("No matching pushes.");b="Are you sure you want to stop these pushes?\n\n";for(f in g)b=b+(g[f][1]+
" to "+g[f][2]+"\n");if(confirm(b)){g=Object.keys(g);mist.send(function(){c(g)},{push_stop:g});for(f in g)e.find("tr[data-pushid="+g[f]+"]").html($("<td colspan=99>").html($("<span>").addClass("red").text("Stopping..")))}}))).append(e)}},{push_settings:1,push_list:1,push_auto_list:1});break;case "Start Push":if(!("capabilities"in mist.data)){d.append("Loading Mist capabilities..");mist.send(function(){UI.navto("Start Push",c)},{capabilities:1});break}var v,Q=function(){var a=[],b;for(b in mist.data.capabilities.connectors){var e=
mist.data.capabilities.connectors[b];"push_urls"in e&&(a=a.concat(e.push_urls))}c=="auto"&&d.find("h2").text("Add automatic push");var g={};d.append(UI.buildUI([{label:"Stream name",type:"str",help:"This may either be a full stream name, a partial wildcard stream name, or a full wildcard stream name.<br>For example, given the stream <i>a</i> you can use:<ul><li><i>a</i>: the stream configured as <i>a</i></li><li><i>a+</i>: all streams configured as <i>a</i> with a wildcard behind it, but not <i>a</i> itself</li><li><i>a+b</i>: only the version of stream <i>a</i> that has wildcard <i>b</i></li></ul>",
pointer:{main:g,index:"stream"},validate:["required",function(a){a=a.split("+");a=a[0];return a in mist.data.streams?false:{msg:"'"+a+"' is not a stream name.",classes:["red"]}}],datalist:v,LTSonly:1},{label:"Target",type:"str",help:"Where the stream will be pushed to.<br>Valid formats:<ul><li>"+a.join("</li><li>")+"</li></ul> Valid text replacements:<ul><li>$stream - inserts the stream name used to push to MistServer</li><li>$day - inserts the current day number</li><li>$month - inserts the current month number</li><li>$year - inserts the current year number</li><li>$hour - inserts the hour timestamp when stream was received</li><li>$minute - inserts the minute timestamp the stream was received</li><li>$seconds - inserts the seconds timestamp when the stream was received</li><li>$datetime - inserts $year.$month.$day.$hour.$minute.$seconds timestamp when the stream was received</li>",
pointer:{main:g,index:"target"},validate:["required",function(b){for(var c in a)if(mist.inputMatch(a[c],b))return false;return{msg:"Does not match a valid target.<br>Valid formats:<ul><li>"+a.join("</li><li>")+"</li></ul>",classes:["red"]}}],LTSonly:1},{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Push")}},{type:"save",label:"Save","function":function(){var a={};a[c=="auto"?"push_auto_add":"push_start"]=g;mist.send(function(){UI.navto("Push")},a)}}]}]))};mist.data.LTS?
mist.send(function(a){(v=a.active_streams)||(v=[]);var a=[],b;for(b in v)v[b].indexOf("+")!=-1&&a.push(v[b].replace(/\+.*/,"")+"+");v=v.concat(a);var c=0,d=0;for(b in mist.data.streams){v.push(b);if(mist.inputMatch(mist.data.capabilities.inputs.Folder.source_match,mist.data.streams[b].source)){v.push(b+"+");mist.send(function(a,b){var e=b.stream,g;for(g in a.browse.files)for(var f in mist.data.capabilities.inputs)f.indexOf("Buffer")>=0||f.indexOf("Folder")>=0||mist.inputMatch(mist.data.capabilities.inputs[f].source_match,
"/"+a.browse.files[g])&&v.push(e+"+"+a.browse.files[g]);d++;if(c==d){v=v.filter(function(a,b,c){return c.lastIndexOf(a)===b}).sort();Q()}},{browse:mist.data.streams[b].source},{stream:b});c++}}if(c==d){v=v.filter(function(a,b,c){return c.lastIndexOf(a)===b}).sort();Q()}},{active_streams:1}):(v=Object.keys(mist.data.streams),Q());break;case "Triggers":"triggers"in mist.data.config||(mist.data.config.triggers={});h=$("<tbody>");e=$("<table>").html($("<thead>").html($("<tr>").html($("<th>").text("Trigger on").attr("data-sort-type",
"string").addClass("sorting-asc")).append($("<th>").text("Applies to").attr("data-sort-type","string")).append($("<th>").text("Handler").attr("data-sort-type","string")).append($("<th>")))).append(h);d.append(UI.buildUI([{type:"help",help:"Triggers are the system you can use to react to events that occur inside MistServer. These allow you to block specific users, redirect streams, keep tabs on what is being pushed where, etcetera. For full documentation, please refer to the developer documentation section on the MistServer website."}])).append($("<button>").text("New trigger").click(function(){UI.navto("Edit Trigger")})).append(e);
e.stupidtable();l=mist.data.config.triggers;for(q in l)for(r in l[q])h.append($("<tr>").attr("data-index",q+","+r).append($("<td>").text(q)).append($("<td>").text(l[q][r][2].join(", "))).append($("<td>").text(l[q][r][0])).append($("<td>").html($("<button>").text("Edit").click(function(){UI.navto("Edit Trigger",$(this).closest("tr").attr("data-index"))})).append($("<button>").text("Delete").click(function(){var a=$(this).closest("tr").attr("data-index").split(",");if(confirm("Are you sure you want to delete this "+
a[0]+" trigger?")){mist.data.config.triggers[a[0]].splice(a[1],1);mist.data.config.triggers[a[0]].length==0&&delete mist.data.config.triggers[a[0]];mist.send(function(){UI.navto("Triggers")},{config:mist.data.config})}}))));break;case "Edit Trigger":"triggers"in mist.data.config||(mist.data.config.triggers={});c?(c=c.split(","),l=mist.data.config.triggers[c[0]][c[1]],o={triggeron:c[0],appliesto:l[2],url:l[0],async:l[1],"default":l[3]}):(d.html($("<h2>").text("New Trigger")),o={});d.append(UI.buildUI([{label:"Trigger on",
pointer:{main:o,index:"triggeron"},help:"For what event this trigger should activate.",type:"select",select:[["SYSTEM_START","SYSTEM_START: after MistServer boot"],["SYSTEM_STOP","SYSTEM_STOP: right before MistServer shutdown"],["SYSTEM_CONFIG","SYSTEM_CONFIG: after MistServer configurations have changed"],["OUTPUT_START","OUTPUT_START: right after the start command has been send to a protocol"],["OUTPUT_STOP","OUTPUT_STOP: right after the close command has been send to a protocol "],["STREAM_ADD",
{type:"buttons",buttons:[{type:"save",label:"Save","function":function(){var a={config:mist.data.config};if(mist.data.save)a.save=mist.data.save;mist.send(function(){UI.navto("Overview")},a)}}]}]));if(mist.data.LTS){var q=function(){var a=mist.stored.get().update||{};"uptodate"in a?a.error?e.addClass("red").text(a.error):a.uptodate?e.text("Your version is up to date.").addClass("green"):e.addClass("red").text("Version outdated!").append($("<button>").text("Update").css({"font-size":"1em","margin-left":"1em"}).click(function(){if(confirm("Are you sure you want to execute a rolling update?")){e.addClass("orange").removeClass("red").text("Rolling update command sent..");
mist.stored.del("update");mist.send(function(){UI.navto("Overview")},{autoupdate:true})}})):e.text("Unknown")};if(!mist.stored.get().update||36E5<(new Date).getTime()-mist.stored.get().update.lastchecked){var p=mist.stored.get().update||{};p.lastchecked=(new Date).getTime();mist.send(function(a){mist.stored.set("update",$.extend(true,p,a.update));q()},{checkupdate:!0})}else q()}else e.text("");var f=function(){mist.send(function(){t()},{totals:{fields:["clients"],start:-10},active_streams:true})},
t=function(){l.text(("active_streams"in mist.data?mist.data.active_streams?mist.data.active_streams.length:0:"?")+" active, "+(mist.data.streams?Object.keys(mist.data.streams).length:0)+" configured");if("totals"in mist.data&&"all_streams"in mist.data.totals)var a=mist.data.totals.all_streams.all_protocols.clients,a=a.length?UI.format.number(a[a.length-1][1]):0;else a="Loading..";n.text(a);h.text(UI.format.dateTime(mist.data.config.time,"long"))};f();t();UI.interval.set(f,3E4);break;case "Protocols":if("undefined"==
typeof mist.data.capabilities){mist.send(function(){UI.navto(a)},{capabilities:!0});c.append("Loading..");break}var g=$("<tbody>");c.append(UI.buildUI([{type:"help",help:"You can find an overview of all the protocols and their relevant information here. You can add, edit or delete protocols."}])).append($("<button>").text("New protocol").click(function(){UI.navto("Edit Protocol")})).append($("<table>").html($("<thead>").html($("<tr>").html($("<th>").text("Protocol")).append($("<th>").text("Status")).append($("<th>").text("Settings")).append($("<th>")))).append(g));
var i=function(){function a(b){var c=mist.data.capabilities.connectors[b.connector];if(!c)return"";var d=[],f=["required","optional"],g;for(g in f)for(var e in c[f[g]])b[e]&&b[e]!=""?d.push(e+": "+b[e]):c[f[g]][e]["default"]&&d.push(e+": "+c[f[g]][e]["default"]);return $("<span>").addClass("description").text(d.join(", "))}g.html("");for(var b in mist.data.config.protocols){var c=mist.data.config.protocols[b];g.append($("<tr>").data("index",b).append($("<td>").text(c.connector)).append($("<td>").html(UI.format.status(c))).append($("<td>").html(a(c))).append($("<td>").css("text-align",
"right").html($("<button>").text("Edit").click(function(){UI.navto("Edit Protocol",$(this).closest("tr").data("index"))})).append($("<button>").text("Delete").click(function(){var a=$(this).closest("tr").data("index");if(confirm('Are you sure you want to delete the protocol "'+mist.data.config.protocols[a].connector+'"?')){mist.data.config.protocols.splice(a,1);mist.send(function(){UI.navto("Protocols")},{config:mist.data.config})}}))))}};i();UI.interval.set(function(){mist.send(function(){i()})},
3E4);break;case "Edit Protocol":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a,b)},{capabilities:!0});c.append("Loading..");break}var j=!1;""!=b&&0<=b&&(j=!0);var k={};for(f in mist.data.config.protocols)k[mist.data.config.protocols[f].connector]=1;var E=function(a){var c=mist.data.capabilities.connectors[a],d=mist.convertBuildOptions(c,m);d.push({type:"hidden",pointer:{main:m,index:"connector"},value:a});d.push({type:"buttons",buttons:[{type:"save",label:"Save","function":function(){if(j)mist.data.config.protocols[b]=
m;else{if(!mist.data.config.protocols)mist.data.config.protocols=[];mist.data.config.protocols.push(m)}mist.send(function(){UI.navto("Protocols")},{config:mist.data.config})}},{type:"cancel",label:"Cancel","function":function(){UI.navto("Protocols")}}]});if("deps"in c&&c.deps!=""){$t=$("<span>").text("Dependencies:");$ul=$("<ul>");$t.append($ul);if(typeof c.deps=="string")c.deps=c.deps.split(", ");for(var f in c.deps){a=$("<li>").text(c.deps[f]+" ");$ul.append(a);typeof k[c.deps[f]]!="undefined"||
typeof k[c.deps[f]+".exe"]!="undefined"?a.append($("<span>").addClass("green").text("(Configured)")):a.append($("<span>").addClass("red").text("(Not yet configured)"))}d.unshift({type:"text",text:$t[0].innerHTML})}return UI.buildUI(d)},k={};for(f in mist.data.config.protocols)k[mist.data.config.protocols[f].connector]=1;if(j)m=d=mist.data.config.protocols[b],c.find("h2").append(' "'+d.connector+'"'),c.append(E(d.connector));else{c.html($("<h2>").text("New Protocol"));var m={},x=[];for(f in mist.data.capabilities.connectors)x.push([f,
f]);var F=$("<span>");c.append(UI.buildUI([{label:"Protocol",type:"select",select:x,"function":function(){F.html(E($(this).getval()))}}])).append(F)}break;case "Streams":if(!("capabilities"in mist.data)){c.html("Loading..");mist.send(function(){UI.navto(a)},{capabilities:!0});break}var f=$("<button>"),B=$("<span>").text("Loading..");c.append(UI.buildUI([{type:"help",help:"Here you can create, edit or delete new and existing streams. Go to stream preview or embed a video player on your website."},
$("<div>").css({width:"45.25em",display:"flex","justify-content":"flex-end"}).append(f).append($("<button>").text("Create a new stream").click(function(){UI.navto("Edit")}))])).append(B);if(""==b){var r=mist.stored.get();"viewmode"in r&&(b=r.viewmode)}f.text("Switch to "+("thumbnails"==b?"list":"thumbnail")+" view").click(function(){mist.stored.set("viewmode",b=="thumbnails"?"list":"thumbnails");UI.navto("Streams",b=="thumbnails"?"list":"thumbnails")});var Q=function(b,d,f){B.remove();switch(b){case "thumbnails":var e=
$("<div>").addClass("preview_icons"),g;g=f||[];d.sort();d.unshift("");B.remove();c.append($("<h2>").text(a)).append(UI.buildUI([{label:"Filter the streams",type:"datalist",datalist:d,pointer:{main:{},index:"stream"},help:"If you type something here, the box below will only show streams with names that contain your text.","function":function(){var a=$(this).val();e.children().each(function(){$(this).hide();$(this).attr("data-stream").indexOf(a)>-1&&$(this).show()})}}]));d.shift();c.append($("<span>").addClass("description").text("Choose a stream below.")).append(e);
for(var h in d){var b=d[h],i="",j=$("<button>").text("Delete").click(function(){var a=$(this).closest("div").attr("data-stream");if(confirm('Are you sure you want to delete the stream "'+a+'"?')){delete mist.data.streams[a];var b={};mist.data.LTS?b.deletestream=[a]:b.streams=mist.data.streams;mist.send(function(){UI.navto("Streams")},b)}}),l=$("<button>").text("Settings").click(function(){UI.navto("Edit",$(this).closest("div").attr("data-stream"))}),f=$("<button>").text("Preview").click(function(){UI.navto("Preview",
$(this).closest("div").attr("data-stream"))}),k=$("<button>").text("Embed").click(function(){UI.navto("Embed",$(this).closest("div").attr("data-stream"))}),n=$("<span>").addClass("image");if(b.indexOf("+")>-1){i=b.split("+");i=mist.data.streams[i[0]].source+i[1];l=j="";n.addClass("wildcard")}else{i=mist.data.streams[b].source;if(g.indexOf(b)>-1){k=f="";n.addClass("folder")}}e.append($("<div>").append($("<span>").addClass("streamname").text(b)).append(n).append($("<span>").addClass("description").text(i)).append($("<span>").addClass("button_container").append(l).append(j).append(f).append(k)).attr("title",
b).attr("data-stream",b))}break;default:var m=$("<tbody>").append($("<tr>").append("<td>").attr("colspan",6).text("Loading.."));h=$("<table>").html($("<thead>").html($("<tr>").html($("<th>").text("Stream name").attr("data-sort-type","string").addClass("sorting-asc")).append($("<th>").text("Source").attr("data-sort-type","string")).append($("<th>").text("Status").attr("data-sort-type","int")).append($("<th>").css("text-align","right").text("Connections").attr("data-sort-type","int")).append($("<th>")).append($("<th>")))).append(m);
c.append(h);h.stupidtable();var o=function(){var a=[],b;for(b in mist.data.active_streams)a.push({streams:[mist.data.active_streams[b]],fields:["clients"],start:-2});mist.send(function(){$.extend(true,p,mist.data.streams);var a=0;m.html("");d.sort();for(var b in d){var c=d[b],f;f=c in mist.data.streams?mist.data.streams[c]:p[c];var g=$("<td>").css("text-align","right").html($("<span>").addClass("description").text("Loading..")),e=0;if(typeof mist.data.totals!="undefined"&&typeof mist.data.totals[c]!=
"undefined"){var h=mist.data.totals[c].all_protocols.clients,e=0;if(h.length){for(a in h)e=e+h[a][1];e=Math.round(e/h.length)}}g.html(UI.format.number(e));if(e==0&&f.online==1)f.online=2;e=$("<td>").css("text-align","right").css("white-space","nowrap");(!("ischild"in f)||!f.ischild)&&e.html($("<button>").text("Settings").click(function(){UI.navto("Edit",$(this).closest("tr").data("index"))})).append($("<button>").text("Delete").click(function(){var a=$(this).closest("tr").data("index");if(confirm('Are you sure you want to delete the stream "'+
a+'"?')){delete mist.data.streams[a];var b={};mist.data.LTS?b.deletestream=[a]:b.streams=mist.data.streams;mist.send(function(){UI.navto("Streams")},b)}}));h=$("<span>").text(c);f.ischild&&h.css("padding-left","1em");var L=UI.format.status(f),i=$("<button>").text("Preview").click(function(){UI.navto("Preview",$(this).closest("tr").data("index"))}),j=$("<button>").text("Embed").click(function(){UI.navto("Embed",$(this).closest("tr").data("index"))});if("filesfound"in p[c]){L.html("");i="";g.html("");
j=""}m.append($("<tr>").data("index",c).html($("<td>").html(h).attr("title",c).addClass("overflow_ellipsis")).append($("<td>").text(f.source).attr("title",f.source).addClass("description").addClass("overflow_ellipsis").css("max-width","20em")).append($("<td>").data("sort-value",f.online).html(L)).append(g).append($("<td>").css("white-space","nowrap").html(i).append(j)).append(e));a++}},{totals:a,active_streams:true})},p=$.extend(true,{},mist.data.streams);if(mist.data.LTS){var q=0,t=0;for(g in mist.data.streams){h=
mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"];if(!h)break;if(mist.inputMatch(h.source_match,mist.data.streams[g].source)){p[g].source=p[g].source+"*";p[g].filesfound=null;mist.send(function(a,b){var c=b.stream,d;for(d in a.browse.files)for(var f in mist.data.capabilities.inputs)if(!(f.indexOf("Buffer")>=0||f.indexOf("Folder")>=0)&&mist.inputMatch(mist.data.capabilities.inputs[f].source_match,"/"+a.browse.files[d])){var e=c+"+"+a.browse.files[d],g=p,h=e,L=e,i=$.extend({},
mist.data.streams[c]);delete i.meta;delete i.error;i.online=2;i.name=L;i.ischild=true;g[h]=i;p[e].source=mist.data.streams[c].source+a.browse.files[d]}"files"in a.browse&&a.browse.files.length?p[c].filesfound=true:mist.data.streams[c].filesfound=false;t++;if(q==t){mist.send(function(){o()},{active_streams:true});UI.interval.set(function(){o()},5E3)}},{browse:mist.data.streams[g].source},{stream:g});q++}}if(q==0){mist.send(function(){o()},{active_streams:true});UI.interval.set(function(){o()},5E3)}}else{mist.send(function(){o()},
{active_streams:true});UI.interval.set(function(){o()},5E3)}}};if(mist.data.LTS){var R=0,aa=0,x={},ba=[];for(r in mist.data.streams)if(mist.inputMatch((mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"]).source_match,mist.data.streams[r].source))ba.push(r),mist.send(function(a,c){var d=c.stream,f;for(f in a.browse.files)for(var e in mist.data.capabilities.inputs)e.indexOf("Buffer")>=0||e.indexOf("Folder")>=0||mist.inputMatch(mist.data.capabilities.inputs[e].source_match,
"/"+a.browse.files[f])&&(x[d+"+"+a.browse.files[f]]=true);aa++;R==aa&&mist.send(function(){for(var a in mist.data.active_streams){var c=mist.data.active_streams[a].split("+");c.length>1&&c[0]in mist.data.streams&&(x[mist.data.active_streams[a]]=true)}x=Object.keys(x);x=x.concat(Object.keys(mist.data.streams));Q(b,x,ba)},{active_streams:true})},{browse:mist.data.streams[r].source},{stream:r}),R++;0==R&&mist.send(function(){var a=[],c;for(c in mist.data.active_streams){var d=mist.data.active_streams[c].split("+");
d.length>1&&d[0]in mist.data.streams&&(a[mist.data.active_streams[c]]=true)}mist.data.streams&&(a=a.concat(Object.keys(mist.data.streams)));a.sort();Q(b,a)},{active_streams:!0})}else Q(b,Object.keys(mist.data.streams));break;case "Edit":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a,b)},{capabilities:!0});c.append("Loading..");break}j=!1;""!=b&&(j=!0);if(j){var s=b,m=mist.data.streams[s];c.find("h2").append(' "'+s+'"')}else c.html($("<h2>").text("New Stream")),m={};
s=[];for(f in mist.data.capabilities.inputs)s.push(mist.data.capabilities.inputs[f].source_match);var K=$("<div>"),ca=function(a){if(!mist.data.streams)mist.data.streams={};mist.data.streams[m.name]=m;b!=m.name&&delete mist.data.streams[b];var c={};if(mist.data.LTS){c.addstream={};c.addstream[m.name]=m;if(b!=m.name)c.deletestream=[b]}else c.streams=mist.data.streams;if(m.stop_sessions&&b!=""){c.stop_sessions=b;delete m.stop_sessions}mist.send(function(){delete mist.data.streams[m.name].online;delete mist.data.streams[m.name].error;
UI.navto(a,a=="Preview"?m.name:"")},c)},da=$("<style>").text("button.saveandpreview { display: none; }");c.append(UI.buildUI([{label:"Stream name",type:"str",validate:["required","streamname"],pointer:{main:m,index:"name"},help:"Set the name this stream will be recognised by for players and/or stream pushing."},{label:"Source",type:"browse",filetypes:s,pointer:{main:m,index:"source"},help:"<p>Below is the explanation of the input methods for MistServer. Anything between brackets () will go to default settings if not specified.</p><table><tr><td>Input</td><td>Syntax</td><td>Explanation</td></tr> <tr><th>File</th><td>Linux/MacOS:&nbsp;/PATH/FILE<br>Windows:&nbsp;/cygdrive/DRIVE/PATH/FILE</td><td>For file input please specify the proper path and file.<br>Supported inputs are: DTSC, FLV, MP3. MistServer Pro has TS, MP4, ISMV added as input.</td></tr><th>Folder<br>(Pro&nbsp;only)</th><td>Linux/MacOS:&nbsp;/PATH/<br>Windows:&nbsp;/cygdrive/DRIVE/PATH/</td><td>A folder stream makes all the recognised files in the selected folder available as a stream.</td></tr><tr><th>RTMP</th><td>push://(IP)(@PASSWORD)</td><td>IP is white listed IP for pushing towards MistServer, if left empty all are white listed.<br>Password is the application under which to push to MistServer, if it doesn't match the stream will be rejected. Password is MistServer Pro only. <tr><th>RTSP<br>(Pro&nbsp;only)</th><td>push://(IP)(@PASSWORD)</td><td>IP is white listed IP for pushing towards MistServer, if left empty all are white listed.</td></tr> <tr><th>TS<br>(Pro&nbsp;only)</th><td>tsudp://(IP):PORT(/INTERFACE)</td><td>IP is the IP address used for this stream, multi-cast IP range is: 224.0.0.0 - 239.255.255.255. If IP is not set all IPs of the machine will be used.<br>PORT is the port you reserve for this stream on the chosen IP.<br>INTERFACE is the interface used, if left all interfaces will be used.</td></tr></table>",
"function":function(){var a=$(this).val();da.remove();if(a!=""){var b=null,d;for(d in mist.data.capabilities.inputs)if(typeof mist.data.capabilities.inputs[d].source_match!="undefined"&&mist.inputMatch(mist.data.capabilities.inputs[d].source_match,a)){b=d;break}if(b===null)K.html($("<h3>").text("Unrecognized input").addClass("red")).append($("<span>").text("Please edit the stream source.").addClass("red"));else{b=mist.data.capabilities.inputs[b];K.html($("<h3>").text(b.name+" Input options"));var f=
mist.convertBuildOptions(b,m);"always_match"in mist.data.capabilities.inputs[d]&&mist.inputMatch(mist.data.capabilities.inputs[d].always_match,a)&&f.push({label:"Always on",type:"checkbox",help:"Keep this input available at all times, even when there are no active viewers.",pointer:{main:m,index:"always_on"}});K.append(UI.buildUI(f));b.name=="Folder"&&c.append(da)}}}},{label:"Stop sessions",type:"checkbox",help:"When saving these stream settings, kill this stream's current connections.",LTSonly:!0,
pointer:{main:m,index:"stop_sessions"}},$("<br>"),{type:"custom",custom:K},$("<br>"),$("<h3>").text("Encryption"),{type:"help",help:"To enable encryption, the licence acquisition url must be entered, as well as either the content key or the key ID and seed.<br>Unsure how you should fill in your encryption or missing your preferred encryption? Please contact us."},{label:"License acquisition url",type:"str",LTSonly:!0,pointer:{main:m,index:"la_url"}},$("<br>"),{label:"Content key",type:"str",LTSonly:!0,
pointer:{main:m,index:"contentkey"}},{type:"text",text:" - or - "},{label:"Key ID",type:"str",LTSonly:!0,pointer:{main:m,index:"keyid"}},{label:"Key seed",type:"str",LTSonly:!0,pointer:{main:m,index:"keyseed"}},{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Streams")}},{type:"save",label:"Save","function":function(){ca("Streams")}},{type:"save",label:"Save and Preview","function":function(){ca("Preview")},classes:["saveandpreview"]}]}]));break;case "Preview":""==
b&&UI.navto("Streams");r=":8080";for(f in mist.data.config.protocols)if(d=mist.data.config.protocols[f],"HTTP"==d.connector||"HTTP.exe"==d.connector)r=d.port?":"+d.port:":8080";var s=parseURL(mist.user.host),M=s.protocol+s.host+r+"/",F=$("<div>").css({display:"flex","flex-flow":"row wrap"}),s="";-1==b.indexOf("+")&&(s=$("<button>").text("Settings").addClass("settings").click(function(){UI.navto("Edit",b)}));c.html($("<div>").addClass("bigbuttons").append(s).append($("<button>").text("Embed").addClass("embed").click(function(){UI.navto("Embed",
b)})).append($("<button>").addClass("cancel").addClass("return").text("Return").click(function(){UI.navto("Streams")}))).append($("<h2>").text('Preview of "'+b+'"')).append(F);var C=encodeURIComponent(b),f=$("<div>");F.append(f);var S=$("<div>"),N=$("<select>").append($("<option>").text("Automatic").val("")).change(function(){T()}),I=$("<select>").append($("<option>").text("Automatic").val("")).change(function(){T()}),s=UI.buildUI([{label:"Use player",type:"DOMfield",DOMfield:N,help:"Choose a player to preview"},
{label:"Use source",type:"DOMfield",DOMfield:I,help:"Choose an output type to preview"}]),G=$("<div>").addClass("mistvideo").text("Loading player..");f.append(G).append(S).append(s);var T=function(){G.html("");z.html("");var a={target:G[0],maxheight:window.innerHeight-$("header").height(),maxwidth:window.innerWidth-UI.elements.menu.width()-100,loop:true};if(N.val()!="")a.forcePlayer=N.val();if(I.val()!="")a.forceType=I.val();mistPlay(b,a)},z=$("<div>").addClass("player_log");f.append($("<div>").append($("<h3>").text("Player log:")).append(z));
G.on("log error",function(a){var b=false;z.height()+z.scrollTop()==z[0].scrollHeight&&(b=true);z.append($("<div>").append($("<span>").text("["+UI.format.time((new Date).getTime()/1E3)+"]").css("margin-right","0.5em")).append($("<span>").text(a.originalEvent.message)).addClass(a.type=="error"?"red":""));b&&z.scrollTop(z[0].scrollHeight)});var ea=function(){S.text("");var a=document.createElement("script");c.append(a);a.src=M+"player.js";a.onerror=function(){G.html("Failed to load player.js").append($("<button>").text("Reload").css("display",
"block").click(function(){ea()}))};a.onload=function(){for(var d in mistplayers)N.append($("<option>").text(mistplayers[d].name).val(d));T();G.on("initialized",function(){if(I.children().length<=1)for(var a in mistvideo[b].source){var c=UI.humanMime(mistvideo[b].source[a].type);I.append($("<option>").val(mistvideo[b].source[a].type).text(c?c+" ("+mistvideo[b].source[a].type+")":UI.format.capital(mistvideo[b].source[a].type)))}a=mistvideo[b].embedded[mistvideo[b].embedded.length-1];c=UI.humanMime(a.player.options.source.type);
S.html("You're watching "+(c?c+" <span class=description>("+a.player.options.source.type+")</span>":UI.format.capital(a.player.options.source.type))+" through "+mistplayers[a.selectedPlayer].name+".")});c[0].removeChild(a)}};ea();var f=$("<div>").append($("<h3>").text("Meta information")),O=$("<span>").text("Loading..");f.append(O);F.append(f);$.ajax({type:"GET",url:M+"json_"+C+".js",success:function(a){var b=a.meta;if(b){a=[];a.push({label:"Type",type:"span",value:b.live?"Live":"Pre-recorded (VoD)"});
"format"in b&&a.push({label:"Format",type:"span",value:b.format});b.live&&a.push({label:"Buffer window",type:"span",value:UI.format.addUnit(b.buffer_window,"ms")});var c={audio:{vheader:"Audio",labels:["Codec","Duration","Peak bitrate","Channels","Samplerate","Language"],content:[]},video:{vheader:"Video",labels:["Codec","Duration","Peak bitrate","Size","Framerate","Language"],content:[]},subtitle:{vheader:"Subtitles",labels:["Codec","Duration","Peak bitrate","Language"],content:[]}},d=Object.keys(b.tracks);
d.sort(function(a,b){a=a.split("_").pop();b=b.split("_").pop();return a-b});for(var f in d){var e=d[f],g=b.tracks[e];switch(g.type){case "audio":c.audio.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"),"lang"in g?g.lang:"unknown"]});break;case "video":c.video.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"),"lang"in g?g.lang:"unknown"]});break;case "subtitle":c.subtitle.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),"lang"in g?g.lang:"unknown"]})}}f=["audio","video","subtitle"];b=$("<div>").css({display:"flex","flex-flow":"row wrap","font-size":"0.9em"});for(e in f)c[f[e]].content.length&&b.append(UI.buildVheaderTable(c[f[e]]).css("width","auto"));a.push($("<span>").text("Tracks:"));a.push(b);O.html(UI.buildUI(a))}else O.html("No meta information available.")},error:function(){O.html("Error while retrieving stream info.")}});
break;case "Embed":""==b&&UI.navTo("Streams");s="";-1==b.indexOf("+")&&(s=$("<button>").addClass("settings").text("Settings").click(function(){UI.navto("Edit",b)}));c.html($("<div>").addClass("bigbuttons").append(s).append($("<button>").text("Preview").addClass("preview").click(function(){UI.navto("Preview",b)})).append($("<button>").addClass("cancel").addClass("return").text("Return").click(function(){UI.navto("Streams")}))).append($("<h2>").text('Embed "'+b+'"'));var P=$("<span>");c.append(P);C=
encodeURIComponent(b);s=parseURL(mist.user.host);r=":8080";for(f in mist.data.config.protocols)if(d=mist.data.config.protocols[f],"HTTP"==d.connector||"HTTP.exe"==d.connector)r=d.port?":"+d.port:":8080";var D=M=s.protocol+s.host+r+"/";otherhost&&(f=parseURL(otherhost),D=f.protocol+f.host+r+"/");var U={forcePlayer:"",forceType:"",controls:!0,autoplay:!0,loop:!1,width:"",height:"",maxwidth:"",maxheight:"",poster:"",urlappend:"",setTracks:{}},o=$.extend({},U),f=UI.stored.getOpts();"embedoptions"in f&&
(o=$.extend(o,f.embedoptions,!0),"object"!=typeof o.setTracks&&(o.setTracks={}));f={};switch(o.controls){case "stock":f.controls="stock";break;case !0:f.controls=1;break;case !1:f.controls=0}var v=function(){function a(b){switch(typeof b){case "string":return $.isNumeric(b)?b:'"'+b+'"';case "object":return JSON.stringify(b);default:return b}}UI.stored.saveOpt("embedoptions",o);for(var c=b+"_",d=12,f="";d--;){var g;g=Math.floor(Math.random()*62);g=g<10?g:g<36?String.fromCharCode(g+55):String.fromCharCode(g+
61);f=f+g}var c=c+f,d=['target: document.getElementById("'+c+'")'],e;for(e in o)o[e]!=U[e]&&(typeof o[e]!="object"||JSON.stringify(o[e])!=JSON.stringify(U[e]))&&d.push(e+": "+a(o[e]));e=[];e.push('<div class="mistvideo" id="'+c+'">');e.push(" <noscript>");e.push(' <a href="'+D+C+'.html" target="_blank">');e.push(" Click here to play this video");e.push(" </a>");e.push(" </noscript>");e.push(" <script>");e.push(" var a = function(){");e.push(' mistPlay("'+b+'",{');e.push(" "+
d.join(",\n "));e.push(" });");e.push(" };");e.push(" if (!window.mistplayers) {");e.push(' var p = document.createElement("script");');e.push(' p.src = "'+D+'player.js"');e.push(" document.head.appendChild(p);");e.push(" p.onload = a;");e.push(" }");e.push(" else { a(); }");e.push(" <\/script>");e.push("</div>");return e.join("\n")},V=$("<span>").text("Loading.."),r=v(o),H=$("<div>").text("Loading..").css("display","flex");P.append($("<span>").addClass("input_container").append($("<label>").addClass("UIelement").append($("<span>").addClass("label").text("Use a different host:")).append($("<span>").addClass("field_container").append($("<input>").attr("type",
"text").addClass("field").val(otherhost?otherhost:s.protocol+s.host)).append($("<span>").addClass("unit").append($("<button>").text("Apply").click(function(){otherhost=$(this).closest("label").find("input").val();UI.navto("Embed",b)})))))).append(UI.buildUI([$("<h3>").text("Urls"),{label:"Stream info json",type:"str",value:D+"json_"+C+".js",readonly:!0,clipboard:!0,help:"Information about this stream as a json page."},{label:"Stream info script",type:"str",value:D+"info_"+C+".js",readonly:!0,clipboard:!0,
help:"This script loads information about this stream into a mistvideo javascript object."},{label:"HTML page",type:"str",value:D+C+".html",readonly:!0,qrcode:!0,clipboard:!0,help:"A basic html containing the embedded stream."},$("<h3>").text("Embed code"),{label:"Embed code",type:"textarea",value:r,rows:r.split("\n").length+3,readonly:!0,classes:["embed_code"],clipboard:!0,help:"Include this code on your webpage to embed the stream. The options below can be used to configure how your content is displayed."},
$("<h4>").text("Embed code options (optional)").css("margin-top",0),{type:"help",help:"Use these controls to customise what this embedded video will look like.<br>Not all players have all of these options."},{label:"Force player",type:"select",select:[["","Automatic"]],pointer:{main:o,index:"forcePlayer"},classes:["forcePlayer"],"function":function(){o.forcePlayer=$(this).getval();$(".embed_code").setval(v(o))},help:"Only use this particular player."},{label:"Force source",type:"select",select:[["",
"Automatic"]],pointer:{main:o,index:"forceType"},classes:["forceType"],"function":function(){o.forceType=$(this).getval();$(".embed_code").setval(v(o))},help:"Only use this particular source."},{label:"Controls",type:"select",select:[["1","MistServer Controls"],["stock","Player controls"],["0","None"]],pointer:{main:f,index:"controls"},"function":function(){o.controls=$(this).getval()==1;switch($(this).getval()){case 0:o.controls=false;break;case 1:o.controls=true;break;case "stock":o.controls="stock"}$(".embed_code").setval(v(o))},
help:"The type of controls that should be shown."},{label:"Autoplay",type:"checkbox",pointer:{main:o,index:"autoplay"},"function":function(){o.autoplay=$(this).getval();$(".embed_code").setval(v(o))},help:"Whether or not the video should play as the page is loaded."},{label:"Loop",type:"checkbox",pointer:{main:o,index:"loop"},"function":function(){o.loop=$(this).getval();$(".embed_code").setval(v(o))},help:"If the video should restart when the end is reached."},{label:"Force width",type:"int",min:0,
unit:"px",pointer:{main:o,index:"width"},"function":function(){o.width=$(this).getval();$(".embed_code").setval(v(o))},help:"Enforce a fixed width."},{label:"Force height",type:"int",min:0,unit:"px",pointer:{main:o,index:"height"},"function":function(){o.height=$(this).getval();$(".embed_code").setval(v(o))},help:"Enforce a fixed height."},{label:"Maximum width",type:"int",min:0,unit:"px",pointer:{main:o,index:"maxwidth"},"function":function(){o.maxwidth=$(this).getval();$(".embed_code").setval(v(o))},
help:"The maximum width this video can use."},{label:"Maximum height",type:"int",min:0,unit:"px",pointer:{main:o,index:"maxheight"},"function":function(){o.maxheight=$(this).getval();$(".embed_code").setval(v(o))},help:"The maximum height this video can use."},{label:"Poster",type:"str",pointer:{main:o,index:"poster"},"function":function(){o.poster=$(this).getval();$(".embed_code").setval(v(o))},help:"URL to an image that is displayed when the video is not playing."},{label:"Video URL addition",type:"str",
pointer:{main:o,index:"urlappend"},help:"The embed script will append this string to the video url, useful for sending through params.",classes:["embed_code_forceprotocol"],"function":function(){o.urlappend=$(this).getval();$(".embed_code").setval(v(o))}},{label:"Preselect tracks",type:"DOMfield",DOMfield:H,help:"Pre-select these tracks."},$("<h3>").text("Protocol stream urls"),V]));$.ajax({type:"GET",url:D+"json_"+C+".js",success:function(a){var b=[],c=P.find(".forceType"),d;for(d in a.source){var e=
a.source[d],g=UI.humanMime(e.type);b.push({label:g?g+" <span class=description>("+e.type+")</span>":UI.format.capital(e.type),type:"str",value:e.url,readonly:true,qrcode:true,clipboard:true});g=UI.humanMime(e.type);c.append($("<option>").text(g?g+" ("+e.type+")":UI.format.capital(e.type)).val(e.type))}V.html(UI.buildUI(b));H.html("");b={};for(d in a.meta.tracks){c=a.meta.tracks[d];c.type!="audio"&&c.type!="video"||(c.type in b?b[c.type].push([c.trackid,UI.format.capital(c.type)+" track "+(b[c.type].length+
1)]):b[c.type]=[["",UI.format.capital(c.type)+" track 1"]])}if(Object.keys(b).length){H.closest("label").show();for(d in b){a=$("<select>").attr("data-type",d).css("flex-grow","1").change(function(){$(this).val()==""?delete o.setTracks[$(this).attr("data-type")]:o.setTracks[$(this).attr("data-type")]=$(this).val();$(".embed_code").setval(v(o))});H.append(a);b[d].push([-1,"No "+d]);for(var f in b[d])a.append($("<option>").val(b[d][f][0]).text(b[d][f][1]));if(d in o.setTracks){a.val(o.setTracks[d]);
if(a.val()==null){a.val("");delete o.setTracks[d];$(".embed_code").setval(v(o))}}}}else H.closest("label").hide()},error:function(){V.html("Error while retrieving stream info.");H.closest("label").hide();o.setTracks={}}});f=document.createElement("script");f.src=M+"player.js";document.head.appendChild(f);f.onload=function(){var a=P.find(".forcePlayer"),b;for(b in mistplayers)a.append($("<option>").text(mistplayers[b].name).val(b));document.head.removeChild(this)};f.onerror=function(){document.head.removeChild(this)};
break;case "Push":var y=$("<div>").text("Loading..");c.append(y);mist.send(function(a){function b(a){setTimeout(function(){mist.send(function(c){var d=false;if("push_list"in c&&c.push_list&&c.push_list.length){var d=true,f;for(f in c.push_list)if(a.indexOf(c.push_list[f][0])>-1){d=false;break}}else d=true;if(d)for(f in a)e.find("tr[data-pushid="+a[f]+"]").remove();else b()},{push_list:1})},1E3)}function c(d,f){var g=$("<span>");d.length>=4&&d[2]!=d[3]?g.append($("<span>").text(d[2])).append($("<span>").html("&#187").addClass("unit").css("margin",
"0 0.5em")).append($("<span>").text(d[3])):g.append($("<span>").text(d[2]));var h=$("<td>").append($("<button>").text(f=="Automatic"?"Remove":"Stop").click(function(){if(confirm("Are you sure you want to "+$(this).text().toLowerCase()+" this push?\n"+d[1]+" to "+d[2])){var a=$(this).closest("tr");a.html($("<td colspan=99>").html($("<span>").addClass("red").text(f=="Automatic"?"Removing..":"Stopping..")));f=="Automatic"?mist.send(function(){a.remove()},{push_auto_remove:{stream:d[1],target:d[2]}}):
mist.send(function(){b([d[0]])},{push_stop:[d[0]]})}}));f=="Automatic"&&h.append($("<button>").text("Remove and stop pushes").click(function(){if(confirm("Are you sure you want to remove this automatic push, and also stop all pushes matching it?\n"+d[1]+" to "+d[2])){var c=$(this).closest("tr");c.html($("<td colspan=99>").html($("<span>").addClass("red").text("Removing and stopping..")));var f=[],g;for(g in a.push_list)if(d[1]==a.push_list[g][1]&&d[2]==a.push_list[g][2]){f.push(a.push_list[g][0]);
e.find("tr[data-pushid="+a.push_list[g][0]+"]").html($("<td colspan=99>").html($("<span>").addClass("red").text("Stopping..")))}mist.send(function(){c.remove();b(f)},{push_auto_remove:{stream:d[1],target:d[2]},push_stop:f})}}));return $("<tr>").attr("data-pushid",d[0]).append($("<td>").text(d[1])).append($("<td>").append(g.children())).append(h)}y.html("");var d=a.push_settings;d||(d={});y.append(UI.buildUI([{type:"help",help:"You can push streams to files or other servers, allowing them to broadcast your stream as well."},
$("<h3>").text("Settings"),{label:"Delay before retry",unit:"s",type:"int",min:0,help:"How long the delay should be before MistServer retries an automatic push.<br>If set to 0, it does not retry.","default":0,pointer:{main:d,index:"wait"},LTSonly:1},{label:"Maximum retries",unit:"/s",type:"int",min:0,help:"The maximum amount of retries per second (for all automatic pushes).<br>If set to 0, there is no limit.","default":0,pointer:{main:d,index:"maxspeed"},LTSonly:1},{type:"buttons",buttons:[{type:"save",
label:"Save","function":function(){mist.send(function(){UI.navto("Push")},{push_settings:d})}}]}]));var e=$("<table>").append($("<tr>").append($("<th>").text("Stream")).append($("<th>").text("Target")).append($("<th>"))),g=e.clone();if("push_list"in a)for(var f in a.push_list)e.append(c(a.push_list[f],"Manual"));if("push_auto_list"in a)for(f in a.push_auto_list)g.append(c([-1,a.push_auto_list[f][0],a.push_auto_list[f][1]],"Automatic"));y.append($("<h3>").text("Automatic pushes")).append($("<button>").text("Add an automatic push").click(function(){UI.navto("Start Push",
"auto")}));g.find("tr").length==1?y.append($("<div>").text("No automatic pushes have been configured.").addClass("text").css("margin-top","0.5em")):y.append(g);y.append($("<h3>").text("Pushes")).append($("<button>").text("Start a push").click(function(){UI.navto("Start Push")}));if(e.find("tr").length==1)y.append($("<div>").text("No pushes are active.").addClass("text").css("margin-top","0.5em"));else{var g=[],h=[],i=$("<select>").css("margin-left","0.5em").append($("<option>").text("Any stream").val("")),
j=$("<select>").css("margin-left","0.5em").append($("<option>").text("Any target").val(""));for(f in a.push_list){g.indexOf(a.push_list[f][1])==-1&&g.push(a.push_list[f][1]);h.indexOf(a.push_list[f][2])==-1&&h.push(a.push_list[f][2])}g.sort();h.sort();for(f in g)i.append($("<option>").text(g[f]));for(f in h)j.append($("<option>").text(h[f]));y.append($("<button>").text("Stop all pushes").click(function(){var c=[],d;for(d in a.push_list)c.push(a.push_list[d][0]);if(c.length!=0&&confirm("Are you sure you want to stop all pushes?")){mist.send(function(){b(c)},
{push_stop:c});e.find("tr:not(:first-child)").html($("<td colspan=99>").append($("<span>").addClass("red").text("Stopping..")));$(this).remove()}})).append($("<label>").css("margin-left","1em").append($("<span>").text("Stop all pushes that match: ").css("font-size","0.9em")).append(i).append($("<span>").css("margin-left","0.5em").text("and").css("font-size","0.9em")).append(j).append($("<button>").css("margin-left","0.5em").text("Apply").click(function(){var c=i.val(),d=j.val();if(c==""&&d=="")return alert("Looks like you want to stop all pushes. Maybe you should use that button?");
var f={},g;for(g in a.push_list)if((c==""||a.push_list[g][1]==c)&&(d==""||a.push_list[g][2]==d))f[a.push_list[g][0]]=a.push_list[g];if(Object.keys(f).length==0)return alert("No matching pushes.");c="Are you sure you want to stop these pushes?\n\n";for(g in f)c=c+(f[g][1]+" to "+f[g][2]+"\n");if(confirm(c)){f=Object.keys(f);mist.send(function(){b(f)},{push_stop:f});for(g in f)e.find("tr[data-pushid="+f[g]+"]").html($("<td colspan=99>").html($("<span>").addClass("red").text("Stopping..")))}}))).append(e)}},
{push_settings:1,push_list:1,push_auto_list:1});break;case "Start Push":if(!("capabilities"in mist.data)){c.append("Loading Mist capabilities..");mist.send(function(){UI.navto("Start Push",b)},{capabilities:1});break}var u,W=function(){var a=[],d;for(d in mist.data.capabilities.connectors){var f=mist.data.capabilities.connectors[d];"push_urls"in f&&(a=a.concat(f.push_urls))}b=="auto"&&c.find("h2").text("Add automatic push");var g={};c.append(UI.buildUI([{label:"Stream name",type:"str",help:"This may either be a full stream name, a partial wildcard stream name, or a full wildcard stream name.<br>For example, given the stream <i>a</i> you can use:<ul><li><i>a</i>: the stream configured as <i>a</i></li><li><i>a+</i>: all streams configured as <i>a</i> with a wildcard behind it, but not <i>a</i> itself</li><li><i>a+b</i>: only the version of stream <i>a</i> that has wildcard <i>b</i></li></ul>",
pointer:{main:g,index:"stream"},validate:["required",function(a){a=a.split("+");a=a[0];return a in mist.data.streams?false:{msg:"'"+a+"' is not a stream name.",classes:["red"]}}],datalist:u,LTSonly:1},{label:"Target",type:"str",help:"Where the stream will be pushed to.<br>Valid formats:<ul><li>"+a.join("</li><li>")+"</li></ul> Valid text replacements:<ul><li>$stream - inserts the stream name used to push to MistServer</li><li>$day - inserts the current day number</li><li>$month - inserts the current month number</li><li>$year - inserts the current year number</li><li>$hour - inserts the hour timestamp when stream was received</li><li>$minute - inserts the minute timestamp the stream was received</li><li>$seconds - inserts the seconds timestamp when the stream was received</li><li>$datetime - inserts $year.$month.$day.$hour.$minute.$seconds timestamp when the stream was received</li>",
pointer:{main:g,index:"target"},validate:["required",function(b){for(var c in a)if(mist.inputMatch(a[c],b))return false;return{msg:"Does not match a valid target.<br>Valid formats:<ul><li>"+a.join("</li><li>")+"</li></ul>",classes:["red"]}}],LTSonly:1},{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Push")}},{type:"save",label:"Save","function":function(){var a={};a[b=="auto"?"push_auto_add":"push_start"]=g;mist.send(function(){UI.navto("Push")},a)}}]}]))};mist.data.LTS?
mist.send(function(a){(u=a.active_streams)||(u=[]);var a=[],b;for(b in u)u[b].indexOf("+")!=-1&&a.push(u[b].replace(/\+.*/,"")+"+");u=u.concat(a);var c=0,d=0;for(b in mist.data.streams){u.push(b);if(mist.inputMatch(mist.data.capabilities.inputs.Folder.source_match,mist.data.streams[b].source)){u.push(b+"+");mist.send(function(a,b){var f=b.stream,g;for(g in a.browse.files)for(var e in mist.data.capabilities.inputs)e.indexOf("Buffer")>=0||e.indexOf("Folder")>=0||mist.inputMatch(mist.data.capabilities.inputs[e].source_match,
"/"+a.browse.files[g])&&u.push(f+"+"+a.browse.files[g]);d++;if(c==d){u=u.filter(function(a,b,c){return c.lastIndexOf(a)===b}).sort();W()}},{browse:mist.data.streams[b].source},{stream:b});c++}}if(c==d){u=u.filter(function(a,b,c){return c.lastIndexOf(a)===b}).sort();W()}},{active_streams:1}):(u=Object.keys(mist.data.streams),W());break;case "Triggers":"triggers"in mist.data.config||(mist.data.config.triggers={});g=$("<tbody>");r=$("<table>").html($("<thead>").html($("<tr>").html($("<th>").text("Trigger on").attr("data-sort-type",
"string").addClass("sorting-asc")).append($("<th>").text("Applies to").attr("data-sort-type","string")).append($("<th>").text("Handler").attr("data-sort-type","string")).append($("<th>")))).append(g);c.append(UI.buildUI([{type:"help",help:"Triggers are the system you can use to react to events that occur inside MistServer. These allow you to block specific users, redirect streams, keep tabs on what is being pushed where, etcetera. For full documentation, please refer to the developer documentation section on the MistServer website."}])).append($("<button>").text("New trigger").click(function(){UI.navto("Edit Trigger")})).append(r);
r.stupidtable();r=mist.data.config.triggers;for(f in r)for(s in r[f])g.append($("<tr>").attr("data-index",f+","+s).append($("<td>").text(f)).append($("<td>").text(r[f][s][2].join(", "))).append($("<td>").text(r[f][s][0])).append($("<td>").html($("<button>").text("Edit").click(function(){UI.navto("Edit Trigger",$(this).closest("tr").attr("data-index"))})).append($("<button>").text("Delete").click(function(){var a=$(this).closest("tr").attr("data-index").split(",");if(confirm("Are you sure you want to delete this "+
a[0]+" trigger?")){mist.data.config.triggers[a[0]].splice(a[1],1);mist.data.config.triggers[a[0]].length==0&&delete mist.data.config.triggers[a[0]];mist.send(function(){UI.navto("Triggers")},{config:mist.data.config})}}))));break;case "Edit Trigger":"triggers"in mist.data.config||(mist.data.config.triggers={});b?(b=b.split(","),f=mist.data.config.triggers[b[0]][b[1]],m={triggeron:b[0],appliesto:f[2],url:f[0],async:f[1],"default":f[3]}):(c.html($("<h2>").text("New Trigger")),m={});c.append(UI.buildUI([{label:"Trigger on",
pointer:{main:m,index:"triggeron"},help:"For what event this trigger should activate.",type:"select",select:[["SYSTEM_START","SYSTEM_START: after MistServer boot"],["SYSTEM_STOP","SYSTEM_STOP: right before MistServer shutdown"],["SYSTEM_CONFIG","SYSTEM_CONFIG: after MistServer configurations have changed"],["OUTPUT_START","OUTPUT_START: right after the start command has been send to a protocol"],["OUTPUT_STOP","OUTPUT_STOP: right after the close command has been send to a protocol "],["STREAM_ADD",
"STREAM_ADD: right before new stream configured"],["STREAM_CONFIG","STREAM_CONFIG: right before a stream configuration has changed"],["STREAM_REMOVE","STREAM_REMOVE: right before a stream has been deleted"],["STREAM_SOURCE","STREAM_SOURCE: right before stream source is loaded"],["STREAM_LOAD","STREAM_LOAD: right before stream input is loaded in memory"],["STREAM_READY","STREAM_READY: when the stream input is loaded and ready for playback"],["STREAM_UNLOAD","STREAM_UNLOAD: right before the stream input is removed from memory"],
["STREAM_PUSH","STREAM_PUSH: right before an incoming push is accepted"],["STREAM_TRACK_ADD","STREAM_TRACK_ADD: right before a track will be added to a stream; e.g.: additional push received"],["STREAM_TRACK_REMOVE","STREAM_TRACK_REMOVE: right before a track will be removed track from a stream; e.g.: push timeout"],["STREAM_BUFFER","STREAM_BUFFER: when a buffer changes between mostly full or mostly empty"],["RTMP_PUSH_REWRITE","RTMP_PUSH_REWRITE: allows rewriting of RTMP push URLs from external to internal representation before further parsing"],
["PUSH_OUT_START","PUSH_OUT_START: before recording/pushing, allow target changes."],["CONN_OPEN","CONN_OPEN: right after a new incoming connection has been received"],["CONN_CLOSE","CONN_CLOSE: right after a connection has been closed"],["CONN_PLAY","CONN_PLAY: right before a stream playback of a connection"],["USER_NEW","USER_NEW: A new user connects that hasn't been allowed or denied access before"]],LTSonly:!0,"function":function(){switch($(this).getval()){case "SYSTEM_START":case "SYSTEM_STOP":case "SYSTEM_CONFIG":case "OUTPUT_START":case "OUTPUT_STOP":case "RTMP_PUSH_REWRITE":$("[name=appliesto]").setval([]).closest(".UIelement").hide();
break;default:$("[name=appliesto]").closest(".UIelement").show()}}},{label:"Applies to",pointer:{main:o,index:"appliesto"},help:"For triggers that can apply to specific streams, this value decides what streams they are triggered for. (none checked = always triggered)",type:"checklist",checklist:Object.keys(mist.data.streams),LTSonly:!0},$("<br>"),{label:"Handler (URL or executable)",help:"This can be either an HTTP URL or a full path to an executable.",pointer:{main:o,index:"url"},validate:["required"],
type:"str",LTSonly:!0},{label:"Blocking",type:"checkbox",help:"If checked, pauses processing and uses the response of the handler. If the response does not start with 1, true, yes or cont, further processing is aborted. If unchecked, processing is never paused and the response is not checked.",pointer:{main:o,index:"async"},LTSonly:!0},{label:"Default response",type:"str",help:"For blocking requests, the default response in case the handler cannot be executed for any reason.",pointer:{main:o,index:"default"},
LTSonly:!0},{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Triggers")}},{type:"save",label:"Save","function":function(){c&&mist.data.config.triggers[c[0]].splice(c[1],1);var a=[o.url,o.async?true:false,typeof o.appliesto!="undefined"?o.appliesto:[]];typeof o["default"]!="undefined"&&a.push(o["default"]);o.triggeron in mist.data.config.triggers||(mist.data.config.triggers[o.triggeron]=[]);mist.data.config.triggers[o.triggeron].push(a);mist.send(function(){UI.navto("Triggers")},
{config:mist.data.config})}}]}]));$("[name=triggeron]").trigger("change");break;case "Logs":var Z=$("<button>").text("Refresh now").click(function(){$(this).text("Loading..");mist.send(function(){R();Z.text("Refresh now")})}).css("padding","0.2em 0.5em").css("flex-grow",0);d.append(UI.buildUI([{type:"help",help:"Here you have an overview of all edited settings within MistServer and possible warnings or errors MistServer has encountered. MistServer stores up to 100 logs at a time."},{label:"Refresh every",
type:"select",select:[[10,"10 seconds"],[30,"30 seconds"],[60,"minute"],[300,"5 minutes"]],value:30,"function":function(){UI.interval.clear();UI.interval.set(function(){mist.send(function(){R()})},$(this).val()*1E3)},help:"How often the table below should be updated."},{label:"..or",type:"DOMfield",DOMfield:Z,help:"Instantly refresh the table below."}]));d.append($("<button>").text("Purge logs").click(function(){mist.send(function(){mist.data.log=[];UI.navto("Logs")},{clearstatlogs:true})}));h=$("<tbody>").css("font-size",
"0.9em");d.append($("<table>").append(h));var ba=function(a){var b=$("<span>").text(a);switch(a){case "WARN":b.addClass("orange");break;case "ERROR":case "FAIL":b.addClass("red")}return b},R=function(){var a=mist.data.log;if(a){a.length>=2&&a[0][0]<a[a.length-1][0]&&a.reverse();h.html("");for(var b in a)h.append($("<tr>").html($("<td>").text(UI.format.dateTime(a[b][0],"long")).css("white-space","nowrap")).append($("<td>").html(ba(a[b][1])).css("text-align","center")).append($("<td>").text(a[b][2]).css("text-align",
"left")))}};R();break;case "Statistics":var B=$("<span>").text("Loading..");d.append(B);var o={},w=mist.stored.get().graphs?$.extend(!0,{},mist.stored.get().graphs):{},I={};for(q in mist.data.streams)I[q]=!0;for(q in mist.data.active_streams)I[mist.data.active_streams[q]]=!0;var I=Object.keys(I).sort(),S=[];for(q in mist.data.config.protocols)S.push(mist.data.config.protocols[q].connector);S.sort();mist.send(function(){UI.plot.datatype.templates.cpuload.cores=0;for(var a in mist.data.capabilities.cpu)UI.plot.datatype.templates.cpuload.cores=
UI.plot.datatype.templates.cpuload.cores+mist.data.capabilities.cpu[a].cores;B.html(UI.buildUI([{type:"help",help:"Here you will find the MistServer stream statistics, you can select various categories yourself. All statistics are live: up to five minutes are saved."},$("<h3>").text("Select the data to display"),{label:"Add to",type:"select",select:[["new","New graph"]],pointer:{main:o,index:"graph"},classes:["graph_ids"],"function":function(){if($(this).val()){var a=B.find(".graph_xaxis"),b=B.find(".graph_id");
if($(this).val()=="new"){a.children("option").prop("disabled",false);b.setval("Graph "+(Object.keys(w).length+1)).closest("label").show()}else{var c=w[$(this).val()].xaxis;a.children("option").prop("disabled",true).filter('[value="'+c+'"]').prop("disabled",false);b.closest("label").hide()}a.children('option[value="'+a.val()+'"]:disabled').length&&a.val(a.children("option:enabled").first().val());a.trigger("change")}}},{label:"Graph id",type:"str",pointer:{main:o,index:"id"},classes:["graph_id"],validate:[function(a){return a in
w?{msg:"This graph id has already been used. Please enter something else.",classes:["red"]}:false}]},{label:"Axis type",type:"select",select:[["time","Time line"]],pointer:{main:o,index:"xaxis"},value:"time",classes:["graph_xaxis"],"function":function(){$s=B.find(".graph_datatype");switch($(this).getval()){case "coords":$s.children("option").prop("disabled",true).filter('[value="coords"]').prop("disabled",false);break;case "time":$s.children("option").prop("disabled",false).filter('[value="coords"]').prop("disabled",
true)}if(!$s.val()||$s.children('option[value="'+$s.val()+'"]:disabled').length){$s.val($s.children("option:enabled").first().val());$s.trigger("change")}}},{label:"Data type",type:"select",select:[["clients","Connections"],["upbps","Bandwidth (up)"],["downbps","Bandwidth (down)"],["cpuload","CPU use"],["memload","Memory load"],["coords","Client location"]],pointer:{main:o,index:"datatype"},classes:["graph_datatype"],"function":function(){$s=B.find(".graph_origin");switch($(this).getval()){case "cpuload":case "memload":$s.find("input[type=radio]").not('[value="total"]').prop("disabled",
true);$s.find('input[type=radio][value="total"]').prop("checked",true);break;default:$s.find("input[type=radio]").prop("disabled",false)}}},{label:"Data origin",type:"radioselect",radioselect:[["total","All"],["stream","The stream:",I],["protocol","The protocol:",S]],pointer:{main:o,index:"origin"},value:["total"],classes:["graph_origin"]},{type:"buttons",buttons:[{label:"Add data set",type:"save","function":function(){var a;if(o.graph=="new"){a=UI.plot.addGraph(o,b);w[a.id]=a;B.find("select.graph_ids").append($("<option>").text(a.id)).val(a.id).trigger("change")}else a=
w[o.graph];var c=UI.plot.datatype.getOptions({datatype:o.datatype,origin:o.origin});a.datasets.push(c);UI.plot.save(a);UI.plot.go(w)}}]}]));var b=$("<div>").addClass("graph_container");d.append(b);var c=B.find("select.graph_ids");for(a in w){var e=UI.plot.addGraph(w[a],b);c.append($("<option>").text(e.id)).val(e.id);var g=[],f;for(f in w[a].datasets){var h=UI.plot.datatype.getOptions({datatype:w[a].datasets[f].datatype,origin:w[a].datasets[f].origin});g.push(h)}e.datasets=g;w[e.id]=e}c.trigger("change");
UI.plot.go(w);UI.interval.set(function(){UI.plot.go(w)},1E4)},{active_streams:!0,capabilities:!0});break;case "Server Stats":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a)},{capabilities:!0});d.append("Loading..");break}var T=$("<table>"),U=$("<table>"),l={vheader:"CPUs",labels:["Model","Processor speed","Amount of cores","Amount of threads"],content:[]};for(q in mist.data.capabilities.cpu)r=mist.data.capabilities.cpu[q],l.content.push({header:"CPU #"+(Number(q)+1),
body:[r.model,UI.format.addUnit(UI.format.number(r.mhz),"MHz"),r.cores,r.threads]});var l=UI.buildVheaderTable(l),aa=function(){var a=mist.data.capabilities.mem,b=mist.data.capabilities.load,a={vheader:"Memory",labels:["Used","Cached","Available","Total"],content:[{header:"Physical memory",body:[UI.format.bytes(a.used*1048576)+" ("+UI.format.addUnit(b.memory,"%")+")",UI.format.bytes(a.cached*1048576),UI.format.bytes(a.free*1048576),UI.format.bytes(a.total*1048576)]},{header:"Swap memory",body:[UI.format.bytes((a.swaptotal-
a.swapfree)*1048576),UI.format.addUnit("","N/A"),UI.format.bytes(a.swapfree*1048576),UI.format.bytes(a.swaptotal*1048576)]}]},a=UI.buildVheaderTable(a);T.replaceWith(a);T=a;b={vheader:"Load average",labels:["CPU use","1 minute","5 minutes","15 minutes"],content:[{header:"&nbsp;",body:[UI.format.addUnit(UI.format.number(mist.data.capabilities.cpu_use/10),"%"),UI.format.number(b.one/100),UI.format.number(b.five/100),UI.format.number(b.fifteen/100)]}]};b=UI.buildVheaderTable(b);U.replaceWith(b);U=b};
aa();d.append(UI.buildUI([{type:"help",help:"You can find general server statistics here. Note that memory and CPU usage is for your entire machine, not just MistServer."}])).append($("<table>").css("width","auto").addClass("nolay").append($("<tr>").append($("<td>").append(T)).append($("<td>").append(U))).append($("<tr>").append($("<td>").append(l).attr("colspan",2))));UI.interval.set(function(){mist.send(function(){aa()},{capabilities:true})},3E4);break;case "Email for Help":l=$.extend({},mist.data);
delete l.statistics;delete l.totals;delete l.clients;delete l.capabilities;l=JSON.stringify(l);l="Version: "+mist.data.config.version+"\n\nConfig:\n"+l;o={};d.append(UI.buildUI([{type:"help",help:"You can use this form to email MistServer support if you're having difficulties.<br>A copy of your server config file will automatically be included."},{type:"str",label:"Your name",validate:["required"],pointer:{main:o,index:"name"},value:mist.user.name},{type:"email",label:"Your email address",validate:["required"],
pointer:{main:o,index:"email"}},{type:"hidden",value:"Integrated Help",pointer:{main:o,index:"subject"}},{type:"hidden",value:"-",pointer:{main:o,index:"company"}},{type:"textarea",rows:20,label:"Your message",validate:["required"],pointer:{main:o,index:"message"}},{type:"textarea",rows:20,label:"Your config file",readonly:!0,value:l,pointer:{main:o,index:"configfile"}},{type:"buttons",buttons:[{type:"save",label:"Send","function":function(a){$(a).text("Sending..");$.ajax({type:"POST",url:"http://mistserver.org/contact?skin=plain",
data:o,success:function(a){a=$("<span>").html(a);a.find("script").remove();d.html(a[0].innerHTML)}})}}]}]));break;case "Disconnect":mist.user.password="";delete mist.user.authstring;delete mist.user.loggedin;UI.navto("Login");break;default:d.append($("<p>").text("This tab does not exist."))}}};"origin"in location||(location.origin=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""));
var mist={data:{},user:{name:"",password:"",host:location.origin+location.pathname.replace(/\/+$/,"")+"/api"},send:function(a,c,e){var c=c||{},e=e||{},e=$.extend(true,{timeOut:3E4,sendData:c},e),b={authorize:{password:mist.user.authstring?MD5(MD5(mist.user.password)+mist.user.authstring):"",username:mist.user.name}};$.extend(true,b,c);log("Send",$.extend(true,{},c));b={url:mist.user.host,type:"POST",data:{command:JSON.stringify(b)},dataType:"jsonp",crossDomain:true,timeout:e.timeout*1E3,async:true,
error:function(b,d){delete mist.user.loggedin;if(!e.hide){switch(d){case "timeout":d=$("<i>").text("The connection timed out. ");break;case "abort":d=$("<i>").text("The connection was aborted. ");break;default:d=$("<i>").text(d+". ").css("text-transform","capitalize")}$("#message").addClass("red").text("An error occurred while attempting to communicate with MistServer:").append($("<br>")).append(d).append($("<a>").text("Send server request again").click(function(){mist.send(a,c,e)}))}UI.navto("Login")},
success:function(b){log("Receive",$.extend(true,{},b),"as reply to",e.sendData);delete mist.user.loggedin;switch(b.authorize.status){case "OK":if("streams"in b)if(b.streams)if("incomplete list"in b.streams){delete b.streams["incomplete list"];$.extend(mist.data.streams,b.streams)}else mist.data.streams=b.streams;else mist.data.streams={};var d=$.extend({},b),f=["config","capabilities","ui_settings","LTS","active_streams","browse","log","totals"],p;for(p in d)f.indexOf(p)==-1&&delete d[p];$.extend(true,
mist.data,d);mist.user.loggedin=true;UI.elements.connection.status.text("Connected").removeClass("red").addClass("green");UI.elements.connection.user_and_host.text(mist.user.name+" @ "+mist.user.host);UI.elements.connection.msg.removeClass("red").text("Last communication with the server at "+UI.format.time((new Date).getTime()/1E3));b.LTS&&UI.elements.menu.find(".LTSonly").removeClass("LTSonly");if(b.log){d=b.log[b.log.length-1];UI.elements.connection.msg.append($("<br>")).append("Last log entry: "+
UI.format.time(d[0])+" ["+d[1]+"] "+d[2])}if("totals"in b){d=function(a,b,c){var d;d=function(){for(var a in c.fields)e[c.fields[a]].push([n,0])};var e={},f;for(f in c.fields)e[c.fields[f]]=[];var i=0,n;if(c.data){if(c.start>mist.data.config.time-600){n=(mist.data.config.time-600)*1E3;d();n=c.start*1E3;d()}else n=c.start*1E3;for(f in c.data){if(f==0){n=c.start*1E3;var p=0}else{n=n+c.interval[p][1]*1E3;c.interval[p][0]--;if(c.interval[p][0]<=0){p++;p<c.interval.length-1&&(i=i+2)}}if(i%2==1){d();i--}for(var F in c.data[f])e[c.fields[F]].push([n,
c.data[f][F]]);if(i){d();i--}}if(mist.data.config.time-c.end>20){d();n=(mist.data.config.time-15)*1E3;d()}}else{n=(mist.data.config.time-600)*1E3;d();n=(mist.data.config.time-15)*1E3;d()}d=e;stream=a?a.join(" "):"all_streams";protocol=b?b.join("_"):"all_protocols";stream in mist.data.totals||(mist.data.totals[stream]={});protocol in mist.data.totals[stream]||(mist.data.totals[stream][protocol]={});$.extend(mist.data.totals[stream][protocol],d)};mist.data.totals={};if("fields"in b.totals)d(c.totals.streams,
c.totals.protocols,b.totals);else for(p in b.totals)d(c.totals[p].streams,c.totals[p].protocols,b.totals[p])}a&&a(b,e);break;case "CHALL":if(b.authorize.challenge==mist.user.authstring){mist.user.password!=""&&UI.elements.connection.msg.text("The credentials you provided are incorrect.").addClass("red");UI.navto("Login")}else if(mist.user.password=="")UI.navto("Login");else{mist.user.authstring=b.authorize.challenge;mist.send(a,c,e)}break;case "NOACC":UI.navto("Create a new account");break;case "ACC_MADE":delete c.authorize;
mist.send(a,c,e);break;default:UI.navto("Login")}}};e.hide||UI.elements.connection.msg.removeClass("red").text("Data sent, waiting for a reply..").append($("<br>")).append($("<a>").text("Cancel request").click(function(){d.abort()}));var d=$.ajax(b)},inputMatch:function(a,c){if(typeof a=="undefined")return false;if(typeof a=="string"){var e=a.replace(/[^\w\s]/g,"\\$&"),e=e.replace(/\\\?/g,".").replace(/\\\*/g,"(?:.)*"),e=RegExp("^"+e+"$","i");return e.test(c)}for(var b in a){e=a[b].replace(/[^\w\s]/g,
"\\$&");e=e.replace(/\\\?/g,".").replace(/\\\*/g,"(?:.)*");e=RegExp("^"+e+"$","i");if(e.test(c))return true}return false},convertBuildOptions:function(a,c){var e=[],b=["required","optional"];"desc"in a&&e.push({type:"help",help:a.desc});for(var d in b)if(a[b[d]]){e.push($("<h4>").text(UI.format.capital(b[d])+" parameters"));for(var i in a[b[d]]){var n=a[b[d]][i],f={label:UI.format.capital(n.name),pointer:{main:c,index:i},validate:[]};b[d]=="required"&&!("default"in n)&&f.validate.push("required");
if("default"in n)f.placeholder=n["default"];if("help"in n)f.help=n.help;if("unit"in n)f.unit=n.unit;switch(n.type){case "int":f.type="int";break;case "uint":f.type="int";f.min=0;break;case "debug":f.type="debug";break;case "select":f.type="select";f.select=n.select;break;default:f.type="str"}e.push(f)}}return e},stored:{get:function(){return mist.data.ui_settings||{}},set:function(a,c){var e=this.get();e[a]=c;mist.send(function(){},{ui_settings:e})},del:function(a){delete mist.data.ui_settings[a];
break;default:$("[name=appliesto]").closest(".UIelement").show()}}},{label:"Applies to",pointer:{main:m,index:"appliesto"},help:"For triggers that can apply to specific streams, this value decides what streams they are triggered for. (none checked = always triggered)",type:"checklist",checklist:Object.keys(mist.data.streams),LTSonly:!0},$("<br>"),{label:"Handler (URL or executable)",help:"This can be either an HTTP URL or a full path to an executable.",pointer:{main:m,index:"url"},validate:["required"],
type:"str",LTSonly:!0},{label:"Blocking",type:"checkbox",help:"If checked, pauses processing and uses the response of the handler. If the response does not start with 1, true, yes or cont, further processing is aborted. If unchecked, processing is never paused and the response is not checked.",pointer:{main:m,index:"async"},LTSonly:!0},{label:"Default response",type:"str",help:"For blocking requests, the default response in case the handler cannot be executed for any reason.",pointer:{main:m,index:"default"},
LTSonly:!0},{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Triggers")}},{type:"save",label:"Save","function":function(){b&&mist.data.config.triggers[b[0]].splice(b[1],1);var a=[m.url,m.async?true:false,typeof m.appliesto!="undefined"?m.appliesto:[]];typeof m["default"]!="undefined"&&a.push(m["default"]);m.triggeron in mist.data.config.triggers||(mist.data.config.triggers[m.triggeron]=[]);mist.data.config.triggers[m.triggeron].push(a);mist.send(function(){UI.navto("Triggers")},
{config:mist.data.config})}}]}]));$("[name=triggeron]").trigger("change");break;case "Logs":var fa=$("<button>").text("Refresh now").click(function(){$(this).text("Loading..");mist.send(function(){X();fa.text("Refresh now")})}).css("padding","0.2em 0.5em").css("flex-grow",0);c.append(UI.buildUI([{type:"help",help:"Here you have an overview of all edited settings within MistServer and possible warnings or errors MistServer has encountered. MistServer stores up to 100 logs at a time."},{label:"Refresh every",
type:"select",select:[[10,"10 seconds"],[30,"30 seconds"],[60,"minute"],[300,"5 minutes"]],value:30,"function":function(){UI.interval.clear();UI.interval.set(function(){mist.send(function(){X()})},$(this).val()*1E3)},help:"How often the table below should be updated."},{label:"..or",type:"DOMfield",DOMfield:fa,help:"Instantly refresh the table below."}]));c.append($("<button>").text("Purge logs").click(function(){mist.send(function(){mist.data.log=[];UI.navto("Logs")},{clearstatlogs:true})}));g=$("<tbody>").css("font-size",
"0.9em");c.append($("<table>").append(g));var ha=function(a){var b=$("<span>").text(a);switch(a){case "WARN":b.addClass("orange");break;case "ERROR":case "FAIL":b.addClass("red")}return b},X=function(){var a=mist.data.log;if(a){a.length>=2&&a[0][0]<a[a.length-1][0]&&a.reverse();g.html("");for(var b in a)g.append($("<tr>").html($("<td>").text(UI.format.dateTime(a[b][0],"long")).css("white-space","nowrap")).append($("<td>").html(ha(a[b][1])).css("text-align","center")).append($("<td>").text(a[b][2]).css("text-align",
"left")))}};X();break;case "Statistics":var A=$("<span>").text("Loading..");c.append(A);var m={},w=mist.stored.get().graphs?$.extend(!0,{},mist.stored.get().graphs):{},J={};for(f in mist.data.streams)J[f]=!0;for(f in mist.data.active_streams)J[mist.data.active_streams[f]]=!0;var J=Object.keys(J).sort(),Y=[];for(f in mist.data.config.protocols)Y.push(mist.data.config.protocols[f].connector);Y.sort();mist.send(function(){UI.plot.datatype.templates.cpuload.cores=0;for(var a in mist.data.capabilities.cpu)UI.plot.datatype.templates.cpuload.cores=
UI.plot.datatype.templates.cpuload.cores+mist.data.capabilities.cpu[a].cores;A.html(UI.buildUI([{type:"help",help:"Here you will find the MistServer stream statistics, you can select various categories yourself. All statistics are live: up to five minutes are saved."},$("<h3>").text("Select the data to display"),{label:"Add to",type:"select",select:[["new","New graph"]],pointer:{main:m,index:"graph"},classes:["graph_ids"],"function":function(){if($(this).val()){var a=A.find(".graph_xaxis"),b=A.find(".graph_id");
if($(this).val()=="new"){a.children("option").prop("disabled",false);b.setval("Graph "+(Object.keys(w).length+1)).closest("label").show()}else{var c=w[$(this).val()].xaxis;a.children("option").prop("disabled",true).filter('[value="'+c+'"]').prop("disabled",false);b.closest("label").hide()}a.children('option[value="'+a.val()+'"]:disabled').length&&a.val(a.children("option:enabled").first().val());a.trigger("change")}}},{label:"Graph id",type:"str",pointer:{main:m,index:"id"},classes:["graph_id"],validate:[function(a){return a in
w?{msg:"This graph id has already been used. Please enter something else.",classes:["red"]}:false}]},{label:"Axis type",type:"select",select:[["time","Time line"]],pointer:{main:m,index:"xaxis"},value:"time",classes:["graph_xaxis"],"function":function(){$s=A.find(".graph_datatype");switch($(this).getval()){case "coords":$s.children("option").prop("disabled",true).filter('[value="coords"]').prop("disabled",false);break;case "time":$s.children("option").prop("disabled",false).filter('[value="coords"]').prop("disabled",
true)}if(!$s.val()||$s.children('option[value="'+$s.val()+'"]:disabled').length){$s.val($s.children("option:enabled").first().val());$s.trigger("change")}}},{label:"Data type",type:"select",select:[["clients","Connections"],["upbps","Bandwidth (up)"],["downbps","Bandwidth (down)"],["cpuload","CPU use"],["memload","Memory load"],["coords","Client location"]],pointer:{main:m,index:"datatype"},classes:["graph_datatype"],"function":function(){$s=A.find(".graph_origin");switch($(this).getval()){case "cpuload":case "memload":$s.find("input[type=radio]").not('[value="total"]').prop("disabled",
true);$s.find('input[type=radio][value="total"]').prop("checked",true);break;default:$s.find("input[type=radio]").prop("disabled",false)}}},{label:"Data origin",type:"radioselect",radioselect:[["total","All"],["stream","The stream:",J],["protocol","The protocol:",Y]],pointer:{main:m,index:"origin"},value:["total"],classes:["graph_origin"]},{type:"buttons",buttons:[{label:"Add data set",type:"save","function":function(){var a;if(m.graph=="new"){a=UI.plot.addGraph(m,b);w[a.id]=a;A.find("select.graph_ids").append($("<option>").text(a.id)).val(a.id).trigger("change")}else a=
w[m.graph];var c=UI.plot.datatype.getOptions({datatype:m.datatype,origin:m.origin});a.datasets.push(c);UI.plot.save(a);UI.plot.go(w)}}]}]));var b=$("<div>").addClass("graph_container");c.append(b);var d=A.find("select.graph_ids");for(a in w){var f=UI.plot.addGraph(w[a],b);d.append($("<option>").text(f.id)).val(f.id);var g=[],e;for(e in w[a].datasets){var h=UI.plot.datatype.getOptions({datatype:w[a].datasets[e].datatype,origin:w[a].datasets[e].origin});g.push(h)}f.datasets=g;w[f.id]=f}d.trigger("change");
UI.plot.go(w);UI.interval.set(function(){UI.plot.go(w)},1E4)},{active_streams:!0,capabilities:!0});break;case "Server Stats":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a)},{capabilities:!0});c.append("Loading..");break}var Z=$("<table>"),B=$("<table>"),s={vheader:"CPUs",labels:["Model","Processor speed","Amount of cores","Amount of threads"],content:[]};for(f in mist.data.capabilities.cpu)r=mist.data.capabilities.cpu[f],s.content.push({header:"CPU #"+(Number(f)+1),
body:[r.model,UI.format.addUnit(UI.format.number(r.mhz),"MHz"),r.cores,r.threads]});var f=UI.buildVheaderTable(s),ga=function(){var a=mist.data.capabilities.mem,b=mist.data.capabilities.load,a={vheader:"Memory",labels:["Used","Cached","Available","Total"],content:[{header:"Physical memory",body:[UI.format.bytes(a.used*1048576)+" ("+UI.format.addUnit(b.memory,"%")+")",UI.format.bytes(a.cached*1048576),UI.format.bytes(a.free*1048576),UI.format.bytes(a.total*1048576)]},{header:"Swap memory",body:[UI.format.bytes((a.swaptotal-
a.swapfree)*1048576),UI.format.addUnit("","N/A"),UI.format.bytes(a.swapfree*1048576),UI.format.bytes(a.swaptotal*1048576)]}]},a=UI.buildVheaderTable(a);Z.replaceWith(a);Z=a;b={vheader:"Load average",labels:["CPU use","1 minute","5 minutes","15 minutes"],content:[{header:"&nbsp;",body:[UI.format.addUnit(UI.format.number(mist.data.capabilities.cpu_use/10),"%"),UI.format.number(b.one/100),UI.format.number(b.five/100),UI.format.number(b.fifteen/100)]}]};b=UI.buildVheaderTable(b);B.replaceWith(b);B=b};
ga();c.append(UI.buildUI([{type:"help",help:"You can find general server statistics here. Note that memory and CPU usage is for your entire machine, not just MistServer."}])).append($("<table>").css("width","auto").addClass("nolay").append($("<tr>").append($("<td>").append(Z)).append($("<td>").append(B))).append($("<tr>").append($("<td>").append(f).attr("colspan",2))));UI.interval.set(function(){mist.send(function(){ga()},{capabilities:true})},3E4);break;case "Email for Help":f=$.extend({},mist.data);
delete f.statistics;delete f.totals;delete f.clients;delete f.capabilities;f=JSON.stringify(f);f="Version: "+mist.data.config.version+"\n\nConfig:\n"+f;m={};c.append(UI.buildUI([{type:"help",help:"You can use this form to email MistServer support if you're having difficulties.<br>A copy of your server config file will automatically be included."},{type:"str",label:"Your name",validate:["required"],pointer:{main:m,index:"name"},value:mist.user.name},{type:"email",label:"Your email address",validate:["required"],
pointer:{main:m,index:"email"}},{type:"hidden",value:"Integrated Help",pointer:{main:m,index:"subject"}},{type:"hidden",value:"-",pointer:{main:m,index:"company"}},{type:"textarea",rows:20,label:"Your message",validate:["required"],pointer:{main:m,index:"message"}},{type:"textarea",rows:20,label:"Your config file",readonly:!0,value:f,pointer:{main:m,index:"configfile"}},{type:"buttons",buttons:[{type:"save",label:"Send","function":function(a){$(a).text("Sending..");$.ajax({type:"POST",url:"http://mistserver.org/contact?skin=plain",
data:m,success:function(a){a=$("<span>").html(a);a.find("script").remove();c.html(a[0].innerHTML)}})}}]}]));break;case "Disconnect":mist.user.password="";delete mist.user.authstring;delete mist.user.loggedin;sessionStorage.removeItem("mistLogin");UI.navto("Login");break;default:c.append($("<p>").text("This tab does not exist."))}}}};"origin"in location||(location.origin=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""));
var mist={data:{},user:{name:"",password:"",host:location.origin+location.pathname.replace(/\/+$/,"")+"/api"},send:function(a,b,c){var b=b||{},c=c||{},c=$.extend(true,{timeOut:3E4,sendData:b},c),d={authorize:{password:mist.user.authstring?MD5(mist.user.password+mist.user.authstring):"",username:mist.user.name}};$.extend(true,d,b);log("Send",$.extend(true,{},b));d={url:mist.user.host,type:"POST",data:{command:JSON.stringify(d)},dataType:"jsonp",crossDomain:true,timeout:c.timeout*1E3,async:true,error:function(d,
e){delete mist.user.loggedin;if(!c.hide){switch(e){case "timeout":e=$("<i>").text("The connection timed out. ");break;case "abort":e=$("<i>").text("The connection was aborted. ");break;default:e=$("<i>").text(e+". ").css("text-transform","capitalize")}$("#message").addClass("red").text("An error occurred while attempting to communicate with MistServer:").append($("<br>")).append(e).append($("<a>").text("Send server request again").click(function(){mist.send(a,b,c)}))}UI.navto("Login")},success:function(d){log("Receive",
$.extend(true,{},d),"as reply to",c.sendData);delete mist.user.loggedin;switch(d.authorize.status){case "OK":if("streams"in d)if(d.streams)if("incomplete list"in d.streams){delete d.streams["incomplete list"];$.extend(mist.data.streams,d.streams)}else mist.data.streams=d.streams;else mist.data.streams={};var e=$.extend({},d),h=["config","capabilities","ui_settings","LTS","active_streams","browse","log","totals"],q;for(q in e)h.indexOf(q)==-1&&delete e[q];$.extend(true,mist.data,e);mist.user.loggedin=
true;UI.elements.connection.status.text("Connected").removeClass("red").addClass("green");UI.elements.connection.user_and_host.text(mist.user.name+" @ "+mist.user.host);UI.elements.connection.msg.removeClass("red").text("Last communication with the server at "+UI.format.time((new Date).getTime()/1E3));d.LTS&&UI.elements.menu.find(".LTSonly").removeClass("LTSonly");if(d.log){e=d.log[d.log.length-1];UI.elements.connection.msg.append($("<br>")).append("Last log entry: "+UI.format.time(e[0])+" ["+e[1]+
"] "+e[2])}if("totals"in d){e=function(a,b,c){var d;d=function(){for(var a in c.fields)e[c.fields[a]].push([l,0])};var e={},h;for(h in c.fields)e[c.fields[h]]=[];var k=0,l;if(c.data){if(c.start>mist.data.config.time-600){l=(mist.data.config.time-600)*1E3;d();l=c.start*1E3;d()}else l=c.start*1E3;for(h in c.data){if(h==0){l=c.start*1E3;var m=0}else{l=l+c.interval[m][1]*1E3;c.interval[m][0]--;if(c.interval[m][0]<=0){m++;m<c.interval.length-1&&(k=k+2)}}if(k%2==1){d();k--}for(var n in c.data[h])e[c.fields[n]].push([l,
c.data[h][n]]);if(k){d();k--}}if(mist.data.config.time-c.end>20){d();l=(mist.data.config.time-15)*1E3;d()}}else{l=(mist.data.config.time-600)*1E3;d();l=(mist.data.config.time-15)*1E3;d()}d=e;stream=a?a.join(" "):"all_streams";protocol=b?b.join("_"):"all_protocols";stream in mist.data.totals||(mist.data.totals[stream]={});protocol in mist.data.totals[stream]||(mist.data.totals[stream][protocol]={});$.extend(mist.data.totals[stream][protocol],d)};mist.data.totals={};if("fields"in d.totals)e(b.totals.streams,
b.totals.protocols,d.totals);else for(q in d.totals)e(b.totals[q].streams,b.totals[q].protocols,d.totals[q])}a&&a(d,c);break;case "CHALL":if(d.authorize.challenge==mist.user.authstring){mist.user.password!=""&&UI.elements.connection.msg.text("The credentials you provided are incorrect.").addClass("red");UI.navto("Login")}else if(mist.user.password=="")UI.navto("Login");else{mist.user.authstring=d.authorize.challenge;mist.send(a,b,c);sessionStorage.setItem("mistLogin",JSON.stringify({host:mist.user.host,
name:mist.user.name,password:mist.user.password}))}break;case "NOACC":UI.navto("Create a new account");break;case "ACC_MADE":delete b.authorize;mist.send(a,b,c);break;default:UI.navto("Login")}}};c.hide||UI.elements.connection.msg.removeClass("red").text("Data sent, waiting for a reply..").append($("<br>")).append($("<a>").text("Cancel request").click(function(){e.abort()}));var e=$.ajax(d)},inputMatch:function(a,b){if(typeof a=="undefined")return false;typeof a=="string"&&(a=[a]);for(var c in a){var d=
a[c].replace(/[^\w\s]/g,"\\$&"),d=d.replace(/\\\?/g,".").replace(/\\\*/g,"(?:.)*");if(RegExp("^(?:[a-zA-Z]:)?"+d+"$","i").test(b))return true}return false},convertBuildOptions:function(a,b){var c=[],d=["required","optional"];"desc"in a&&c.push({type:"help",help:a.desc});for(var e in d)if(a[d[e]]){c.push($("<h4>").text(UI.format.capital(d[e])+" parameters"));for(var l in a[d[e]]){var n=a[d[e]][l],h={label:UI.format.capital(n.name),pointer:{main:b,index:l},validate:[]};d[e]=="required"&&!("default"in
n)&&h.validate.push("required");if("default"in n)h.placeholder=n["default"];if("help"in n)h.help=n.help;if("unit"in n)h.unit=n.unit;switch(n.type){case "int":h.type="int";break;case "uint":h.type="int";h.min=0;break;case "debug":h.type="debug";break;case "select":h.type="select";h.select=n.select;break;default:h.type="str"}c.push(h)}}return c},stored:{get:function(){return mist.data.ui_settings||{}},set:function(a,b){var c=this.get();c[a]=b;mist.send(function(){},{ui_settings:c})},del:function(a){delete mist.data.ui_settings[a];
mist.send(function(){},{ui_settings:mist.data.ui_settings})}}};function log(){try{UI.debug&&[].push.call(arguments,Error().stack);[].unshift.call(arguments,"["+UI.format.time((new Date).getTime()/1E3)+"]");console.log.apply(console,arguments)}catch(a){}}
$.fn.getval=function(){var a=$(this).data("opts"),c=$(this).val();if(a&&"type"in a)switch(a.type){case "span":c=$(this).html();break;case "checkbox":c=$(this).prop("checked");break;case "radioselect":a=$(this).find("label > input[type=radio]:checked").parent();if(a.length){c=[];c.push(a.children("input[type=radio]").val());a=a.children("select");a.length&&c.push(a.val())}else c="";break;case "checklist":c=[];$(this).find(".checklist input[type=checkbox]:checked").each(function(){c.push($(this).attr("name"))})}return c};
$.fn.setval=function(a){var c=$(this).data("opts");$(this).val(a);if(c&&"type"in c)switch(c.type){case "span":$(this).html(a);break;case "checkbox":$(this).prop("checked",a);break;case "geolimited":case "hostlimited":c=$(this).closest(".field_container").data("subUI");if(typeof a=="undefined"||a.length==0)a="-";c.blackwhite.val(a.charAt(0));var a=a.substr(1).split(" "),e;for(e in a)c.values.append(c.prototype.clone(true).val(a[e]));c.blackwhite.trigger("change");break;case "radioselect":if(typeof a==
"undefined")return $(this);e=$(this).find('label > input[type=radio][value="'+a[0]+'"]').prop("checked",true).parent();a.length>1&&e.children("select").val(a[1]);break;case "checklist":c=$(this).find(".checklist input[type=checkbox]").prop("checked",false);for(e in a)c.filter('[name="'+a[e]+'"]').prop("checked",true)}$(this).trigger("change");return $(this)};
$.fn.getval=function(){var a=$(this).data("opts"),b=$(this).val();if(a&&"type"in a)switch(a.type){case "span":b=$(this).html();break;case "checkbox":b=$(this).prop("checked");break;case "radioselect":a=$(this).find("label > input[type=radio]:checked").parent();if(a.length){b=[];b.push(a.children("input[type=radio]").val());a=a.children("select");a.length&&b.push(a.val())}else b="";break;case "checklist":b=[];$(this).find(".checklist input[type=checkbox]:checked").each(function(){b.push($(this).attr("name"))})}return b};
$.fn.setval=function(a){var b=$(this).data("opts");$(this).val(a);if(b&&"type"in b)switch(b.type){case "span":$(this).html(a);break;case "checkbox":$(this).prop("checked",a);break;case "geolimited":case "hostlimited":b=$(this).closest(".field_container").data("subUI");if(typeof a=="undefined"||a.length==0)a="-";b.blackwhite.val(a.charAt(0));var a=a.substr(1).split(" "),c;for(c in a)b.values.append(b.prototype.clone(true).val(a[c]));b.blackwhite.trigger("change");break;case "radioselect":if(typeof a==
"undefined")return $(this);c=$(this).find('label > input[type=radio][value="'+a[0]+'"]').prop("checked",true).parent();a.length>1&&c.children("select").val(a[1]);break;case "checklist":b=$(this).find(".checklist input[type=checkbox]").prop("checked",false);for(c in a)b.filter('[name="'+a[c]+'"]').prop("checked",true)}$(this).trigger("change");return $(this)};function parseURL(a){var b=document.createElement("a");b.href=a;return{protocol:b.protocol+"//",host:b.hostname,port:b.port?":"+b.port:""}};

File diff suppressed because it is too large Load diff

View file

@ -16,11 +16,10 @@
</head>
<body>
<nav>
<a href='#' class=logo>Server</a>
<a href='#' class=logo>MistServer</a>
<div class=menu>
</div>
</nav>
<div class=scroller>
<div class=filler>
<header>
<h1>Management Interface</h1>
@ -30,12 +29,10 @@
<span id='message'></span>
</aside>
</header>
<nav class=secondary_menu></nav>
<main>
Loading..
<noscript>Please enable JavaScript.</noscript>
</main>
</div>
</div>
</body>
</html>

341
mist.css.h Normal file
View file

@ -0,0 +1,341 @@
const char *mist_css =
"\n.mistvideo {\n background: black center none no-repeat;\n /*LTS\n backgroun" \
"d-size: auto 30%;\n background-image: url('data:image/svg+xml;base64,PD94bWwgdm" \
"Vyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxuczpkYz" \
"0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdm" \
"Vjb21tb25zLm9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZG" \
"Ytc3ludGF4LW5zIyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM9Im" \
"h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBpZD0ic3ZnNTI4MCIgaGVpZ2h0PSIxNTAiIHdpZHRoPS" \
"IyMDIuNTIwMTciIHZlcnNpb249IjEuMSI+PGRlZnMgaWQ9ImRlZnM1MjgyIiAvPjxtZXRhZGF0YSBpZD" \
"0ibWV0YWRhdGE1Mjg1Ij48cmRmOlJERj48Y2M6V29yayByZGY6YWJvdXQ9IiI+PGRjOmZvcm1hdD5pbW" \
"FnZS9zdmcreG1sPC9kYzpmb3JtYXQ+PGRjOnR5cGUgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcm" \
"cvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz48ZGM6dGl0bGU+PC9kYzp0aXRsZT48L2NjOldvcms+PC" \
"9yZGY6UkRGPjwvbWV0YWRhdGE+PGcgaWQ9ImxheWVyMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQ4Lj" \
"cyNjIzNCwtNDQ5Ljc1MjA0KSI+PHBhdGggc3R5bGU9ImZpbGw6IzhjYjNjZjtmaWxsLW9wYWNpdHk6MT" \
"tmaWxsLXJ1bGU6bm9uemVybztzdHJva2U6bm9uZSIgaWQ9InBhdGg0NiIgZD0ibSA2OS4wODIxNTMsNT" \
"M0LjI1MzE0IDgxLjAyODYzNyw0My4yNjQ4OCA4MS4wMjYwNSwtNDMuMjY0ODggLTMwLjUwNzA3LC02OS" \
"4wMDg5NCAtMTAxLjAzOTA2OCwwIC0zMC41MDg1NDksNjkuMDA4OTQgMCwwIHogbSA4MS4wMjg2MzcsNT" \
"AuMTE3MzIgLTg4LjgyNjQ4NiwtNDcuNDMwODggMzQuMzY5NDE4LC03Ny43NDA3OSAxMDguOTEzNTY4LD" \
"AgMzQuMzY5MDUsNzcuNzQwNzkgLTg4LjgyNTU1LDQ3LjQzMDg4IDAsMCIgLz48cGF0aCBzdHlsZT0iZm" \
"lsbDojYjVkM2UyO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIiBpZD" \
"0icGF0aDQ4IiBkPSJtIDIzNC44NzM1Miw1MzguMDM5NTkgLTE2Ni43NTE1MTksMCAwLC02LjA0NTQxID" \
"E2Ni43NTE1MTksMCAwLDYuMDQ1NDEiIC8+PHBhdGggc3R5bGU9ImZpbGw6IzhjYjNjZjtmaWxsLW9wYW" \
"NpdHk6MTtmaWxsLXJ1bGU6bm9uemVybztzdHJva2U6bm9uZSIgaWQ9InBhdGg1MCIgZD0ibSA4My40OD" \
"cwMDksNTM1LjUyMDgyIGMgMCw5LjU5OTY4IC03Ljc4MTA4LDE3LjM4MDc1IC0xNy4zNzk2NTEsMTcuMz" \
"gwNzUgLTkuNTk5MTIyLDAgLTE3LjM4MTEyNCwtNy43ODEwNiAtMTcuMzgxMTI0LC0xNy4zODA3NSAwLC" \
"05LjU5Nzg0IDcuNzgyMDAyLC0xNy4zODA3NiAxNy4zODExMjQsLTE3LjM4MDc2IDkuNTk4NTcxLDAgMT" \
"cuMzc5NjUxLDcuNzgyOTIgMTcuMzc5NjUxLDE3LjM4MDc2IiAvPjxwYXRoIHN0eWxlPSJmaWxsOiM4Y2" \
"IzY2Y7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiIGlkPSJwYXRoNT" \
"IiIGQ9Im0gMjUxLjI0NjQsNTM1LjUyMDgyIGMgMCw5LjU5OTY4IC03Ljc4MTA3LDE3LjM4MDc1IC0xNy" \
"4zODA3NCwxNy4zODA3NSAtOS41OTk2OCwwIC0xNy4zNzg5MiwtNy43ODEwNiAtMTcuMzc4OTIsLTE3Lj" \
"M4MDc1IDAsLTkuNTk3ODQgNy43NzkyNCwtMTcuMzgwNzYgMTcuMzc4OTIsLTE3LjM4MDc2IDkuNTk5Nj" \
"csMCAxNy4zODA3NCw3Ljc4MjkyIDE3LjM4MDc0LDE3LjM4MDc2IiAvPjxwYXRoIHN0eWxlPSJmaWxsOi" \
"NiNWQzZTI7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiIGlkPSJwYX" \
"RoNTQiIGQ9Im0gMTU1Ljc4NzY4LDUzNy4xODI4IC01LjA1MjI4LC0zLjMyMjEyIDQ5LjM3MTA4LC03NS" \
"4wNjM1NiA1LjA1MDQzLDMuMzIyMTEgLTQ5LjM2OTIzLDc1LjA2MzU3IDAsMCIgLz48cGF0aCBzdHlsZT" \
"0iZmlsbDojYjVkM2UyO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIi" \
"BpZD0icGF0aDU2IiBkPSJtIDE0OC43ODYsNTM3Ljc4MTYyIC01Mi44OTY5NzcsLTc0LjA1NTY5IDQuOT" \
"E5NDE3LC0zLjUxNTU4IDUyLjg5NTMzLDc0LjA1NzU0IC00LjkxNzc3LDMuNTEzNzMgMCwwIiAvPjxwYX" \
"RoIHN0eWxlPSJmaWxsOiM4Y2IzY2Y7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2" \
"tlOm5vbmUiIGlkPSJwYXRoNTgiIGQ9Im0gMjE0LjU5NjI4LDQ2Mi41OTgyOSBjIDAsNy4wOTc1IC01Lj" \
"c1MjQyLDEyLjg0ODEgLTEyLjg0NjI0LDEyLjg0ODEgLTcuMDk1NjUsMCAtMTIuODQ2MjUsLTUuNzUwNi" \
"AtMTIuODQ2MjUsLTEyLjg0ODEgMCwtNy4wOTM4MSA1Ljc1MDYsLTEyLjg0NjI1IDEyLjg0NjI1LC0xMi" \
"44NDYyNSA3LjA5MzgyLDAgMTIuODQ2MjQsNS43NTI0NCAxMi44NDYyNCwxMi44NDYyNSIgLz48cGF0aC" \
"BzdHlsZT0iZmlsbDojOGNiM2NmO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZT" \
"pub25lIiBpZD0icGF0aDYwIiBkPSJtIDExMS44MjQ4NCw0NjIuNTk4MjkgYyAwLDcuMDk3NSAtNS43NT" \
"EzMywxMi44NDgxIC0xMi44NDU4NzMsMTIuODQ4MSAtNy4wOTUyODUsMCAtMTIuODQ3NTMyLC01Ljc1MD" \
"YgLTEyLjg0NzUzMiwtMTIuODQ4MSAwLC03LjA5MzgxIDUuNzUyMjQ3LC0xMi44NDYyNSAxMi44NDc1Mz" \
"IsLTEyLjg0NjI1IDcuMDk0NTQzLDAgMTIuODQ1ODczLDUuNzUyNDQgMTIuODQ1ODczLDEyLjg0NjI1Ii" \
"AvPjxwYXRoIHN0eWxlPSJmaWxsOiM4Y2IzY2Y7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm" \
"87c3Ryb2tlOm5vbmUiIGlkPSJwYXRoNjIiIGQ9Im0gMTY4Ljg3NzE0LDQ4Ny41MzUzNSBjIDAsOS4zOT" \
"E0NSAtNy42MTE1NywxNy4wMDQ4NyAtMTcuMDAxMTksMTcuMDA0ODcgLTkuMzg5NjMsMCAtMTcuMDAzMD" \
"QsLTcuNjEzNDIgLTE3LjAwMzA0LC0xNy4wMDQ4NyAwLC05LjM4OTYyIDcuNjEzNDEsLTE3LjAwMTIgMT" \
"cuMDAzMDQsLTE3LjAwMTIgOS4zODk2MiwwIDE3LjAwMTE5LDcuNjExNTggMTcuMDAxMTksMTcuMDAxMi" \
"IgLz48cGF0aCBzdHlsZT0iZmlsbDojYjVkM2UyO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZX" \
"JvO3N0cm9rZTpub25lIiBpZD0icGF0aDY0IiBkPSJtIDE2NS44NTUzNiw1MzYuNDAxNTYgYyAwLDcuNz" \
"IzOTYgLTYuMjU5MTMsMTMuOTgxMjYgLTEzLjk3OTQxLDEzLjk4MTI2IC03LjcyMDI5LDAgLTEzLjk4MT" \
"I2LC02LjI1NzMgLTEzLjk4MTI2LC0xMy45ODEyNiAwLC03LjcyMDI5IDYuMjYwOTcsLTEzLjk3OTQxID" \
"EzLjk4MTI2LC0xMy45Nzk0MSA3LjcyMDI4LDAgMTMuOTc5NDEsNi4yNTkxMiAxMy45Nzk0MSwxMy45Nz" \
"k0MSIgLz48cGF0aCBzdHlsZT0iZmlsbDojOGNiM2NmO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub2" \
"56ZXJvO3N0cm9rZTpub25lIiBpZD0icGF0aDY2IiBkPSJtIDY4LjMzNTczNiw1MzcuNDA1NzQgLTIuOT" \
"Q1ODY2LC01LjI4MDc0IDgzLjg3ODg4LC00Ny45ODU0NyA0LjQ1NzEyLDYuNzkxNjIgLTg1LjM5MDEzNC" \
"w0Ni40NzQ1OSAwLDAiIC8+PHBhdGggc3R5bGU9ImZpbGw6IzhjYjNjZjtmaWxsLW9wYWNpdHk6MTtmaW" \
"xsLXJ1bGU6bm9uemVybztzdHJva2U6bm9uZSIgaWQ9InBhdGg2OCIgZD0ibSAxNDkuNDY5NTgsNDkwLj" \
"Y1NDc3IC01Mi4xNDE3MjQsLTI1LjMxNDc2IDIuNTQ1NjY5LC01LjQ4MTU5IDUzLjY1MzM1NSwyMy44MD" \
"IwNCAtMy4zMDE4NSw2LjIzODg3IC0wLjc1NTQ1LDAuNzU1NDQiIC8+PHBhdGggc3R5bGU9ImZpbGw6Iz" \
"hjYjNjZjtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6bm9uemVybztzdHJva2U6bm9uZSIgaWQ9InBhdG" \
"g3MCIgZD0ibSAxNDkuNDE0Myw0ODQuMDYzOTcgNTEuMDA3MjYsLTIzLjgwMjAzIDIuNjU1MSw1LjQyOT" \
"k5IC00OS40OTYzNSwyNS4zMTQ3NyIgLz48cGF0aCBzdHlsZT0iZmlsbDojOGNiM2NmO2ZpbGwtb3BhY2" \
"l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIiBpZD0icGF0aDcyIiBkPSJtIDIzMy4wOT" \
"M2Miw1MzguNTA3NTggLTgzLjg4MDE2LC00Ny45ODU0NyA0LjU2NzY4LC02LjcyNzE0IDgyLjM2NzQzLD" \
"Q5LjQ5NjM3IC0zLjA1NDk1LDUuMjE2MjQgMCwwIiAvPjxwYXRoIHN0eWxlPSJmaWxsOiM4Y2IzY2Y7Zm" \
"lsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiIGlkPSJwYXRoNzQiIGQ9Im" \
"0gMTU0LjUyMDAxLDU4MC40ODQ1MiAtNi44MDA4NCwwIC0yLjI2NjM0LC05My43MDI3OCAxMS4zMzUzNi" \
"wwIC0yLjI2ODE4LDkzLjcwMjc4IDAsMCIgLz48cGF0aCBzdHlsZT0iZmlsbDojOGNiM2NmO2ZpbGwtb3" \
"BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIiBpZD0icGF0aDc2IiBkPSJtIDE2OC" \
"4xMjE2OSw1ODIuMzczMTMgYyAwLDkuNTk5NjggLTcuNzgxMDcsMTcuMzc4OTEgLTE3LjM4MDc1LDE3Lj" \
"M3ODkxIC05LjU5Nzg0LDAgLTE3LjM3ODkxLC03Ljc3OTIzIC0xNy4zNzg5MSwtMTcuMzc4OTEgMCwtOS" \
"41OTk2OCA3Ljc4MTA3LC0xNy4zODA3NiAxNy4zNzg5MSwtMTcuMzgwNzYgOS41OTk2OCwwIDE3LjM4MD" \
"c1LDcuNzgxMDggMTcuMzgwNzUsMTcuMzgwNzYiIC8+PC9nPjwvc3ZnPg==');\n LTS*/\n displa" \
"y: inline-block;\n color: white;\n font-family: sans-serif;\n text-align: cen" \
"ter;\n}\n.mistvideo[data-loading] {\n background-image: none;\n position: rela" \
"tive;\n min-width: 70px;\n min-height: 70px;\n}\n.mistvideo[data-loading]:befo" \
"re {\n content: '';\n display: block;\n width: 25px;\n height: 25px;\n bord" \
"er: 5px solid transparent;\n border-radius: 25px;\n border-top-color: white;\n" \
" border-left: 0px;\n opacity: 0.8;\n animation: spin 1.5s infinite linear;\n " \
" margin: -15px 0 0 -12.5px;\n position: absolute;\n top: 50%;\n left: 50%;\n " \
" z-index: 5;\n}\n.mistvideo .error {\n margin: 225px 20px 20px;\n}\n.mistvideo " \
".error button {\n margin: 5px auto;\n display: block;\n}\n.mistplayer {\n pos" \
"ition: relative;\n overflow: hidden;\n}\n.mistplayer[data-hide] {\n cursor: no" \
"ne;\n}\n.mistplayer .html5_player {\n display: block;\n margin: 0 auto;\n}\n.m" \
"istplayer .controls {\n height: 75px;\n background-color: black;\n opacity: 0" \
".6;\n position: absolute;\n left: 1px;\n right: 1px;\n bottom: -75px;\n dis" \
"play: flex;\n align-items: center;\n}\n.mistplayer:hover:not([data-hide]) .cont" \
"rols {\n bottom: 0;\n}\n.mistplayer.audio {\n width: 500px;\n}\n.mistplayer.au" \
"dio .controls {\n position: static;\n}\n.mistplayer:not(:hover) .controls,\n.mi" \
"stplayer[data-hide] .controls {\n transition: bottom 0.5s ease-in 1s;\n}\n.mist" \
"player video {\n display: block;\n}\n.mistplayer .controls .row {\n display: f" \
"lex;\n flex-flow: row nowrap;\n}\n.mistplayer .controls .column {\n display: f" \
"lex;\n flex-flow: column nowrap;\n align-items: center;\n}\n.mistplayer .contr" \
"ols .row .button {\n\n}\n.mistplayer .controls .row .button:not(:first-child) {\n" \
" margin-left: 0;\n}\n.mistplayer .controls .button {\n cursor: pointer;\n wid" \
"th: 45px;\n line-height: 45px;\n font-size: 16px;\n position: relative;\n ba" \
"ckground: transparent center none no-repeat;\n}\n.mistplayer .controls .button.p" \
"lay {\n height: 45px;\n margin-left: 15px;\n}\n.mistplayer .controls .button.p" \
"lay[data-state=playing] {\n background-image: url(\"data:image/svg+xml;base64,P" \
"D94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4b" \
"WxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOmNjPSJodHRwOi8vY" \
"3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wM" \
"i8yMi1yZGYtc3ludGF4LW5zIyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIge" \
"G1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIGlkPSJzdmcyIiBoZ" \
"WlnaHQ9IjQ1IiB3aWR0aD0iNDUiPjxkZWZzIGlkPSJkZWZzNCIgLz48bWV0YWRhdGEgaWQ9Im1ldGFkY" \
"XRhNyI+PHJkZjpSREY+PGNjOldvcmsgcmRmOmFib3V0PSIiPjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htb" \
"DwvZGM6Zm9ybWF0PjxkYzp0eXBlIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0e" \
"XBlL1N0aWxsSW1hZ2UiIC8+PGRjOnRpdGxlPjwvZGM6dGl0bGU+PC9jYzpXb3JrPjwvcmRmOlJERj48L" \
"21ldGFkYXRhPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMDcuMzYyMikiIGlkPSJsYXllcjEiP" \
"jxnIHN0eWxlPSJmaWxsOiNmZmYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMuMDMwNDU3NSw0Ny43Mjk3M" \
"DUpIiBpZD0iZzM3NzkiPjxwYXRoIGlkPSJwYXRoMzgyMy03IiBkPSJtIDQuNDY5NTQyOSw5OTguMTYzN" \
"zcgYSA0LjAwMTE5MTYsNC4wMDExOTE2IDAgMCAwIDMuNzQ5OTk5LDMuOTY4NzMgbCAyLjI4MTI1MDEsM" \
"CBhIDQuMDAxMTkxNiw0LjAwMTE5MTYgMCAwIDAgMy45Njg3NSwtMy43NTAwMyBsIDAsLTMyLjI4MTIzI" \
"GEgNC4wMDExOTE2LDQuMDAxMTkxNiAwIDAgMCAtMy43NSwtMy45Njg3NSBsIC0yLjI4MTI1MDEsMCBhI" \
"DQuMDAxMTkxNiw0LjAwMTE5MTYgMCAwIDAgLTMuOTY4NzQ5LDMuNzUgbCAwLDMyLjI4MTI4IHoiIHN0e" \
"WxlPSJmaWxsOiNmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmUiIC8+PHBhdGggaWQ9InBhdGgzO" \
"DIzLTctNCIgZD0ibSAyNC40Njk1NDIsOTk4LjE2MzggYSA0LjAwMTE5MTYsNC4wMDExOTE2IDAgMCAwI" \
"DMuNzUsMy45Njg3IGwgMi4yODEyNSwwIGEgNC4wMDExOTE2LDQuMDAxMTkxNiAwIDAgMCAzLjk2ODc1L" \
"C0zLjc1IGwgMCwtMzIuMjgxMjYgYSA0LjAwMTE5MTYsNC4wMDExOTE2IDAgMCAwIC0zLjc1LC0zLjk2O" \
"Dc1IGwgLTIuMjgxMjUsMCBhIDQuMDAxMTkxNiw0LjAwMTE5MTYgMCAwIDAgLTMuOTY4NzUsMy43NSBsI" \
"DAsMzIuMjgxMzEgeiIgc3R5bGU9ImZpbGw6I2ZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgL" \
"z48L2c+PC9nPjwvc3ZnPg==\");\n}\n.mistplayer .controls .button.play[data-state=pa" \
"used] {\n background-image: url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0" \
"iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxuczpkYz0iaHR0cDo" \
"vL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25" \
"zLm9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF" \
"4LW5zIyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM9Imh0dHA6Ly9" \
"3d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIGlkPSJzdmcyIiBoZWlnaHQ9IjQ1IiB3aWR" \
"0aD0iNDUiPjxkZWZzIGlkPSJkZWZzNCIgLz48bWV0YWRhdGEgaWQ9Im1ldGFkYXRhNyI+PHJkZjpSREY" \
"+PGNjOldvcmsgcmRmOmFib3V0PSIiPjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0Pjx" \
"kYzp0eXBlIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2U" \
"iIC8+PGRjOnRpdGxlPjwvZGM6dGl0bGU+PC9jYzpXb3JrPjwvcmRmOlJERj48L21ldGFkYXRhPjxnIHR" \
"yYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMDcuMzYyMikiIGlkPSJsYXllcjEiPjxwYXRoIHRyYW5zZm9" \
"ybT0ibWF0cml4KDEuMDE0MTgyNywtMC41ODU1Mzg2NywwLjU4NTUzODY3LDEuMDE0MTgyNywtMC40ODQ" \
"xOTgzMSwxMDIyLjg4OTMpIiBkPSJNIDEwLjMxMjUsLTYuMzQzNzUgQSAyLjk0MTYxODYsMi45NDE2MTg" \
"2IDAgMCAwIDcuOTA2MjUsLTQuODc1IGwgLTE0LjEyNSwyNC41IGEgMi45NDE2MTg2LDIuOTQxNjE4NiA" \
"wIDAgMCAyLjU2MjUsNC40MDYyNSBsIDI4LjI4MTI1LDAgQSAyLjk0MTYxODYsMi45NDE2MTg2IDAgMCA" \
"wIDI3LjE1NjI1LDE5LjYyNSBMIDEzLC00Ljg3NSBhIDIuOTQxNjE4NiwyLjk0MTYxODYgMCAwIDAgLTI" \
"uNjg3NSwtMS40Njg3NSB6IiBpZD0icGF0aDM4MDkiIHN0eWxlPSJmaWxsOiNmZmY7ZmlsbC1vcGFjaXR" \
"5OjE7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOm5vbmUiIC8+PC9nPjwvc3ZnPg==\");\n}\n.mistp" \
"layer .controls .progress_container {\n flex-grow: 1;\n position: relative;\n " \
" margin: 15px;\n}\n.mistplayer .controls .button.progress {\n height: 15px;\n " \
"border: 1px solid white;\n overflow: hidden;\n width: auto;\n margin: 0;\n}\n" \
".mistplayer .controls .button.progress .bar {\n background-color: white;\n pos" \
"ition: absolute;\n width: 0;\n top: 0;\n bottom: 0;\n left: 0;\n}\n.mistplay" \
"er .controls .button.progress .buffer {\n background-color: white;\n opacity: " \
"0.5;\n position: absolute;\n top: 0;\n bottom: 0;\n}\n.mistplayer .controls ." \
"progress_container .hint {\n position: absolute;\n background: white;\n borde" \
"r-radius: 5px;\n bottom: 22px;\n padding: 3px 5px;\n color: black;\n opacity" \
": 0.6;\n display: none;\n font-size: 12px;\n}\n.mistplayer .controls .progress" \
"_container .hint:after {\n content: '';\n display: block;\n position: absolut" \
"e;\n left: 0;\n border: 5px solid transparent;\n border-left-color: white;\n " \
" bottom: -5px;\n}\n.mistplayer .controls .button.timestamp {\n width: auto;\n " \
"cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms" \
"-user-select: none;\n user-select: none;\n}\n.mistplayer .controls .button.soun" \
"d {\n height: 65px;\n width: 30px;\n margin-left: 20px;\n position: relative" \
";\n background: url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmN" \
"vZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxuczpkYz0iaHR0cDovL3B1cmwub3J" \
"nL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyM" \
"iIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgeG1" \
"sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3J" \
"nLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIGlkPSJzdmczOTM3IiBoZWlnaHQ9IjY1IiB3aWR0aD0iMzA" \
"iPjxkZWZzIGlkPSJkZWZzMzkzOSIgLz48bWV0YWRhdGEgaWQ9Im1ldGFkYXRhMzk0MiI+PHJkZjpSREY" \
"+PGNjOldvcmsgcmRmOmFib3V0PSIiPjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0Pjx" \
"kYzp0eXBlIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2U" \
"iIC8+PGRjOnRpdGxlPjwvZGM6dGl0bGU+PC9jYzpXb3JrPjwvcmRmOlJERj48L21ldGFkYXRhPjxnIHR" \
"yYW5zZm9ybT0idHJhbnNsYXRlKDAsLTk4Ny4zNjIyKSIgaWQ9ImxheWVyMSI+PHBhdGggaWQ9InJlY3Q" \
"0Njc0IiBkPSJtIDAsMTA1Mi4zNjIyIDAsLTY1IDUsMCBjIC0wLjE3MjU4OCwwIC0wLjMzNzI1NiwwLjA" \
"yOTUgLTAuNSwwLjA2MjUgLTAuNDg5MTExLDAuMSAtMC45NDIzNDUsMC4zMTcyNSAtMS4yODEyNSwwLjY" \
"1NjI1IC0wLjIyNjIwNiwwLjIyNjIgLTAuNDA0NzQzLDAuNTEzNSAtMC41MzEyNSwwLjgxMjUgLTAuMTI" \
"2NTA3LDAuMjk5MSAtMC4xODc1LDAuNjIzNjUgLTAuMTg3NSwwLjk2ODc1IDAsMCAwLjA3NTk3OCwwLjQ" \
"0NzA1IDAuMTg3NSwwLjc4MTI1IGwgMTkuODQzNzUsNTkuNDk5OTUgYyAwLjE0Mjc3NywxLjI0NTEgMS4" \
"xODU0MTQsMi4yMTg4IDIuNDY4NzUsMi4yMTg4IGwgLTI1LDAgeiBtIDI1LDAgYyAwLjg3NzU0OSwwIDE" \
"uNjQ3NjYzLC0wLjQ0MSAyLjA5Mzc1LC0xLjEyNSAwLjA2MzgxLC0wLjA5OCAwLjEwNjIsLTAuMjA0NiA" \
"wLjE1NjI1LC0wLjMxMjUgMC4wMjk2MiwtMC4wNjIgMC4wNjkyNiwtMC4xMjI1IDAuMDkzNzUsLTAuMTg" \
"3NSAwLjA0NTAxLC0wLjEyMTIgMC4wNjc0MSwtMC4yNDU5IDAuMDkzNzUsLTAuMzc1IDAuMDA5LC0wLjA" \
"0NCAwLjAyNDU3LC0wLjA4IDAuMDMxMjUsLTAuMTI1IDAuMDE4NzgsLTAuMTIzNSAwLjAzMTI1LC0wLjI" \
"0NjIgMC4wMzEyNSwtMC4zNzUgbCAwLC02MCBjIDAsLTEuMzg1IC0xLjExNDk5OSwtMi41IC0yLjUsLTI" \
"uNSBsIDUsMCAwLDY1IC01LDAgeiIgc3R5bGU9ImNvbG9yOiMwMDAwMDA7ZGlzcGxheTppbmxpbmU7b3Z" \
"lcmZsb3c6dmlzaWJsZTt2aXNpYmlsaXR5OnZpc2libGU7ZmlsbDojMDAwMDAwO2ZpbGwtb3BhY2l0eTo" \
"xO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lO21hcmtlcjpub25lO2VuYWJsZS1iYWNrZ3JvdW5" \
"kOmFjY3VtdWxhdGUiIC8+PHBhdGggaWQ9InBhdGg0Njk3LTYiIGQ9Im0gMjUsMTA1Mi4zNjE3IGMgLTE" \
"uMjgzMzM2LDAgLTIuMzI1OTczLC0wLjk3MzcgLTIuNDY4NzUsLTIuMjE4NyBMIDIuNjg3NSw5OTAuNjQ" \
"yOSBDIDIuNTc1OTc4LDk5MC4zMDg3IDIuNSw5ODkuODYxNyAyLjUsOTg5Ljg2MTcgYyAwLC0wLjM0NTE" \
"gMC4wNjA5OTMsLTAuNjY5NyAwLjE4NzUsLTAuOTY4OCAwLjEyNjUwNywtMC4yOTkgMC4zMDUwNDQsLTA" \
"uNTg2MyAwLjUzMTI1LC0wLjgxMjUgMC4zMzg5MDUsLTAuMzM5IDAuNzkyMTM5LC0wLjU1NjIgMS4yODE" \
"yNSwtMC42NTYyIDAuMTYyNzQ0LC0wLjAzMyAwLjMyNzQxMiwtMC4wNjIgMC41LC0wLjA2MiBsIDIwLDA" \
"gYyAxLjM4NTAwMSwwIDIuNSwxLjExNSAyLjUsMi41IGwgMCw2MCBjIDAsMC4xMjg4IC0wLjAxMjQ3LDA" \
"uMjUxNSAtMC4wMzEyNSwwLjM3NSAtMC4wMDY3LDAuMDQ1IC0wLjAyMjI1LDAuMDgxIC0wLjAzMTI1LDA" \
"uMTI1IC0wLjAyNjM0LDAuMTI5MiAtMC4wNDg3NCwwLjI1MzggLTAuMDkzNzUsMC4zNzUgLTAuMDI0NDk" \
"sMC4wNjUgLTAuMDY0MTMsMC4xMjUyIC0wLjA5Mzc1LDAuMTg3NSAtMC4wNTAwNSwwLjEwNzkgLTAuMDk" \
"yNDQsMC4yMTQ1IC0wLjE1NjI1LDAuMzEyNSAtMC40NDYwODcsMC42ODQgLTEuMjE2MjAxLDEuMTI1IC0" \
"yLjA5Mzc1LDEuMTI1IHogbSAwLC0xLjIxODcgYyAwLjQ3NDEwNiwwIDAuODY0NzM0LC0wLjIxMTQgMS4" \
"wOTM3NSwtMC41NjI1IC0wLjAyMTEyLDAuMDMyIC0wLjAwNTksLTAuMDEgMC4wNjI1LC0wLjE1NjMgYSA" \
"xLjIwNDQ1MiwxLjIwNDQ1MiAwIDAgMSAwLC0wLjAzMSBjIDAuMDIzNSwtMC4wNDkgMC4wNTE5OCwtMC4" \
"wNTIgMC4wNjI1LC0wLjA2MiAwLjAwNTUsLTAuMDE2IDAuMDA5NCwtMC4wMzUgMCwtMC4wMzEgMC4wMDE" \
"3LC0wLjAxIDAuMDA1NSwtMC4wNjEgMC4wMzEyNSwtMC4xODc1IDAuMDA4LC0wLjAzOSAwLjAyNTU1LC0" \
"wLjAzOSAwLjAzMTI1LC0wLjA2MiAwLjAwOTgsLTAuMDY2IDAuMDA1NSwtMC4xMDI3IDAsLTAuMDk0IC0" \
"wLjAwMTYsLTAuMDMgMCwtMC4wNjggMCwtMC4wOTQgbCAwLC02MCBjIDAsLTAuNzM4NiAtMC41NDI2MTc" \
"sLTEuMjgxMyAtMS4yODEyNSwtMS4yODEzIGwgLTIwLDAgYyAtMC4wMzUzNTMsMCAtMC4xMDUzMjIsMCA" \
"tMC4yNSwwLjAzMSAtMC4yOTY4NjMsMC4wNjEgLTAuNTQ2MzQzLDAuMTcxMyAtMC42ODc1LDAuMzEyNSA" \
"tMC4wODkzOTQsMC4wODkgLTAuMjA1MjYzLDAuMjU4IC0wLjI4MTI1LDAuNDM3NSAtMC4wNTUzMTUsMC4" \
"xMzA4IC0wLjA1ODY2MSwwLjI4MzIgLTAuMDYyNSwwLjQ2ODcgLTIuNTJlLTQsMC4wMTIgMCwwLjAxOSA" \
"wLDAuMDMxIDAuMDI3OTgyLDAuMTM1MyAwLjA4MjQ5OSwwLjI3ODkgMC4xMjUsMC40MDYyIGwgMTkuODQ" \
"zNzUsNTkuNTAwNSBhIDEuMjA0NDUyLDEuMjA0NDUyIDAgMCAxIDAuMDMxMjUsMC4yNSBjIDAuMDc1Mjc" \
"sMC42NTY0IDAuNjA3MDU0LDEuMTI1IDEuMjgxMjUsMS4xMjUgeiIgc3R5bGU9ImZpbGw6I2ZmZmZmZjt" \
"maWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz48L2c+PC9zdmc+\") no-repeat;\n}\n.mistpla" \
"yer .controls .button.sound .speaker {\n width: 25px;\n height: 25px;\n margi" \
"n: 0;\n background-image: url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iM" \
"S4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxuczpkYz0iaHR0cDovL" \
"3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zL" \
"m9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4L" \
"W5zIyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM9Imh0dHA6Ly93d" \
"3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIGlkPSJzdmc0NjU5IiBoZWlnaHQ9IjI1IiB3a" \
"WR0aD0iMjUiPjxkZWZzIGlkPSJkZWZzNDY2MSIgLz48bWV0YWRhdGEgaWQ9Im1ldGFkYXRhNDY2NCI+P" \
"HJkZjpSREY+PGNjOldvcmsgcmRmOmFib3V0PSIiPjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Z" \
"m9ybWF0PjxkYzp0eXBlIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0a" \
"WxsSW1hZ2UiIC8+PGRjOnRpdGxlPjwvZGM6dGl0bGU+PC9jYzpXb3JrPjwvcmRmOlJERj48L21ldGFkY" \
"XRhPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMjcuMzYyMikiIGlkPSJsYXllcjEiPjxwYXRoI" \
"GlkPSJyZWN0NDE1OSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwxMDI3LjM2MjIpIiBkPSJNIDAgMCBMI" \
"DAgMjUgTCAyNSAyNSBMIDI1IDAgTCAwIDAgeiBNIDE3Ljc4OTA2MiAwLjc0NjA5Mzc1IEMgMTguMjk1M" \
"TM5IDAuNzY3NzkwNDMgMTguNzk2OTM2IDAuOTE1NDM0MzggMTkuMjUgMS4xODU1NDY5IEwgMTkuMjUgM" \
"jMuODEyNSBDIDE4LjA0MTUxMiAyNC41MzQ2IDE2LjQ4MTgzMiAyNC4zNzc0OTQgMTUuNDQ1MzEyIDIzL" \
"jMwODU5NCBMIDEwLjM0MTc5NyAxOC4wNDY4NzUgTCA4LjA4Nzg5MDYgMTguMDQ2ODc1IEMgNi43OTk3O" \
"Tc2IDE4LjA0Njg3NSA1Ljc1IDE2Ljk2MzI2NiA1Ljc1IDE1LjYzNDc2NiBMIDUuNzUgOS4zNjMyODEyI" \
"EMgNS43NSA4LjAzNDg4MTIgNi43OTk3OTc2IDYuOTUxMTcxOSA4LjA4Nzg5MDYgNi45NTExNzE5IEwgM" \
"TAuMzQxNzk3IDYuOTUxMTcxOSBMIDE1LjQ0NTMxMiAxLjY4OTQ1MzEgQyAxNi4wOTI3NTkgMS4wMjE3M" \
"DMxIDE2Ljk0NTYwMiAwLjcwOTkzMjYyIDE3Ljc4OTA2MiAwLjc0NjA5Mzc1IHogIiBzdHlsZT0ib3BhY" \
"2l0eToxO2ZpbGw6IzAwMDAwMDtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2U6b" \
"m9uZTtzdHJva2Utd2lkdGg6MS41O3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub" \
"25lO3N0cm9rZS1kYXNob2Zmc2V0OjA7c3Ryb2tlLW9wYWNpdHk6MSIgLz48cGF0aCBpZD0icmVjdDQ1N" \
"zQiIGQ9Im0gMTkuMjUsMTAyOC41NDczIGMgLTEuMjA4MTcsLTAuNzIwMyAtMi43Njk1OTksLTAuNTY0I" \
"C0zLjgwNTUxMywwLjUwNDQgbCAtNS4xMDIzNjIsNS4yNjIyIC0yLjI1MzU0MTgsMCBjIC0xLjI4ODA5M" \
"ywwIC0yLjMzODU4MzIsMS4wODM0IC0yLjMzODU4MzIsMi40MTE4IGwgMCw2LjI3MDkgYyAwLDEuMzI4N" \
"SAxLjA1MDQ5MDIsMi40MTE5IDIuMzM4NTgzMiwyLjQxMTkgbCAyLjI1MzU0MTgsMCA1LjEwMjM2Miw1L" \
"jI2MjMgYyAxLjAzNjUyLDEuMDY4OSAyLjU5NzAyNSwxLjIyNjMgMy44MDU1MTMsMC41MDQyIGwgMCwtM" \
"jIuNjI3NyB6IiBzdHlsZT0iZmlsbDpub25lO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTojZmZmZmZmO3N0c" \
"m9rZS13aWR0aDoxLjU7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb" \
"2tlLW9wYWNpdHk6MSIgLz48L2c+PC9zdmc+\");\n position: absolute;\n left: -15px;\n" \
" top: 30px;\n background-color: white;\n}\n.mistplayer .controls .button.sound" \
" .speaker[data-muted] {\n background-color: transparent;\n}\n.mistplayer .contr" \
"ols .button.sound .volume {\n position: absolute;\n bottom: 0;\n left: 1px;\n" \
" right: 1px;\n background-color: white;\n opacity: 0.6;\n height: 100%;\n z" \
"-index: -1;\n}\n.mistplayer .controls .button.loop {\n min-height: 45px;\n bac" \
"kground-color: transparent;\n background-image: url(\"data:image/svg+xml;base64" \
",PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB" \
"4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOmNjPSJodHRwOi8" \
"vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8" \
"wMi8yMi1yZGYtc3ludGF4LW5zIyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI" \
"geG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNDUiIGhlaWdodD0iNDUiIGl" \
"kPSJzdmczOTM3IiB2ZXJzaW9uPSIxLjEiPiA8ZGVmcyBpZD0iZGVmczM5MzkiIC8+IDxtZXRhZGF0YSB" \
"pZD0ibWV0YWRhdGEzOTQyIj4gPHJkZjpSREY+IDxjYzpXb3JrIHJkZjphYm91dD0iIj4gPGRjOmZvcm1" \
"hdD5pbWFnZS9zdmcreG1sPC9kYzpmb3JtYXQ+IDxkYzp0eXBlIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B" \
"1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+IDxkYzp0aXRsZT48L2RjOnRpdGxlPiA8L2N" \
"jOldvcms+IDwvcmRmOlJERj4gPC9tZXRhZGF0YT4gPHBhdGggaWQ9InJlY3Q0NTExIiBkPSJNIDAgMCB" \
"MIDAgNDUgTCA0NSA0NSBMIDQ1IDAgTCAwIDAgeiBNIDIyLjUgMTEuMjUgQSAxMS4yNSAxMS4yNSAwIDA" \
"gMSAzMy43NSAyMi41IEEgMTEuMjUgMTEuMjUgMCAwIDEgMjIuNSAzMy43NSBBIDExLjI1IDExLjI1IDA" \
"gMCAxIDE0LjU1MDc4MSAzMC40NDkyMTkgTCAxMi43MTQ4NDQgMzIuMjg1MTU2IEwgMTIuNzE0ODQ0IDI" \
"1Ljc4NTE1NiBMIDE5LjIxNDg0NCAyNS43ODUxNTYgTCAxNy4zNzY5NTMgMjcuNjIzMDQ3IEEgNy4yNSA" \
"3LjI1IDAgMCAwIDIyLjUgMjkuNzUgQSA3LjI1IDcuMjUgMCAwIDAgMjkuNzUgMjIuNSBBIDcuMjUgNy4" \
"yNSAwIDAgMCAyMi41IDE1LjI1IEEgNy4yNSA3LjI1IDAgMCAwIDE3LjM3Njk1MyAxNy4zNzY5NTMgTCA" \
"xNC41NTA3ODEgMTQuNTUwNzgxIEEgMTEuMjUgMTEuMjUgMCAwIDEgMjIuNSAxMS4yNSB6ICIgc3R5bGU" \
"9Im9wYWNpdHk6MTtmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3R" \
"yb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNTtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJ" \
"yYXk6bm9uZTtzdHJva2UtZGFzaG9mZnNldDowO3N0cm9rZS1vcGFjaXR5OjEiIC8+IDxwYXRoIGlkPSJ" \
"wYXRoNDQ5NSIgZD0iTSAyMi41IDExLjI1IEEgMTEuMjUgMTEuMjUgMCAwIDAgMTQuNTUwNzgxIDE0LjU" \
"1MDc4MSBMIDE3LjM3Njk1MyAxNy4zNzY5NTMgQSA3LjI1IDcuMjUgMCAwIDEgMjIuNSAxNS4yNSBBIDc" \
"uMjUgNy4yNSAwIDAgMSAyOS43NSAyMi41IEEgNy4yNSA3LjI1IDAgMCAxIDIyLjUgMjkuNzUgQSA3LjI" \
"1IDcuMjUgMCAwIDEgMTcuMzc2OTUzIDI3LjYyMzA0NyBMIDE5LjIxNDg0NCAyNS43ODUxNTYgTCAxMi4" \
"3MTQ4NDQgMjUuNzg1MTU2IEwgMTIuNzE0ODQ0IDMyLjI4NTE1NiBMIDE0LjU1MDc4MSAzMC40NDkyMTk" \
"gQSAxMS4yNSAxMS4yNSAwIDAgMCAyMi41IDMzLjc1IEEgMTEuMjUgMTEuMjUgMCAwIDAgMzMuNzUgMjI" \
"uNSBBIDExLjI1IDExLjI1IDAgMCAwIDIyLjUgMTEuMjUgeiAiIHN0eWxlPSJvcGFjaXR5OjE7ZmlsbDp" \
"ub25lO2ZpbGwtb3BhY2l0eTowLjg1ODQ0NzU7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOiNmZmZmZmY" \
"7c3Ryb2tlLXdpZHRoOjEuNTtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTt" \
"zdHJva2UtZGFzaG9mZnNldDowO3N0cm9rZS1vcGFjaXR5OjEiIC8+PC9zdmc+\");\n}\n.mistplaye" \
"r .controls .button.loop[data-on] {\n background-color: rgba(255,255,255,0.6);\n" \
"}\n.mistplayer .controls .button.fullscreen {\n background-image: url(\"data:im" \
"age/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvb" \
"mU9Im5vIj8+PHN2ZyB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtb" \
"G5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDovL3d3d" \
"y53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczL" \
"m9yZy8yMDAwL3N2ZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxL" \
"jEiIGlkPSJzdmczOTM3IiBoZWlnaHQ9IjQ1IiB3aWR0aD0iNDUiPjxkZWZzIGlkPSJkZWZzMzkzOSIgL" \
"z48bWV0YWRhdGEgaWQ9Im1ldGFkYXRhMzk0MiI+PHJkZjpSREY+PGNjOldvcmsgcmRmOmFib3V0PSIiP" \
"jxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0PjxkYzp0eXBlIHJkZjpyZXNvdXJjZT0ia" \
"HR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+PGRjOnRpdGxlPjwvZGM6dGl0b" \
"GU+PC9jYzpXb3JrPjwvcmRmOlJERj48L21ldGFkYXRhPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsL" \
"TEwMDcuMzYyMikiIGlkPSJsYXllcjEiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEuMTA5Mzc1K" \
"SIgaWQ9Imc0NTYzIj48ZyBpZD0iZzQ1NTgiPjxwYXRoIGlkPSJyZWN0Mzk0NSIgdHJhbnNmb3JtPSJ0c" \
"mFuc2xhdGUoMCwxMDA3LjM2MjIpIiBkPSJNIDUuMTU2MjUsMTAgQyAzLjY5MTM0NjEsMTAgMi41LDExL" \
"jE5MTM0NiAyLjUsMTIuNjU2MjUgbCAwLDE5LjY4NzUgQyAyLjUsMzMuODA4NjU0IDMuNjkxMzQ2MSwzN" \
"SA1LjE1NjI1LDM1IGwgMzQuNjg3NSwwIEMgNDEuMzA4NjU0LDM1IDQyLjUsMzMuODA4NjU0IDQyLjUsM" \
"zIuMzQzNzUgbCAwLC0xOS42ODc1IEMgNDIuNSwxMS4xOTEzNDYgNDEuMzA4NjU0LDEwIDM5Ljg0Mzc1L" \
"DEwIEwgNS4xNTYyNSwxMCB6IE0gNSwxMi41MzEyNSBsIDM1LDAgMCwyMCAtMzUsMCAwLC0yMCB6IiBzd" \
"HlsZT0iZmlsbDojZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPjxyZWN0IHJ5PSIwIiB5P" \
"SIxMDE5Ljg2MjIiIHg9IjUiIGhlaWdodD0iMjAiIHdpZHRoPSIzNSIgaWQ9InJlY3QzOTQ3IiBzdHlsZ" \
"T0iZmlsbDojZmZmO2ZpbGwtb3BhY2l0eTowLjM5MjE1Njg2O3N0cm9rZTpub25lIiAvPjxwYXRoIGlkP" \
"SJwYXRoMzk0OSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwxMDA3LjM2MjIpIiBkPSJtIDE4Ljc4MTI1L" \
"DM1LjQwNjI1IGMgLTEuNTM2NjEsMC4zNzk4MDkgLTIuOTcxNDY1LDAuOTkxNTU3IC00LjI4MTI1LDEuO" \
"DEyNSBsIDE1LjY1NjI1LDAgYyAtMS4zMTMwMDUsLTAuODIyOTYxIC0yLjc2MjgyNSwtMS40MzI5NTMgL" \
"TQuMzEyNSwtMS44MTI1IGwgLTcuMDYyNSwwIHoiIHN0eWxlPSJmaWxsOiNmZmY7ZmlsbC1vcGFjaXR5O" \
"jE7c3Ryb2tlOm5vbmUiIC8+PC9nPjxnIGlkPSJnNDAwNyIgdHJhbnNmb3JtPSJtYXRyaXgoMi4wMzUzO" \
"Tg1LDAsMCwxLjE2MzA4MjgsLTk5LjMyMTczNCwtMTQxLjU0NTgxKSIgc3R5bGU9ImZpbGw6IzAwMCI+P" \
"HBhdGggaWQ9InJlY3QzOTU4IiBkPSJtIDY1LjUzMzY0NiwxMDAxLjQ3NTggLTIuMDMyOTMyLDAgMC42N" \
"jI5MTMsMC42NjI5IC0yLjI1MzkwMywyLjI1MzkgMC43MDcxMDcsMC43MDcxIDIuMjUzOTAzLC0yLjI1M" \
"zkgMC42NjI5MTIsMC42NjI5IDAsLTIuMDMyOSB6IiBzdHlsZT0iZmlsbDojZmZmO2ZpbGwtb3BhY2l0e" \
"ToxO3N0cm9rZTpub25lIiAvPjxwYXRoIGlkPSJyZWN0Mzk1OC01IiBkPSJtIDY1LjUzMzY0NiwxMDEyL" \
"jg0IDAsLTIuMDMzIC0wLjY2MjgzNiwwLjY2MjkgLTIuMjUzOTAxLC0yLjI1MzkgLTAuNzA3MTA0LDAuN" \
"zA3MSAyLjI1MzkwMiwyLjI1MzkgLTAuNjYyOTA2LDAuNjYyOSAyLjAzMjg0NSwxZS00IHoiIHN0eWxlP" \
"SJmaWxsOiNmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmUiIC8+PHBhdGggaWQ9InJlY3QzOTU4L" \
"TUxIiBkPSJtIDU0LjE2OTQzLDEwMDEuNDc1OCAyLjAzMjkzMiwwIC0wLjY2MjkxMywwLjY2MjkgMi4yN" \
"TM5MDMsMi4yNTM5IC0wLjcwNzEwNywwLjcwNzEgLTIuMjUzOTAzLC0yLjI1MzkgLTAuNjYyOTEyLDAuN" \
"jYyOSAwLC0yLjAzMjkgeiIgc3R5bGU9ImZpbGw6I2ZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZ" \
"SIgLz48cGF0aCBpZD0icmVjdDM5NTgtNS03IiBkPSJtIDU0LjE2OTQzLDEwMTIuODQgMCwtMi4wMzMgM" \
"C42NjI4MzYsMC42NjI5IDIuMjUzOTAxLC0yLjI1MzkgMC43MDcxMDQsMC43MDcxIC0yLjI1MzkwMiwyL" \
"jI1MzkgMC42NjI5MDYsMC42NjI5IC0yLjAzMjg0NSwxZS00IHoiIHN0eWxlPSJmaWxsOiNmZmY7Zmlsb" \
"C1vcGFjaXR5OjE7c3Ryb2tlOm5vbmUiIC8+PC9nPjwvZz48L2c+PC9zdmc+\");\n height: 45px;" \
"\n}\n.mistplayer .controls .button.tracks {\n line-height: 25px;\n width: 100%" \
";\n margin: 0;\n height: 25px;\n padding: 0 15px;\n box-sizing: border-box;\n" \
" -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none" \
";\n user-select: none;\n}\n.mistplayer .controls .tracks .settings {\n positio" \
"n: absolute;\n background-color: black;\n padding: 5px 10px;\n right: -1000px" \
";\n bottom: 27px;\n}\n.mistplayer .controls .tracks:hover .settings {\n right:" \
" 0;\n}\n.mistplayer .controls .tracks:not(:hover) .settings {\n transition: rig" \
"ht 0.5s ease-in 1s;\n}\n.mistplayer .controls .tracks .settings label {\n text-" \
"align: left;\n display: flex;\n flex-flow: row nowrap;\n}\n.mistplayer .contro" \
"ls .tracks .settings label > *:not(:first-child) {\n margin-left: 1em;\n flex-" \
"grow: 1;\n}\n.mistplayer .controls .tracks .settings label span {\n text-transf" \
"orm: capitalize;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms" \
"-user-select: none;\n user-select: none;\n}\n.mistplayer .controls .tracks .set" \
"tings label select {\n background: none;\n color: white;\n border: none;\n o" \
"utline: none;\n}\n.mistplayer .controls .tracks .settings label option {\n colo" \
"r: black;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n " \
"100% {\n transform: rotate(360deg);\n }\n}\n";
unsigned int mist_css_len = 26810;

View file

@ -16,6 +16,13 @@ namespace Mist {
myConn = Socket::Connection(fileno(stdout),fileno(stdin) );
myConn.setHost(host);
}
if (config->getOption("wrappers",true).size() == 0 || config->getString("wrappers") == ""){
JSON::Value & wrappers = config->getOption("wrappers",true);
wrappers.shrink(0);
jsonForEach(capa["optional"]["wrappers"]["allowed"],it){
wrappers.append(*it);
}
}
}
OutHTTP::~OutHTTP() {}
@ -58,9 +65,24 @@ namespace Mist {
capa["url_match"].append("/$.smil");
capa["url_match"].append("/info_$.js");
capa["url_match"].append("/json_$.js");
capa["url_match"].append("/player.js");
capa["url_match"].append("/player.css");
capa["url_match"].append("/embed_$.js");
capa["url_match"].append("/flashplayer.swf");
capa["url_match"].append("/oldflashplayer.swf");
capa["optional"]["wrappers"]["name"] = "Active players";
capa["optional"]["wrappers"]["help"] = "Which players are attempted and in what order.";
capa["optional"]["wrappers"]["default"] = "";
capa["optional"]["wrappers"]["type"] = "ord_multi_sel";
/*capa["optional"]["wrappers"]["allowed"].append("theoplayer");
capa["optional"]["wrappers"]["allowed"].append("jwplayer");*/
capa["optional"]["wrappers"]["allowed"].append("html5");
capa["optional"]["wrappers"]["allowed"].append("dashjs");
//capa["optional"]["wrappers"]["allowed"].append("polytrope"); //currently borked
capa["optional"]["wrappers"]["allowed"].append("flash_strobe");
capa["optional"]["wrappers"]["allowed"].append("silverlight");
capa["optional"]["wrappers"]["option"] = "--wrappers";
capa["optional"]["wrappers"]["short"] = "w";
cfg->addConnectorOptions(8080, capa);
/*LTS-START*/
cfg->addOption("nostreamtext", JSON::fromString("{\"arg\":\"string\", \"default\":\"\", \"short\":\"t\",\"long\":\"nostreamtext\",\"help\":\"Text or HTML to display when streams are unavailable.\"}"));
@ -261,6 +283,7 @@ namespace Mist {
}
// send generic HTML page
/* old embed
if (H.url.length() > 6 && H.url.substr(H.url.length() - 5, 5) == ".html"){
H.Clean();
H.SetHeader("Content-Type", "text/html");
@ -275,6 +298,33 @@ namespace Mist {
H.SendResponse("200", "OK", myConn);
return;
}
*/
/* new embed */
if (H.url.length() > 6 && H.url.substr(H.url.length() - 5, 5) == ".html"){
std::string fullHost = H.GetHeader("Host");
std::string uAgent = H.GetHeader("User-Agent");
H.Clean();
H.SetHeader("Content-Type", "text/html");
H.SetHeader("Server", "MistServer/" PACKAGE_VERSION);
H.setCORSHeaders();
if(method == "OPTIONS" || method == "HEAD"){
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
std::string hlsUrl = "/hls/"+streamName+"/index.m3u8";
std::string mp4Url = "/"+streamName+".mp4";
H.SetBody("<!DOCTYPE html><html><head><title>"+streamName+"</title><style>body{color:white;background:black;}</style></head><body><div class=mistvideo id=\""+streamName+"\"><noscript><video controls autoplay><source src=\""+hlsUrl+"\" type=\"application/vnd.apple.mpegurl\"><source src=\""+mp4Url+"\" type=\"video/mp4\"><a href=\""+hlsUrl+"\">Click here to play the video [Apple]</a><br><a href=\""+mp4Url+"\">Click here to play the video [MP4]</a></video></noscript><script src=\"/player.js\"></script><script>mistPlay('"+streamName+"',{host:'//"+fullHost+"',target:document.getElementById('"+streamName+"')})</script></div></body></html>");
if ((uAgent.find("iPad") != std::string::npos) || (uAgent.find("iPod") != std::string::npos) || (uAgent.find("iPhone") != std::string::npos)) {
H.SetHeader("Location",hlsUrl);
H.SendResponse("307", "HLS redirect", myConn);
return;
}
H.SendResponse("200", "OK", myConn);
return;
}
// send smil MBR index
if (H.url.length() > 6 && H.url.substr(H.url.length() - 5, 5) == ".smil"){
@ -497,5 +547,99 @@ namespace Mist {
H.Clean();
return;
} //embed code generator
if (H.url == "/player.js"){
std::string fullHost = H.GetHeader("Host");
std::string response;
std::string rURL = H.url;
std::string host = H.GetHeader("Host");
if (host.rfind(':') != std::string::npos && *host.rbegin() != ']'){
host.resize(host.rfind(':'));
}
H.Clean();
H.SetHeader("Server", "MistServer/" PACKAGE_VERSION);
H.setCORSHeaders();
H.SetHeader("Content-Type", "application/javascript");
if(method == "OPTIONS" || method == "HEAD"){
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
response.append("if (typeof mistoptions == 'undefined') { mistoptions = {}; }\nif (!('host' in mistoptions)) { mistoptions.host = 'http://"+fullHost+"'; }\n");
#include "core.js.h"
response.append((char*)core_js, (size_t)core_js_len);
jsonForEach(config->getOption("wrappers",true),it){
bool used = false;
if (it->asStringRef() == "html5"){
#include "html5.js.h"
response.append((char*)html5_js, (size_t)html5_js_len);
used = true;
}
if (it->asStringRef() == "flash_strobe"){
#include "flash_strobe.js.h"
response.append((char*)flash_strobe_js, (size_t)flash_strobe_js_len);
used = true;
}
if (it->asStringRef() == "silverlight"){
#include "silverlight.js.h"
response.append((char*)silverlight_js, (size_t)silverlight_js_len);
used = true;
}
if (it->asStringRef() == "theoplayer"){
#include "theoplayer.js.h"
response.append((char*)theoplayer_js, (size_t)theoplayer_js_len);
used = true;
}
if (it->asStringRef() == "jwplayer"){
#include "jwplayer.js.h"
response.append((char*)jwplayer_js, (size_t)jwplayer_js_len);
used = true;
}
if (it->asStringRef() == "polytrope"){
#include "polytrope.js.h"
response.append((char*)polytrope_js, (size_t)polytrope_js_len);
used = true;
}
if (it->asStringRef() == "dashjs"){
#include "playerdash.js.h"
response.append((char*)playerdash_js, (size_t)playerdash_js_len);
#include "dashjs.js.h"
response.append((char*)dash_js, (size_t)dash_js_len);
used = true;
}
if (!used) {
WARN_MSG("Unknown player type: %s",it->asStringRef().c_str());
}
}
H.SetBody(response);
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
if (H.url == "/player.css"){
std::string response;
H.Clean();
H.SetHeader("Server", "MistServer/" PACKAGE_VERSION);
H.setCORSHeaders();
H.SetHeader("Content-Type", "text/css");
if (method == "OPTIONS" || method == "HEAD"){
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
#include "mist.css.h"
response.append((char*)mist_css, (size_t)mist_css_len);
H.SetBody(response);
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
}
}