Live Streaming

Horn allows streaming a conversation to CDN platforms like Youtube Live, Twitch, and similar.

Note

Currently, this feature has to be enabled for your channel by the Horn staff. Contact us if you want to use it and we’ll be happy to turn it on for you!

Each channel can have multiple destinations. A destination should be a valid RTMP URL (i.e. rtmp://a.rtmp.youtube.com/live2/us23a-4586-af89-y225-bs41). Each destination can be enabled or disabled.

A broadcast can be started only if there is at least one, enabled, destination configured. Modifying destinations during the broadcast will not change anything in the running broadcast. If you want to i.e. add a new destination, you have to stop the broadcast, make the modifications and start it again.

Only Channel Owners can modify the destinations. All Hosts are allowed to start and stop the broadcast once it’s configured properly.

Note

Starting up the broadcast can take up to 3 or 4 minutes before everything will be up and running and data will start transmitting to the final destination (i.e. YouTube).

Add channel broadcast destination

POST /channels/(string: channel)/broadcast/destinations
Parameters:
  • channel (string) – The channel ID

Request JSON Object:
  • destination (option[string]) – [default: None]

  • label (option[string]) – [default: None]

Response JSON Object:
  • id (option[string]) – [default: None]

Disable channel broadcast destination

POST /channels/(string: channel)/broadcast/destinations/(string: destination)/disable
Parameters:
  • channel (string) – The channel ID

  • destination (string) – The destination ID

Response JSON Object:
  • message (option[string]) – [default: None]

Enable channel broadcast destination

POST /channels/(string: channel)/broadcast/destinations/(string: destination)/enable
Parameters:
  • channel (string) – The channel ID

  • destination (string) – The destination ID

Response JSON Object:
  • message (option[string]) – [default: None]

Enable/disable broadcast for a channel

POST /channels/(string: uuid)/settings/broadcast/(string: state)

If enabled, broadcast feature will be available in the channel. This call can be only be made by Horn team.

Parameters:
  • uuid (string) – The channel ID

  • state (string) – The desired state: “enable” or “disable”

Get broadcast from history

GET /channels/(string: uuid)/broadcast/history/(string: broadcastID)
Parameters:
  • uuid (string) – The channel ID

  • broadcastID (string) – The Broadcast ID

Response JSON Object:
  • ended (option[string]) – [default: None]

  • clientId (option[string]) – [default: None]

  • sessions (option[seq[string]]) – [default: None]

  • id (option[string]) – [default: None]

  • started (option[string]) – [default: None]

  • channelId (option[string]) – [default: None]

  • created (option[string]) – [default: None]

Get broadcast metrics

GET /channels/(string: uuid)/broadcast/metrics

Get metrics for running broadcast session

Parameters:
  • uuid (string) – The channel ID

Response JSON Object:
  • ended (option[string]) – [default: None]

  • clientId (option[string]) – [default: None]

  • sessions (option[seq[string]]) – [default: None]

  • id (option[string]) – [default: None]

  • started (option[string]) – [default: None]

  • channelId (option[string]) – [default: None]

  • created (option[string]) – [default: None]

Get current broadcast state

GET /channels/(string: uuid)/broadcast/state

The state can be one of the following: “idle”, “pending”, “running”

Parameters:
  • uuid (string) – The channel ID

Response JSON Object:
  • state (string)

List broadcast history

GET /channels/(string: uuid)/broadcast/history
Parameters:
  • uuid (string) – The channel ID

Query Parameters:
  • session (string)

  • sort (string)

  • order (string)

  • offset (string)

  • limit (string)

Response JSON Object:
  • total (option[bigdecimal]) – [default: None]

  • rows (option[seq[historyresultrowsinner]]) – [default: None]

List channel broadcast destinations

GET /channels/(string: channel)/broadcast/destinations
Parameters:
  • channel (string) – The channel ID

Response JSON Array of Objects:
  • enabled (option[boolean]) – [default: None]

  • label (option[string]) – [default: None]

  • id (option[string]) – [default: None]

  • destination (option[string]) – [default: None]

  • channelId (option[string]) – [default: None]

Remove channel broadcast destination

DELETE /channels/(string: channel)/broadcast/destinations/(string: destination)
Parameters:
  • channel (string) – The channel ID

  • destination (string) – The destination ID

Response JSON Object:
  • message (option[string]) – [default: None]

Start broadcast from a channel

POST /channels/(string: uuid)/broadcast/start
Parameters:
  • uuid (string) – The channel ID

Response JSON Object:
  • broadcastID (option[string]) – [default: None]

Stop broadcast in a channel

DELETE /channels/(string: uuid)/broadcast/stop
Parameters:
  • uuid (string) – The channel ID

Response JSON Object:
  • message (option[string]) – [default: None]