This project is early in development and API may change. The query, playout, data and template commands are mostly finished and I will be adding more as I need them. If you need something that is missing add an issue.
For now docs are in the source only.
npm install caspar-cg
var CasparCG = require("caspar-cg");
ccg = new CasparCG("localhost", 5250);
ccg.connect(function () {
ccg.info(function (err, serverInfo) {
console.log(serverInfo);
});
ccg.play("1-1", "AMB");
setTimeout(function () {
ccg.clear("1");
ccg.disconnect();
}, 10 * 1000);
});
ccg.on("connected", function () {
console.log("Connected");
});
- Fix
disconnected
event on node v4+ - Requires node v4+
- Fix
info
parsing error when parsingimage-producer
data
- Adds
resume
- Adds
swap
- Adds
print
- Adds
logLevel
- Adds
mixerFill
to move and resize layers
ccg.info()
now parses layers and returns a much more predictable result.
- Layers is always an array
- Numbers and Booleans are parsed (all values were strings before)
- Parameters with
-
and_
are replaced with cammel case - Inconsistent parameters are renamed
Socket errors are now emitted as connectionError
instead of error
.