After peer dependencies installed, follow these following steps depends on your Platform
IOS
Install pod
cdios&&podinstall
Add permission in your info.split file
<key>NSCameraUsageDescription</key><string>Your own description of the purpose</string><key>NSMicrophoneUsageDescription</key><string>Your own description of the purpose</string>
Android
config kotlinVersion and compileSdkVersion in android/build.gradle, add kotlinVersion above 1.7.0 and compileSdkVersion above 34 in buildscript > ext
To create a stream, use StreamRepository.createStream() This will return a LiveObject instance of the created AmityStream. After AmityStream created successfully, StreamId will be used to publish the stream.
We provide AmityVideoBroadcaster component. This component can be used to preview your preview your video. You can adjust your own resolution and bitrate as followed.
To observe the status of a broadcast, you can pass onBroadcastStateChange to observe broadcaster's stage change. This function will be invoke and accept AmityStreamBroadcasterState as an input. The possible statuses are :
idle a status of stream in an idle state.
connectingindicates a status of stream that it's connecting to a rtmp server.
connectedindicates a status of stream that it's connected to a rtmp server.
disconnectedindicates a status of stream that it's disconnected to a rtmp server. We also provide error information through an exception.