Skip to content

Commit

Permalink
Added peerlist docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Decoder07 committed May 10, 2024
1 parent 9e7bcba commit cf0bf71
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ class Preview implements HMSPreviewListener{
List<HMSAudioDevice>? availableAudioDevice}) {
/// Get notified when the audio device is changed: https://www.100ms.live/docs/flutter/v2/features/audio-output-routing#adding-audio-device-change-event-listener-android-only
}
@override
void onPeerListUpdate(
{required List<HMSPeer> addedPeers, required List<HMSPeer> removedPeers}){
///When a room is joined we can get the list of peers in the room from `addedPeers`
/// Get notified when a peer is added or removed: https://www.100ms.live/docs/flutter/v2/features/update-listener-enums#hms-peer-update
}
}
```

Expand Down Expand Up @@ -265,5 +272,14 @@ abstract class HMSPreviewListener {
void onAudioDeviceChanged(
{HMSAudioDevice? currentAudioDevice,
List<HMSAudioDevice>? availableAudioDevice});
///Upon joining a room with existing peers, onPeerListUpdated will be called with the list of peers present
///in the room instead of getting onPeerUpdate for each peer in the room.
///Subsequent peer joins/leaves would be notified via both onPeerUpdate and onPeerListUpdated
/// - Parameters:
/// - addedPeers: List of peers who joined the room
/// - removedPeers: List of peers who left the room
void onPeerListUpdate(
{required List<HMSPeer> addedPeers, required List<HMSPeer> removedPeers});
}
```

0 comments on commit cf0bf71

Please sign in to comment.