pixel-streaming webrtc path updated to relative, webrtc test added
This commit is contained in:
@@ -9,7 +9,7 @@ module.exports = {
|
||||
webrtc_port_begin: parseInt(process.env.WEBRTC_PORT_BEGIN),
|
||||
session_limit: 100,
|
||||
log_path: "./logs/runtime.log",
|
||||
webrtc_server_path: "C:/Users/c/Documents/Projects/pixel-streaming-webrtc/WebServers/SignallingWebServer/cirrus.js",
|
||||
webrtc_server_path: "../pixel-streaming-webrtc/WebServers/SignallingWebServer/cirrus.js",
|
||||
app_args: {
|
||||
runtime: {
|
||||
port: "-PixelStreamingPort="
|
||||
|
||||
@@ -38,51 +38,3 @@ module.exports = {
|
||||
get_webrtc_port,
|
||||
get_app_port
|
||||
}
|
||||
|
||||
// class port {
|
||||
// constructor(value) {
|
||||
// this.#value = value
|
||||
// this.#free = true
|
||||
// }
|
||||
// get_value() {
|
||||
// return this.#value
|
||||
// }
|
||||
// set_free() {
|
||||
// this.#free = true
|
||||
// }
|
||||
// set_busy() {
|
||||
// this.#free = false
|
||||
// }
|
||||
// is_free() {
|
||||
// return this.#free
|
||||
// }
|
||||
// #value
|
||||
// #free
|
||||
// }
|
||||
|
||||
// class port_alloc {
|
||||
// constructor(port_begin, count) {
|
||||
// this.#ports = new Array()
|
||||
// for (var i = port_begin; i < port_begin + count; ++i) {
|
||||
// this.#ports.push(new port(i))
|
||||
// }
|
||||
// }
|
||||
// get() {
|
||||
// for (var i in this.#ports) {
|
||||
// if (this.#ports[i].is_free()) {
|
||||
// this.#ports[i].set_busy()
|
||||
// return this.#ports[i].get_value()
|
||||
// }
|
||||
// }
|
||||
// throw new Error('no free ports')
|
||||
// }
|
||||
// free(busy_port) {
|
||||
// for (var i in this.#ports) {
|
||||
// if (this.#ports[i].get_value() == busy_port) {
|
||||
// this.#ports[i].set_free()
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// #ports
|
||||
// }
|
||||
+9
-1
@@ -1,4 +1,5 @@
|
||||
var config = require('../config')
|
||||
const config = require('../config')
|
||||
const fs = require('fs')
|
||||
|
||||
const not_valid = (message) => {
|
||||
console.error('not valid (config.js): ', message)
|
||||
@@ -57,6 +58,13 @@ const test_config = () => {
|
||||
config_pass = false
|
||||
}
|
||||
|
||||
if (config.webrtc_server_path) {
|
||||
if (!fs.existsSync(config.webrtc_server_path)) {
|
||||
not_valid('wbertc_server_path exists in config BUT not in the filesystem (file not exists)')
|
||||
config_pass = false
|
||||
}
|
||||
}
|
||||
|
||||
if (!config.app_args) {
|
||||
not_valid('webrtc_server_path')
|
||||
config_pass = false
|
||||
|
||||
Reference in New Issue
Block a user