23 lines
811 B
C#
23 lines
811 B
C#
|
|
namespace TeamsISO.App.Services;
|
||
|
|
|
||
|
|
// /teams/* route handlers — UIAutomation-driven in-call controls.
|
||
|
|
//
|
||
|
|
// POST /teams/mute → InvokeTeams(ToggleMute, "mute")
|
||
|
|
// POST /teams/camera → InvokeTeams(ToggleCamera, "camera")
|
||
|
|
// POST /teams/leave → InvokeTeams(LeaveCall, "leave")
|
||
|
|
// POST /teams/share → InvokeTeams(OpenShareTray, "share")
|
||
|
|
// POST /teams/raise-hand → InvokeTeams(ToggleRaiseHand, "raise-hand")
|
||
|
|
public sealed partial class ControlSurfaceServer
|
||
|
|
{
|
||
|
|
private object InvokeTeams(Func<TeamsControlBridge.InvokeResult> invoke, string action)
|
||
|
|
{
|
||
|
|
var result = invoke();
|
||
|
|
return new
|
||
|
|
{
|
||
|
|
ok = result == TeamsControlBridge.InvokeResult.Invoked,
|
||
|
|
action,
|
||
|
|
result = result.ToString(),
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|