EMVideoMessageBody

EMVideoMessageBody

new EMVideoMessageBody(localPath, thumbnailLocalPath)

Source:
Video message body constructor.
Parameters:
Name Type Description
localPath String 视频本地位置
thumbnailLocalPath String 视频缩略图本地位置

Methods

displayName() → {String}

Source:
Get display name of the attachment.
Returns:
返回消息展示名
Type
String

downloadStatus() → {Number}

Source:
Get file downloading status
Returns:
返回文件下载状态
Type
Number

duration() → {Number}

Source:
Get playing duration of the video.
Returns:
返回视频持续时间
Type
Number

fileLength() → {Number}

Source:
Get file length of the attachment.
Returns:
返回文件长度
Type
Number

localPath() → {String}

Source:
Get local path of the attachment.
Returns:
返回消息本地存储路径
Type
String

remotePath() → {String}

Source:
Get remote path of the attachment.
Returns:
返回消息在服务器存储路径
Type
String

secretKey() → {String}

Source:
Get secret key of the attachment, it's used to download attachment from server.
Returns:
返回消息加密密钥
Type
String

setDisplayName(displayName) → {void}

Source:
Set display name of the attachment.
Parameters:
Name Type Description
displayName String 消息展示名
Returns:
Type
void

setDownloadStatus(downloadStatus) → {void}

Source:
Set file downloading status. Note: Usually, user should NOT call this method directly.
Parameters:
Name Type Description
downloadStatus Number 文件下载状态
Returns:
Type
void

setDuration(duration) → {void}

Source:
Set playing duration of the video.
Parameters:
Name Type Description
duration Number 视频持续时间
Returns:
Type
void

setFileLength(fileLength) → {void}

Source:
Set file length of the attachment. Note: It's usually not necessary to call this method, will calculate file length automatically when setting local path.
Parameters:
Name Type Description
fileLength Number 文件长度
Returns:
Type
void

setLocalPath(localPath) → {void}

Source:
Set local path of the attachment. Note: should NOT change the local path of the Received message.
Parameters:
Name Type Description
localPath String 消息本地存储路径
Returns:
Type
void

setRemotePath(remotePath) → {void}

Source:
Set remote path of the attachment. Note: It's internal used, user should never need to call this method.
Parameters:
Name Type Description
remotePath String 消息在服务器存储路径
Returns:
Type
void

setSecretKey(secretKey) → {void}

Source:
Set secret key of the attachment. Note: It's internal used, user should never need to call this method.
Parameters:
Name Type Description
secretKey String 消息加密密钥
Returns:
Type
void

setSize(size) → {void}

Source:
Set size of the thumbnail.
Parameters:
Name Type Description
size EMVideoSize 视频大小
Returns:
Type
void

setThumbnailDownloadStatus(thumbnailDownloadStatus) → {void}

Source:
Set download status of the thumbnail. Note: Usually, user should NOT call this method directly.
Parameters:
Name Type Description
thumbnailDownloadStatus Number 缩略图下载状态
Returns:
Type
void

setThumbnailLocalPath(thumbnailLocalPath) → {void}

Source:
Set local path of the thumbnail.
Parameters:
Name Type Description
thumbnailLocalPath String 缩略图本地存储路径
Returns:
Type
void

setThumbnailRemotePath(thumbnailRemotePath) → {void}

Source:
Set remote path of the thumbnail. Note: It's internal used, user should never need to call this method.
Parameters:
Name Type Description
thumbnailRemotePath String 缩略图在服务器的存储路径
Returns:
Type
void

setThumbnailSecretKey(thumbnailKey) → {void}

Source:
Set secret key of the thumbnail. Note: It's internal used, user should never need to call this method.
Parameters:
Name Type Description
thumbnailKey String 缩略图加密密钥
Returns:
Type
void

size() → {EMVideoSize}

Source:
Get size of the thumbnail.
Returns:
返回视频大小
Type
EMVideoSize

thumbnailDownloadStatus() → {Number}

Source:
Get download status of the thumbnail.
Returns:
返回缩略图下载状态
Type
Number

thumbnailLocalPath() → {String}

Source:
Get local path of the thumbnail.
Returns:
返回缩略图本地存储路径
Type
String

thumbnailRemotePath() → {String}

Source:
Get remote path of the thumbnail.
Returns:
返回缩略图在服务器的存储路径
Type
String

thumbnailSecretKey() → {String}

Source:
Get secret key of the thumbnail.
Returns:
返回缩略图加密密钥
Type
String

type() → {Number}

Source:
Get message body type.
Returns:
返回消息类型
Type
Number