client icon indicating copy to clipboard operation
client copied to clipboard

Web Api - Websockets ?

Open stevespaw opened this issue 8 years ago • 4 comments

I see that the newest client on the build, 2.09, supports websockets, this would be fantastic, but I can't seem to make it work. I assume that it is like a web API. Maybe I am wrong. I would think the command from a browser assuming a clip with a UID in the client "test" would be:

http://127.0.0.1:4250/control/test/play

Am I doing something wrong? or will this not work this way?

Thanks, Steve

stevespaw avatar Mar 28 '17 16:03 stevespaw

Try this! WS.html.zip (Chrome) /olle

5opr4ni avatar Mar 28 '17 21:03 5opr4ni

I will try and report back, We are looking to control the official CCG client from Ross Dashboard. This should make it easy. I will post an example when we get it working

Thanks for your help!

stevespaw avatar Mar 29 '17 17:03 stevespaw

We have it working, nice. Can you give us the details on the "path" and "args" and the [1] ? {"path" : "/control/5/play", "args" : [1]}').

Can we pass template data through this method?

I am trying to document a project here for my web/javascript developer. I will pass along examples of our project as we go along to the forum.

Thanks again, This is very helpful. Steve

stevespaw avatar Mar 29 '17 21:03 stevespaw

Hi Steve,

great that you are looking on this... there's so little info about how this works... ;) I also try to understand how to use the "args" parameter, hoping it has to be a way to customise the triggered line but with no luck... I tried for example adding a seek as second argument: {"path" : "/control/10/play", "args" : [1, seek 5]}')} this does not work and looking at the CasparCG client logs, the above is not registered... only an: ...[dbc] [D] Accepted connection from 127.0.0.1

In fact, it seems that any of those args are not received, not even the [1] arg...

ex: {"path" : "/control/10/stop", "args" : [1]}')} logs: [2017-03-30 22:46:56.740] [dbc] [D] Accepted connection from 127.0.0.1 [2017-03-30 22:46:56.749] [dbc] [D] Received OSC message over WebSocket from 127.0.0.1:65459: /control/10/stop [2017-03-30 22:46:56.751] [dbc] [D] Sent message to 10.20.30.119:5250: STOP 1-10\r\n [2017-03-30 22:46:56.752] [dbc] [D] Received message from 10.20.30.119:5250: 202 STOP OK\r\n

Perhaps this is a feature for futur implementacion...

@5opr4ni
Olle, could you enlighten us a little with an example, please?

Thanks for your help! Greetings

RTVA avatar Mar 30 '17 22:03 RTVA