mirror of
https://github.com/UiO-Gaming/infoscreen3.git
synced 2026-11-05 13:56:52 +01:00
Update Infoscreen3 to 1.6.4
* Update npm dependencies * Change config to use environmental variables, * Fix videos to actually show (modern browsers needs muted volume) * Fix videos to load actually for lite and css views * Provide zip with precompiled binaries for super-easy setup
This commit is contained in:
1 parent
383d9123ef
commit
a0875f8c1f
33 files changed
+9193
-1158
No files matched your search
+3
-2
@@ -129,8 +129,9 @@ export default class admin {
|
||||
|
||||
if (serverOptions.isStreaming === false) {
|
||||
serverOptions.loop = false;
|
||||
// changed next line from http:// to ws://, to reduce stream lag
|
||||
serverOptions.streamSource = "ws://" + config.serverHost + ":" + (config.serverListenPort + 1) + "/live/" + config.streamKey + ".flv";
|
||||
// changed next line from http:// to ws://, to reduce stream lag
|
||||
|
||||
serverOptions.streamSource = "http://" + config.serverHost + ":" + (config.serverListenPort + 1) + "//" + config.streamKey + ".flv";
|
||||
serverOptions.isStreaming = true;
|
||||
cli.success("start stream");
|
||||
} else {
|
||||
|
||||
+8
-8
@@ -28,7 +28,7 @@ export default class bundleClass {
|
||||
|
||||
getSlideJsonFile(fileName) {
|
||||
try {
|
||||
return fs.readFileSync("./data/bundles/" + this.name + "/slides/" + fileName).toString();
|
||||
return fs.readFileSync(process.cwd() + "/data/bundles/" + this.name + "/slides/" + fileName).toString();
|
||||
} catch (err) {
|
||||
return "{}";
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export default class bundleClass {
|
||||
if (slide.uuid === uuid) {
|
||||
if (slide.type === "slide") {
|
||||
let newId = uuidv4();
|
||||
let path = "./data/bundles/" + this.name;
|
||||
let path = process.cwd() + "/data/bundles/" + this.name;
|
||||
try {
|
||||
// duplicate at filesystem
|
||||
if (fs.existsSync(path + "/render/" + uuid + ".png")) {
|
||||
@@ -72,8 +72,8 @@ export default class bundleClass {
|
||||
}
|
||||
|
||||
moveTo(bundleDir, uuid) {
|
||||
let toPath = "./data/bundles/" + bundleDir;
|
||||
let path = "./data/bundles/" + this.name;
|
||||
let toPath = process.cwd() +"/data/bundles/" + bundleDir;
|
||||
let path = process.cwd() + "/data/bundles/" + this.name;
|
||||
for (let slide of this.allSlides) {
|
||||
if (slide.uuid === uuid) {
|
||||
try {
|
||||
@@ -109,7 +109,7 @@ export default class bundleClass {
|
||||
}
|
||||
if (slide.uuid === uuid) {
|
||||
if (slide.type === "slide") {
|
||||
let path = "./data/bundles/" + this.name;
|
||||
let path = process.cwd() + "/data/bundles/" + this.name;
|
||||
try {
|
||||
if (fs.existsSync(path + "/render/" + uuid + ".png")) {
|
||||
fs.unlinkSync(path + "/render/" + uuid + ".png");
|
||||
@@ -201,7 +201,7 @@ export default class bundleClass {
|
||||
if (slide.uuid === uuid) {
|
||||
slideData = {
|
||||
settings: slide,
|
||||
render: fs.readFileSync("./data/bundles/" + this.name + "/slides/" + slide.uuid + ".png")
|
||||
render: fs.readFileSync(process.cwd() + "/data/bundles/" + this.name + "/slides/" + slide.uuid + ".png")
|
||||
};
|
||||
return slide;
|
||||
}
|
||||
@@ -211,8 +211,8 @@ export default class bundleClass {
|
||||
save() {
|
||||
this.sync();
|
||||
try {
|
||||
fs.writeFileSync("./data/bundles/" + this.name + "/slides.json", JSON.stringify(this.allSlides, null, "\t"));
|
||||
fs.writeFileSync("./data/bundles/" + this.name + "/bundle.json", JSON.stringify(this.bundleData, null, "\t"));
|
||||
fs.writeFileSync(process.cwd() + "/data/bundles/" + this.name + "/slides.json", JSON.stringify(this.allSlides, null, "\t"));
|
||||
fs.writeFileSync(process.cwd() + "/data/bundles/" + this.name + "/bundle.json", JSON.stringify(this.bundleData, null, "\t"));
|
||||
} catch (e) {
|
||||
cli.error("error while saving file:", e);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'dotenv/config'
|
||||
import chalk from 'chalk';
|
||||
let lastStamp = "";
|
||||
|
||||
@@ -23,6 +24,7 @@ export default {
|
||||
},
|
||||
|
||||
log: function (string) {
|
||||
if (process.env.DEBUG != "true") return;
|
||||
let now = getDateTime();
|
||||
if (lastStamp != now) {
|
||||
lastStamp = now;
|
||||
|
||||
@@ -28,7 +28,7 @@ export default function (pluginManager, io, dispatcher) {
|
||||
cli.log("Checking for write permissions...");
|
||||
|
||||
try {
|
||||
fs.accessSync("./data", fs.W_OK);
|
||||
fs.accessSync(process.cwd() + "/data", fs.W_OK);
|
||||
cli.success("data directory (./data) is writable");
|
||||
} catch (err) {
|
||||
cli.error("data directory (./data) is not writable", err);
|
||||
@@ -36,7 +36,7 @@ export default function (pluginManager, io, dispatcher) {
|
||||
}
|
||||
|
||||
try {
|
||||
fs.accessSync("./trash", fs.W_OK);
|
||||
fs.accessSync(process.cwd() + "/trash", fs.W_OK);
|
||||
cli.success("trash directory (./trash) is writable");
|
||||
} catch (err) {
|
||||
cli.error("trash directory (./trash) is not writable", err);
|
||||
@@ -44,15 +44,15 @@ export default function (pluginManager, io, dispatcher) {
|
||||
}
|
||||
|
||||
try {
|
||||
fs.accessSync("./tmp", fs.W_OK);
|
||||
fs.accessSync(process.cwd() + "/tmp", fs.W_OK);
|
||||
cli.success("temp directory (./tmp) is writable ");
|
||||
let tempFiles = fs.readdirSync("./tmp/", {
|
||||
let tempFiles = fs.readdirSync(process.cwd() + "/tmp/", {
|
||||
dotfiles: false
|
||||
});
|
||||
cli.info("removing temp-files...");
|
||||
for (let file of tempFiles) {
|
||||
if (file !== ".gitkeep") {
|
||||
fs.unlinkSync("./tmp/" + file);
|
||||
fs.unlinkSync(process.cwd() + "/tmp/" + file);
|
||||
}
|
||||
}
|
||||
cli.info("done.");
|
||||
@@ -81,14 +81,14 @@ export default function (pluginManager, io, dispatcher) {
|
||||
let adminLobby1 = new adminLobby(io, dispatcher, screenView, adminView, bundleManager);
|
||||
// create lobby
|
||||
io.of("/lobby").on("connection", function (socket) {
|
||||
cli.info("WS/" + socket.conn.remoteAddress + " connect");
|
||||
// cli.info("WS/" + socket.conn.remoteAddress + " connect");
|
||||
|
||||
socket.on('error', function (error) {
|
||||
cli.error(error, "WS/ error");
|
||||
});
|
||||
|
||||
socket.on('disconnect', function (reason) {
|
||||
cli.info("WS/ " + reason + " " + socket.conn.remoteAddress);
|
||||
// cli.info("WS/ " + reason + " " + socket.conn.remoteAddress);
|
||||
});
|
||||
|
||||
socket.on('displays', function () {
|
||||
|
||||
Reference in new issue
Block a user