This commit is contained in:
Reaby committed 2020-03-15 23:25:32 +02:00
1 parent 286dc5800c
commit 61cd2cce9b
8 files changed
+32 -37

No files matched your search

+7 -9
View File
@@ -27,17 +27,13 @@ Usage is very easy after you have setup the server at local network. The viewer
5. run `npm start`
# Default usage
Viewer is located at: http://127.0.0.1:8000 <br/>
Admin interface is located at: http://127.0.0.1:8000/admin<br/>
Viewer is located at: http://localhost:8000 <br/>
Admin interface is located at: http://localhost:8000/admin<br/>
Defaults to user: `admin`, pass: `admin`<br/>
It's highly encouraged to change the defaults to something else!
# Local stream support for OBS
> Works only when config has `mediaServer` set to `true`
> if you have changed the default port from 8000, the admin interface can be found port +1
Stream admin interface is located at: http://127.0.0.1:8001/admin
Defaults to same admin username and password, which you connect to admin interface as well.
> Works only when config has `mediaServer` set to `true`
at OBS go to: `Settings` -> `Stream`<br/>
set following options:<br/>
@@ -45,14 +41,16 @@ set following options:<br/>
|Setting|Value|
|:---|:---|
|Stream Type:| Custom Streaming Server|
|URL:| `rtmp://127.0.0.1/live`|
|URL:| `rtmp://localhost/live`|
|Stream key:|`STREAM_NAME`|
Later it is possible to define other stream names/keys too, but for now only this one is supported.
# Environment variables
|ENV|default|Usage|
|:---|:---|:---|
|PORT|8000|Server listen port|
|HOST|127.0.0.1|Host or ip from where to server is externally accessible|
|HOST|localhost|Host or ip from where to server is externally accessible|
|ADMIN_USER|admin|Username to access admin interface|
|ADMIN_PASS|admin|Password for the admin interface|
+4 -8
View File
@@ -10,8 +10,8 @@ const EventEmitter = require('events');
let cookieParser = require('cookie-parser')(config.sessionKey);
class Dispatcher extends EventEmitter {}
const eventDispatcher = new Dispatcher();
const cli = require('./modules/cli');
let app = express();
let server = require('http').Server(app);
@@ -59,7 +59,6 @@ if (config.mediaServer) {
const NodeMediaServer = require('node-media-server');
const nodeServerConfig = {
logType: 2,
rtmp: {
port: 1935,
chunk_size: 60000,
@@ -70,19 +69,16 @@ if (config.mediaServer) {
http: {
port: (parseInt(config.serverListenPort) + 1),
allow_origin: '*'
},
auth: {
api : true,
api_user: config.admins[0].username,
api_pass: config.admins[0].password
}
};
let nms = new NodeMediaServer(nodeServerConfig);
nms.run();
nms.run();
}
i18next
.use(FilesystemBackend)
.use(i18nextMiddleware.LanguageDetector)
+2 -1
View File
@@ -130,10 +130,11 @@ class admin {
if (serverOptions.isStreaming === false) {
serverOptions.loop = false;
serverOptions.streamSource = "http://" + config.serverHost + ":" + (parseInt(config.serverListenPort) + 1) + "/live/" + data.streamName + ".flv";
serverOptions.streamSource = "http://" + config.serverHost + ":" + (config.serverListenPort + 1) + "/live/" + data.streamName + ".flv";
serverOptions.isStreaming = true;
cli.success("start stream");
} else {
serverOptions.loop = true;
serverOptions.isStreaming = false;
serverOptions.streamSource = "";
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "infoscreen3",
"version": "1.1.0",
"version": "1.2.0",
"private": true,
"scripts": {
"start": "node --expose-gc ./bin/infoscreen3"
+8 -11
View File
@@ -194,7 +194,7 @@ function undo() {
if (bundleData.styleHeader.fontSize !== fontSize) {
object.setOptions({fontSize: fontSize});
}
if (bundleData.styleHeader.stroke !== "") {
if (bundleData.styleHeader.fill !== "") {
object.setShadow({color: "rgba(0,0,0,0.6)", blur: 5, offsetX: 2, offsetY: 2});
}
} else {
@@ -202,7 +202,7 @@ function undo() {
if (bundleData.styleText.fontSize !== fontSize) {
object.setOptions({fontSize: fontSize});
}
if (bundleData.styleText.stroke !== "") {
if (bundleData.styleText.fill !== "") {
object.setShadow({color: "rgba(0,0,0,0.6)", blur: 5, offsetX: 2, offsetY: 2});
}
}
@@ -476,7 +476,7 @@ function nextSlide(data) {
if (bundleData.styleHeader.fontSize !== fontSize) {
object.setOptions({fontSize: fontSize});
}
if (bundleData.styleHeader.stroke !== "") {
if (bundleData.styleHeader.fill !== "") {
object.setShadow({color: "rgba(0,0,0,0.6)", blur: 5, offsetX: 2, offsetY: 2});
}
} else {
@@ -484,7 +484,7 @@ function nextSlide(data) {
if (bundleData.styleText.fontSize !== fontSize) {
object.setOptions({fontSize: fontSize});
}
if (bundleData.styleText.stroke !== "") {
if (bundleData.styleText.fill !== "") {
object.setShadow({color: "rgba(0,0,0,0.6)", blur: 5, offsetX: 2, offsetY: 2});
}
}
@@ -558,12 +558,10 @@ function addText(content, isHeader) {
y = 30;
}
var needShadow = bundleData.styleText.stroke === "" ? true : false;
if (isHeader) {
text.id = "header";
text.setOptions(bundleData.styleHeader);
text.setOptions({top: y + 10, left: 150});
needShadow = bundleData.styleHeader.stroke === "" ? true : false;
} else {
text.setOptions(bundleData.styleText);
text.setOptions({top: y + 10, left: 250});
@@ -573,9 +571,8 @@ function addText(content, isHeader) {
text.hasControls = false;
text.lockUniScaling = true;
text.hasRotatingPoint = false;
if (needShadow) {
text.setShadow({color: "#000", blur: 5, offsetX: 2, offsetY: 2});
}
text.setShadow({color: "#000", blur: 5, offsetX: 2, offsetY: 2});
canvas.add(text);
}
@@ -788,8 +785,8 @@ function saveAsFullScreenImage(name = "untitled", imageData) {
objects: [{
type: "image",
version: "2.6.0",
width: 1920,
height: 1080,
width: 1280,
height: 720,
crossOrigin: "",
src: dataurl,
filters: []
+1 -1
View File
@@ -138,7 +138,7 @@ function fixCanvas() {
width = con.innerWidth(),
height = Math.floor(width * aspect);
canvas.setWidth(1920).setHeight(1080);
canvas.setWidth(1280).setHeight(720);
$("#c").css("width", width + "px").css("height", height + "px");
canvas.calcOffset();
}
+8 -5
View File
@@ -13,7 +13,10 @@
color: white;
}
canvas {
canvas {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: geometricPrecision;
font-smooth: always;
@@ -186,7 +189,7 @@
<div style="margin:0; padding:0;">
<div id="matchsize">
<canvas id="edit" width="1920" height="1080" style="position: fixed; z-index:10;"></canvas>
<canvas id="edit" width="1280" height="720" style="position: fixed; z-index:10;"></canvas>
<div id="bg">
<img id="bgimg" class="fsimage" src="" />
</div>
@@ -231,7 +234,7 @@
</div>
</div>
<canvas id="tempCanvas" width="1920" height="1080" style="display: none"></canvas>
<canvas id="tempCanvas" width="1280" height="720" style="display: none"></canvas>
<script>
var socket = io.connect("{{ config.serverUrl }}:{{ config.serverListenPort }}/admin-" + displayId);
@@ -280,8 +283,8 @@
var src = e.target.result;
var tempCanvas = new fabric.StaticCanvas("tempCanvas", {
width: 1920,
height: 1080
width: 1280,
height: 720
});
tempCanvas.backgroundColor = null;
tempCanvas.backgroundImage = null;
+1 -1
View File
@@ -11,7 +11,7 @@
{% block body %}
<canvas id="c" width="1980" height="1080" style="position: fixed; z-index: 3;"></canvas>
<canvas id="c" width="1280" height="720" style="position: fixed; z-index: 3;"></canvas>
<div id="bg" style="display: none;">
<img id="bgimg" class="fsimage" src="" />