蓝莺开发者
Web & Mini ProgramiOSAndroidC++Server API

floo::BMXVideoAttachment#

视频消息附件

#include <bmx_video_attachment.h>

Inherits from floo::BMXFileAttachment, floo::BMXMessageAttachment, BMXBaseObject

Public Functions#

Name
BMXVideoAttachment(const std::string & path, int duration, const [Size] & size, const std::string & displayName ="")
构造函数,构建发送视频消息附件
BMXVideoAttachment(const std::string & path, const std::string & thumbnailPath, int duration, const [Size] & size, const std::string & displayName ="")
构造函数,构建发送视频消息附件
BMXVideoAttachment(const std::string & ratelUrl, int duration, const [Size] & size, const std::string & displayName, int64_t fileLength)
构造函数,构建接收视频消息附件
BMXVideoAttachment(const std::string & ratelUrl, const std::string & thumbnailRatelUrl, int duration, const [Size] & size, const std::string & displayName, int64_t fileLength)
构造函数,构建接收视频消息附件
virtual~BMXVideoAttachment()
析构函数
virtual Typetype() const
返回文件类型
virtual BMXMessageAttachmentPtrclone() const
克隆函数
const [Size] &size() const
视频大小,宽度和高度
int32_tduration() const
视频片段时长
voidsetThumbnail(const std::string & path)
设置发送视频片段消息缩略图
const std::string &thumbnailPath() const
缩略图本地路径
const std::string &thumbnailUrl() const
远程缩略图使用URL
voidsetThumbnailRatelUrl(const std::string & thumbnailRatelUrl)
设置发送视频片段消息缩略图ratel服务器路径
const std::string &thumbnailRatelUrl() const
缩略图ratel服务器路径
DownloadStatusthumbnailDownloadStatus() const
缩略图下载状态

Friends#

Additional inherited members#

Public Functions inherited from floo::BMXFileAttachment

Name
BMXFileAttachment(const std::string & path, const std::string & displayName ="")
构造函数,构建发送文件消息附件
BMXFileAttachment(const std::string & ratelUrl, const std::string & displayName, int64_t fileLength)
构造函数,构建接收文件消息附件
virtual~BMXFileAttachment()
析构函数
const std::string &path() const
本地路径
const std::string &displayName() const
显示名
const std::string &ratelUrl() const
远程ratel使用URL
const std::string &url() const
远程使用URL
int64_tfileLength() const
文件长度
DownloadStatusdownloadStatus() const
附件下载状态

Protected Attributes inherited from floo::BMXFileAttachment

Name
std::stringmPath
std::stringmDisplayName
std::stringmRatelUrl
std::stringmUrl
int64_tmFileLength
DownloadStatusmDownloadStatus

Friends inherited from floo::BMXFileAttachment

Public Types inherited from floo::BMXMessageAttachment

Name
enum classType { Image, Voice, Video, File, Location, Command, Forward}
附件类型
enum classDownloadStatus { Downloaing, Successed, Failed, NotStart, Canceled}
附件下载状态

Public Functions inherited from floo::BMXMessageAttachment

Name
BMXMessageAttachment()
构造函数
virtual~BMXMessageAttachment()
析构函数

Public Functions Documentation#

function BMXVideoAttachment#

BMXVideoAttachment(
    const std::string & path,
    int duration,
    const Size & size,
    const std::string & displayName =""
)

构造函数,构建发送视频消息附件

Parameters:

  • path 文件的本地路径
  • duration 视频片段时长
  • size 视频大小,宽度和高度
  • displayName 文件展示名

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="BMXVideoAttachment" %}{% endlanying_code_snippet %}

function BMXVideoAttachment#

BMXVideoAttachment(
    const std::string & path,
    const std::string & thumbnailPath,
    int duration,
    const Size & size,
    const std::string & displayName =""
)

构造函数,构建发送视频消息附件

