Live Stream

Host your events virtually and see community interaction as it happens

Live streams and playback videos information are stored in Amity.Stream. To start working with 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.amity.co with your use-case and we will determine if the current limit can be raised.

Viewing a live stream

Retrieve a stream object

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

Stream Status

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 in the process of transforming to a recorded stream."

  • RECORDED indicates "a stream has ended broadcasting and has been transformed to a recorded stream."

Retrieve a stream collection

You can query a list of stream by calling queryStream.

Playing a live stream

To play a live stream, currently FLV, RTMP and HLS protocol are supported by using watcherUrl inside the stream object.

Play a recorded stream

To play a recorded stream, currently FLV, MP4 and M3U8 protocol are supported by using recordings inside the stream object.

Broadcast Live Stream

Follow the below code to Create Livestream:

Stop live stream session

To stop broadcasting live stream...

Delete live stream

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.

Last updated