LANYINGDevelopers
Web & Mini ProgramiOSAndroidC++Server API

floo::BMXVideoAttachment#

Video attachment of message

#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 ="")
Constructor to build the video attachment to send
BMXVideoAttachment(const std::string & path, const std::string & thumbnailPath, int duration, const [Size] & size, const std::string & displayName ="")
Constructor to build the video attachment to send
BMXVideoAttachment(const std::string & ratelUrl, int duration, const [Size] & size, const std::string & displayName, int64_t fileLength)
Constructor to build the video attachment to receive
BMXVideoAttachment(const std::string & ratelUrl, const std::string & thumbnailRatelUrl, int duration, const [Size] & size, const std::string & displayName, int64_t fileLength)
Constructor to build the video attachment to receive
virtual~BMXVideoAttachment()
Destructor
virtual Typetype() const
Type of returned file
virtual BMXMessageAttachmentPtrclone() const
Cloning function
const [Size] &size() const
Video size, width, and height
int32_tduration() const
Length of video clip
voidsetThumbnail(const std::string & path)
Set the thumbnail for video clip to send
const std::string &thumbnailPath() const
Local path of thumbnail
const std::string &thumbnailUrl() const
URL for remote thumbnail
voidsetThumbnailRatelUrl(const std::string & thumbnailRatelUrl)
Set thumbnail ratel server path to send video clip message
const std::string &thumbnailRatelUrl() const
Thumbnail ratel server path
DownloadStatusthumbnailDownloadStatus() const
Thumbnail downloading state

Friends#

Additional inherited members#

Public Functions inherited from floo::BMXFileAttachment

Name
BMXFileAttachment(const std::string & path, const std::string & displayName ="")
Constructor to build the message attachment of sent file
BMXFileAttachment(const std::string & ratelUrl, const std::string & displayName, int64_t fileLength)
Constructor to build the message attachment of received file
virtual~BMXFileAttachment()
Destructor
const std::string &path() const
Local path
const std::string &displayName() const
Display name
const std::string &ratelUrl() const
URL for remote ratel
const std::string &url() const
URL for remote
int64_tfileLength() const
File length
DownloadStatusdownloadStatus() const
Attachment download state

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}
Attachment type
enum classDownloadStatus { Downloaing, Successed, Failed, NotStart, Canceled}
Attachment download state

Public Functions inherited from floo::BMXMessageAttachment

Name
BMXMessageAttachment()
Constructor
virtual~BMXMessageAttachment()
Destructor

Public Functions Documentation#

function BMXVideoAttachment#

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

Constructor to build the video attachment to send

Parameters:

  • path Local path of file
  • duration Length of video clip
  • size Video size, width, and height
  • displayName Display name of file

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 =""
)

Constructor to build the video attachment to send

Parameters:

  • path Local path of file
  • thumbnailPath Local path of thumbnail file
  • duration Length of video clip
  • size Video size, width, and height
  • displayName Display name of file

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
)

Constructor to build the video attachment to receive

Parameters:

  • ratelUrl Address of ratel file server
  • duration Length of video clip
  • size Video size, width, and height
  • displayName Display name of file
  • fileLength File size

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
)

Constructor to build the video attachment to receive

Parameters:

  • ratelUrl Address of ratel file server
  • thumbnailRatelUrl Thumbnail ratel file server address
  • duration Length of video clip
  • size Video size, width, and height
  • displayName Display name of file
  • fileLength File size

Example:

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

function ~BMXVideoAttachment#

inline virtual ~BMXVideoAttachment()

Destructor

Example:

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

function type#

inline virtual Type type() const

Type of returned file

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

Cloning function

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

Video size, width, and height

Return: Size

Example:

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

function duration#

int32_t duration() const

Length of video clip

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
)

Set the thumbnail for video clip to send

Parameters:

  • path Thumbnail of video clip message

Example:

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

function thumbnailPath#

const std::string & thumbnailPath() const

Local path of thumbnail

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 for remote thumbnail

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
)

Set thumbnail ratel server path to send video clip message

Parameters:

  • thumbnailRatelUrl Thumbnail server path for video clip message

Example:

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

function thumbnailRatelUrl#

const std::string & thumbnailRatelUrl() const

Thumbnail ratel server path

Return: std::string

Example:

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

function thumbnailDownloadStatus#

DownloadStatus thumbnailDownloadStatus() const

Thumbnail downloading state

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

Generated API content with concise AI notes where context helps.