Ensure that your users don’t miss important content from each other
This functionality is not currently supported for Flutter but will be coming soon! We will update the relevant sections accordingly
This module allows for richer, interactive experiences by enabling video stories and live streaming in your application
More than ever, videos are increasingly dominating mobile screens. From fun short-form clips to promote new products to live-streamed talk shows to educate your customers, videos have the potential to transform the way customers experience your brand.
Host your events virtually and see community interaction as it happens
Live streams and playback videos information are stored in AmityStream
. These stream objects reside in AmityStreamRepository
. To start working with stream, first, the app needs to initialize the repository.
Note : There is a limitation for the maximum number of concurrent live events. Reach out to us at community.amity.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.
This function returns a flowable of AmityStream
. The stream object contains essential data, for example, title and description.
Stream consists of many states. It can change from one state to another, depending on events and actions.
Amitystream.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."
You can check the status of a stream by calling stream.getStatus()
.
AmityStreamRepository provides a convenient method getStreams
and also call setStatus(statuses: Array<Amitystream.Status>)
to query live streams. We provide enums of stream status as AmityStream.Status
You can observe changes in a collection as per the defined statuses.
Run this command:
With Flutter:
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Now in your Dart code, you can use:
To begin with you will need to setup the AmityVideoPlayerClient in the application level.
SDK provides AmityVideoPlayer with a capability to play a live stream or a recorded live stream by providing a streamId
in AmityVideoContoller
.