Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions millicast/webhooks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ The [Thumbnail](/millicast/webhooks/thumbnail.mdx) hook does not use this schema

The [ViewerConnection](/millicast/webhooks/viewerconnection.md) hook guide explains how to use viewer connection events to automate your workflow.

## Filtered webhooks

You may wish to send webhooks for different groups of streams to different webhook URLs. For example you may set up different targets for webhooks relating to different environments, customers or regions.

You can do this by configuring a **filter** on your webhook. A filter is a regular expression. Only events matching the filter will be sent to the webhook.

For event types 'feeds', 'media', 'thumbnail' and 'viewerConnection' the filter will be applied to the `streamName` data field. For event type 'transcoder' the filter will be applied to the `transcoderName` data field.

## Learn more

Learn more or find examples by exploring the [developer blog](https://optiview.dolby.com/resources/blog/tag/webhooks) and [code samples](https://github.com/orgs/dolbyio-samples/repositories?q=webhooks).
25 changes: 25 additions & 0 deletions millicast/webhooks/thumbnail.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The following HTTP headers are on the request to identify stream details:
- **X-Millicast-Timestamp**: timestamp of the generated thumbnail.
- **X-Millicast-Feed-Id**: Dolby.io Real-time Streaming feed id.
- **X-Millicast-Stream-Id**: Dolby.io Real-time Streaming stream id.
- **X-Millicast-Token-Id**: Dolby.io Real-time Streaming publish token id.
- **X-Millicast-Signature**: SHA1 signature using the hook configured secret (The same signature mechanism used by the other webhooks).

## Troubleshooting
Expand All @@ -76,6 +77,30 @@ There are a few limitations to be aware of:
- Thumbnails cannot be configured to send more or less frequently than every 30 seconds.
- Regular intra frames are required to generate the thumbnails.

## On demand thumbnails

If the thumbnails generated every 30 seconds are not interesting or timed appropriately, you may instead create 'on-demand' thumbnails.
Call the /api/thumbnails endpoint to immediately generate a thumbnail for a streamName and/or tokenId and send it to any configured webhooks.

```
curl --request POST \
--url https://api.millicast.com/api/thumbnails \
--header 'accept: application/json' \
--header 'authorization: Bearer {YOUR_API_SECRET}' \
--header 'content-type: application/json' \
--data '
{
"streamName": "myStreamName",
"tokenId": 12345
}
'
```

Note that the thumbnail setting on the publish token only controls the regularly scheduled thumbnails every 30 seconds and is not required for on demand thumbnails.
On demand thumbnails and scheduled thumbnails may be used in parallel.

On demand thumbnails are rate limited to 6 per minute per streamName/tokenId combination.

## Learn more

We have some sample code to demonstrate receiving a thumbnail hook and saving it to disk: [Webhook Code Example (download and save)](https://github.com/millicast/samples-millicast-webhooks)
Loading