Skip to content

XL-Andrew/ChatToolBarAudioButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatToolBarAudioButton

  • 导入头文件

#import "ChatToolBarAudioButton.h"

  • 添加代理

<ChatToolBarAudioDelegate>

  • 初始化
ChatToolBarAudioButton *audioButton = [[ChatToolBarAudioButton alloc]init];
audioButton.delegate = self;
[self.view addSubview:audioButton];
  • 代理方法

/*
 * 录音完成
 *
 * @param audioData amr文件data
 * @prram body      附带信息,比如录音时长等信息
 */
- (void)DPAudioRecordingFinishWithData:(NSData *)audioData withBodyString:(NSString *)body;

/*
 * 开始录音
 *
 * @param isRecording 是否开始
 *
 */
- (void)DPAudioStartRecording:(BOOL)isRecording;

/*
 * 录音失败
 */
- (void)DPAudioRecordingFail:(NSString *)reason;

/*
 * 音频值测量
 *
 * @param power 音频值
 */
- (void)DPAudioSpeakPower:(float)power;
  • 效果图:

发送语音按钮.gif

About

iOS IM语音录音机、IM语音播放器。AMR播放器

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published