Skip to main content
Version: 0.0.x

Go Live On Social Media

This feature allows participant to broadcast meeting on various social media platforms such as Facebook or Youtube. This guide will provide an overview of how participant can start and stop broadcasting meeting.

  1. Start LiveStream - By using startLivestream() function, a participant can start broadcasting meeting on various platforms by provding url and stream keys as an argument.
  2. Stop LiveStream - By using stopLivestream() function, a participant can stop broadcasting on all platforms.

Start And Stop Live Stream

private val YOUTUBE_RTMP_URL: String? = null
private val YOUTUBE_RTMP_STREAM_KEY: String? = null

//
findViewById<View>(R.id.btnLivestream).setOnClickListener {
if (!livestreaming) {
if (YOUTUBE_RTMP_URL == null || YOUTUBE_RTMP_STREAM_KEY == null) {
throw Error("RTMP url or stream key missing.")
}
val outputs: MutableList<LivestreamOutput> = ArrayList()
outputs.add(LivestreamOutput(YOUTUBE_RTMP_URL, YOUTUBE_RTMP_STREAM_KEY))

meeting!!.startLivestream(outputs)
} else {
meeting!!.stopLivestream()
}
}

Events

  1. livestream-started - Whenever broadcasting of meeting started, livestream-started event will trigger.

  2. livestream-stopped - Whenever broadcasting of meeting stopped, livestream-stopped event will trigger.

object : MeetingEventListener() {
override fun onLivestreamStarted() {
livestreaming = true

// TODO: show indication that meeting livestream is started.
}

override fun onLivestreamStopped() {
livestreaming = false

// TODO: show indication that meeting livestream is stopped.
}

}