mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2025-06-09 13:10:35 +01:00
virtualcam - print OutputActive status on toggle
This commit is contained in:
parent
d9d3c7c8b2
commit
6ad530ce2e
@ -43,10 +43,16 @@ type VirtualCamToggleCmd struct{} // size = 0x0
|
||||
|
||||
// Run executes the command to toggle the virtual camera.
|
||||
func (c *VirtualCamToggleCmd) Run(ctx *context) error {
|
||||
_, err := ctx.Client.Outputs.ToggleVirtualCam()
|
||||
resp, err := ctx.Client.Outputs.ToggleVirtualCam()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to toggle virtual camera: %w", err)
|
||||
}
|
||||
|
||||
if resp.OutputActive {
|
||||
fmt.Fprintln(ctx.Out, "Virtual camera is now active.")
|
||||
} else {
|
||||
fmt.Fprintln(ctx.Out, "Virtual camera is now inactive.")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user