createOfferForPublishing method

Future<void> createOfferForPublishing(
  1. Map<String, dynamic> constraints
)

Creates an offer for publishing

Implementation

Future<void> createOfferForPublishing(
    Map<String, dynamic> constraints) async {
  RTCSessionDescription offer =
      await localParticipant!.peerConnection!.createOffer(constraints);
  await localParticipant!.peerConnection!
      .setLocalDescription(offer)
      .then((_) => websocket.publishVideo(offer));
}