ZegoReplayKitExt
ZegoReplayKitExt
Declared in ZegoExpressDefines.h
Methods
sharedInstance
static
sharedInstance
+ (ZegoReplayKitExt *)sharedInstance;Create a screen capture extension singleton.
Declared in
ZegoExpressDefines.hCreate a screen sharing extension singleton for Broadcast upload Extension to send the capture screen data to the SDK.
- Available since: 3.1.0
Extension singleton instance.
setupWithDelegate:
setupWithDelegate:
- (void)setupWithDelegate:(id<ZegoReplayKitExtHandler>)delegate API_AVAILABLE(ios (12.0));Initialize the extension app.
Declared in
ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| delegate | nullable id<ZegoReplayKitExtHandler> | Screen capture extension application event notification callback. Passing [nil] means no callback notification will be received. |
Details
If the App Group configuration is not enabled, this interface can be used for initialization.
- Use cases: It needs to be called in the [broadcastStartedWithSetupInfo] method in the implementation class of [RPBroadcastSampleHandler].
- Available since: 3.1.0
setupWithDelegate:appGroup
setupWithDelegate:appGroup
- (void)setupWithDelegate:(id<ZegoReplayKitExtHandler>)delegate appGroup:(NSString *)groupID API_AVAILABLE(ios (12.0));Use App Group to initialize the extension process, which can provide better performance and stability when sharing screens.
Declared in
ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| delegate | nullable id<ZegoReplayKitExtHandler> | Screen capture extension application event notification callback. Passing [nil] means no callback notification will be received. |
| groupID | NSString * | The host app and the extension app should belong to the same App Group, and the AppGroupID needs to be passed in here. |
Details
Setting AppGroupID is used to share memory between app, which can improve the performance and stability of data transmission. At the same time, it is necessary to call the [setAppGroupID:] method to set the AppGroupID before starting [startScreenCapture] in the host App.
- Use cases: It needs to be called in the [broadcastStartedWithSetupInfo] method in the implementation class of [RPBroadcastSampleHandler].
- Available since: 3.3.0
finished
finished
- (void)finished API_AVAILABLE(ios (12.0));Finish screen capture.
Declared in
ZegoExpressDefines.h- Use cases: When the screen recording is stopped through the system control center, RPBroadcastSampleHandler.broadcastFinished will be called back and called in the broadcastFinished method.
- Available since: 3.1.0
sendSampleBuffer:withType
sendSampleBuffer:withType
- (void)sendSampleBuffer:(CMSampleBufferRef)sampleBuffer withType:(RPSampleBufferType)sampleBufferType API_AVAILABLE(ios (12.0));Media data sending method
Declared in
ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| sampleBuffer | CMSampleBufferRef | CMSampleBuffer object which contains either video or audio data. |
| sampleBufferType | RPSampleBufferType | Determine's the type of the sample buffer defined by the RPSampleBufferType enum. |
- Use cases: It needs to be called in the processSampleBuffer: method in the implementation class of RPBroadcastSampleHandler.
- Available since: 3.1.0
