Skip to main content
Version: 1.0.x

Go Live On Social Media

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

  1. Start LiveStream - By using startLivestream() function, a participant can start broadcasting room 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

// Start Live Stream
room.startLivestream([
{
url: "rtmp://a.rtmp.youtube.com/live2",
streamKey: "streamKey1",
},
]);

// Stop Live Stream
room?.stopLivestream();

Events

  1. livestreamStarted - Whenever broadcasting of room started, livestreamStarted event will trigger.

  2. livestreamStopped - Whenever broadcasting of room stopped, livestreamStopped event will trigger.

room.on(Events.livestreamStarted, () {
print("room livestream started");
});
//
room.on(Events.livestreamStopped, () {
print("room livestream stopped");
});