setVideoRotationMode method

Future<int?> setVideoRotationMode(
  1. VideoRotationMode rotationMode
)

@detail api @hiddensdk(audiosdk) @brief Set the orientation of the video capture. By default, the App direction is used as the orientation reference.
During rendering, the receiving client rotates the video in the same way as the sending client did. @param rotationMode Rotation reference can be the orientation of the App or gravity. Refer to VideoRotationMode{@link #VideoRotationMode} for details. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note - The orientation setting is effective for internal video capture only. That is, the orientation setting is not effective to the custom video source or the screen-sharing stream. - If the video capture is on, the setting will be effective once you call this API. If the video capture is off, the setting will be effective on when capture starts.

Implementation

Future<int?> setVideoRotationMode(VideoRotationMode rotationMode) async {
  $a() => ($instance as $p_a.RTCEngine).setVideoRotationMode(
      t_VideoRotationMode.code_to_android(rotationMode));
  $i() => ($instance as $p_i.ByteRTCEngine)
      .setVideoRotationMode(t_VideoRotationMode.code_to_ios(rotationMode));

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