Manage streams
When working with live streams, you would want to manage your streams, retrieve details about them, update or even delete your streams, and also enable or disable the access to stream live.
Single stream
Setting up a single live stream is ideal when you'll only have one active stream at a time or for temporary, one-time broadcasts. For instance, if you're organizing a conference with a series of consecutive speakers, using a single live stream is ideal for this purpose.
Multiple streams
Setting up multiple live stream configurations is necessary when you anticipate having multiple live streams. This setup is useful for various scenarios with concurrent streams that start at the same time or overlap.
Best practice for multiple concurrent streams
Sure, when you're dealing with several live streams happening at the same time, it's smart to set up different configurations for each one. Each configuration is like a setup tailored specifically for a particular live event. For instance, if you're running multiple events concurrently, you should create a unique configuration for each event.
Show live stream (retrieve stream details for watching)
You can get all the details about any live stream by sending a request with the streamId
. The response will display the current status of the live stream and fetch all necessary details if you intend to broadcast that specific live stream.
API reference for Get live stream by ID
curl --request GET \
--url https://v1.fastpix.io/live/streams/streamId \
--header 'accept: application/json'
Update a live stream
To update details for a particular live stream, you would need the streamId
for your live stream. In your request you can update the following parameters:
- reconnectWindow: When broadcasting software for live streaming purposefully or because of network problems disconnects from FastPix, the Reconnect Window specifies how long FastPix will wait (in seconds) before concluding the recorded media and declaring the stream to be over. If no Reconnect Window is supplied, the API falls back to a 60-second window.
metadata
(object): Stores additional details about the live stream, such as its title, category, or any other relevant information.
Here’s is a request example:
curl -X PATCH 'https://v1.fastpix.io/live/streams/{streamId}'
--user {Access Token ID}:{Secret Key} \
-H 'Content-Type: application/json' \
-d '{
"metadata": {
"livestream_name": "Gaming_stream"
},
"reconnectWindow": 100
}'
Delete a live stream
Here’s is a request example:
curl -X DELETE 'https://v1.fastpix.io/live/streams/{streamId}'
--user {Access Token ID}:{Secret Key} \
Updated 2 days ago