receiveVideoFrom method

void receiveVideoFrom(
  1. RTCSessionDescription sessionDescription,
  2. RemoteParticipant remoteParticipant,
  3. String streamId
)

Sends the receiveVideoFrom to the WebSocket server

Implementation

void receiveVideoFrom(RTCSessionDescription sessionDescription,
    RemoteParticipant remoteParticipant, String streamId) {
  final receiveVideoFromParams = {
    'sender': streamId,
  };
  if (mediaServer == 'kurento') {
    receiveVideoFromParams['sdpOffer'] = sessionDescription.sdp!;
  } else {
    receiveVideoFromParams['sdpAnswer'] = sessionDescription.sdp!;
  }
  idsReceiveVideo[sendJson(
          JsonConstants.receiveVideoMethod, receiveVideoFromParams)] =
      remoteParticipant.connectionId!;
}