listParticipants method Null safety

Future<List<AudioBridgeParticipants>> listParticipants(
  1. String roomId
)

listParticipants

To get a list of the participants in a specific room of roomId

Implementation

Future<List<AudioBridgeParticipants>> listParticipants(String roomId) async {
  var payload = {
    "request": "listparticipants",
    "room": roomId,
  };
  _handleRoomIdTypeDifference(payload);
  JanusEvent response = JanusEvent.fromJson(await this.send(data: payload));
  JanusError.throwErrorFromEvent(response);
  return (response.plugindata?.data['participants'] as List<dynamic>).map((e) => AudioBridgeParticipants.fromJson(e)).toList();
}