What are webhooks in live streaming?
- Webhooks are a mechanism for communication between two web applications in real-time.
- Webhooks act as a tool used by FastPix to notify your application of events occurring asynchronously, outside of the API request cycle. For example, these events could involve livestream creation, update, or changes in the livestream API status.
- FastPix sends a POST request to the provided address when these asynchronous events occur, allowing you the freedom to handle the response in a manner that fits your application’s requirements. After a webhook is configured for a specific environment, notifications will be sent for all events within that environment.
Requirements for webhooks implementation
- Develop a webhooks endpoint:
Create a designated endpoint on your server to receive incoming webhook requests from FastPix. This endpoint, usually a URL, will serve as the destination for data sent through the POST method when specific trigger events related to live streaming occur within your application.
- Define the trigger event for live streaming:
Identify the precise live streaming events or actions within your application that must trigger the FastPix webhook. These events could include, for instance, the start of a live stream, viewer interactions, or the completion of a live stream session.
- Monitoring and maintenance for webhooks:
Regularly monitor the FastPix webhook endpoint to identify and address any errors or failures that may arise during live streaming events. Conduct routine maintenance tasks and updates to ensure the ongoing functionality and reliability of the FastPix webhook system tailored for live streaming applications.
When a POST request is made to create a live stream, this webhook event is triggered.
When a POST request is made to create a Simulcast of a livestream, this webhook event is triggered.
Implement webhooks
Get a webhook proxy unique URL from webhooks.site and create a webhook API for a particular workspace-Id.
Next, start creating live streams and execute live stream tasks. Subsequently, a specific event is received at a designated URL.
Live stream events
Simulcast events
Utilizing simulcast target events is crucial for developing a user interface that provides users with real-time information on the status of their set third-party endpoints. This becomes especially beneficial when designing a UI to present the current state of each simulcast target and to monitor any updates in their status as they happen.