handleParticipantLeft method
Future<void>
handleParticipantLeft(
- String targetId
)
override
Implementation
@override
Future<void> handleParticipantLeft(String targetId) async {
_notify(CallbackEvents.participantHasLeft, participantId: targetId);
final subscriber = _remoteSubscribers.remove(targetId);
if (subscriber != null) {
await subscriber.dispose();
}
_iceCandidateQueueForSubscribers.remove(targetId);
_audioStats.removeReceiver(targetId);
_videoStats.removeReceivers(targetId);
if (_remoteSubscribers.isEmpty) {
_setConnectionType(ConnectionType.p2p, needMigrate: true);
}
}