Skip to content

Stream events ​

Vabu tells your server when a stream goes live, drops or ends, when an asset is ready and when someone's access changes. You get these as webhooks, signed and retried like every other event, so your app does not need to poll.

Register an endpoint with POST /v1/webhook_endpoints and ask for streams.* and access.*. The envelope, the signature check and the retry schedule are on the webhooks page. Every event type and its fields are in the event catalogue.

The events carry the resource as the API shows it, without secrets. The stream key, the upload address and the SRT passphrase are never in an event. data.previous_attributes shows the old values of whatever changed.

Live streams ​

EventWhenWhat to do
streams.live_stream.createdA live stream was createdStore its id next to your venue.
streams.live_stream.updatedSettings, the key, simulcast targets or playback ids changed, or an encoder connected (status: "connecting")Refresh what you show.
streams.live_stream.activeThe encoder is sending videoShow the stream as live and send your "we are live" message.
streams.live_stream.disconnectedThe encoder dropped. It can come back within the reconnect_window.Show "we will be right back". Alert the crew if you want to.
streams.live_stream.idleThe broadcast endedShow the stream as over. Offer the replay when you have one.
streams.live_stream.deletedA live stream was deletedRemove it from your lists.

Use these events for what the page shows. Do not use them to decide who may watch. That is the job of an entitlement and a session.

Assets, clips and uploads ​

EventWhenWhat to do
streams.asset.createdAn asset or a clip was created, or an upload produced oneRecord the asset id.
streams.asset.readyThe asset can be playedShow it and tell your customers.
streams.asset.erroredThe video could not be processed. data.object.error says why.Ask for a new file.
streams.asset.updatedMetadata, the external id or playback ids changedRefresh what you show.
streams.asset.deletedAn asset was deletedRemove it from your lists.
streams.clip.createdA clip was createdRecord it.
streams.upload.asset_createdAn upload finished and its asset existsLink the upload to your own record.

Access ​

EventWhenWhat to do
access.entitlement.grantedSomeone was given accessUpdate your records.
access.entitlement.revokedAccess was taken awayUpdate your records.
access.entitlement.suspended and access.entitlement.resumedAccess was paused and restoredUpdate your records.
access.entitlement.expiredThe end date passedOffer a renewal.
access.entitlement.extendedA source moved the end date laterUpdate your records.

Handling events well ​

  • An event can arrive more than once and out of order. Store the event id and skip repeats. Compare created_at, or fetch the resource, when order matters.
  • Answer with a 2xx fast and do slow work afterwards.
  • Check the signature on every delivery. See verify the signature.
  • In test mode, events come from your test streams and test entitlements to your test endpoints only.

Not available yet ​

Events for viewer counts, watch time and quality are on What's coming.

Vabu OS documentation