Curate a List of Titles

You might have a need to write a controller that can completely manage the full list of titles. It might need to access all of the titles in the list, understand their status, control their playback, and display what they look like.

For example, you might want to interface a hardware controller to control the playback of graphics or create a simple web app that runs on a browser elsewhere in the network, empowering a second person to drive all graphics playout.

Retrieve the title data and icons

The getTitleControlInfo command makes this very easy to do.

scheduler.scheduleCommand('getTitleControlInfo', { icon: true, width: 100, height: 70 }, {}, (reply) => {
  let titleInfo = JSON.parse(reply);
  // ... Parse titleInfo and extract information and images for each title in the list.
});
Parameter
Description

icon

indicates this should return icons for all the titles.

width and height

set the size of the returned icons.

input

when set, only returns titles connected to the named input.

id

when set, only returns the one title listed by id.

The returned payload is relatively extensive, so the best way to find out what’s possible is to look at the code and run in the debugger. Capture the returned JavaScript object with a breakpoint or print it to the console to see all your options.

Or use the JSON Command Testerwhich displays all returned objects too.

Subscribe for Notifications

Use the “subscribe” command. In this case, it is being applied individually for each title.

scheduler.scheduleCommand('subscribe', { id: title.id, sender: cleanedId, events: 'play, control, data' },

Last updated