setRemoteVideoSuperResolution method

Future<int?> setRemoteVideoSuperResolution({
  1. required string streamId,
  2. required VideoSuperResolutionMode mode,
})

@hidden for internal use only @detail api @hiddensdk(audiosdk) @author yinkaisheng @brief Sets the super resolution mode for remote video stream. @param streamId Stream ID, used to specify the video stream for which the super resolution mode needs to be set. @param mode Super resolution mode. See VideoSuperResolutionMode{@link #VideoSuperResolutionMode}. @return.
- 0: RETURN_STATUS_SUCCESS. It does not indicate the actual status of the super resolution mode, you should refer to onRemoteVideoSuperResolutionModeChanged{@link #IRTCEngineEventHandler#onRemoteVideoSuperResolutionModeChanged} callback. - -1: RETURN_STATUS_NATIVE_IN_VALID. Native library is not loaded. - -2: RETURN_STATUS_PARAMETER_ERR. Invalid parameter. - -9: RETURN_STATUS_SCREEN_NOT_SUPPORT. Failure. Screen stream is not supported. See ReturnStatus{@link #ReturnStatus} for more return value indications. @note - Call this API after joining room. - The original resolution of the remote video stream should not exceed 640 × 360 pixels. - You can only turn on super-resolution mode for one stream.

Implementation

Future<int?> setRemoteVideoSuperResolution(
    {required string streamId,
    required VideoSuperResolutionMode mode}) async {
  $a() => ($instance as $p_a.RTCEngine).setRemoteVideoSuperResolution(
      streamId, t_VideoSuperResolutionMode.code_to_android(mode));
  $i() => ($instance as $p_i.ByteRTCEngine).setRemoteVideoSuperResolution(
      streamId, t_VideoSuperResolutionMode.code_to_ios(mode));

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