SuperFlyTV / casparcg-connection

node.js Javascript/TypeScript library for CasparCG connection and commands.
https://www.npmjs.com/package/casparcg-connection
MIT License
86 stars 22 forks source link

ERROR 400 #134

Open CyberGentleman opened 5 years ago

CyberGentleman commented 5 years ago

const {CasparCG} = require ("casparcg-connection");

var connection = new CasparCG (); connection.connect (); connection.play (1, 1, "AMB");

Installation: npm init npm install --save casparcg-connection Error: Can not find module 'tslib' npm install tslib Second error: The command connection.play (1, 1, "AMB") returns the error:

Received message from 127.0.0.1: REQ yv8qtl7 PLAY 1-1 "AMB" \ r \ n Sent message to 127.0.0.1: 400 ERROR \ r \ nREQ yv8qtl7 PLAY 1-1 "AMB" \ r \ n

Do you have a solution ?

mint-dewit commented 5 years ago

Hi,

What version of CasparCG are you using? By default this library uses command request id's, but that is only supported in CasparCG 2.1+, if you are still using 2.0.7 you have to disable asynchronous commands by setting CasparCG.queueMode = QueueMode.SALVO.