sfu support added, IPC cirrus support added, session history added, advanced session info added

This commit is contained in:
2023-04-19 21:52:30 +03:00
parent b78bdd81fa
commit 9c2c413363
16 changed files with 285 additions and 74 deletions
+7 -7
View File
@@ -15,8 +15,8 @@ const is_proc_running = (pid) => {
}
const is_proc_running_async = async (pid, time_ms) => {
var timeout_count = 0
var check_times = 10
let timeout_count = 0
let check_times = 10
while (true) {
++timeout_count
@@ -30,14 +30,14 @@ const is_proc_running_async = async (pid, time_ms) => {
}
}
const run_webrtc = async (webrtc_port, app_port) => {
const run_webrtc = async (webrtc_port, app_port, sfu_port, session_server_url, session_id) => {
if (!fs.existsSync(webrtc_server_path)) {
return null
}
var webrtc_proc
let webrtc_proc
try {
var webrtc_proc_arg = JSON.stringify({webrtc_port:webrtc_port, app_port:app_port})
let webrtc_proc_arg = JSON.stringify({webrtc_port:webrtc_port, app_port:app_port, sfu_port:sfu_port, session_server_url:session_server_url, session_id:session_id})
webrtc_proc = fork(webrtc_server_path, [webrtc_proc_arg], {
detached: true
})
@@ -47,13 +47,13 @@ const run_webrtc = async (webrtc_port, app_port) => {
return null
}
//var proc_status = await is_proc_running_async(webrtc_proc.pid, 500)
//let proc_status = await is_proc_running_async(webrtc_proc.pid, 500)
return (webrtc_proc) ? webrtc_proc.pid : null
}
const run_app = async (app_path, app_port) => {
var app_proc
let app_proc
try {
app_proc = spawn(app_path, [].concat(app_args_static,
[app_port_arg + app_port.toString()], { cwd: './', stdio: ['ignore', 'pipe', 'pipe']}), {