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
@@ -0,0 +1,8 @@
|
||||
NODE_ENV=production
|
||||
DEBUG=false
|
||||
HOST="127.0.0.1"
|
||||
PORT=3000
|
||||
ADMIN_USER="admin"
|
||||
ADMIN_PASS="admin"
|
||||
LOCALE=en
|
||||
MEDIASERVER=false
|
||||
+3
-2
@@ -63,7 +63,6 @@ typings/
|
||||
# own additions
|
||||
.idea
|
||||
.vscode
|
||||
config.js
|
||||
tmp/*.png
|
||||
public/assets/
|
||||
data/sessions.db
|
||||
@@ -74,4 +73,6 @@ data/template.json
|
||||
!data/bundles/default/*
|
||||
data/video/*.mp4
|
||||
trash/*
|
||||
!trash/.gitkeep
|
||||
!trash/.gitkeep
|
||||
webpack
|
||||
dist
|
||||
@@ -0,0 +1,9 @@
|
||||
# BUILD
|
||||
|
||||
## Prequisities
|
||||
|
||||
1. `npm i pgk -g`
|
||||
|
||||
## Build excutable
|
||||
|
||||
1. `npm run build`
|
||||
@@ -23,24 +23,17 @@ When you need to display same content to multiple locations or need to remotely
|
||||
|
||||
## Setup
|
||||
1. run `npm install`
|
||||
2. copy `config-default.js` to `config.js`
|
||||
2. copy `.env.example` to `.env`
|
||||
3. run `npm start`
|
||||
- optionally you can start as a background task: `npm run-script daemon`, it will output just a pid for the new process and you find new files: `output.log` and `errors.log` at the `data` directory.
|
||||
|
||||
## Configuration
|
||||
> The default `config.js` file serves you well only if you wish to run infoscreen at localhost only!
|
||||
|
||||
To access the infoscreen server outside from the localhost, like at LAN network, the config must be bind to external IP your server machine has.
|
||||
To access the infoscreen server outside from the localhost, like at LAN network, the config must be bind to external IP your server machine has. Configuration is set by environmental variables or by editing `.env` file.
|
||||
|
||||
Example:
|
||||
```javascript
|
||||
module.exports = {
|
||||
"serverListenPort": 8000,
|
||||
"serverHost": "192.168.56.100",
|
||||
// ...config file continues from here...
|
||||
```
|
||||
If you wish to have live stream support at local network using OBS, set `mediaServer` to `true` and set desired streamKey
|
||||
You can run the server listen port as well the default http port `80`, but in that case you have to run the app with privileges at linux systems: `sudo npm start`
|
||||
If you wish to have live stream support at local network using OBS, set `MEDIASERVER` to `true` and set desired streamKey
|
||||
|
||||
You can run the server listen port as well the default http port `80`, but in that case you have to run the app with privileges with linux systems: `sudo npm start`
|
||||
|
||||
## Plugins
|
||||
|
||||
@@ -75,6 +68,9 @@ at OBS go to `Settings` -> `Stream`
|
||||
| Stream key | config.streamKey value, defaults to: `INFOSCREEN3` |
|
||||
| Use Authentication | *leave un-ticked* |
|
||||
|
||||
### Note
|
||||
Use only **baseline**-encoding for H.264, other options not works with the embedded javascript player
|
||||
|
||||
## Mediaserver admin panel
|
||||
> if you have changed the default port from 8000 to something else, the correct port to access this feature is (config.serverListenPort+1)
|
||||
|
||||
@@ -82,15 +78,20 @@ Admin interface is located at: http://localhost:8001/admin
|
||||
It accepts the same crendetials as configured at the main app.
|
||||
|
||||
## Environment variables
|
||||
| ENV | default | Usage |
|
||||
| :---------- | :-------- | :---------------------------------------------------- |
|
||||
| PORT | 8000 | Server listen port |
|
||||
| HOST | localhost | Host or ip, where the server is externally accessible |
|
||||
| ADMIN_USER | admin | Username to access admin interface |
|
||||
| ADMIN_PASS | admin | Password for the admin interface |
|
||||
| USER | view | Username to access viewer |
|
||||
| PASS | view | Password to access viewer |
|
||||
| FRONT_PROXY | false | Tell software that it's behind a front proxy |
|
||||
| ENV | default | Usage |
|
||||
| :---------- | :-------- | :---------------------------------------------------- |
|
||||
| PORT | 8000 | Server listen port |
|
||||
| HOST | localhost | Host or ip, where the server is externally accessible |
|
||||
| ADMIN_USER | admin | Username to access admin interface |
|
||||
| ADMIN_PASS | admin | Password for the admin interface |
|
||||
| USER | view | Username to access viewer |
|
||||
| PASS | view | Password to access viewer |
|
||||
| FRONT_PROXY | false | Tell software that it's behind a front proxy |
|
||||
| DEBUG | false | whatever to debug... or not |
|
||||
| SESSIONKEY | predefined | used to encrypt cookies |
|
||||
| STREAMKEY | INFOSCREEN3 | streamkey used at OBS |
|
||||
| MEDIASERVER | false | use streaming feature |
|
||||
| LOCALE | en | available locales: en, fi |
|
||||
|
||||
## Dockerfile
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import config from './config.js';
|
||||
import express from 'express';
|
||||
import createError from 'http-errors';
|
||||
import logger from 'morgan';
|
||||
import lessMiddleware from 'less-middleware';
|
||||
import path from 'path';
|
||||
import PluginManager from './modules/pluginManager.js';
|
||||
const app = express();
|
||||
@@ -30,7 +29,7 @@ import CookieParser from 'cookie-parser';
|
||||
import Http from 'http';
|
||||
import { Server as SocketIO } from 'socket.io';
|
||||
import i18next from 'i18next';
|
||||
import FilesystemBackend from 'i18next-node-fs-backend';
|
||||
import FilesystemBackend from 'i18next-fs-backend';
|
||||
import i18nextMiddleware from 'i18next-http-middleware';
|
||||
import passport from 'passport';
|
||||
import passportlocal from 'passport-local';
|
||||
@@ -83,22 +82,23 @@ passport.use("local", new LocalStrategy({
|
||||
if (config.mediaServer) {
|
||||
const nodeServerConfig = {
|
||||
logtype: 2,
|
||||
allow_origin: '*',
|
||||
rtmp: {
|
||||
port: 1935,
|
||||
chunk_size: 60000,
|
||||
gop_cache: true,
|
||||
ping: 60,
|
||||
ping_timeout: 30
|
||||
ping_timeout: 30,
|
||||
|
||||
},
|
||||
http: {
|
||||
port: (parseInt(config.serverListenPort) + 1),
|
||||
allow_origin: '*',
|
||||
allow_origin: '*',
|
||||
},
|
||||
auth: {
|
||||
api: true,
|
||||
api_user: config.admins[0].username,
|
||||
api_pass: config.admins[0].password,
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -148,14 +148,13 @@ app.set('port', parseInt(config.serverListenPort));
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
app.set('view engine', 'twig');
|
||||
app.use(i18nextMiddleware.handle(i18next));
|
||||
app.use(logger('dev'));
|
||||
//app.use(logger('dev'));
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded({
|
||||
extended: false
|
||||
}));
|
||||
|
||||
app.use(cookieParser);
|
||||
app.use(lessMiddleware(path.join(__dirname, 'public')));
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
app.use("/video/",express.static(path.join(__dirname, 'data','video')));
|
||||
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "infoscreen3",
|
||||
"version": "1.6.4",
|
||||
"private": true,
|
||||
"bin": "./webpack/bundle.js",
|
||||
"module": "false",
|
||||
"pkg": {
|
||||
"scripts": ["./webpack/*.bundle.js", "./node_modules/socket.io/"],
|
||||
"assets": ["./node_modules/socket.io/"],
|
||||
"targets": [ "node18-windows-x64", "node18-linux-x64"],
|
||||
"outputPath": "dist"
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import { execSync } from 'child_process';
|
||||
import fs from "fs-extra";
|
||||
|
||||
console.log("Copying files...");
|
||||
const toCopy = ["data", "locales", "templates", "tmp", "trash", ".env"];
|
||||
|
||||
for (const dir of toCopy) {
|
||||
console.log(`Copying ${dir}...`);
|
||||
fs.cpSync(`./${dir}`, `./dist/${dir}`, {
|
||||
recursive: true
|
||||
});
|
||||
console.log("done.");
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'dotenv/config'
|
||||
|
||||
const host = "127.0.0.1" // ip of the infoscreen interface, use external address if not develoment
|
||||
const port = 8000; // port for infoscreen
|
||||
@@ -10,17 +11,17 @@ export default {
|
||||
"serverListenPort": process.env.PORT || port,
|
||||
"serverHost": process.env.HOST || host,
|
||||
"serverUrl": hostUrl,
|
||||
"sessionKey": "generateRandomStringForSecret", // used for encrypting cookies
|
||||
"streamKey": 'INFOSCREEN3', // stream key for rtmp end point
|
||||
"sessionKey": process.env.SESSIONKEY || "generateSecret", // used for encrypting cookies
|
||||
"streamKey": process.env.STREAMKEY || 'INFOSCREEN3', // stream key for rtmp end point
|
||||
"useLocalAssets": false, // used to load javascript libraries locally from /public/assets
|
||||
"mediaServer": false, // local streaming server for rtmp, see docs how to use
|
||||
"defaultLocale": "en", // currently supported values are: "en","fi"
|
||||
"mediaServer": (process.env.MEDIASERVER == "true") ? true : false, // local streaming server for rtmp, see docs how to use
|
||||
"defaultLocale": process.env.LOCALE || "en", // currently supported values are: "en","fi"
|
||||
|
||||
/*
|
||||
* Plugins
|
||||
*/
|
||||
"plugins": [
|
||||
"profiler", // display memory statistics at console.
|
||||
// "profiler", // display memory statistics at console.
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -4,7 +4,7 @@ import fs from 'fs';
|
||||
import { daemon } from 'daemon';
|
||||
var stdoutFd = fs.openSync('./data/output.log', 'a');
|
||||
var stderrFd = fs.openSync('./data/errors.log', 'a');
|
||||
var proc2 = daemon("./bin/infoscreen3",
|
||||
var proc2 = daemon("./infoscreen3",
|
||||
"",
|
||||
{
|
||||
cwd: process.cwd(),
|
||||
@@ -3,10 +3,9 @@
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
import cli from '../modules/cli.js';
|
||||
import chalk from 'chalk';
|
||||
import config from '../config.js';
|
||||
import { app, server } from "../app.js";
|
||||
import config from './config.js';
|
||||
import { app, server } from "./app.js";
|
||||
|
||||
|
||||
/**
|
||||
@@ -20,7 +19,6 @@ app.set('port', port);
|
||||
* Create HTTP server.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Listen on provided port, on all network interfaces.
|
||||
*/
|
||||
@@ -85,8 +83,7 @@ function onListening() {
|
||||
let addr = server.address();
|
||||
let bind = typeof addr === 'string'
|
||||
? 'pipe ' + addr
|
||||
: 'port ' + addr.port;
|
||||
|
||||
cli.info('Infoscreen is now accessible at ' + chalk.bold.white(config.serverUrl));
|
||||
: 'port ' + addr.port;
|
||||
console.log('Infoscreen is now accessible at ' + chalk.bold.white(config.serverUrl));
|
||||
console.log(chalk.green(">>") + chalk.white("Start complete.") + chalk.green("<<"));
|
||||
}
|
||||
+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 () {
|
||||
|
||||
Generated
+8879
-1007
File diff suppressed because it is too large.
Load diff
+32
-11
@@ -1,17 +1,25 @@
|
||||
{
|
||||
"name": "infoscreen3",
|
||||
"version": "1.6.3",
|
||||
"version": "1.6.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": "./bin/infoscreen3.js",
|
||||
"main": "./infoscreen3.js",
|
||||
"scripts": {
|
||||
"start": "node --expose-gc ./bin/infoscreen3.js",
|
||||
"daemon": "node --expose-gc ./bin/daemon.js"
|
||||
"compile": "pkg package.json --compress GZip",
|
||||
"build": "webpack && node compile.js && pkg package.json --compress GZip",
|
||||
"start": "node --expose-gc ./infoscreen3.js",
|
||||
"daemon": "node --expose-gc ./daemon.js"
|
||||
},
|
||||
"bin": "./webpack/bundle.js",
|
||||
"pkg": {
|
||||
"scripts": ["./webpack/*.bundle.js"],
|
||||
"targets": [ "node18-windows-x64", "node18-linux-x64"],
|
||||
"outputPath": "dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"basic-auth": "2.0.1",
|
||||
"bufferutil": "4.0.7",
|
||||
"chalk": "5.1.2",
|
||||
"chalk": "4.1.2",
|
||||
"connect-busboy": "1.0.0",
|
||||
"connect-ensure-login": "0.1.1",
|
||||
"connect-sqlite3": "0.9.13",
|
||||
@@ -19,18 +27,18 @@
|
||||
"cors": "2.8.5",
|
||||
"daemon": "1.1.0",
|
||||
"debug": "4.3.4",
|
||||
"dotenv": "^16.3.1",
|
||||
"express": "4.18.2",
|
||||
"express-session": "1.17.3",
|
||||
"fs-extra": "10.1.0",
|
||||
"http-errors": "2.0.0",
|
||||
"i18next": "22.0.6",
|
||||
"i18next": "23.7.3",
|
||||
"i18next-fs-backend": "2.3.0",
|
||||
"i18next-http-middleware": "3.2.1",
|
||||
"i18next-node-fs-backend": "2.1.3",
|
||||
"less-middleware": "3.1.0",
|
||||
"lodash": "4.17.21",
|
||||
"minimist": "1.2.7",
|
||||
"minimist": "1.2.8",
|
||||
"morgan": "1.10.0",
|
||||
"node-media-server": "2.4.9",
|
||||
"node-media-server": "2.6.2",
|
||||
"node.extend": "2.0.2",
|
||||
"passport": "0.6.0",
|
||||
"passport-local": "1.0.0",
|
||||
@@ -41,5 +49,18 @@
|
||||
"twig": "1.15.4",
|
||||
"utf-8-validate": "5.0.10",
|
||||
"xmlhttprequest-ssl": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
|
||||
"@babel/preset-env": "^7.23.3",
|
||||
"babel-core": "^4.7.16",
|
||||
"babel-loader": "9.1.3",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babel-preset-es2015": "6.24.1",
|
||||
"json-loader": "^0.5.7",
|
||||
"node-loader": "^2.0.0",
|
||||
"webpack": "5.89.0",
|
||||
"webpack-cli": "5.1.4",
|
||||
"webpack-node-externals": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
-9
@@ -295,10 +295,11 @@ function nextSlide(data) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let video = document.getElementById("stream");
|
||||
|
||||
switch (serverOptions.currentMeta.type) {
|
||||
case "webpage":
|
||||
$("#slider").hide();
|
||||
let video = document.getElementById("stream");
|
||||
$("#slider").hide();
|
||||
video.pause();
|
||||
$("#stream").hide();
|
||||
$("#" + getWebLayer()).css("transform", "scale(" + serverOptions.currentMeta.zoom + ")");
|
||||
@@ -323,12 +324,11 @@ function nextSlide(data) {
|
||||
|
||||
$("#" + getWebLayer()).addClass("fadeOut").removeClass("fadeIn");
|
||||
$("#" + getWebLayer(1)).addClass("fadeOut").removeClass("fadeIn");
|
||||
$("#stream").fadeOut();
|
||||
$("#stream").hide();
|
||||
video.pause();
|
||||
$("#slider").show();
|
||||
window.f.showImageById(serverOptions.currentFile, transition);
|
||||
setTimeout(function () {
|
||||
let video = document.getElementById("stream");
|
||||
video.pause();
|
||||
window.f.showImageById(serverOptions.currentFile, transition);
|
||||
setTimeout(function () {
|
||||
clearIFrame(getWebLayer());
|
||||
clearIFrame(getWebLayer(1));
|
||||
}, 2500);
|
||||
@@ -351,6 +351,7 @@ function setBackground(background) {
|
||||
if (parseUrl(video.src) !== background) {
|
||||
bg.fadeOut();
|
||||
video.src = background;
|
||||
video.volume = 0.;
|
||||
video.load();
|
||||
video.play();
|
||||
$(video).show();
|
||||
@@ -386,11 +387,12 @@ function checkStream(serverOptions) {
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false, // enable for much longer buffer, note: video may stall if network jitter
|
||||
isLive: true
|
||||
isLive: true,
|
||||
cors: true,
|
||||
});
|
||||
try {
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.volume = videoVolume;
|
||||
flvPlayer.muted = true;
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
streamStarted = true;
|
||||
|
||||
+60
-23
@@ -67,7 +67,9 @@ $(function () {
|
||||
serverOptions = data.serverOptions;
|
||||
bundleData = data.bundleData;
|
||||
checkBlackout();
|
||||
nextSlide(data);
|
||||
if (checkStream(serverOptions) === false) {
|
||||
nextSlide(data);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -75,8 +77,10 @@ $(function () {
|
||||
socket.on('callback.update', function (data) {
|
||||
serverOptions = data.serverOptions;
|
||||
bundleData = data.bundleData;
|
||||
checkBlackout();
|
||||
nextSlide(data);
|
||||
checkBlackout();
|
||||
if (checkStream(serverOptions) === false) {
|
||||
nextSlide(data);
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('callback.reload', function () {
|
||||
@@ -85,7 +89,9 @@ $(function () {
|
||||
|
||||
socket.on('callback.announce', function (data) {
|
||||
checkBlackout();
|
||||
nextSlide(data);
|
||||
if (checkStream(serverOptions) === false) {
|
||||
nextSlide(data);
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('callback.forceSlide', function (data) {
|
||||
@@ -127,15 +133,15 @@ function getLayer(offset) {
|
||||
* Displays the local time for bottom of screen
|
||||
* hh:mm
|
||||
**/
|
||||
function displayTime() {
|
||||
function displayTime() {
|
||||
let date = new Date();
|
||||
let min = date.getMinutes();
|
||||
let month = date.getMonth()+1;
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
if (min < 10) min = "0" + min;
|
||||
if (month < 10) month = "0" + month;
|
||||
if (day < 10) day = "0" + day;
|
||||
$('#time').html(date.getHours() + ":" + min + "<div style='font-size: 3vh;'>"+ date.toLocaleDateString() + "</div>");
|
||||
$('#time').html(date.getHours() + ":" + min + "<div style='font-size: 3vh;'>" + date.toLocaleDateString() + "</div>");
|
||||
}
|
||||
/** resize canvas to max width keeping aspect ratio 16:9**/
|
||||
function fixImageSizes() {
|
||||
@@ -205,6 +211,16 @@ function nextSlide(data) {
|
||||
}
|
||||
displayWebPage(serverOptions.announceMeta.webUrl);
|
||||
}
|
||||
|
||||
if (serverOptions.announceMeta.type === "video") {
|
||||
if (serverOptions.announceMeta.displayTime) {
|
||||
$('#time').removeClass('flipOutX').addClass("flipInX");
|
||||
} else {
|
||||
$('#time').addClass('flipOutX').removeClass("flipInX");
|
||||
}
|
||||
displayVideo(serverOptions.announceMeta.url, serverOptions.announceMeta.loop, serverOptions.announceMeta.mute);
|
||||
}
|
||||
|
||||
if (serverOptions.announceMeta.type === "image") {
|
||||
$(elem).show();
|
||||
$("#" + getWebLayer()).addClass("fadeOut").removeClass("fadeIn");
|
||||
@@ -230,15 +246,24 @@ function nextSlide(data) {
|
||||
$("#" + getWebLayer()).addClass("fadeIn").removeClass("fadeOut");
|
||||
displayWebPage(serverOptions.currentMeta.webUrl);
|
||||
break;
|
||||
case "video":
|
||||
displayVideo(serverOptions.currentMeta.url, serverOptions.currentMeta.loop, serverOptions.currentMeta.mute);
|
||||
setTimeout(function () {
|
||||
clearIFrame(getWebLayer());
|
||||
clearIFrame(getWebLayer(1));
|
||||
}, 2500);
|
||||
break;
|
||||
default:
|
||||
elem.src = "/render/" + serverOptions.currentBundle + "/" + serverOptions.currentFile + ".png";
|
||||
$(elem).show();
|
||||
$("#" + getWebLayer()).addClass("fadeOut").removeClass("fadeIn");
|
||||
$("#" + getWebLayer(1)).addClass("fadeOut").removeClass("fadeIn");
|
||||
$("#stream").hide();
|
||||
setTimeout(function () {
|
||||
clearIFrame(getLayer());
|
||||
clearIFrame(getLayer(1));
|
||||
}, 1000);
|
||||
elem.src = "/render/" + serverOptions.currentBundle + "/" + serverOptions.currentFile + ".png";
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -285,6 +310,17 @@ function setBackground(background) {
|
||||
}
|
||||
}
|
||||
|
||||
function displayVideo(url, loop, mute) {
|
||||
if (serverOptions.isStreaming) return;
|
||||
$("#stream").show();
|
||||
let video = document.getElementById("stream");
|
||||
video.src = url;
|
||||
video.loop = loop;
|
||||
video.volume = mute ? 0.0 : 1.0;
|
||||
video.load();
|
||||
video.play();
|
||||
}
|
||||
|
||||
function parseUrl(url) {
|
||||
return '/background' + url.split('background')[1]
|
||||
}
|
||||
@@ -295,29 +331,28 @@ function showBackgroundOnly() {
|
||||
}
|
||||
|
||||
function checkStream(serverOptions) {
|
||||
|
||||
if (serverOptions.isStreaming && streamStarted === false) {
|
||||
if (serverOptions.isStreaming) {
|
||||
if (flvjs.isSupported()) {
|
||||
var videoElement = document.getElementById('bgvid');
|
||||
flvPlayer = flvjs.createPlayer(
|
||||
$("#stream").show();
|
||||
var videoElement = document.getElementById('stream');
|
||||
flvPlayer = flvjs.createPlayer({
|
||||
type: 'flv',
|
||||
url: serverOptions.streamSource
|
||||
},
|
||||
{
|
||||
type: 'flv',
|
||||
url: serverOptions.streamSource
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false, // enable for much longer buffer, note, video may stall if network jitter
|
||||
isLive: true
|
||||
}
|
||||
);
|
||||
enableStashBuffer: false, // enable for much longer buffer, note: video may stall if network jitter
|
||||
isLive: true,
|
||||
cors: true,
|
||||
});
|
||||
try {
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.volume = videoVolume;
|
||||
flvPlayer.muted = true;
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
showBackgroundOnly();
|
||||
streamStarted = true;
|
||||
return true;
|
||||
} catch (err) {
|
||||
$('#stream').hide();
|
||||
console.log(err);
|
||||
streamStarted = false;
|
||||
return false;
|
||||
@@ -333,10 +368,12 @@ function checkStream(serverOptions) {
|
||||
flvPlayer = null;
|
||||
streamStarted = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
$("#stream").hide();
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateTimeout() {
|
||||
|
||||
+27
-20
@@ -160,13 +160,16 @@ socket.on('callback.reloadImage', function (data) {
|
||||
|
||||
socket.on('callback.announce', function (data) {
|
||||
checkBlackout();
|
||||
nextSlide(data);
|
||||
if (checkStream(serverOptions) === false) {
|
||||
nextSlide(data);
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('callback.forceSlide', function (data) {
|
||||
checkBlackout();
|
||||
nextSlide(data);
|
||||
|
||||
if (checkStream(serverOptions) === false) {
|
||||
nextSlide(data);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -176,12 +179,12 @@ socket.on('callback.forceSlide', function (data) {
|
||||
function displayTime() {
|
||||
let date = new Date();
|
||||
let min = date.getMinutes();
|
||||
let month = date.getMonth()+1;
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
if (min < 10) min = "0" + min;
|
||||
if (month < 10) month = "0" + month;
|
||||
if (day < 10) day = "0" + day;
|
||||
$('#time').html(date.getHours() + ":" + min + "<div style='font-size: 3vh;'>"+date.toLocaleDateString() + "</div>");
|
||||
$('#time').html(date.getHours() + ":" + min + "<div style='font-size: 3vh;'>" + date.toLocaleDateString() + "</div>");
|
||||
}
|
||||
|
||||
function checkTimeDisplay() {
|
||||
@@ -216,6 +219,7 @@ function updateStatusMessage() {
|
||||
$('#statusMessage').text("");
|
||||
}
|
||||
}
|
||||
|
||||
function displayVideo(url, loop, mute) {
|
||||
if (serverOptions.isStreaming) return;
|
||||
$("#stream").show();
|
||||
@@ -276,10 +280,11 @@ function nextSlide(data) {
|
||||
sketch.showTempImage(imgUrl)
|
||||
}
|
||||
} else {
|
||||
let video = document.getElementById("stream");
|
||||
switch (serverOptions.currentMeta.type) {
|
||||
|
||||
case "webpage":
|
||||
$("#slider").hide();
|
||||
let video = document.getElementById("stream");
|
||||
$("#slider").hide();
|
||||
video.pause();
|
||||
$("#stream").hide();
|
||||
$("#" + getWebLayer()).css("transform", "scale(" + serverOptions.currentMeta.zoom + ")");
|
||||
@@ -301,13 +306,11 @@ function nextSlide(data) {
|
||||
|
||||
$("#" + getWebLayer()).addClass("fadeOut").removeClass("fadeIn");
|
||||
$("#" + getWebLayer(1)).addClass("fadeOut").removeClass("fadeIn");
|
||||
$("#stream").fadeOut();
|
||||
$("#stream").hide();
|
||||
$("#slider").show();
|
||||
sketch.showSlide(serverOptions.currentFile, transition);
|
||||
|
||||
setTimeout(function () {
|
||||
let video = document.getElementById("stream");
|
||||
video.pause();
|
||||
sketch.showSlide(serverOptions.currentFile, transition);
|
||||
video.pause();
|
||||
setTimeout(function () {
|
||||
clearIFrame(getWebLayer());
|
||||
clearIFrame(getWebLayer(1));
|
||||
}, 2500);
|
||||
@@ -333,6 +336,7 @@ function setBackground(background) {
|
||||
bg.fadeOut();
|
||||
try {
|
||||
video.src = background;
|
||||
video.volume = 0.;
|
||||
video.load();
|
||||
video.play();
|
||||
$(video).show();
|
||||
@@ -365,17 +369,20 @@ function checkStream(serverOptions) {
|
||||
if (flvjs.isSupported()) {
|
||||
$("#stream").show();
|
||||
const videoElement = document.getElementById('stream');
|
||||
flvPlayer = flvjs.createPlayer({
|
||||
type: 'flv',
|
||||
url: serverOptions.streamSource
|
||||
},
|
||||
flvPlayer = flvjs.createPlayer(
|
||||
{
|
||||
enableStashBuffer: false, // enable for much longer buffer, note: video may stall if network jitter
|
||||
type: 'flv',
|
||||
url: serverOptions.streamSource
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false, // enable for much longer buffer, note, video may stall if network jitter
|
||||
cors: true,
|
||||
isLive: true
|
||||
});
|
||||
}
|
||||
);
|
||||
try {
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.volume = videoVolume;
|
||||
flvPlayer.muted = true;
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
streamStarted = true;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/admin.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script src="/js/sharedScript.js"></script>
|
||||
{% if config.useLocalAssets %}
|
||||
<script src="/assets/jquery.jeditable.min.js"></script>
|
||||
@@ -96,15 +96,6 @@
|
||||
</div>
|
||||
|
||||
<div class="center aligned six wide column">
|
||||
|
||||
<!-- <div class="row">
|
||||
<div id="previewContainer" class="ui inverted segment">
|
||||
<h2 class="ui inverted nopadded header"> {{ t("admin.dashboard.preview") }}</h2>
|
||||
<iframe style="overflow-scrolling: unset; overflow: unset;" class="nopadded" id="preview"
|
||||
src="/admin/preview?uid={{ uid }}"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="row">
|
||||
<div id="programContainer" class="ui nopadded basic segment">
|
||||
<h2 class="ui inverted nopadded header currentDisplay"> {{ t("admin.dashboard.program") }} </h2>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/admin.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script src="/js/sharedScript.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/admin.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
{% if config.useLocalAssets %}
|
||||
<script src="/assets/jquery.jeditable.min.js"></script>
|
||||
{% else %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/edit.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
{% if config.useLocalAssets %}
|
||||
<script src="/assets/jquery.jeditable.min.js"></script>
|
||||
{% else %}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% block header %}
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script src="/js/sharedScript.js"></script>
|
||||
<script>
|
||||
var bundle = "{{ bundle }}";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/edit.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script>
|
||||
let bundle = "{{ bundle }}";
|
||||
let file = "{{ file }}";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/admin.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script>
|
||||
var socket = io("{{ config.serverUrl }}/admin-{{ displayId }}");
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/edit.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script>
|
||||
let bundle = "{{ bundle }}";
|
||||
let file = "{{ file }}";
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<div id="mute" class="ui toggle checkbox">
|
||||
<input type="checkbox"/>
|
||||
<input type="checkbox" checked="1" disabled="1"/>
|
||||
<label>{{ t("admin.addVideo.mute") }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -4,10 +4,10 @@
|
||||
{% if config.useLocalAssets %}
|
||||
<script src="/assets/flv.min.js"></script>
|
||||
{% else %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.5.0/flv.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.6.2/flv.min.js"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script src="/js/flux.js" type="text/javascript" charset="utf-8"></script>
|
||||
<title>InfoScreen3 - {{ display.name }}</title>
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
{% if config.useLocalAssets %}
|
||||
<script src="/assets/flv.min.js"></script>
|
||||
{% else %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.5.0/flv.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.6.2/flv.min.js"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<script src="/js/three.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/js/gl-transitions.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/js/tween.js" type="text/javascript" charset="utf-8"></script>
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<div id="networkstatus" class="noselect animated"><i class="spinner loading icon"></i></div>
|
||||
|
||||
<video id="stream" class="fsimage" poster=""></video>
|
||||
<video id="stream" class="fsimage" poster="" mute></video>
|
||||
|
||||
<div id="helperLayer" class="gpu animated"></div>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<img id="bgimg" class="fsimage" src="/img/wait.png"/>
|
||||
</div>
|
||||
|
||||
<video loop autoplay id="bgvid" class="fsimage" poster="">
|
||||
<video loop mute autoplay id="bgvid" class="fsimage" poster="">
|
||||
</video>
|
||||
|
||||
<script>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/view.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
{% if config.useLocalAssets %}
|
||||
<script src="/assets/flv.min.js"></script>
|
||||
{% else %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.5.0/flv.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.6.2/flv.min.js"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
<title>InfoScreen3 - {{ display.name }}</title>
|
||||
{% endblock %}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
<div id="networkstatus" class="noselect animated"><i class="spinner loading icon"></i></div>
|
||||
|
||||
<video id="stream" class="fsimage" poster=""></video>
|
||||
|
||||
<div id="helperLayer" class="gpu animated"></div>
|
||||
|
||||
<iframe id="webLayer0" scrolling="no" class="web fsimage animated"></iframe>
|
||||
@@ -42,6 +44,7 @@
|
||||
<div id="bg">
|
||||
<img id="bgimg" class="fsimage" src=""/>
|
||||
</div>
|
||||
|
||||
<video muted loop id="bgvid" class="gpu" poster="">
|
||||
<source src="" type="video/mp4">
|
||||
</video>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{% extends 'layout/view.twig' %}
|
||||
|
||||
{% block header %}
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.0/socket.io.min.js"></script>
|
||||
{% if config.useLocalAssets %}
|
||||
<script src="/assets/webfont.js"></script>
|
||||
{% else %}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
var path = require("path");
|
||||
var fs = require("fs");
|
||||
|
||||
var nodeModules = { };
|
||||
fs.readdirSync("./node_modules")
|
||||
.filter(function (x) {
|
||||
return [".bin"].indexOf(x) === -1;
|
||||
})
|
||||
.forEach(function (mod) {
|
||||
nodeModules[mod] = "commonjs " + mod;
|
||||
});
|
||||
|
||||
if (fs.existsSync("./data/sessions.db")) {
|
||||
fs.rmSync("./data/sessions.db");
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
name: "infoscreen3",
|
||||
context: __dirname,
|
||||
mode: 'production',
|
||||
entry: "./infoscreen3.js",
|
||||
target: "node",
|
||||
output: {
|
||||
path: __dirname + '/webpack',
|
||||
filename: "bundle.js",
|
||||
library: 'commonjs'
|
||||
},
|
||||
externals: nodeModules,
|
||||
module: {
|
||||
noParse: [/socket.io-client/],
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
exclude: /node_modules/,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ test: /\.node$/, use: { loader: "node-loader" } }
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'socket.io-client': path.join(__dirname, 'node_modules', 'socket.io-client', 'socket.io.js')
|
||||
},
|
||||
extensions: ["", ".js", ".node"]
|
||||
},
|
||||
node: {
|
||||
__dirname: true,
|
||||
__filename: true
|
||||
},
|
||||
profile: true
|
||||
}
|
||||
];
|
||||
Reference in new issue
Block a user