stopRtpForward method Null safety

Future<RtpForwardStopped> stopRtpForward(
  1. String roomId,
  2. int streamId
)

stopRtpForward

To stop a previously created RTP forwarder.
roomId unique numeric ID of the room to stop the forwarder from.
streamId unique numeric ID of the RTP forwarder.

Implementation

Future<RtpForwardStopped> stopRtpForward(String roomId, int streamId) async {
  var payload = {"request": "stop_rtp_forward", "room": roomId, "stream_id": streamId};
  _handleRoomIdTypeDifference(payload);
  JanusEvent response = JanusEvent.fromJson(await this.send(data: payload));
  JanusError.throwErrorFromEvent(response);
  return RtpForwardStopped.fromJson(response.plugindata?.data);
}