Skip to main content
Version: 0.1.x

RTMP Events - Android

VideoSDK provides onLivestreamStateChanged event which will notify you of the current state of livestream for the meeting.

onLivestreamStateChanged

  • This event will be triggered when the meeting's livestream status changed.
  • You can implement this method of the abstract Class MeetingEventListener and add the listener to Meeting class using the addEventListener() method of Meeting Class.

Example

Here is the usage of the event mentioned in this page.

private val meetingEventListener: MeetingEventListener = object : MeetingEventListener() {
override fun onLivestreamStateChanged(livestreamState: String?) {
when (livestreamState) {
"LIVESTREAM_STARTING" -> Log.d( "LivestreamStateChanged",
"Meeting livestream is starting"
)
"LIVESTREAM_STARTED" -> Log.d( "LivestreamStateChanged",
"Meeting livestream is started"
)
"LIVESTREAM_STOPPING" -> Log.d("LivestreamStateChanged",
"Meeting livestream is stopping"
)
"LIVESTREAM_STOPPED" -> Log.d("LivestreamStateChanged",
"Meeting livestream is stopped"
)
}
}
}

override fun onCreate(savedInstanceState: Bundle?) {
//...

// add listener to meeting
meeting!!.addEventListener(meetingEventListener)
}

API Reference

The API references for all the methods and events utilised in this guide are provided below.

Got a Question? Ask us on discord