NIMVideoObject Class Reference

Inherits from NSObject
Conforms to NIMMessageObject
Declared in NIMVideoObject.h

Overview

Video message object

– initWithSourcePath:

Initialization method for video message objects

- (instancetype)initWithSourcePath:(NSString *)sourcePath

Parameters

sourcePath

video file path

Return Value

Video message object

Discussion

Initialization method for video message objects

Declared In

NIMVideoObject.h

– initWithData:extension:

Initialization method for video message objects

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

Parameters

data

Video data

extension

Video file extension

Return Value

Video message object

Discussion

Initialization method for video message objects

Declared In

NIMVideoObject.h

– initWithSourcePath:scene:

Initialization method for video message objects

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

Parameters

sourcePath

video file path

scene

scenario type

Return Value

Video message object

Discussion

Initialization method for video message objects

Declared In

NIMVideoObject.h

– initWithData:extension:scene:

Initialization method for video message objects

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

Parameters

data

Video data

extension

Video file extension

scene

scenario type

Return Value

Video message object

Discussion

Initialization method for video message objects

Declared In

NIMVideoObject.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

NIMVideoObject.h

  displayName

Display name of a video message

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

Discussion

Display name of a video message

Declared In

NIMVideoObject.h

  md5

MD5 value of a video message

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

Discussion

MD5 value of a video message

Declared In

NIMVideoObject.h

  path

Local video file path

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

Discussion

Local video file path

The SDK does not provide the functionality for video download. We recommend the APP use this path for video download. The SDK can provide cache cleaning later.

Declared In

NIMVideoObject.h

  url

Remote video path

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

Discussion

Remote video path

Declared In

NIMVideoObject.h

  coverUrl

Remote path of the thumbnail of a video file

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

Discussion

Remote path of the thumbnail of a video file

Only video files uploaded to the CommeEase server supports the thumbnail URL. Otherwise, the URL is invalid

Declared In

NIMVideoObject.h

  coverPath

Local file path of a video thumbnail

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

Discussion

Local file path of a video thumbnail

Declared In

NIMVideoObject.h

  coverSize

Thumbnail dimension

@property (nonatomic, assign, readonly) CGSize coverSize

Discussion

Thumbnail dimension

Declared In

NIMVideoObject.h

  duration

Video duration in milliseconds

@property (nonatomic, assign) NSInteger duration

Discussion

Video 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

NIMVideoObject.h

  fileLength

File size

@property (nonatomic, assign, readonly) long long fileLength

Discussion

File size

Declared In

NIMVideoObject.h