getThumbnail method
- ByteRTCScreenCaptureSourceType sourceType,
- intptr_t sourceId,
- int maxWidth,
- int maxHeight,
@hidden(iOS)
@detail api
@author liyi.000
@brief Get the thumbnail of the screen
@param sourceType Type of the screen capture object. See ByteRTCScreenCaptureSourceType{@link #ByteRTCScreenCaptureSourceType}.
@param sourceId ID of the screen-shared object. You can get the ID from ByteRTCScreenCaptureSourceInfo returned by calling getScreenCaptureSourceList{@link #ByteRTCEngine#getScreenCaptureSourceList}.
@param maxWidth Maximum width. RTC will scale the thumbnail to fit the given size while maintaining the original aspect ratio. If the aspect ratio of the given size does not match the sharing object, the thumbnail will have blank borders.
@param maxHeight Maximum height. Refer to the note for maxWidth.
@return The thumbnail of the sharing object.
The thumbnail is of the same width-height ratio of the object. The size of the trumbnail is no larger than the specified size.
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]);
}