RTMP Events - Flutter
VideoSDK provides livestreamStateChanged
event which will notify you of the current state of livestream for the meeting.
Events.livestreamStateChanged​
- This event will be triggered when the meeting's livestream status changed.
- This event can be subscribed from the
Room
object.
Example​
Here is the usage of the event mentioned in this page.
import 'package:flutter/material.dart';
import 'package:videosdk/videosdk.dart';
class MeetingScreen extends StatefulWidget {
...
}
class _MeetingScreenState extends State<MeetingScreen> {
late Room room;
@override
void initState() {
...
setupRoomEventListener();
}
@override
Widget build(BuildContext context) {
return YourMeetingWidget();
}
void setupRoomEventListener() {
room.on(Events.livestreamStateChanged, (String status) {
//Status can be :: LIVESTREAM_STARTING
//Status can be :: LIVESTREAM_STARTED
//Status can be :: LIVESTREAM_STOPPING
//Status can be :: LIVESTREAM_STOPPED
log("Meeting Livestream status : $status");
});
}
}
API Reference​
The API references for all the methods and events utilized in this guide are provided below.
Got a Question? Ask us on discord