sendAnswer method

Future<void> sendAnswer(
  1. RTCSessionDescription answer
)

Implementation

Future<void> sendAnswer(RTCSessionDescription answer) async {
  final callCapabilities = CallCapabilities()
    ..dtmf = false
    ..transferee = false;

  final metadata = SDPStreamMetadata({
    localUserMediaStream!.stream!.id: SDPStreamPurpose(
        purpose: SDPStreamMetadataPurpose.Usermedia,
        audio_muted: localUserMediaStream!.stream!.getAudioTracks().isEmpty,
        video_muted: localUserMediaStream!.stream!.getVideoTracks().isEmpty)
  });

  final res = await sendAnswerCall(room, callId, answer.sdp!, localPartyId,
      type: answer.type!, capabilities: callCapabilities, metadata: metadata);
  Logs().v('[VOIP] answer res => $res');
}