Live Stream
Host your events virtually and see community interaction as it happens.
Last updated
Host your events virtually and see community interaction as it happens.
Last updated
Live streams and playback video information are stored in Amity.Stream
. To start working with the stream, first, the app needs to initialize the repository. To create a new SDK instance with your API key, refer to the Initialization section.
There is a limitation for the maximum concurrent live events. Please feel free to reach out to us at community.social.plus.co with your use-case and we will determine if the current limit can be raised.
Each stream object has a unique identifier. To retrieve a single stream object. The stream object contains essential data such as title, description, streamerUrl, watcherUrl, etc
The stream consists of many states. It can change from one state to another, depending on events and actions.
Amity.StreamStatus.<STATUS>
represents a stream status. The following enum cases describe all the possible statuses of a stream.
IDLE
indicates "a stream that has generated but no actions have been taken."
LIVE
indicates "a stream is currently being broadcasted."
ENDED
indicates "a stream has ended broadcasting and is in the process of transforming to a recorded stream."
RECORDED
indicates "a stream has ended broadcasting and has been transformed to a recorded stream."
The system offers real-time automated moderation for live streams, where streams can be flagged or terminated based on customizable thresholds set via the console. The SDK provides access to information about which categories the live stream has been flagged or terminated by.
You can query a list of streams by calling queryStream
.
To play a live stream, please refer to View & Play Live Stream.
To play a recorded stream, currently, FLV, MP4, and M3U8 protocols are supported by using recordings
inside the stream object.
Note that the TypeScript SDK does not support broadcasting a live stream directly. Instead, it allows the creation of a stream object. You can then retrieve the streaming URL from this object and implement it with a third-party library or a streaming tool like OBS.
To stop broadcasting a live stream, you can use the dedicated stop function provided by the SDK. This function will explicitly end the ongoing live stream and change its status to 'ENDED' Using this function is crucial for effectively managing your live streams and ensuring that they transition properly to their recorded state after broadcasting. Here's how you can use the function:
To delete a stream, you will need the ID of the stream that you want to delete. The function will return true if successfully deleted, otherwise, it will throw an error.