createAnswerForSubscribing method
Future<void>
createAnswerForSubscribing(
- RemoteParticipant remoteParticipant,
- String streamId,
- Map<
String, dynamic> constraints
Creates an answer for subscribing
Implementation
Future<void> createAnswerForSubscribing(RemoteParticipant remoteParticipant,
String streamId, Map<String, dynamic> constraints) async {
RTCSessionDescription answer =
await remoteParticipant.peerConnection!.createAnswer(constraints);
await remoteParticipant.peerConnection!.setLocalDescription(answer).then(
(_) => websocket.receiveVideoFrom(answer, remoteParticipant, streamId));
}