View & Play Live Stream

Host your events virtually and see community interaction as it happens.

In order to play a live stream or recorded live stream using React Native app, we provided AmityStreamPlayer component. This player allows developers to easily incorporate video playback functionality into their applications. To utilize this feature, developers can refer to the example code provided below, which demonstrates how to play the desired video with simplicity and efficiency.

Setup & Configuration

To use AmityStreamPlayer , please follow this setup step in your react native project.

Install peer dependencies

yarn add \
@amityco/ts-sdk-react-native \
react-native-video \
react-native-vlc-media-player \
react-native-get-random-values \
react-native-rsa-native

After peer dependencies are installed, follow the following steps depending on your Platform.

IOS

Install pods

cd ios && pod install

Android

config kotlinVersion and compileSdkVersion in android/build.gradle, add kotlinVersion above 1.7.0 and compileSdkVersion above 34 in buildscript > ext

buildscript {
    ext {
        ...
        compileSdkVersion = 34
        kotlinVersion = "1.9.22"
        ...
    }
    ....
}

Play a live stream and playback video

To initialize the player, call setupAmityVideoPlayer() after login

Get Amity.Stream object using StreamRepository.getStreamById

On your live-stream video player page, use AmityStreamPlayer component and pass Amity.Stream .

Last updated

Was this helpful?