mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
make janus-static work for web ui
This commit is contained in:
parent
e6a5d5648f
commit
5912693c1a
5
extras/janus-static/manifest.yaml
Normal file
5
extras/janus-static/manifest.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
name: Janus Static
|
||||
description: Janus WebRTC Gateway (Static Config)
|
||||
path: janus
|
||||
daemon: kvmd-janus-static
|
||||
place: -1
|
||||
@ -21,6 +21,7 @@
|
||||
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from typing import Dict
|
||||
from typing import Optional
|
||||
@ -51,9 +52,10 @@ class ExtrasInfoSubmanager(BaseInfoSubmanager):
|
||||
try:
|
||||
extras_path = self.__global_config.kvmd.info.extras
|
||||
extras: Dict[str, Dict] = {}
|
||||
for app in os.listdir(extras_path):
|
||||
if app[0] != "." and os.path.isdir(os.path.join(extras_path, app)):
|
||||
extras[app] = load_yaml_file(os.path.join(extras_path, app, "manifest.yaml"))
|
||||
for name in os.listdir(extras_path):
|
||||
if name[0] != "." and os.path.isdir(os.path.join(extras_path, name)):
|
||||
app = re.sub(r"[^a-zA-Z0-9_]+", "_", name)
|
||||
extras[app] = load_yaml_file(os.path.join(extras_path, name, "manifest.yaml"))
|
||||
self.__rewrite_app_daemon(extras[app])
|
||||
self.__rewrite_app_port(extras[app])
|
||||
return extras
|
||||
|
||||
@ -126,7 +126,10 @@ export function Session() {
|
||||
$("webterm-window").show_hook = show_hook;
|
||||
$("webterm-window").close_hook = close_hook;
|
||||
|
||||
__streamer.setJanusEnabled(state.janus && (state.janus.enabled || state.janus.started));
|
||||
__streamer.setJanusEnabled(
|
||||
(state.janus && (state.janus.enabled || state.janus.started))
|
||||
|| (state.janus_static && (state.janus_static.enabled || state.janus_static.started))
|
||||
);
|
||||
};
|
||||
|
||||
var __formatTemp = function(temp) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user