Parameters:

  • path 文件的本地路径
  • thumbnailPath 缩略图文件的本地路径
  • duration 视频片段时长
  • size 视频大小,宽度和高度
  • displayName 文件展示名

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="BMXVideoAttachment" %}{% endlanying_code_snippet %}

function BMXVideoAttachment#

BMXVideoAttachment(
    const std::string & ratelUrl,
    int duration,
    const Size & size,
    const std::string & displayName,
    int64_t fileLength
)

构造函数,构建接收视频消息附件

Parameters:

  • ratelUrl ratel文件服务器地址
  • duration 视频片段时长
  • size 视频大小,宽度和高度
  • displayName 文件展示名
  • fileLength 文件大小

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="BMXVideoAttachment" %}{% endlanying_code_snippet %}

function BMXVideoAttachment#

BMXVideoAttachment(
    const std::string & ratelUrl,
    const std::string & thumbnailRatelUrl,
    int duration,
    const Size & size,
    const std::string & displayName,
    int64_t fileLength
)

构造函数,构建接收视频消息附件

Parameters:

  • ratelUrl ratel文件服务器地址
  • thumbnailRatelUrl 缩略图ratel文件服务器地址
  • duration 视频片段时长
  • size 视频大小,宽度和高度
  • displayName 文件展示名
  • fileLength 文件大小

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="BMXVideoAttachment" %}{% endlanying_code_snippet %}

function ~BMXVideoAttachment#

inline virtual ~BMXVideoAttachment()

析构函数

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="~BMXVideoAttachment" %}{% endlanying_code_snippet %}

function type#

inline virtual Type type() const

返回文件类型

Return: Type

Reimplements: floo::BMXFileAttachment::type

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="type" %}{% endlanying_code_snippet %}

function clone#

virtual BMXMessageAttachmentPtr clone() const

克隆函数

Return: BMXMessageAttachmentPtr

Reimplements: floo::BMXFileAttachment::clone

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="clone" %}{% endlanying_code_snippet %}

function size#

const Size & size() const

视频大小,宽度和高度

Return: Size

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="size" %}{% endlanying_code_snippet %}

function duration#

int32_t duration() const

视频片段时长

Return: int32_t

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="duration" %}{% endlanying_code_snippet %}

function setThumbnail#

void setThumbnail(
    const std::string & path
)

设置发送视频片段消息缩略图

Parameters:

  • path 视频片段消息缩略图

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="setThumbnail" %}{% endlanying_code_snippet %}

function thumbnailPath#

const std::string & thumbnailPath() const

缩略图本地路径

Return: std::string

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="thumbnailPath" %}{% endlanying_code_snippet %}

function thumbnailUrl#

const std::string & thumbnailUrl() const

远程缩略图使用URL

Return: std::string

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="thumbnailUrl" %}{% endlanying_code_snippet %}

function setThumbnailRatelUrl#

void setThumbnailRatelUrl(
    const std::string & thumbnailRatelUrl
)

设置发送视频片段消息缩略图ratel服务器路径

Parameters:

  • thumbnailRatelUrl 视频片段消息缩略图服务器路径

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="setThumbnailRatelUrl" %}{% endlanying_code_snippet %}

function thumbnailRatelUrl#

const std::string & thumbnailRatelUrl() const

缩略图ratel服务器路径

Return: std::string

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="thumbnailRatelUrl" %}{% endlanying_code_snippet %}

function thumbnailDownloadStatus#

DownloadStatus thumbnailDownloadStatus() const

缩略图下载状态

Return: DownloadStatus

Friends#

friend Encoder< BMXVideoAttachment >#

friend class Encoder< BMXVideoAttachment >(
    Encoder< BMXVideoAttachment > 
);

friend Decoder< BMXVideoAttachment >#

friend class Decoder< BMXVideoAttachment >(
    Decoder< BMXVideoAttachment > 
);

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="thumbnailDownloadStatus" %}{% endlanying_code_snippet %}

Updated on 2022-01-26 at 17:20:40 +0800

自动生成的 API 内容,仅在必要位置补充精简的 AI 解释。