AlivcLivePusher_Interactive v6.17.0
Aliyun Live Pusher Interactive SDK API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
<AlivcLivePusherInfoDelegate> Protocol Reference

推流基本信息相关回调 More...

#include "AlivcLivePusher.h"

Inheritance diagram for <AlivcLivePusherInfoDelegate>:

Instance Methods

(void) - onAudioPublishStateChanged:oldState:newState:
 音频推流变更回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onFirstFramePreviewed:
 渲染第一帧回调
 
(void) - onFirstFramePushed:
 发送第一帧音视频流回调
 
(void) - onJoinChannelResult:result:channel:userId:
 加入频道回调
 
(void) - onKickedOutByServer:reason:
 被服务侧强制踢掉回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onLocalAudioStateChanged:state:message:
 本地音频采集设备状态回调
 
(void) - onLocalDualAudioStreamPushState:state:
 发送第二路音频推送状态回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onLocalVideoStateChanged:state:message:
 本地视频采集设备状态回调
 
(void) - onMediaRecordEvent:event:recoderStoragePath:
 本地媒体录制状态回调 注:录制开始或者录制异常都是通过该回调回抛
 
(void) - onMicrophoneVolumeUpdate:volume:
 麦克风音量回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onPreviewStarted:
 预览开始
 
(void) - onPreviewStoped:
 停止预览回调
 
(void) - onPushPaused:
 摄像头推流暂停回调
 
(void) - onPushRestart:
 重新推流回调
 
(void) - onPushResumed:
 摄像头推流恢复回调
 
(void) - onPushStarted:
 推流开始回调
 
(void) - onPushStatistics:statsInfo:
 直播推流器统计数据回调(每2秒回调一次)
 
(void) - onPushStoped:
 推流停止回调
 
(void) - onRemoteUserAudioStream:userId:state:
 有用户在房间内成员推送音频流回调(只针对直播连麦场景生效) 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onRemoteUserEnterRoom:userId:state:
 有用户加入房间回调(只针对直播连麦场景生效) 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onRemoteUserVideoStream:userId:type:state:
 有用户在房间内开启摄像头或共享流回调,可以是屏幕共享流或者unity流(只针对直播连麦场景生效) 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onScreenSharePublishStateChanged:oldState:newState:
 屏幕分享推流变更回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onSetLiveMixTranscodingConfig:status:message:
 设置云端的混流(转码)参数回调,对应于setLiveMixTranscodingConfig接口 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 
(void) - onVideoPublishStateChanged:oldState:newState:
 视频推流变更回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用
 

Detailed Description

推流基本信息相关回调

Method Documentation

◆ onAudioPublishStateChanged:oldState:newState:

- (void) onAudioPublishStateChanged: (AlivcLivePusher *)  pusher
oldState: (AliLivePublishState)  oldState
newState: (AliLivePublishState)  newState 
optional

音频推流变更回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用

Parameters
pusher推流引擎对象
oldState之前的推流状态,详见 AliLivePublishState
newState当前的推流状态,详见 AliLivePublishState

◆ onFirstFramePreviewed:

- (void) onFirstFramePreviewed: (AlivcLivePusher *)  pusher
optional

渲染第一帧回调

Parameters
pusher推流引擎对象

◆ onFirstFramePushed:

- (void) onFirstFramePushed: (AlivcLivePusher *)  pusher
optional

发送第一帧音视频流回调

Parameters
pusher推流引擎对象

◆ 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加入频道结果
  • 0:成功
  • 非0:失败
channel加入频道名
userId用户ID

◆ onKickedOutByServer:reason:

- (void) onKickedOutByServer: (AlivcLivePusher *)  pusher
reason: (AlivcLivePushKickedOutType)  code 
optional

被服务侧强制踢掉回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用

Parameters
pusher推流引擎对象
code具体被踢掉原因

◆ 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
pusherThe live pusher engine object
eventLocal recording status and error callback, see AlivcLiveRecordMediaEventCode
storagePathRecording file storage path

◆ onMicrophoneVolumeUpdate:volume:

- (void) onMicrophoneVolumeUpdate: (AlivcLivePusher *)  pusher
volume: (int)  volume 
optional

麦克风音量回调 注:此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才可以使用

Parameters
pusher推流引擎对象
volume音量大小, 取值范围[0,255]
Note
调用 enableAudioVolumeIndication 打开音量回调频率后,会收到这个回调通知。

◆ onPreviewStarted:

- (void) onPreviewStarted: (AlivcLivePusher *)  pusher
optional

预览开始

Parameters
pusher推流引擎对象

◆ onPreviewStoped:

- (void) onPreviewStoped: (AlivcLivePusher *)  pusher
optional

停止预览回调

Parameters
pusher推流引擎对象

◆ onPushPaused:

- (void) onPushPaused: (AlivcLivePusher *)  pusher
optional

摄像头推流暂停回调

Parameters
pusher推流引擎对象

◆ onPushRestart:

- (void) onPushRestart: (AlivcLivePusher *)  pusher
optional

重新推流回调

Parameters
pusher推流引擎对象

◆ onPushResumed:

- (void) onPushResumed: (AlivcLivePusher *)  pusher
optional

摄像头推流恢复回调

Parameters
pusher推流引擎对象

◆ onPushStarted:

- (void) onPushStarted: (AlivcLivePusher *)  pusher
optional

推流开始回调

Parameters
pusher推流引擎对象

◆ onPushStatistics:statsInfo:

- (void) onPushStatistics: (AlivcLivePusher *)  pusher
statsInfo: (AlivcLivePushStatsInfo *)  statistics 
optional

直播推流器统计数据回调(每2秒回调一次)

Parameters
pusher推流引擎对象
statistics推流器统计数据 AlivcLivePushStatsInfo

◆ onPushStoped:

- (void) onPushStoped: (AlivcLivePusher *)  pusher
optional

推流停止回调

Parameters
pusher推流引擎对象

◆ 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推流引擎对象
isSuccessYES表示成功,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: