#ifndef DTKExternalReplayKitOpenDelegateProtocol_h
#define DTKExternalReplayKitOpenDelegateProtocol_h
#import <ReplayKit/ReplayKit.h>
@protocol DTKExternalReplayKitOpenCallBackDelegateProtocol
@required
- (void)openDelegate_finishBroadcastWithError:(NSError *)error;
@end
@protocol DTKExternalReplayKitOpenDelegateProtocol <NSObject>
@optional
@property (nonatomic, weak) id<DTKExternalReplayKitOpenCallBackDelegateProtocol> callBackDelegate;
/*! @abstract Method is called when the RPBroadcastController startBroadcast method is called from the broadcasting application.
@param setupInfo Dictionary that can be supplied by the UI extension to the sample handler.
*/
- (void)broadcastStartedWithSetupInfo:(nullable NSDictionary <NSString *, NSObject *> *)setupInfo;
/*! @abstract Method is called when the RPBroadcastController pauseBroadcast method is called from the broadcasting application. */
- (void)broadcastPaused;
/*! @abstract Method is called when the RPBroadcastController resumeBroadcast method is called from the broadcasting application. */
- (void)broadcastResumed;
/*! @abstract Method is called when the RPBroadcastController finishBroadcast method is called from the broadcasting application. */
- (void)broadcastFinished;
/*! @abstract Method is called as video and audio data become available during a broadcast session and is delivered as CMSampleBuffer objects.
@param sampleBuffer CMSampleBuffer object which contains either video or audio data.
@param sampleBufferType Determine's the type of the sample buffer defined by the RPSampleBufferType enum.
*/
- (void)processSampleBuffer:(CMSampleBufferRef)sampleBuffer withType:(RPSampleBufferType)sampleBufferType;
/*! @abstract Method that should be called when broadcasting can not proceed due to an error. Calling this method will stop the broadcast and deliver the error back to the broadcasting app through RPBroadcastController's delegate.
@param error NSError object that will be passed back to the broadcasting app through RPBroadcastControllerDelegate's broadcastController:didFinishWithError: method.
*/
- (void)finishBroadcastWithError:(NSError *)error;
@end
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
id<DTKExternalReplayKitOpenDelegateProtocol> getDTKExternalReplayKitOpenDelegateImpl();
#ifdef __cplusplus
}
#endif // __cplusplus
#endif /* DTKExternalReplayKitOpenDelegateProtocol_h */id<DTKExternalReplayKitOpenDelegateProtocol> getDTKExternalReplayKitOpenDelegateImpl(){
return [YourImplClass new];
}id<DTKExternalReplayKitOpenDelegateProtocol> getDTKExternalReplayKitOpenDelegateImpl(){
return [YourImplClass new];
}id<DTKExternalNativeAPIServiceProtocol> handler = DTKExternalGetImpl(@"your_bundle_id", DTKExternalNativeAPIServiceProtocol);
[handler invokeNativeAPI:@"dd.replaykit.removeOpenBizType" requestParam:^(id<DTKExternalAPIRequest> _Nonnull param, id<DTKExternalAPIContext> _Nonnull context) {
} callback:^(NSDictionary * _Nonnull response) {
//结束投 屏
}];

【钉钉】API开发者 微信交流群
用微信扫右侧二维码,加入【钉钉】API开发者 交流群,互助沟通

扫码加入交流群