推流基本信息相关回调
More...
#include "AlivcLivePusher.h"
◆ onAudioPublishStateChanged:oldState:newState:
- (void) onAudioPublishStateChanged: |
|
(AlivcLivePusher *) |
pusher |
oldState: |
|
(AliLivePublishState) |
oldState |
newState: |
|
(AliLivePublishState) |
newState |
|
|
| |
|
optional |
音频推流变更回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
oldState | 之前的推流状态,详见 AliLivePublishState |
newState | 当前的推流状态,详见 AliLivePublishState |
◆ onFirstFramePreviewed:
◆ onFirstFramePushed:
◆ onJoinChannelResult:result:channel:userId:
- (void) onJoinChannelResult: |
|
(AlivcLivePusher *) |
pusher |
result: |
|
(int) |
result |
channel: |
|
(NSString *_Nonnull) |
channel |
userId: |
|
(NSString *_Nonnull) |
userId |
|
|
| |
|
optional |
加入频道回调
互动模式下调用startPushWithURL时,会先加入RTC频道,该回调表示成功/失败加入频道,并且返回频道加入的相关信息
- Parameters
-
pusher | 推流引擎对象 |
result | 加入频道结果
|
channel | 加入频道名 |
userId | 用户ID |
◆ onKickedOutByServer:reason:
- (void) onKickedOutByServer: |
|
(AlivcLivePusher *) |
pusher |
reason: |
|
(AlivcLivePushKickedOutType) |
code |
|
|
| |
|
optional |
被服务侧强制踢掉回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
◆ onLocalAudioStateChanged:state:message:
- (void) onLocalAudioStateChanged: |
|
(AlivcLivePusher *) |
pusher |
state: |
|
(AliLiveLocalAudioStateType) |
state |
message: |
|
(NSString *_Nullable) |
msg |
|
|
| |
|
optional |
本地音频采集设备状态回调
- Parameters
-
pusher | 推流引擎对象 |
state | 设备状态,AliLiveLocalAudioStateType类型 |
- Note
- startAudioCapture 和 stopAudioCapture的结果回调
◆ onLocalDualAudioStreamPushState:state:
- (void) onLocalDualAudioStreamPushState: |
|
(AlivcLivePusher *) |
pusher |
state: |
|
(BOOL) |
isPushing |
|
|
| |
|
optional |
发送第二路音频推送状态回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
isPushing | 推流状态:YES表示开始推流,NO表示停止推流 |
◆ onLocalVideoStateChanged:state:message:
- (void) onLocalVideoStateChanged: |
|
(AlivcLivePusher *) |
pusher |
state: |
|
(AliLiveLocalVideoStateType) |
state |
message: |
|
(NSString *_Nullable) |
msg |
|
|
| |
|
optional |
本地视频采集设备状态回调
- Parameters
-
pusher | 推流引擎对象 |
state | 设备状态,AliLiveLocalVideoStateType类型 |
- Note
- enableLocalCamera的结果回调
◆ onMediaRecordEvent:event:recoderStoragePath:
- (void) onMediaRecordEvent: |
|
(AlivcLivePusher *) |
pusher |
event: |
|
(AlivcLiveRecordMediaEventCode) |
event |
recoderStoragePath: |
|
(NSString *_Nullable) |
storagePath |
|
|
| |
|
optional |
本地媒体录制状态回调 注:录制开始或者录制异常都是通过该回调回抛
- Parameters
-
pusher | 推流引擎对象 |
event | 本地录制状态和错误回调, 参见AlivcLiveRecordMediaEventCode |
storagePath | 录制文件存储路径 |
Local media recording status callback Note: The recording start or recording exception will be thrown through this callback.
- Parameters
-
pusher | The live pusher engine object |
event | Local recording status and error callback, see AlivcLiveRecordMediaEventCode |
storagePath | Recording file storage path |
◆ onMicrophoneVolumeUpdate:volume:
- (void) onMicrophoneVolumeUpdate: |
|
(AlivcLivePusher *) |
pusher |
volume: |
|
(int) |
volume |
|
|
| |
|
optional |
麦克风音量回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
volume | 音量大小, 取值范围[0,255] |
- Note
- 调用 enableAudioVolumeIndication 打开音量回调频率后,会收到这个回调通知。
◆ onPreviewStarted:
◆ onPreviewStoped:
◆ onPushPaused:
◆ onPushRestart:
◆ onPushResumed:
◆ onPushStarted:
◆ onPushStatistics:statsInfo:
直播推流器统计数据回调(每2秒回调一次)
- Parameters
-
◆ onPushStoped:
◆ onRemoteUserAudioStream:userId:state:
- (void) onRemoteUserAudioStream: |
|
(AlivcLivePusher *) |
pusher |
userId: |
|
(NSString *) |
userId |
state: |
|
(BOOL) |
isPushing |
|
|
| |
|
optional |
有用户在房间内成员推送音频流回调(只针对直播连麦场景生效) 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
userId | 加入房间的用户ID |
isPushing | 推流状态:YES表示开始推流,NO表示停止推流 |
- Note
◆ onRemoteUserEnterRoom:userId:state:
- (void) onRemoteUserEnterRoom: |
|
(AlivcLivePusher *) |
pusher |
userId: |
|
(NSString *) |
userId |
state: |
|
(BOOL) |
isOnline |
|
|
| |
|
optional |
有用户加入房间回调(只针对直播连麦场景生效) 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
userId | 加入房间的用户ID |
isOnline | 加入房间状态:YES表示加入了房间,NO表示离开了房间 |
- Note
- 主播和观众连麦时,连麦观众开始推流后,在主播侧可以收到该回调,主播拿到回调后,可以向其 业务server请求该userId的连麦拉流地址,使用AlivcLivePlayer的startPlayWithURL接口进行拉流
◆ onRemoteUserVideoStream:userId:type:state:
- (void) onRemoteUserVideoStream: |
|
(AlivcLivePusher *) |
pusher |
userId: |
|
(NSString *) |
userId |
type: |
|
(AlivcLivePlayVideoStreamType) |
videoStreamType |
state: |
|
(BOOL) |
isPushing |
|
|
| |
|
optional |
有用户在房间内开启摄像头或共享流回调,可以是屏幕共享流或者unity流(只针对直播连麦场景生效) 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
userId | 加入房间的用户ID |
videoStreamType | 视频类型,摄像头流或者屏幕共享流 |
isPushing | 推流状态:YES表示开始推流,NO表示停止推流 |
- Note
- 主播拿到共享流回调后,可以创建AliLivePlayer对象,指定videoStreamType为AlivcLivePlayVideoStreamTypeScreen, 使用该userId的连麦拉流地址,用AlivcLivePlayer的startPlayWithURL接口进行拉流
◆ onScreenSharePublishStateChanged:oldState:newState:
- (void) onScreenSharePublishStateChanged: |
|
(AlivcLivePusher *) |
pusher |
oldState: |
|
(AliLivePublishState) |
oldState |
newState: |
|
(AliLivePublishState) |
newState |
|
|
| |
|
optional |
屏幕分享推流变更回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
oldState | 之前的推流状态,详见 AliLivePublishState |
newState | 当前的推流状态,详见 AliLivePublishState |
◆ onSetLiveMixTranscodingConfig:status:message:
- (void) onSetLiveMixTranscodingConfig: |
|
(AlivcLivePusher *) |
pusher |
status: |
|
(BOOL) |
isSuccess |
message: |
|
(NSString *) |
msg |
|
|
| |
|
optional |
设置云端的混流(转码)参数回调,对应于setLiveMixTranscodingConfig接口 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
isSuccess | YES表示成功,NO表示失败 |
msg | 具体错误原因 |
◆ onVideoPublishStateChanged:oldState:newState:
- (void) onVideoPublishStateChanged: |
|
(AlivcLivePusher *) |
pusher |
oldState: |
|
(AliLivePublishState) |
oldState |
newState: |
|
(AliLivePublishState) |
newState |
|
|
| |
|
optional |
视频推流变更回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
- Parameters
-
pusher | 推流引擎对象 |
oldState | 之前的推流状态,详见 AliLivePublishState |
newState | 当前的推流状态,详见 AliLivePublishState |
The documentation for this protocol was generated from the following file: