Chat SDK for Android v1.2.1
agora java chat SDK
Public Member Functions | List of all members
io.agora.chat.VideoMessageBody Class Reference
Inheritance diagram for io.agora.chat.VideoMessageBody:
io.agora.chat.FileMessageBody io.agora.chat.MessageBody

Public Member Functions

 VideoMessageBody (String videoFilePath, String thumbPath, int duration, long filelength)
 
 VideoMessageBody (Uri videoFilePath, Uri thumbPath, int duration, long filelength)
 
long getVideoFileLength ()
 
void setVideoFileLength (long filelength)
 
String getThumbnailUrl ()
 
void setThumbnailUrl (String thumbnailUrl)
 
void setThumbnailSize (int width, int height)
 
int getThumbnailWidth ()
 
int getThumbnailHeight ()
 
String getLocalThumb ()
 
Uri getLocalThumbUri ()
 
void setLocalThumb (String localThumbPath)
 
void setLocalThumb (Uri localThumbPath)
 
int getDuration ()
 
String getThumbnailSecret ()
 
void setThumbnailSecret (String secret)
 
EMDownloadStatus thumbnailDownloadStatus ()
 
void setThumbnailDownloadStatus (EMDownloadStatus status)
 
- Public Member Functions inherited from io.agora.chat.FileMessageBody
 FileMessageBody (String localPath)
 
 FileMessageBody (Uri localPath)
 
String getFileName ()
 
void setFileName (String fileName)
 
String getLocalUrl ()
 
void setLocalUrl (String localUrl)
 
Uri getLocalUri ()
 
void setLocalUrl (Uri localUrl)
 
String getRemoteUrl ()
 
void setRemoteUrl (String remoteUrl)
 
void setSecret (String secret)
 
String getSecret ()
 
String displayName ()
 
void setFileLength (long length)
 
EMDownloadStatus downloadStatus ()
 
void setDownloadStatus (EMDownloadStatus status)
 
- Public Member Functions inherited from io.agora.chat.MessageBody
long operationTime ()
 
String operatorId ()
 
int operationCount ()
 

Detailed Description

The video message body.

VideoMessageBody body = new VideoMessageBody(videoFilePath, thumbPath, duration, filelength);

Constructor & Destructor Documentation

◆ VideoMessageBody() [1/2]

io.agora.chat.VideoMessageBody.VideoMessageBody ( String  videoFilePath,
String  thumbPath,
int  duration,
long  filelength 
)

Creates a video message body.

Parameters
videoFilePathThe path of the video file.
thumbPathThe thumbnail URI.
durationThe video duration in seconds.
filelengthThe size of the video file.

◆ VideoMessageBody() [2/2]

io.agora.chat.VideoMessageBody.VideoMessageBody ( Uri  videoFilePath,
Uri  thumbPath,
int  duration,
long  filelength 
)

Creates a video message body.

Parameters
videoFilePathThe URI of the video thumbnail.
thumbPathThe thumbnail URI.
durationThe video duration in seconds.
filelengthThe size of the video file.

Member Function Documentation

◆ getDuration()

int io.agora.chat.VideoMessageBody.getDuration ( )

Gets the video duration in seconds.

Returns
The video duration in seconds.

◆ getLocalThumb()

String io.agora.chat.VideoMessageBody.getLocalThumb ( )

Gets the local absolute path of the video thumbnail or its URI in string format.

Returns
The local path of the video thumbnail.

◆ getLocalThumbUri()

Uri io.agora.chat.VideoMessageBody.getLocalThumbUri ( )

Gets the local URI of the video thumbnail.

Returns
The local URI of the video thumbnail.

◆ getThumbnailHeight()

int io.agora.chat.VideoMessageBody.getThumbnailHeight ( )

Gets the height of the video thumbnail.

Returns
The height of the video thumbnail.

◆ getThumbnailSecret()

String io.agora.chat.VideoMessageBody.getThumbnailSecret ( )

Gets the secret key of the video thumbnail. The secret key is used for validation during download of the video thumbnail.

Returns
The secret key of the video thumbnail.

◆ getThumbnailUrl()

String io.agora.chat.VideoMessageBody.getThumbnailUrl ( )

Gets the URL of the thumbnail on the server.

Returns
The URL of the thumbnail on the server.

◆ getThumbnailWidth()

int io.agora.chat.VideoMessageBody.getThumbnailWidth ( )

Gets the width of the video thumbnail.

Returns
The width of video thumbnail.

◆ getVideoFileLength()

long io.agora.chat.VideoMessageBody.getVideoFileLength ( )

Gets the size of the video file in bytes.

Returns
The size of the video file.

◆ setLocalThumb() [1/2]

void io.agora.chat.VideoMessageBody.setLocalThumb ( String  localThumbPath)

Sets the path of the video thumbnail.

Parameters
localThumbPathThe path of the video thumbnail, which can be the absolute path or URI of the video thumbnail.

◆ setLocalThumb() [2/2]

void io.agora.chat.VideoMessageBody.setLocalThumb ( Uri  localThumbPath)

Sets the path of the video thumbnail.

Parameters
localThumbPathThe URI of video thumbnail.

◆ setThumbnailDownloadStatus()

void io.agora.chat.VideoMessageBody.setThumbnailDownloadStatus ( EMDownloadStatus  status)

Sets the download status of the video thumbnail.

Parameters
statusThe download status of the video thumbnail.

◆ setThumbnailSecret()

void io.agora.chat.VideoMessageBody.setThumbnailSecret ( String  secret)

Sets the secret key of the video thumbnail.

Parameters
secretThe secret key of the video thumbnail.

◆ setThumbnailSize()

void io.agora.chat.VideoMessageBody.setThumbnailSize ( int  width,
int  height 
)

Sets the size of the video thumbnail.

Parameters
widthThe thumbnail's width.
heightThe thumbnail's height.

◆ setThumbnailUrl()

void io.agora.chat.VideoMessageBody.setThumbnailUrl ( String  thumbnailUrl)

Sets the URL of the thumbnail on the server.

Parameters
thumbnailUrlThe URL of the thumbnail on the server.

◆ setVideoFileLength()

void io.agora.chat.VideoMessageBody.setVideoFileLength ( long  filelength)

Sets the size of the video file in bytes. This method may be used during database migration.

Parameters
filelengthThe size of the video file.

◆ thumbnailDownloadStatus()

EMDownloadStatus io.agora.chat.VideoMessageBody.thumbnailDownloadStatus ( )

Gets the download status of the video thumbnail.

Returns
The download status of the video thumbnail.

The documentation for this class was generated from the following file: