createScreenCaptureSource method

Future<int> createScreenCaptureSource(
  1. int? sourceId,
  2. int? sourceType
)

Implementation

Future<int> createScreenCaptureSource(int? sourceId, int? sourceType) async {
  sourceId ??= _index;
  var instance =
      await ZegoFlutterEngine.instance.createScreenCaptureSource(sourceId);
  var i = _index;
  var capureSource = ScreenCaptureSource();
  capureSource.instance = instance;
  _mediaSources[i] = capureSource;
  _index++;
  return i;
}