mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Handles new signal events
This commit is contained in:
@ -90,6 +90,10 @@ class _CallScreenState extends SafeState<CallScreen> {
|
||||
if (e.callID == convID) _removeMember(e.userID);
|
||||
});
|
||||
|
||||
this.listen<NewCallSignalEvent>((e) {
|
||||
if (e.callID == convID) _newSignal(e);
|
||||
});
|
||||
|
||||
this.listen<CallPeerReadyEvent>((e) {
|
||||
if (e.callID == convID) _memberReady(e.peerID);
|
||||
});
|
||||
@ -145,6 +149,12 @@ class _CallScreenState extends SafeState<CallScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Call this method each time we get a new signal
|
||||
void _newSignal(NewCallSignalEvent ev) {
|
||||
print(
|
||||
"${ev.peerID} - ${ev.sessionDescription != null ? ev.sessionDescription.toMap() : ev.candidate.toMap()}");
|
||||
}
|
||||
|
||||
/// Call this when a user has interrupted streaming
|
||||
void _removeRemotePeerConnection(int memberID) {
|
||||
_membersList.getUser(memberID).status = MemberStatus.JOINED;
|
||||
|
Reference in New Issue
Block a user