9#import <Foundation/Foundation.h>
11NS_ASSUME_NONNULL_BEGIN
60@property (nonatomic,copy) NSString *
url;
73@protocol NIMMediaManagerDelegate <NSObject>
83- (void)playAudio:(NSString *)filePath didBeganWithError:(nullable NSError *)error;
91- (void)playAudio:(NSString *)filePath didCompletedWithError:(nullable NSError *)error;
99- (void)playAudio:(NSString *)filePath progress:(
float)value;
107- (void)stopPlayAudio:(NSString *)filePath didCompletedWithError:(nullable NSError *)error;
112- (void)playAudioInterruptionBegin;
117- (void)playAudioInterruptionEnd;
126- (void)recordAudio:(nullable NSString *)filePath didBeganWithError:(nullable NSError *)error;
134- (void)recordAudio:(nullable NSString *)filePath didCompletedWithError:(nullable NSError *)error;
139- (void)recordAudioDidCancelled;
146- (void)recordAudioProgress:(NSTimeInterval)currentTime;
151- (void)recordAudioInterruptionBegin;
156- (void)recordAudioInterruptionEnd;
163@protocol NIMMediaManager <NSObject>
171@property (nonatomic, assign) NSTimeInterval recordProgressUpdateTimeInterval;
177@property (nonatomic, assign) BOOL shouldUseBuiltInMic;
179#pragma mark - play audio
194- (void)setNeedProximityMonitor:(BOOL)needProximityMonitor;
209- (void)play:(NSString *)filepath;
224- (BOOL)seek:(NSTimeInterval)timestamp;
226#pragma mark - record audio
241- (void)recordForDuration:(NSTimeInterval)duration;
250 duration:(NSTimeInterval)duration;
270- (float)recordPeakPower;
276- (float)recordAveragePower;
289#pragma mark - common setting
295- (void)disableResetAudioSession:(BOOL)disabled;
302- (void)setDeactivateAudioSessionAfterComplete:(BOOL)deactivate;
304#pragma mark - delegates
310- (void)addDelegate:(
id<NIMMediaManagerDelegate>)delegate;
317- (void)removeDelegate:(
id<NIMMediaManagerDelegate>)delegate;
Definition: NIMMediaManagerProtocol.h:55
NSString * filepath
Definition: NIMMediaManagerProtocol.h:66
NSString * url
Definition: NIMMediaManagerProtocol.h:60