Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Api - Websockets ? #234

Open
stevespaw opened this issue Mar 28, 2017 · 4 comments
Open

Web Api - Websockets ? #234

stevespaw opened this issue Mar 28, 2017 · 4 comments

Comments

@stevespaw
Copy link

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

@5opr4ni
Copy link

5opr4ni commented Mar 28, 2017

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

@stevespaw
Copy link
Author

stevespaw commented Mar 29, 2017

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
Copy link
Author

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

@RTVA
Copy link

RTVA commented Mar 30, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants