subscriptionInitiatedFromClient method

void subscriptionInitiatedFromClient(
  1. RemoteParticipant remoteParticipant,
  2. String streamId
)

Implementation

void subscriptionInitiatedFromClient(
    RemoteParticipant remoteParticipant, String streamId) {
  final sdpConstraints = <String, String>{
    'offerToReceiveAudio': 'true',
    'offerToReceiveVideo': 'true',
  };

  remoteParticipant.peerConnection!.createOffer(sdpConstraints).then((sdp) {
    remoteParticipant.peerConnection!.setLocalDescription(sdp).then((_) {
      receiveVideoFrom(sdp, remoteParticipant, streamId);
    });
  });
}