RTMP Events - Flutter
VideoSDK provides the livestreamStateChanged event, which informs you about the current state of the livestream for the meeting.
Events.livestreamStateChanged
- This event is triggered when the livestream status of the meeting changes.
 - It can be subscribed to using the 
Roomobject. 
Example
Here is an example demonstrating the usage of the event mentioned on this page.
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:videosdk/videosdk.dart';
class MeetingScreen extends StatefulWidget {
  //Existing configuration
}
class _MeetingScreenState extends State<MeetingScreen> {
  late Room room;
  @override
  void initState() {
    //Existing configuration
    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

