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

BMXVoiceAttachment Class Reference#

Inherits from BMXFileAttachment :
BMXMessageAttachment :
BMXBaseObject :
NSObject
Declared in floo_proxy.h

Overview#

@interface 音频消息附件

Class Methods#

dynamicCastWithAttachment:#

消息附件强制转换为语音附件

+ (BMXVoiceAttachment )dynamicCastWithAttachment:(BMXMessageAttachment )attachment

Parameters#

attachment
附件

Return Value#

BMXVoiceAttachment

Declared In#

  • floo_proxy.h

Instance Methods#


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXVoiceAttachment",function="dynamicCastWithAttachment:" %}{% endlanying_code_snippet %}

clone#

克隆函数

- (BMXMessageAttachment *)clone

Return Value#

BMXMessageAttachment

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXVoiceAttachment",function="clone" %}{% endlanying_code_snippet %}

dealloc#

- (void)dealloc


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXVoiceAttachment",function="dealloc" %}{% endlanying_code_snippet %}

duration#

语音时长

- (int)duration

Return Value#

int

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXVoiceAttachment",function="duration" %}{% endlanying_code_snippet %}

initWithPath:duration:#

- (id)initWithPath:(NSString )path duration:(int)duration*


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXVoiceAttachment",function="initWithPath:duration:" %}{% endlanying_code_snippet %}

initWithPath:duration:displayName:#

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

- (id)initWithPath:(NSString )path duration:(int)duration displayName:(NSString )displayName

Parameters#

path
文件的本地路径

duration
音频时长

displayName
文件展示名

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXVoiceAttachment",function="initWithPath:duration:displayName:" %}{% endlanying_code_snippet %}

initWithRatelUrl:duration:displayName:fileLength:#

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

- (id)initWithRatelUrl:(NSString )ratelUrl duration:(int)duration displayName:(NSString )displayName fileLength:(long long)fileLength

Parameters#

ratelUrl
ratel文件服务器地址

duration
音频时长

displayName
文件展示名

fileLength
文件大小

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXVoiceAttachment",function="initWithRatelUrl:duration:displayName:fileLength:" %}{% endlanying_code_snippet %}

type#

返回文件类型

- (BMXMessageAttachment_Type)type

Return Value#

BMXMessageAttachment_Type

Declared In#

  • floo_proxy.h

Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXVoiceAttachment",function="type" %}{% endlanying_code_snippet %}
自动生成的 API 内容,仅在必要位置补充精简的 AI 解释。