Link a data stream to a composition
Open the composition you want to connect to a data stream in Composer.
If you haven't already created a control node for the widget you want to update with the data stream API, create a control node for it.
Open the composition script editor and paste this code snippet into it. You'll need to connect it to the control node in strep 2 and also add the public data stream token.
context.utils.createDataStream(
data_stream_public_token,
(status, payload) =>
{
console.log("we have received: ", status, payload);
if (status === "message") {
// process your data here
}
});
Last updated
Was this helpful?