LSP: thumbnailing; currently disabled
This commit is contained in:
parent
db543cb4e4
commit
b0326ccd1e
7 changed files with 105 additions and 14 deletions
|
@ -165,6 +165,7 @@ set(libSources
|
||||||
${SOURCE_DIR}/lib/util.cpp
|
${SOURCE_DIR}/lib/util.cpp
|
||||||
${SOURCE_DIR}/lib/vorbis.cpp
|
${SOURCE_DIR}/lib/vorbis.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
# MistLib - Build #
|
# MistLib - Build #
|
||||||
########################################
|
########################################
|
||||||
|
@ -319,6 +320,7 @@ add_executable(MistOutHTTP
|
||||||
generated/polytrope.js.h
|
generated/polytrope.js.h
|
||||||
generated/dashjs.js.h
|
generated/dashjs.js.h
|
||||||
generated/videojs.js.h
|
generated/videojs.js.h
|
||||||
|
generated/img.js.h
|
||||||
generated/playerdash.js.h
|
generated/playerdash.js.h
|
||||||
generated/playervideo.js.h
|
generated/playervideo.js.h
|
||||||
generated/core.js.h
|
generated/core.js.h
|
||||||
|
@ -418,6 +420,10 @@ add_custom_command(OUTPUT generated/videojs.js.h
|
||||||
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/videojs.js video_js generated/videojs.js.h
|
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/videojs.js video_js generated/videojs.js.h
|
||||||
DEPENDS sourcery ${SOURCE_DIR}/embed/wrappers/videojs.js
|
DEPENDS sourcery ${SOURCE_DIR}/embed/wrappers/videojs.js
|
||||||
)
|
)
|
||||||
|
add_custom_command(OUTPUT generated/img.js.h
|
||||||
|
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/img.js img_js generated/img.js.h
|
||||||
|
DEPENDS sourcery ${SOURCE_DIR}/embed/wrappers/img.js
|
||||||
|
)
|
||||||
add_custom_command(OUTPUT generated/playerdash.js.h
|
add_custom_command(OUTPUT generated/playerdash.js.h
|
||||||
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/dash.js playerdash_js generated/playerdash.js.h
|
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/dash.js playerdash_js generated/playerdash.js.h
|
||||||
DEPENDS sourcery ${SOURCE_DIR}/embed/players/dash.js
|
DEPENDS sourcery ${SOURCE_DIR}/embed/players/dash.js
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
<script src=wrappers/videojs.js></script>
|
<script src=wrappers/videojs.js></script>
|
||||||
<script src=wrappers/dashjs.js></script>
|
<script src=wrappers/dashjs.js></script>
|
||||||
<script src=wrappers/flash_strobe.js></script>
|
<script src=wrappers/flash_strobe.js></script>
|
||||||
|
<script src=wrappers/img.js></script>
|
||||||
<script src=wrappers/silverlight.js></script>
|
<script src=wrappers/silverlight.js></script>
|
||||||
<script src=wrappers/polytrope.js></script>
|
<script src=wrappers/polytrope.js></script>
|
||||||
|
|
||||||
|
|
22
embed/wrappers/img.js
Normal file
22
embed/wrappers/img.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
mistplayers.img = {
|
||||||
|
name: 'HTML img tag',
|
||||||
|
mimes: ['html5/image/jpeg'],
|
||||||
|
priority: Object.keys(mistplayers).length + 1,
|
||||||
|
isMimeSupported: function (mimetype) {
|
||||||
|
return (this.mimes.indexOf(mimetype) == -1 ? false : true);
|
||||||
|
},
|
||||||
|
isBrowserSupported: function (mimetype,source,options,streaminfo) {
|
||||||
|
//only use this if we are sure we just want an image
|
||||||
|
if ((options.forceType) || (options.forceSource) || (options.forcePlayer)) { return true; }
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
player: function(){}
|
||||||
|
};
|
||||||
|
var p = mistplayers.img.player;
|
||||||
|
p.prototype = new MistPlayer();
|
||||||
|
p.prototype.build = function (options) {
|
||||||
|
var ele = this.element('img');
|
||||||
|
ele.src = options.src;
|
||||||
|
ele.style.display = 'block';
|
||||||
|
return ele;
|
||||||
|
}
|
|
@ -792,6 +792,13 @@ button.return:before {
|
||||||
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG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JrPjwvcmRmOlJERj48L21ldGFkYXRhPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMDcuMzYyMikiIGlkPSJsYXllcjEiPjxwYXRoIHRyYW5zZm9ybT0ibWF0cml4KDEuMDE0MTgyNywtMC41ODU1Mzg2NywwLjU4NTUzODY3LDEuMDE0MTgyNywtMC40ODQxOTgzMSwxMDIyLjg4OTMpIiBkPSJNIDEwLjMxMjUsLTYuMzQzNzUgQSAyLjk0MTYxODYsMi45NDE2MTg2IDAgMCAwIDcuOTA2MjUsLTQuODc1IGwgLTE0LjEyNSwyNC41IGEgMi45NDE2MTg2LDIuOTQxNjE4NiAwIDAgMCAyLjU2MjUsNC40MDYyNSBsIDI4LjI4MTI1LDAgQSAyLjk0MTYxODYsMi45NDE2MTg2IDAgMCAwIDI3LjE1NjI1LDE5LjYyNSBMIDEzLC00Ljg3NSBhIDIuOTQxNjE4NiwyLjk0MTYxODYgMCAwIDAgLTIuNjg3NSwtMS40Njg3NSB6IiBpZD0icGF0aDM4MDkiIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLW9wYWNpdHk6MSIgLz48L2c+PC9zdmc+");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
|
line-height: 100px;
|
||||||
|
}
|
||||||
|
.preview_icons .image img {
|
||||||
|
max-width: 200px;
|
||||||
|
max-height: 100px;
|
||||||
|
min-width: 0px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.preview_icons .image.folder {
|
.preview_icons .image.folder {
|
||||||
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgeG1sbnM6ZGM9Imh0dHA6Ly9wd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2xhdGUoMCwtMTAwNy4zNjIyKSIgICBpZD0ibGF5ZXIxIj4gIDxwYXRoICAgIGlkPSJyZWN0NDE0NyIgICAgZD0ibSAyNi41MDAwMDEsMTAxNC4yOTk3IC01LjMzMzMzNCw1LjkyNzEgLTE4LjY2NjY2NywwIDAsMjkuNjM1NCAyNCwwIDE2LDAgYyAwLC0xMS44NTQyIDAsLTIzLjcwODMgMCwtMzUuNTYyNSB6IiAgICBzdHlsZT0ib3BhY2l0eToxO2ZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MTtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2UtZGFzaG9mZnNldDowO3N0cm9rZS1vcGFjaXR5OjEiIC8+IDwvZz48L3N2Zz4=");
|
||||||
|
|
|
@ -76,13 +76,14 @@ type:"password",validate:["required",function(a,b){return a!=$(".match_password"
|
||||||
delete mist.user.rawpassword}}]}]));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>");
|
delete mist.user.rawpassword}}]}]));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")}}]}]));
|
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 f=$("<span>").text("Loading.."),q=$("<span>"),p=$("<span>").addClass("logs"),l=$("<span>"),u=$("<span>"),h=$("<span>"),i=$("<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:f,
|
break;case "Overview":var f=$("<span>").text("Loading.."),q=$("<span>"),p=$("<span>").addClass("logs"),l=$("<span>"),u=$("<span>"),h=$("<span>"),i=$("<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:f,
|
||||||
LTSonly:!0},{type:"span",label:"Server time",value:u},{type:"span",label:"Configured streams",value:mist.data.streams?Object.keys(mist.data.streams).length:0},{type:"span",label:"Active streams",value:q},{type:"span",label:"Current connections",value:l},{type:"span",label:"Enabled protocols",value:h},{type:"span",label:"Disabled protocols",value:i},{type:"span",label:"Recent problems",value:p},$("<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."},
|
LTSonly:!0},{type:"span",label:"Server time",value:u},{type:"span",label:"Licensed to","default":"unknown",pointer:{main:mist.data.config.license,index:"user"},LTSonly:!0},{type:"span",label:"Configured streams",value:mist.data.streams?Object.keys(mist.data.streams).length:0},{type:"span",label:"Active streams",value:q},{type:"span",label:"Current connections",value:l},{type:"span",label:"Enabled protocols",value:h},{type:"span",label:"Disabled protocols",value:i},{type:"span",label:"Recent problems",
|
||||||
{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."},
|
value:p},$("<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",
|
||||||
{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 k=function(){var a=mist.stored.get().update||{};"uptodate"in a?a.error?f.addClass("red").text(a.error):a.uptodate?f.text("Your version is up to date.").addClass("green"):f.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?")){f.addClass("orange").removeClass("red").text("Rolling update command sent..");
|
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 k=
|
||||||
mist.stored.del("update");mist.send(function(){UI.navto("Overview")},{autoupdate:true})}})):f.text("Unknown")};if(!mist.stored.get().update||36E5<(new Date).getTime()-mist.stored.get().update.lastchecked){var j=mist.stored.get().update||{};j.lastchecked=(new Date).getTime();mist.send(function(a){mist.stored.set("update",$.extend(true,j,a.update));k()},{checkupdate:!0})}else k()}else f.text("");g=function(){var a={totals:{fields:["clients"],start:-10},active_streams:true};if(!("cabailities"in mist.data))a.capabilities=
|
function(a){"uptodate"in a?a.error?f.addClass("red").text(a.error):a.uptodate?f.text("Your version is up to date.").addClass("green"):f.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?")){f.addClass("orange").removeClass("red").text("Rolling update command sent..");mist.stored.del("update");mist.send(function(){UI.navto("Overview")},{autoupdate:true})}})):
|
||||||
true;mist.send(function(){ga()},a)};var ga=function(){q.text("active_streams"in mist.data?mist.data.active_streams?mist.data.active_streams.length:0:"?");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..";l.text(a);u.text(UI.format.dateTime(mist.data.config.time,"long"));p.html("");var a=0,b;for(b in mist.data.log){var c=mist.data.log[b];if(["FAIL","ERROR"].indexOf(c[1])>
|
f.text("Unknown")};if(!mist.stored.get().update||36E5<(new Date).getTime()-mist.stored.get().update.lastchecked){var j={};j.lastchecked=(new Date).getTime();mist.send(function(a){mist.stored.set("update",j);k(a.update)},{checkupdate:!0})}else mist.send(function(a){k(a.update)},{update:!0})}else f.text("");g=function(){var a={totals:{fields:["clients"],start:-10},active_streams:true};if(!("cabailities"in mist.data))a.capabilities=true;mist.send(function(){ga()},a)};var ga=function(){q.text("active_streams"in
|
||||||
-1){a++;var d=$("<span>").addClass("content").addClass("red"),e=c[2].split("|");for(b in e)d.append($("<span>").text(e[b]));p.append($("<div>").append($("<span>").append(UI.format.time(c[0]))).append(d));if(a==5)break}}a==0&&p.html("None.");a=[];c=[];for(b in mist.data.config.protocols){d=mist.data.config.protocols[b];a.indexOf(d.connector)>-1||a.push(d.connector)}h.text(a.length?a.join(", "):"None.");if("capabilities"in mist.data){for(b in mist.data.capabilities.connectors)a.indexOf(b)==-1&&c.push(b);
|
mist.data?mist.data.active_streams?mist.data.active_streams.length:0:"?");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..";l.text(a);u.text(UI.format.dateTime(mist.data.config.time,"long"));p.html("");var a=0,b;for(b in mist.data.log){var c=mist.data.log[b];if(["FAIL","ERROR"].indexOf(c[1])>-1){a++;var d=$("<span>").addClass("content").addClass("red"),e=c[2].split("|");
|
||||||
i.text(c.length?c.join(", "):"None.")}else i.text("Loading..")};g();ga();UI.interval.set(g,3E4);break;case "Protocols":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a)},{capabilities:!0});c.append("Loading..");return}var z=$("<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("Delete all protocols").click(function(){if(confirm("Are you sure you want to delete all currently configured protocols?")){mist.data.config.protocols=
|
for(b in e)d.append($("<span>").text(e[b]));p.append($("<div>").append($("<span>").append(UI.format.time(c[0]))).append(d));if(a==5)break}}a==0&&p.html("None.");a=[];c=[];for(b in mist.data.config.protocols){d=mist.data.config.protocols[b];a.indexOf(d.connector)>-1||a.push(d.connector)}h.text(a.length?a.join(", "):"None.");if("capabilities"in mist.data){for(b in mist.data.capabilities.connectors)a.indexOf(b)==-1&&c.push(b);i.text(c.length?c.join(", "):"None.")}else i.text("Loading..")};g();ga();UI.interval.set(g,
|
||||||
|
3E4);break;case "Protocols":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a)},{capabilities:!0});c.append("Loading..");return}var z=$("<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("Delete all protocols").click(function(){if(confirm("Are you sure you want to delete all currently configured protocols?")){mist.data.config.protocols=
|
||||||
[];mist.send(function(){UI.navto("Protocols")},{config:mist.data.config})}})).append($("<button>").text("Enable default protocols").click(function(){var a=Object.keys(mist.data.capabilities.connectors),b;for(b in mist.data.config.protocols){var c=a.indexOf(mist.data.config.protocols[b].connector);c>-1&&a.splice(c,1)}var d=[];for(b in a)(!("required"in mist.data.capabilities.connectors[a[b]])||Object.keys(mist.data.capabilities.connectors[a[b]].required).length==0)&&d.push(a[b]);c="Click OK to enable disabled protocols with their default settings:\n ";
|
[];mist.send(function(){UI.navto("Protocols")},{config:mist.data.config})}})).append($("<button>").text("Enable default protocols").click(function(){var a=Object.keys(mist.data.capabilities.connectors),b;for(b in mist.data.config.protocols){var c=a.indexOf(mist.data.config.protocols[b].connector);c>-1&&a.splice(c,1)}var d=[];for(b in a)(!("required"in mist.data.capabilities.connectors[a[b]])||Object.keys(mist.data.capabilities.connectors[a[b]].required).length==0)&&d.push(a[b]);c="Click OK to enable disabled protocols with their default settings:\n ";
|
||||||
c=d.length?c+d.join(", "):c+"None.";if(d.length!=a.length){a=a.filter(function(a){return d.indexOf(a)<0});c=c+("\n\nThe following protocols can only be set manually:\n "+a.join(", "))}if(confirm(c)&&d.length){for(b in d)mist.data.config.protocols.push({connector:d[b]});mist.send(function(){UI.navto("Protocols")},{config:mist.data.config})}})).append("<br>").append($("<button>").text("New protocol").click(function(){UI.navto("Edit Protocol")}).css("clear","both")).append($("<table>").html($("<thead>").html($("<tr>").html($("<th>").text("Protocol")).append($("<th>").text("Status")).append($("<th>").text("Settings")).append($("<th>")))).append(z));
|
c=d.length?c+d.join(", "):c+"None.";if(d.length!=a.length){a=a.filter(function(a){return d.indexOf(a)<0});c=c+("\n\nThe following protocols can only be set manually:\n "+a.join(", "))}if(confirm(c)&&d.length){for(b in d)mist.data.config.protocols.push({connector:d[b]});mist.send(function(){UI.navto("Protocols")},{config:mist.data.config})}})).append("<br>").append($("<button>").text("New protocol").click(function(){UI.navto("Edit Protocol")}).css("clear","both")).append($("<table>").html($("<thead>").html($("<tr>").html($("<th>").text("Protocol")).append($("<th>").text("Status")).append($("<th>").text("Settings")).append($("<th>")))).append(z));
|
||||||
var K=function(){function a(b){var c=mist.data.capabilities.connectors[b.connector];if(!c)return"";var d=[],e=["required","optional"],g;for(g in e)for(var t in c[e[g]])b[t]&&b[t]!=""?d.push(t+": "+b[t]):c[e[g]][t]["default"]&&d.push(t+": "+c[e[g]][t]["default"]);return $("<span>").addClass("description").text(d.join(", "))}z.html("");for(var b in mist.data.config.protocols){var c=mist.data.config.protocols[b];z.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",
|
var K=function(){function a(b){var c=mist.data.capabilities.connectors[b.connector];if(!c)return"";var d=[],e=["required","optional"],g;for(g in e)for(var t in c[e[g]])b[t]&&b[t]!=""?d.push(t+": "+b[t]):c[e[g]][t]["default"]&&d.push(t+": "+c[e[g]][t]["default"]);return $("<span>").addClass("description").text(d.join(", "))}z.html("");for(var b in mist.data.config.protocols){var c=mist.data.config.protocols[b];z.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",
|
||||||
|
|
62
lsp/mist.js
62
lsp/mist.js
|
@ -1388,7 +1388,6 @@ var UI = {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'coords':
|
case 'coords':
|
||||||
//TODO
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2067,6 +2066,15 @@ var UI = {
|
||||||
type: 'span',
|
type: 'span',
|
||||||
label: 'Server time',
|
label: 'Server time',
|
||||||
value: $servertime
|
value: $servertime
|
||||||
|
},{
|
||||||
|
type: 'span',
|
||||||
|
label: 'Licensed to',
|
||||||
|
'default': 'unknown',
|
||||||
|
pointer: {
|
||||||
|
main: mist.data.config.license,
|
||||||
|
index: 'user'
|
||||||
|
},
|
||||||
|
LTSonly: true
|
||||||
},{
|
},{
|
||||||
type: 'span',
|
type: 'span',
|
||||||
label: 'Configured streams',
|
label: 'Configured streams',
|
||||||
|
@ -2133,8 +2141,7 @@ var UI = {
|
||||||
}
|
}
|
||||||
]));
|
]));
|
||||||
if (mist.data.LTS) {
|
if (mist.data.LTS) {
|
||||||
function update_update() {
|
function update_update(info) {
|
||||||
var info = mist.stored.get().update || {};
|
|
||||||
if (!('uptodate' in info)) {
|
if (!('uptodate' in info)) {
|
||||||
$versioncheck.text('Unknown');
|
$versioncheck.text('Unknown');
|
||||||
return;
|
return;
|
||||||
|
@ -2163,15 +2170,17 @@ var UI = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!mist.stored.get().update) || ((new Date()).getTime()-mist.stored.get().update.lastchecked > 3600e3)) {
|
if ((!mist.stored.get().update) || ((new Date()).getTime()-mist.stored.get().update.lastchecked > 3600e3)) {
|
||||||
var update = mist.stored.get().update || {};
|
var update = {};
|
||||||
update.lastchecked = (new Date()).getTime();
|
update.lastchecked = (new Date()).getTime();
|
||||||
mist.send(function(d){
|
mist.send(function(d){
|
||||||
mist.stored.set('update',$.extend(true,update,d.update));
|
mist.stored.set('update',update);
|
||||||
update_update();
|
update_update(d.update);
|
||||||
},{checkupdate: true});
|
},{checkupdate: true});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
update_update();
|
mist.send(function(d){
|
||||||
|
update_update(d.update);
|
||||||
|
},{update: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2620,6 +2629,33 @@ var UI = {
|
||||||
$main.append(
|
$main.append(
|
||||||
$('<span>').addClass('description').text('Choose a stream below.')
|
$('<span>').addClass('description').text('Choose a stream below.')
|
||||||
).append($shortcuts);
|
).append($shortcuts);
|
||||||
|
|
||||||
|
//if there is a JPG output, add actual thumnails \o/
|
||||||
|
var thumbnails = false;
|
||||||
|
///\todo activate this code when the backend is ready
|
||||||
|
/*
|
||||||
|
if (UI.findOutput('JPG')) {
|
||||||
|
var jpgport = false;
|
||||||
|
//find the http port and make sure JPG is enabled
|
||||||
|
for (var i in mist.data.config.protocols) {
|
||||||
|
var protocol = mist.data.config.protocols[i];
|
||||||
|
if ((protocol.connector == 'HTTP') || (protocol.connector == 'HTTP.exe')) {
|
||||||
|
jpgport = (protocol.port ? ':'+protocol.port : ':8080');
|
||||||
|
}
|
||||||
|
if ((protocol.connector == 'JPG') || (protocol.connector == 'JPG.exe')) {
|
||||||
|
thumbnails = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((thumbnails) && (jpgport)) {
|
||||||
|
//now we get to use it as a magical function wheee!
|
||||||
|
jpgport = parseURL(mist.user.host).host+jpgport;
|
||||||
|
thumbnails = function(streamname) {
|
||||||
|
return 'http://'+jpgport+'/'+encodeURIComponent(streamname)+'.jpg';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
for (var i in select) {
|
for (var i in select) {
|
||||||
var streamname = select[i];
|
var streamname = select[i];
|
||||||
var source = '';
|
var source = '';
|
||||||
|
@ -2649,6 +2685,17 @@ var UI = {
|
||||||
UI.navto('Embed',$(this).closest('div').attr('data-stream'));
|
UI.navto('Embed',$(this).closest('div').attr('data-stream'));
|
||||||
});
|
});
|
||||||
var $image = $('<span>').addClass('image');
|
var $image = $('<span>').addClass('image');
|
||||||
|
|
||||||
|
if ((thumbnails) && (folders.indexOf(streamname) == -1)) {
|
||||||
|
//there is a JPG output and this isn't a folder
|
||||||
|
$image.append(
|
||||||
|
$('<img>').attr('src',thumbnails(streamname)).error(function(){
|
||||||
|
$(this).hide();
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//its a wildcard stream
|
||||||
if (streamname.indexOf('+') > -1) {
|
if (streamname.indexOf('+') > -1) {
|
||||||
var streambits = streamname.split('+');
|
var streambits = streamname.split('+');
|
||||||
source = mist.data.streams[streambits[0]].source+streambits[1];
|
source = mist.data.streams[streambits[0]].source+streambits[1];
|
||||||
|
@ -2658,6 +2705,7 @@ var UI = {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
source = mist.data.streams[streamname].source;
|
source = mist.data.streams[streamname].source;
|
||||||
|
//its a folder stream
|
||||||
if (folders.indexOf(streamname) > -1) {
|
if (folders.indexOf(streamname) > -1) {
|
||||||
$preview = '';
|
$preview = '';
|
||||||
$embed = '';
|
$embed = '';
|
||||||
|
|
|
@ -89,6 +89,7 @@ namespace Mist {
|
||||||
//capa["optional"]["wrappers"]["allowed"].append("polytrope"); //currently borked
|
//capa["optional"]["wrappers"]["allowed"].append("polytrope"); //currently borked
|
||||||
capa["optional"]["wrappers"]["allowed"].append("flash_strobe");
|
capa["optional"]["wrappers"]["allowed"].append("flash_strobe");
|
||||||
capa["optional"]["wrappers"]["allowed"].append("silverlight");
|
capa["optional"]["wrappers"]["allowed"].append("silverlight");
|
||||||
|
capa["optional"]["wrappers"]["allowed"].append("img");
|
||||||
capa["optional"]["wrappers"]["option"] = "--wrappers";
|
capa["optional"]["wrappers"]["option"] = "--wrappers";
|
||||||
capa["optional"]["wrappers"]["short"] = "w";
|
capa["optional"]["wrappers"]["short"] = "w";
|
||||||
cfg->addConnectorOptions(8080, capa);
|
cfg->addConnectorOptions(8080, capa);
|
||||||
|
@ -577,6 +578,11 @@ namespace Mist {
|
||||||
response.append((char*)video_js, (size_t)video_js_len);
|
response.append((char*)video_js, (size_t)video_js_len);
|
||||||
used = true;
|
used = true;
|
||||||
}
|
}
|
||||||
|
if (it->asStringRef() == "img"){
|
||||||
|
#include "img.js.h"
|
||||||
|
response.append((char*)img, (size_t)img_len);
|
||||||
|
used = true;
|
||||||
|
}
|
||||||
if (!used) {
|
if (!used) {
|
||||||
WARN_MSG("Unknown player type: %s",it->asStringRef().c_str());
|
WARN_MSG("Unknown player type: %s",it->asStringRef().c_str());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue