Chat SDK for Unity and Windows v1.2.0
Public Member Functions | Public Attributes | List of all members
AgoraChat.MessageBody.ImageBody Class Reference
Inheritance diagram for AgoraChat.MessageBody.ImageBody:
AgoraChat.MessageBody.FileBody AgoraChat.IMessageBody

Public Member Functions

 ImageBody (string localPath, string displayName, long fileSize=0, bool original=false, double width=0, double height=0)
 
- Public Member Functions inherited from AgoraChat.MessageBody.FileBody
 FileBody (string localPath, string displayName="", long fileSize=0)
 

Public Attributes

string ThumbnailLocalPath
 
string ThumbnailRemotePath
 
string ThumbnailSecret
 
DownLoadStatus ThumbnailDownStatus = DownLoadStatus.PENDING
 
double Height
 
double Width
 
bool Original
 
- Public Attributes inherited from AgoraChat.MessageBody.FileBody
string LocalPath
 
string DisplayName
 
string Secret
 
string RemotePath
 
long FileSize
 
DownLoadStatus DownStatus = DownLoadStatus.PENDING
 
- Public Attributes inherited from AgoraChat.IMessageBody
MessageBodyType Type
 

Additional Inherited Members

- Properties inherited from AgoraChat.IMessageBody
long OperationTime [get, set]
 
string OperatorId [get, set]
 
long OperationCount [get, set]
 

Detailed Description

The image message body.

Constructor & Destructor Documentation

◆ ImageBody()

AgoraChat.MessageBody.ImageBody.ImageBody ( string  localPath,
string  displayName,
long  fileSize = 0,
bool  original = false,
double  width = 0,
double  height = 0 
)

The image message body constructor.

Parameters
localPathThe local path of the image.
displayNameThe display name of the image.
fileSizeThe image size in bytes.
originalWhether to send the original image.
widthThe image width in pixels.
HeightThe image height in pixels.

Member Data Documentation

◆ ThumbnailLocalPath

string AgoraChat.MessageBody.ImageBody.ThumbnailLocalPath

The local path of the thumbnail.

◆ ThumbnailRemotePath

string AgoraChat.MessageBody.ImageBody.ThumbnailRemotePath

The URL where the thumbnail is located on the server.

◆ ThumbnailSecret

string AgoraChat.MessageBody.ImageBody.ThumbnailSecret

The secret for downloading the thumbnail.

◆ ThumbnailDownStatus

DownLoadStatus AgoraChat.MessageBody.ImageBody.ThumbnailDownStatus = DownLoadStatus.PENDING

The status for downloading the thumbnail.

◆ Height

double AgoraChat.MessageBody.ImageBody.Height

The width and height of the image file, in pixels.

◆ Original

bool AgoraChat.MessageBody.ImageBody.Original

Whether to send the original image.

  • true: Yes.
  • (Default) false: No. If the image is smaller than 100 KB, the SDK sends the original image and its thumbnail. If the image is equal to or greater than 100 KB, the SDK will compress it before sending the compressed image and the thumbnail of the compressed image.