sendOfferSdp method

void sendOfferSdp(
  1. String otherUserId
)

Implementation

void sendOfferSdp(String otherUserId) async {
  final connection = getConnection(otherUserId);
  if (connection != null) {
    final sdp = await connection.createOffer();
    sendMessage('offer-sdp', {
      'userId': userId,
      'otherUserId': otherUserId,
      'sdp': sdp!.toMap(),
    });
  }
}