setRemoteVideoCanvas method

Future<int?> setRemoteVideoCanvas(
  1. string streamId,
  2. VideoCanvas videoCanvas
)

@detail api @hiddensdk(audiosdk) @author sunhang.io @brief Sets the view to be used for remote video rendering and the rendering mode.
To unbind the canvas, set videoCanvas to Null. @param streamId Stream ID, used to specify the video stream for which the view and rendering mode need to be set. @param videoCanvas View information and rendering mode. See VideoCanvas{@link #VideoCanvas}. Starting from version 3.56, you can set the rotation angle of the remote video rendering using renderRotation. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note When the local user leaves the room, the setting will be invalid. The remote user leaving the room does not affect the setting.

Implementation

Future<int?> setRemoteVideoCanvas(
    string streamId, VideoCanvas videoCanvas) async {
  $a() => ($instance as $p_a.RTCEngine).setRemoteVideoCanvas(
      streamId, unpackObject<$p_a.VideoCanvas>(videoCanvas));
  $i() => ($instance as $p_i.ByteRTCEngine).setRemoteVideoCanvas(
      streamId, unpackObject<$p_i.ByteRTCVideoCanvas>(videoCanvas));

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}