Custom Events

Emit custom events from the Streamer.bot WebSocket server

Overview

You can enable Custom events with this Subscribe request:

Subscribe Request
{
  "request": "Subscribe",
  "id": "my-request-id",
  "events": {
    "General": [
      "Custom"
    ]
  },
}

C# Methods

WebsocketBroadcastString

Send a custom string over the Streamer.bot WebSocket server

Send a text string to all clients connected to the Streamer.bot WebSocket Server

public void WebsocketBroadcastString(string data)
CPH.WebsocketBroadcastString("Hello, world!");

WebsocketBroadcastJson

Send a custom JSON event over the Streamer.bot WebSocket server

Send a JSON payload to all clients connected to the Streamer.bot WebSocket Server

public void WebsocketBroadcastJson(string data)
CPH.WebsocketBroadcastJson("{'key': 'value'}");