diff options
-rw-r--r-- | extras/janus-static/manifest.yaml | 5 | ||||
-rw-r--r-- | kvmd/apps/kvmd/info/extras.py | 8 | ||||
-rw-r--r-- | web/share/js/kvm/session.js | 5 |
3 files changed, 14 insertions, 4 deletions
diff --git a/extras/janus-static/manifest.yaml b/extras/janus-static/manifest.yaml new file mode 100644 index 00000000..dae1d15a --- /dev/null +++ b/extras/janus-static/manifest.yaml @@ -0,0 +1,5 @@ +name: Janus Static +description: Janus WebRTC Gateway (Static Config) +path: janus +daemon: kvmd-janus-static +place: -1 diff --git a/kvmd/apps/kvmd/info/extras.py b/kvmd/apps/kvmd/info/extras.py index 61b2f483..375aab04 100644 --- a/kvmd/apps/kvmd/info/extras.py +++ b/kvmd/apps/kvmd/info/extras.py @@ -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 diff --git a/web/share/js/kvm/session.js b/web/share/js/kvm/session.js index b8fee992..3a0b501c 100644 --- a/web/share/js/kvm/session.js +++ b/web/share/js/kvm/session.js @@ -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) { |