App that handles OSC data from CasparCG Server, and deliver status as graphQL queries and subscriptions.
- When loading state-scanner it checks for CCG version, and if not responded, it will run with CCG 2.1.xx support.
Be aware that CasparCG 2.2.xx has disabled OSC by default, so you need to enable it in casparcg.config
<osc>
<default-port>6250</default-port>
<disable-send-to-amcp-clients>false</disable-send-to-amcp-clients>
<predefined-clients>
<predefined-client>
<address>127.0.0.1</address>
<port>5253</port>
</predefined-client>
</predefined-clients>
</osc>
https://github.com/olzzon/casparcg-state-scanner-example
Defaults are specified in top of app.js, but should be ok if you run casparcg-state-scanner in your CCG server folder. If you wan´t to change default ports and IP you can do that in ./utils/CONSTANTS.js And manually rebuild.
Query channels:
query {
channels {
layers {
foreground {
name
path
length
loop
paused
}
background {
name
path
length
loop
}
}
}
}
subscription {
channels {
layers {
foreground {
name
path
length
loop
paused
}
background {
name
path
}
}
}
}
(default layer 10)
subscription {
playerLayer {
layers {
foreground {
name
path
length
loop
paused
}
background {
name
path
}
}
}
}
Returns selected layer of channel
{ layer(ch: 1, l: 10) }
Returns countdown of channel, layer, file
{ timeLeft(ch: 1, l: 10) }
Subscribe to array with timeLeft for all channels, default layer:
subscription {
timeLeft {
timeLeft
}
}
Subscribe to a media folder wathcer on the CCG server, so you get a "TRUE" when files are updated or changed.
subscription {
mediaFilesChanged
}
yarn build
yarn start
http://xxx.xxx.xxx.xxx:5254
If you call it from a browser, you´ll get a Playground where you can test your queries and subscriptions. And see the data Schema
yarn build
yarn build-win
yarn build-linux