ios_getThumbnail method

Future ios_getThumbnail(
  1. ByteRTCScreenCaptureSourceType sourceType,
  2. intptr_t sourceId,
  3. int maxWidth,
  4. int maxHeight,
)

@platform ios @hidden(iOS) @detail api @author liyi.000 @brief 获取屏幕采集对象缩略图 @param sourceType 屏幕采集对象的类型。详见 ByteRTCScreenCaptureSourceType{@link #ByteRTCScreenCaptureSourceType}。 @param sourceId 屏幕分享时,共享对象的 ID。可通过 getScreenCaptureSourceList{@link #ByteRTCEngine#getScreenCaptureSourceList} 返回的ByteRTCScreenCaptureSourceInfo共享对象列表中获取。 @param maxWidth 最大宽度。保持采集对象本身的宽高比不变,将缩略图缩放到指定范围内的最大宽高。如果给出的尺寸与共享对象比例不同,得到的缩略图会有黑边。 @param maxHeight 最大高度。参见 maxWidth 的说明。 @return 屏幕采集对象缩略图。缩略图由屏幕共享对象等比缩放而来。缩略图的大小小于等于此接口设定的尺寸。

Implementation

Future<$p_i.ByteRTCImage?> ios_getThumbnail(
    $p_i.ByteRTCScreenCaptureSourceType sourceType,
    $p_i.intptr_t sourceId,
    int maxWidth,
    int maxHeight) async {
  $() => ($instance as $p_i.ByteRTCEngine)
      .getThumbnail(sourceType, sourceId, maxWidth, maxHeight);

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