casparcg-connection icon indicating copy to clipboard operation
casparcg-connection copied to clipboard

A generic way to call a custom AMCP-command string

Open z1glr opened this issue 10 months ago • 1 comments

  • I'm submitting a: feature request

  • Summary In a past version, there was a method to send any AMCP-command as a string (referenced at #122). In the current library-verison (v6) I can't find any equivalent command.

z1glr avatar Apr 09 '24 14:04 z1glr

See https://github.com/SuperFlyTV/casparcg-connection/pull/205

mint-dewit avatar Apr 11 '24 08:04 mint-dewit

Could you have a go with version 6.3.0-nightly-master-20240412-065100-23103b26.0 and see how that works for you?

mint-dewit avatar Apr 12 '24 12:04 mint-dewit

I did some testing and so for it's working great. Some things I tested: (both in CasparCG-verison 2.3.3 and 2.4.0-RC1)

  • Simple commands like PLAY / PAUSE / RESUME / CLEAR
  • CG ADD together with JSON-data. The JSON has to be escaped manually which I think also should be this way, since it's exactly the CLI behaves. I didn't test XML-data, since I don't have any templates using it.

What doesn't work is the use of REQ: Adding a REQ-id to the command, Since the library uses REQ itself, send commands get ignored. I think it could either be let as is with maybe some documentation somewhere about this behaviour or the presence of a user-defined id could be detected and used instead to be behave more like the direct CLI

z1glr avatar Apr 16 '24 13:04 z1glr

Glad to hear it works. I won't be implementing REQ/RES, that's a responsibility of the library not the user.

mint-dewit avatar Apr 18 '24 11:04 mint-dewit