Chat SDK for Unity and Windows v1.2.0
Public 成员函数 | Public 属性 | 所有成员列表
AgoraChat.MessageBody.ImageBody类 参考
类 AgoraChat.MessageBody.ImageBody 继承关系图:
AgoraChat.MessageBody.FileBody AgoraChat.IMessageBody

Public 成员函数

 ImageBody (string localPath, string displayName, long fileSize=0, bool original=false, double width=0, double height=0)
 
- Public 成员函数 继承自 AgoraChat.MessageBody.FileBody
 FileBody (string localPath, string displayName="", long fileSize=0)
 

Public 属性

string ThumbnailLocalPath
 
string ThumbnailRemotePath
 
string ThumbnailSecret
 
DownLoadStatus ThumbnailDownStatus = DownLoadStatus.PENDING
 
double Height
 
double Width
 
bool Original
 
- Public 属性 继承自 AgoraChat.MessageBody.FileBody
string LocalPath
 
string DisplayName
 
string Secret
 
string RemotePath
 
long FileSize
 
DownLoadStatus DownStatus = DownLoadStatus.PENDING
 
- Public 属性 继承自 AgoraChat.IMessageBody
MessageBodyType Type
 

额外继承的成员函数

- 属性 继承自 AgoraChat.IMessageBody
long OperationTime [get, set]
 
string OperatorId [get, set]
 
long OperationCount [get, set]
 

详细描述

图片消息体。

构造及析构函数说明

◆ ImageBody()

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

图片消息体构造方法。

参数
localPath图片的本地路径。
displayName图片的显示名称。
fileSize图片大小,单位为字节。
original是否发送原图。
width图片宽度,单位为像素。
height图片高度,单位为像素。

类成员变量说明

◆ ThumbnailLocalPath

string AgoraChat.MessageBody.ImageBody.ThumbnailLocalPath

缩略图的本地路径。

◆ ThumbnailRemotePath

string AgoraChat.MessageBody.ImageBody.ThumbnailRemotePath

缩略图在服务器上的保存路径。

◆ ThumbnailSecret

string AgoraChat.MessageBody.ImageBody.ThumbnailSecret

缩略图的下载密钥。

◆ ThumbnailDownStatus

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

缩略图的下载状态。

◆ Height

double AgoraChat.MessageBody.ImageBody.Height

图片文件的宽度和高度,单位为像素。

◆ Original

bool AgoraChat.MessageBody.ImageBody.Original

是否发送原图。

  • true: 发送原图和缩略图。
  • (默认) false: 若图片小于 100 KB,发送原图和缩略图;若图片大于等于 100 KB, 发送压缩后的图片和压缩后图片的缩略图。