createScreenCaptureSource method
Future<ZegoScreenCaptureSource?>
createScreenCaptureSource({
- int? sourceId,
- ZegoScreenCaptureSourceType? sourceType,
Create the screen capture source
Available: since 3.1.0 Description: Creates a screen capture source object. Use cases: It is used when you need to record or share the screen or window. When to call: It needs to be called after createEngine. Platform differences: Supported on Windows / macOS / Linux / OHOS, not supported on Android/iOS.
sourceIdThe specified screen ID or window ID. Only macOS and windows platforms need to pass in this parameter.sourceTypeThe specified screen source type. Only macOS and windows platforms need to pass in this parameter.- Returns The screen capture instance, null will be returned when the maximum number is exceeded.
Implementation
Future<ZegoScreenCaptureSource?> createScreenCaptureSource(
{int? sourceId, ZegoScreenCaptureSourceType? sourceType}) async {
return await ZegoExpressImpl.instance
.createScreenCaptureSource(sourceId: sourceId, sourceType: sourceType);
}