This commit is contained in:
KingKDot
2026-05-13 13:44:33 -05:00
parent 30b6c63cfc
commit 8e97a32567
28 changed files with 1571 additions and 4 deletions
@@ -610,6 +610,30 @@ func HandleCommand(ctx context.Context, env *runtime.Env, envelope map[string]in
env.Plugins.Unload(pluginId)
_ = wire.WriteMsg(ctx, env.Conn, wire.PluginEvent{Type: "plugin_event", PluginID: pluginId, Event: "unloaded"})
return nil
case "webrtc_publish":
payload, _ := envelope["payload"].(map[string]interface{})
if payload == nil {
sendCommandResultSafe(env, cmdID, false, "missing payload")
return nil
}
return handleWebrtcPublish(ctx, env, cmdID, payload)
case "webrtc_stop":
return handleWebrtcStop(ctx, env, cmdID)
case "webrtc_p2p_offer":
payload, _ := envelope["payload"].(map[string]interface{})
if payload == nil {
sendCommandResultSafe(env, cmdID, false, "missing payload")
return nil
}
return handleWebrtcP2POffer(ctx, env, cmdID, payload)
case "webrtc_p2p_ice":
payload, _ := envelope["payload"].(map[string]interface{})
if payload == nil {
return nil
}
return handleWebrtcP2PIce(ctx, env, cmdID, payload)
case "webrtc_p2p_stop":
return handleWebrtcP2PStop(ctx, env, cmdID)
case "desktop_start":
if goruntime.GOOS == "darwin" {
perms := sysinfo.DarwinPermissions()