Hi. I am developing a custom HTML web front end for a broadcast and wondering if anyone has had any success in grouping multiple commands using AMCP like you can with the official front end app?
I do not understand that question. You can simply send one command after another in your client. Send a CR/LF between the commands and that will do it. It’s simply sending strings to a socket…
Ah ok thanks!. So in my HTML I have a data attribute that gets fired on a button click e.g.
data-command=“PLAY 1-5 “HIGHLIGHTS” CUT 0 Linear RIGHT”
so I could just have:
data-command="
PLAY 1-5 “HIGHLIGHTS” CUT 0 Linear RIGHT
\r\n
PLAY 1-5 “MOREHIGHLIGHTS” CUT 0 Linear RIGHT
"
Does that make sense?
I think yes.
Cant seem to get to work, my function is passing over the \r\n but the server ignores it and only processes the first command oddly
my query function is here https://pastebin.com/mFHEq40n
i am using the broadcast vision code as a guide https://github.com/BroadcastVision/webCG anyone else used this?
Probably have to escape it like \\r\\n
or even \\\r\\\n
Thanks man. Will give that a try
Tried again. seems the CasparServerConnector.php doesnt like the way i am posting in the \r\n
the response i get in the log is
Received message from 192.168.0.150: PLAY 1-10 test1 \r\n PLAY 1-15 test2 \r\n
it plays out the first layout fine, but not the second
It’s more likely that the connector is trying to send that return characters as encoded characters, not the other way around
good call… maybe its my ajax function:
$.ajax({
url: ‘CommandHandler.php’,
type: ‘POST’,
data: {casparcg_command: command}
});
Fixed!. i had to switch the characters out as they were already being escaped
var command = $(this).data(‘command’).replace("\n", “\n”).replace("\r", “\r”);