agora_chat_SDK  3.8.2
agorajavachatSDK
Public Member Functions | Static Public Attributes | 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 (EMAVideoMessageBody body)
 
 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 toString ()
 
int describeContents ()
 
void writeToParcel (Parcel dest, int flags)
 
String getThumbnailSecret ()
 
void setThumbnailSecret (String secret)
 
EMDownloadStatus thumbnailDownloadStatus ()
 
- Public Member Functions inherited from io.agora.chat.FileMessageBody
 FileMessageBody (String localPath)
 
 FileMessageBody (Uri localPath)
 
 FileMessageBody (EMAFileMessageBody body)
 
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)
 

Static Public Attributes

static final Parcelable.Creator< VideoMessageBodyCREATOR
 

Detailed Description

Video message body

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

Constructor & Destructor Documentation

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

Create a video message body

Parameters
videoFilePathThe path of the video file
thumbPathThe path of the video first frame
durationVideo duration, in seconds
filelengthThe length of the video file
io.agora.chat.VideoMessageBody.VideoMessageBody ( Uri  videoFilePath,
Uri  thumbPath,
int  duration,
long  filelength 
)

Create a video message body

Parameters
videoFilePathThe uri of the video
thumbPathThe uri of the video first frame
durationVideo duration, in seconds
filelengthThe length of the video file

Member Function Documentation

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

Get video duration, in seconds

Returns
Video duration, in seconds
String io.agora.chat.VideoMessageBody.getLocalThumb ( )

Get local absolute path of thumbnail or the string from of Uri

Returns
Local path of thumbnail
Uri io.agora.chat.VideoMessageBody.getLocalThumbUri ( )

Get local uri of thumbnail

Returns
Local uri of thumbnail
int io.agora.chat.VideoMessageBody.getThumbnailHeight ( )

Get video thumbnail height

Returns
Height of video thumbnail
String io.agora.chat.VideoMessageBody.getThumbnailSecret ( )

Get secret key of thumbnail Required to download a thumbnail

Returns
Secret key (token) of thumbnail
String io.agora.chat.VideoMessageBody.getThumbnailUrl ( )

Get thumbnail's remote url

Returns
Thumbnail's remote url
int io.agora.chat.VideoMessageBody.getThumbnailWidth ( )

Get video thumbnail width

Returns
Width of video thumbnail
long io.agora.chat.VideoMessageBody.getVideoFileLength ( )

Get video file length, in bytes

Returns
Video file length
void io.agora.chat.VideoMessageBody.setLocalThumb ( String  localThumbPath)

Set path of video thumbnail

Parameters
localThumbPathPath of video thumbnail, which can be either the absolute path or the Uri of file
void io.agora.chat.VideoMessageBody.setLocalThumb ( Uri  localThumbPath)

Set path of video thumbnail

Parameters
localThumbPathUri of video thumbnail
void io.agora.chat.VideoMessageBody.setThumbnailSecret ( String  secret)

Set the secret key (token) of thumbnail

Parameters
secretSecret key (token) of thumbnail
void io.agora.chat.VideoMessageBody.setThumbnailSize ( int  width,
int  height 
)

Set video thumbnail's size

Parameters
widthThumbnail's width
heightThumbnail's height
void io.agora.chat.VideoMessageBody.setThumbnailUrl ( String  thumbnailUrl)

Set server url path of thumbnail

Parameters
thumbnailUrlServer url path of thumbnail
void io.agora.chat.VideoMessageBody.setVideoFileLength ( long  filelength)

Set video file length, in bytes Might need it during database migration

Parameters
filelengthVideo file length
EMDownloadStatus io.agora.chat.VideoMessageBody.thumbnailDownloadStatus ( )

Get download status of thumbnail

Returns
Download status of thumbnail

Member Data Documentation

final Parcelable.Creator<VideoMessageBody> io.agora.chat.VideoMessageBody.CREATOR
static
Initial value:
= new Creator<VideoMessageBody>() {
@Override
public VideoMessageBody[] newArray(int size) {
return new VideoMessageBody[size];
}
@Override
public VideoMessageBody createFromParcel(Parcel in) {
return new VideoMessageBody(in);
}
}

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