Feeds hooks
Receive notifications about when a stream is being published
The feed hooks will allow you to receive events when a stream has been published or stopped publishing.
There are two different events sent by the feeds hooks:
- started which is sent when a publishing feed has been started
- ended which is sent when a publishing feed has been terminated either by the publisher or Dolby.io Real-time Streaming server.
Dolby.io Real-time Streaming will send hooks for each individual feed, not stream wide. That is, if you start publishing in one stream and then without stopping it you start streaming to the same stream in another encoder/browser, you will get a new started event, and a stopped event on the previous one.
Webhook Payload data
The payload of the events will contain the following information
- feedId: unique identifier for the publishing feed.
- accountId: Dolby.io Real-time Streaming account id.
- name: Dolby.io Real-time Streaming stream name.
- streamId: Dolby.io Real-time Streaming stream id.
- started: timestamp in seconds when the publishing feed was started.
- active: boolean flag indicating if the publishing feed is active,
true
on thestarted
event,false
on theended
event. - ended: timestamp in seconds when the publishing feed was ended (only available on the
ended
events).
Feed started webhook
Dolby.io Real-time Streaming will trigger this webhook when a publishing feed has been started, the event name is started
.
Here is an example of the webhook body:
{
"type": "feeds",
"event": "started",
"timestamp": 1638463486489,
"data": {
"feedId": "369e4a86-f937-4254-bd9f-99dc484d2bd6",
"accountId": "ZG6NWV",
"name": "sample_stream",
"streamId": "ZG6NWV/sample_stream",
"started": 1638463486359,
"active": true
}
}
Feed ended webhook
Dolby.io Real-time Streaming will trigger this webhook when a publishing feed has been terminated either by the publisher or the Dolby.io Real-time Streaming server, the event name is ended
.
Here is an example of the webhook body:
{
"type": "feeds",
"event": "ended",
"timestamp": 1638463501075,
"data": {
"feedId": "369e4a86-f937-4254-bd9f-99dc484d2bd6",
"accountId": "ZG6NWV",
"name": "sample_stream",
"streamId": "ZG6NWV/sample_stream",
"active": false,
"ended": 1638463500963
}
}
Updated 3 months ago