Skip to main content
Version: Next

Active Speaker Indication - Flutter

Active Speaker indication feature in VideoSDK let you know, which participant in a meeting is active speaker. This feature can be particularly useful in larger meetings or webinars, where there may be many participants and it can be difficult to tell who is speaking.

Whenever any participant speaks in meeting, speakerChanged event will trigger with the participant id of the active speaker.

For example, the meeting is running with Alice and Bob. Whenever any of them speaks, speakerChanged event will trigger and return the speaker participantId.

Event

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.speakerChanged, (String? activeSpeakerId) {
//Room active speaker has changed
//Participant ID of current active speaker is activeSpeakerId
});
}
}

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


Was this helpful?