pixel-streaming webrtc path updated to relative, webrtc test added

This commit is contained in:
C
2023-02-02 13:09:42 +05:00
parent b50c27ad10
commit f2febdfce8
3 changed files with 10 additions and 50 deletions
+1 -1
View File
@@ -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="
-48
View File
@@ -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
View File
@@ -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