This repository was archived by the owner on Jul 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 452
Expand file tree
/
Copy pathLCCKRecordAudioHUD.h
More file actions
91 lines (66 loc) · 1.73 KB
/
LCCKRecordAudioHUD.h
File metadata and controls
91 lines (66 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//
// LCCKRecordAudioHUD.h
// LCCKChatBarExample
//
// Created by alex-W on 2017/6/7.
// Copyright © 2017年 http://codewpf.com/ . All rights reserved.
//
#import <UIKit/UIKit.h>
#define kLCCKRecordAudioTooLong @"kLCCKRecordAudioTooLong"
/**
音频记录结果
- LCCKRecoderResultStateSuccess: 成功
- LCCKRecoderResultStateFail: 失败 转换音频格式错误
- LCCKRecoderResultStateShort: 失败 音频时长太短不发送
- LCCKRecoderResultStateLong: 成功 音频时长太长结束并发送
- LCCKRecoderResultStateCancel: 取消
*/
typedef NS_ENUM(NSUInteger, LCCKRecordResultState) {
LCCKRecoderResultStateSuccess ,
LCCKRecoderResultStateFail ,
LCCKRecoderResultStateShort ,
LCCKRecoderResultStateLong ,
LCCKRecoderResultStateCancel ,
};
/**
音频记录状态
- LCCKRecordProgressStateOutSide: 手指松开,取消发送
- LCCKRecordProgressStateInSide: 手指上滑,取消发送
*/
typedef NS_ENUM(NSUInteger, LCCKRecordProgressState) {
LCCKRecordProgressStateOutSide,
LCCKRecordProgressStateInSide,
};
@interface LCCKRecordAudioHUD : UIView
/** 是否正在显示 */
@property (nonatomic, assign, readonly, getter=isShowing) BOOL showing;
/**
HUD 单例
@return 单例
*/
+ (LCCKRecordAudioHUD *)instance;
/**
显示录音指示器
*/
+ (void)show;
/**
隐藏录音指示器,根据结果
@param recderState 结果
*/
+ (void)dismissWithState:(LCCKRecordResultState)resultState;
/**
修改录音指示器,根据状态
@param progressState 状态
*/
+ (void)changeProgressState:(LCCKRecordProgressState)progressState;
/**
修改音量
@param level 音量
*/
+ (void)changeVolume:(NSInteger)level;
/**
录音总时间
@return 录音总时间
*/
+ (NSInteger)seconds;
@end