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

BMXRTCEngine Class Reference#

Inherits from NSObject
Declared in floo_proxy.h

Overview#

@interface RTC Engine

Properties#

swigCMemOwn#

@property (nonatomic) BOOL swigCMemOwn

swigCPtr#

@property (nonatomic) void *swigCPtr

Instance Methods#

addDelegate:#

添加聊天监听者

- (void)addDelegate:(id<BMXRTCEngineProtocol>)aDelegate

Parameters#

listener
聊天监听者

Declared In#

  • floo_proxy.h


Example:

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

addDelegate:delegateQueue:#

- (void)addDelegate:(id<BMXRTCEngineProtocol>)aDelegate delegateQueue:(dispatch_queue_t)aQueue


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="addDelegate:delegateQueue:" %}{% endlanying_code_snippet %}

addRTCEngineListener:#

- (void)addRTCEngineListener:(id<BMXRTCEngineProtocol>)listener


Example:

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

dealloc#

- (void)dealloc


Example:

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

destroy#

销毁音视频Engine

- (void)destroy

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="destroy" %}{% endlanying_code_snippet %}

getRTCConfig#

获取RTC设置

- (BMXRTCConfig *)getRTCConfig

Return Value#

BMXRTCConfig

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="getRTCConfig" %}{% endlanying_code_snippet %}

initWithCptr:swigOwnCObject:#

- (id)initWithCptr:(void )cptr swigOwnCObject:(BOOL)ownCObject*


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="initWithCptr:swigOwnCObject:" %}{% endlanying_code_snippet %}

joinRoomWithAuth:#

加入频道

- (BMXErrorCode)joinRoomWithAuth:(BMXRoomAuth )auth*

Parameters#

auth
加入频道时的认证信息

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

leaveRoom#

离开频道

- (BMXErrorCode)leaveRoom

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="leaveRoom" %}{% endlanying_code_snippet %}

muteLocalAudioWithMute:#

打开关闭本地音频

- (BMXErrorCode)muteLocalAudioWithMute:(BOOL)mute

Parameters#

mute
true为打开,false为关闭

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

muteLocalVideoWithType:mute:#

打开关闭本地视频

- (BMXErrorCode)muteLocalVideoWithType:(BMXVideoMediaType)type mute:(BOOL)mute

Parameters#

type
视频流类型

mute
true为打开,false为关闭

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="muteLocalVideoWithType:mute:" %}{% endlanying_code_snippet %}

muteRemoteAudioWithStream:mute:#

打开关闭远端音频

- (BMXErrorCode)muteRemoteAudioWithStream:(BMXStream )stream mute:(BOOL)mute*

Parameters#

stream
远端流

mute
true为打开,false为关闭

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="muteRemoteAudioWithStream:mute:" %}{% endlanying_code_snippet %}

muteRemoteVideoWithStream:mute:#

打开关闭远端视频

- (BMXErrorCode)muteRemoteVideoWithStream:(BMXStream )stream mute:(BOOL)mute*

Parameters#

stream
远端流

mute
true为打开,false为关闭

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="muteRemoteVideoWithStream:mute:" %}{% endlanying_code_snippet %}

publishWithType:hasVideo:hasAudio:#

发布流信息

- (BMXErrorCode)publishWithType:(BMXVideoMediaType)type hasVideo:(BOOL)hasVideo hasAudio:(BOOL)hasAudio

Parameters#

type
流媒体类型

hasVideo
是否存在视频流

hasAudio
是否存在音频流

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="publishWithType:hasVideo:hasAudio:" %}{% endlanying_code_snippet %}

removeDelegate:#

移除聊天监听者

- (void)removeDelegate:(id<BMXRTCEngineProtocol>)aDelegate

Parameters#

listener
聊天监听者

Declared In#

  • floo_proxy.h


Example:

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

removeRTCEngineListener:#

- (void)removeRTCEngineListener:(id<BMXRTCEngineProtocol>)listener


Example:

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

setAudioProfile:#

设置音频编码格式

- (BMXErrorCode)setAudioProfile:(BMXAudioProfile)profile

Parameters#

profile
音频编码格式

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

setRoomType:#

设置Room的类型

- (BMXErrorCode)setRoomType:(BMXRoomType)type

Parameters#

type
Room类型

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

setStreamRole:#

设置流操作权限

- (BMXErrorCode)setStreamRole:(BMXStreamRole)role

Parameters#

role
操作权限,推流、拉流、推拉流。

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

setVideoCodec:#

设置视频编码格式类型

- (BMXErrorCode)setVideoCodec:(BMXVideoCodec)codec

Parameters#

codec
VP8编码、H264编码

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

setVideoProfile:#

设置视频编码格式类型

- (BMXErrorCode)setVideoProfile:(BMXVideoConfig )videoConfig*

Parameters#

codec
VP8编码、H264编码

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

startPreviewWithCanvas:#

开启本地渲染

- (BMXErrorCode)startPreviewWithCanvas:(BMXVideoCanvas )canvas*

Parameters#

canvas
画布属性信息

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

startRemoteViewWithCanvas:#

开启远端渲染

- (BMXErrorCode)startRemoteViewWithCanvas:(BMXVideoCanvas )canvas*

Parameters#

canvas
画布属性信息

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

stopPreviewWithCanvas:#

停止本地渲染

- (BMXErrorCode)stopPreviewWithCanvas:(BMXVideoCanvas )canvas*

Parameters#

canvas
画布属性信息

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

stopRemoteViewWithCanvas:#

停止远端渲染

- (BMXErrorCode)stopRemoteViewWithCanvas:(BMXVideoCanvas )canvas*

Parameters#

canvas
画布属性信息

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

subscribeWithStream:#

订阅流信息

- (BMXErrorCode)subscribeWithStream:(BMXStream )stream*

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

switchCamera#

切换摄像头

- (BMXErrorCode)switchCamera

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

{% lanying_code_snippet repo="lanying-im-ios",class="BMXRTCEngine",function="switchCamera" %}{% endlanying_code_snippet %}

unPublishWithType:#

停止发布流

- (BMXErrorCode)unPublishWithType:(BMXVideoMediaType)type

Parameters#

type
流媒体类型

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h


Example:

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

unSubscribeWithStream:#

停止订阅流

- (BMXErrorCode)unSubscribeWithStream:(BMXStream )stream*

Return Value#

BMXErrorCode

Declared In#

  • floo_proxy.h

Example:

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