getThumbnail method

FutureOr getThumbnail(
  1. ByteRTCScreenCaptureSourceType sourceType,
  2. intptr_t sourceId,
  3. int maxWidth,
  4. int maxHeight,
)

@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

FutureOr<ByteRTCImage> getThumbnail(ByteRTCScreenCaptureSourceType sourceType,
    intptr_t sourceId, int maxWidth, int maxHeight) async {
  return await nativeCall('getThumbnail:sourceId:maxWidth:maxHeight:',
      [sourceType.$value, sourceId, maxWidth, maxHeight]);
}