ENF News Bot
Automated News Bot
- Joined
- Apr 15, 2022
- Messages
- 4,556
You can now subscribe to Stream events through Queues event subscriptions and receive them on a queue. Process them with a Worker or an HTTP pull consumer to publish videos when they are ready, react to live broadcasts starting or stopping, or track caption and download progress.
Unlike webhooks, which send a fixed set of events to one URL, event subscriptions let you choose which events you receive and route them to multiple destinations. Create one subscription per queue to send different events to different consumers.
Stream publishes 14 event types across your account:
To create a subscription, run the following command:
npmyarnpnpm
Refer to Stream event subscriptions for all event types and example payloads.
Continue reading...
Unlike webhooks, which send a fixed set of events to one URL, event subscriptions let you choose which events you receive and route them to multiple destinations. Create one subscription per queue to send different events to different consumers.
Stream publishes 14 event types across your account:
- Videos:
video_state.ready,video_state.updated,video_state.errored - Live inputs:
live_input.connected,live_input.disconnected,live_input.errored - Captions:
caption.created,caption.updated,caption.ready,caption.deleted - Downloads:
download.created,download.updated,download.ready,download.deleted
To create a subscription, run the following command:
npmyarnpnpm
npx wrangler queues subscription create <QUEUE_NAME> --source stream --events video_state.ready,live_input.connectedyarn wrangler queues subscription create <QUEUE_NAME> --source stream --events video_state.ready,live_input.connectedpnpm wrangler queues subscription create <QUEUE_NAME> --source stream --events video_state.ready,live_input.connectedRefer to Stream event subscriptions for all event types and example payloads.
Continue reading...