//
//  GMScreenRecorderManager.h
//  LJRepayer
//
//  Created by 刘鹿杰 on 2019/7/30.
//  Copyright © 2019 刘鹿杰. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <ReplayKit/ReplayKit.h>

typedef void(^StartRecordSuccess)();

NS_ASSUME_NONNULL_BEGIN

@protocol GMScreenRecorderDelegate <NSObject>

@optional
// 开启录屏失败时，回调信息
- (void)didStartRecordWithErrorString:(NSString *)errorString;
// 停止录屏失败时 回调信息
- (void)didStopRecordWithErrorString:(NSString *)errorString;
// 视频保存成功回调
- (void)saveVideoSuscessWithAssetURl:(AVURLAsset *)assetURL;
@end


@interface GMScreenRecorderManager : NSObject

+ (instancetype)sharedManager;

@property(nonatomic, weak)id<GMScreenRecorderDelegate> delegate;

// 开始录屏是否需要启用麦克风
+ (BOOL)startRecord:(BOOL)isNeedMicroPhone suscess:(StartRecordSuccess)suscess;
// 结束录屏，并保存视频到相册
+ (void)stopRecordWithSave;
// 结束录屏，丢弃这次的录制
+ (void)stopRecordWithDiscard;
//合成视频
- (void)mixAudioAndVidoWithInputURL2:(NSURL*)inputURL outPath:(NSString *)outPath;

@end

NS_ASSUME_NONNULL_END
