createScreenCaptureSource method

Future<ZegoScreenCaptureSource?> createScreenCaptureSource(
  1. {int? sourceId,
  2. ZegoScreenCaptureSourceType? sourceType}
)

Create the screen capture source

Available: since 3.1.0 Description: Creates a screen capture source object based on the provided source ID and source type. Use cases: It is used when you need to record and share the screen or window. When to call: It needs to be called after createEngine. Platform differences: Only supports Windows and macOS.

  • sourceId The specified screen ID or window ID. Only macOS and windows platforms need to pass in this parameter.
  • sourceType The 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);
}