onSDPStreamMetadataChangedReceived method

Future<void> onSDPStreamMetadataChangedReceived(
  1. String roomId,
  2. String senderId,
  3. Map<String, dynamic> content
)

Implementation

Future<void> onSDPStreamMetadataChangedReceived(
    String roomId, String senderId, Map<String, dynamic> content) async {
  if (senderId == client.userID) {
    // Ignore messages to yourself.
    return;
  }
  final String callId = content['call_id'];
  Logs().d('SDP Stream metadata received for call ID $callId');
  final call = calls[callId];
  if (call != null) {
    if (call.room.id != roomId) {
      Logs().w(
          'Ignoring call sdp metadata change for room $roomId claiming to be for call in room ${call.room.id}');
      return;
    }

    if (content[sdpStreamMetadataKey] == null) {
      Logs().d('SDP Stream metadata is null');
      return;
    }
    await call.onSDPStreamMetadataReceived(
        SDPStreamMetadata.fromJson(content[sdpStreamMetadataKey]));
  }
}