setLocalVideoCanvas method

Future<int?> setLocalVideoCanvas(
  1. VideoCanvas videoCanvas
)

@detail api @hiddensdk(audiosdk) @author sunhang.io @brief Sets the view to be used for local video rendering and the rendering mode. @param videoCanvas View information and rendering mode. See VideoCanvas{@link #VideoCanvas}. @return - 0: Success. - -2: Invalid parameter. - -12: This method is not available in the Audio SDK. @note - You should bind your stream to a view before joining the room. This setting will remain in effect after you leave the room. - If you need to unbind the local video stream from the current view, you can call this API and set the videoCanvas to null.

Implementation

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

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