startScreenCaptureByReplaykit method
void
startScreenCaptureByReplaykit(
- TRTCVideoStreamType streamType,
- TRTCVideoEncParam encParam,
- 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):
- Channel used for screen sharing, which can be the primary stream (TRTCVideoStreamType.big) or substream (TRTCVideoStreamType.sub).
- 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");
}
}