Skip to content

Overlay Broadcast

Topic
channel.overlay.broadcast
Scope
overlays:broadcast

The channel.overlay.broadcast topic delivers custom events to a channel’s overlays in real-time. Events can target all overlays globally or a specific overlay by ID.

Parameter Type Description
data.target string "global" to target all overlays, or a specific overlay ID
data.event string Custom event name (max 256 characters)
data.data object Custom event payload (max 5KB)
{
"id": "01J6VTDB25SX14GDBDFZWDX3M9",
"ts": "2024-09-03T11:30:39Z",
"type": "message",
"topic": "channel.overlay.broadcast",
"room": "5ad23dcc18fff500d78c5348",
"data": {
"target": "global",
"event": "my-custom-event",
"data": {
"key": "value"
}
}
}

StreamElements itself uses this topic: when a viewer uses the chatbot’s !kappagen command, the chatbot broadcasts an emotesplosion-kappagen event to all of the channel’s overlays, with the chat message that triggered the command as the event payload.

{
"id": "01J6VTDB25SX14GDBDFZWDX3M9",
"ts": "2024-09-03T11:30:39Z",
"type": "message",
"topic": "channel.overlay.broadcast",
"room": "5ad23dcc18fff500d78c5348",
"data": {
"target": "global",
"event": "emotesplosion-kappagen",
"data": {
// ... the chat message that triggered !kappagen
}
}
}