NIMAudioObject Class Reference

Inherits from NSObject
Conforms to NIMMessageObject
Declared in NIMAudioObject.h

Overview

Audio object

– initWithSourcePath:

Audio object initialization method

- (instancetype)initWithSourcePath:(NSString *)sourcePath

Parameters

sourcePath

Source audio path

Return Value

instance of an audio object

Discussion

Audio object initialization method

Declared In

NIMAudioObject.h

– initWithData:extension:

Audio object initialization method

- (instancetype)initWithData:(NSData *)data extension:(NSString *)extension

Parameters

data

audio data

extension

Audio data file extension

Return Value

instance of an audio object

Discussion

Audio object initialization method

Declared In

NIMAudioObject.h

– initWithSourcePath:scene:

Audio object initialization method

- (instancetype)initWithSourcePath:(NSString *)sourcePath scene:(NSString *)scene

Parameters

sourcePath

Source audio path

scene

scenario type

Return Value

instance of an audio object

Discussion

Audio object initialization method

Declared In

NIMAudioObject.h

– initWithData:extension:scene:

Audio object initialization method

- (instancetype)initWithData:(NSData *)data extension:(NSString *)extension scene:(NSString *)scene

Parameters

data

audio data

extension

Audio data file extension

scene

scenario type

Return Value

instance of an audio object

Discussion

Audio object initialization method

Declared In

NIMAudioObject.h

– setUploadURL:

Set a URL for uploaded resources

- (void)setUploadURL:(NSString *)urlString

Parameters

urlString

URL for an image

Discussion

Set a URL for uploaded resources

Declared In

NIMAudioObject.h

  path

Local audio file path

@property (nullable, nonatomic, copy, readonly) NSString *path

Discussion

Local audio file path

Declared In

NIMAudioObject.h

  url

Remote audio file path

@property (nullable, nonatomic, copy, readonly) NSString *url

Discussion

Remote audio file path

Declared In

NIMAudioObject.h

  duration

Audio duration in milliseconds

@property (nonatomic, assign) NSInteger duration

Discussion

Audio duration in milliseconds

The SDK will automatically parse the duration based on the file information, but the upper layer can also set this value.

Declared In

NIMAudioObject.h

  md5

MD5 value of an audio file

@property (nullable, nonatomic, copy, readonly) NSString *md5

Discussion

MD5 value of an audio file

Declared In

NIMAudioObject.h

  displayName

Display name

@property (nullable, nonatomic, copy) NSString *displayName

Discussion

Display name

Declared In

NIMAudioObject.h