Updating text in HTML Template

When creating an HTML template, is there something special I need to do to make the text change?

I have an update function in a casparcg.js file. If I run the update function with the JSON that CasparCG is generating (copied from the command line) in Chrome Developer tools the template updates as expected. This is the beginning of the update() function in may javascript:

function update(arg) { //the key/value pairs configured in CasparCG client are passed here
json = JSON.parse(arg);

if (json.f0 != undefined) {
    $("#homename").html(json.f0);
}

What version of CasparCG are you using? Support for json template data was only added in 2.1, so if you are using 2.0 it will not work without some workarounds.
Have you tried to enable remote debugging for the html producer to see if an error is reported in the console when you call update, or have you tried making the update function log something to the console to verify it is being called correctly and getting the correct data?

Are you using the official client to send the updated json? If not it could an issue with speech marks not being escaped correctly (it can get rather messy)

What version of CasparCG are you using? Support for json template data was only added in 2.1, so if you are using 2.0 it will not work without some workarounds.

This was the issue. Didn’t realize the current stable version was so old/didn’t support this feature. Everything is working now.

1 Like