startScreenCaptureByReplaykit method

  1. @override
void startScreenCaptureByReplaykit(
  1. TRTCVideoStreamType streamType,
  2. TRTCVideoEncParam encParam,
  3. String? appGroup
)
override

Start screen sharing by ReplayKit (for iOS only)

This interface supports you to share the entire iOS system screen.

Parameters:

  • encParam(TRTCVideoEncParam):
    • Image encoding parameters used for screen sharing, which can be set to empty, indicating to let the SDK choose the optimal encoding parameters (such as resolution and bitrate).
  • streamType(TRTCVideoStreamType):
  • appGroup(String):
    • The Application Group Identifier shared by your app and the screen recording process.
    • You can specify this parameter as nil, but it is recommended that you set it according to the documentation for better reliability.

Implementation

@override
void startScreenCaptureByReplaykit(TRTCVideoStreamType streamType, TRTCVideoEncParam encParam, String? appGroup) {
  if (TRTCPlatform.isIOS) {
    TRTCMethodChannel().startScreenCaptureByReplaykit(streamType, encParam, appGroup);
  } else {
    TRTCLog(_tag, "startScreenCaptureByReplaykit is not currently supported on this platform");
  }
}