QPusherClient
interface com.qlive.pushclient.QPusherClient
推流客户端(主播端)
Index
方法
方法
getService
- @Override() <T extends QLiveService>T getService(Class<T> serviceClass);
-
获取插件服务实例
Parameters-
serviceClass: Class
插件的类
Returns QLiveService -
addLiveStatusListener
- @Override() void addLiveStatusListener(QLiveStatusListener liveStatusListener);
-
设置直播状态回调
Parameters-
liveStatusListener: QLiveStatusListener
直播事件监听
Returns void -
removeLiveStatusListener
- @Override() void removeLiveStatusListener(QLiveStatusListener liveStatusListener);
-
Returns void
getClientType
- @Override() QClientType getClientType();
-
当前客户端类型 QClientType.PUSHER 代表推流端 QClientType.PLAYER 代表拉流端
Returns QClientType
enableCamera
- void enableCamera(QCameraParam cameraParam, QPushRenderView renderView);
-
启动视频采集 和预览
Parameters-
cameraParam: QCameraParam
摄像头参数
-
renderView: QPushRenderView
预览窗口
Returns void -
enableMicrophone
- void enableMicrophone(QMicrophoneParam microphoneParam);
-
启动麦克采集
Parameters-
microphoneParam: QMicrophoneParam
麦克风参数
Returns void -
joinRoom
- void joinRoom(String roomID, QLiveCallBack<QLiveRoomInfo> callBack);
-
加入房间
Parameters-
roomID: String
房间ID
-
callBack: QLiveCallBack
回调函数
Returns void -
closeRoom
- void closeRoom(QLiveCallBack<Void> callBack);
-
主播关闭房间
Parameters-
callBack: QLiveCallBack
Returns void -
leaveRoom
- void leaveRoom(QLiveCallBack<Void> callBack);
-
主播离开房间 房间不关闭
Parameters-
callBack: QLiveCallBack
Returns void -
destroy
- void destroy();
-
销毁推流客户端 销毁后不能使用
Returns void
setConnectionStatusLister
- void setConnectionStatusLister(QConnectionStatusLister connectionStatusLister);
-
主播设置推流链接状态监听
Parameters-
connectionStatusLister: QConnectionStatusLister
Returns void -
switchCamera
- void switchCamera(QLiveCallBack<QCameraFace> callBack);
-
Switch camera
Parameters-
callBack: QLiveCallBack
切换摄像头回调
Returns void -
muteCamera
- void muteCamera(boolean muted, QLiveCallBack<Boolean> callBack);
-
禁/不禁用本地视频流 禁用后本地能看到预览 观众不能看到主播的画面
Parameters-
muted: boolean
是否禁用
-
callBack: QLiveCallBack
Returns void -
muteMicrophone
- void muteMicrophone(boolean muted, QLiveCallBack<Boolean> callBack);
-
禁用麦克风推流
Parameters-
muted: boolean
是否禁用
-
callBack: QLiveCallBack
Returns void -
setVideoFrameListener
- void setVideoFrameListener(QVideoFrameListener frameListener);
-
设置视频帧回调
Parameters-
frameListener: QVideoFrameListener
视频帧监听
Returns void -
setAudioFrameListener
- void setAudioFrameListener(QAudioFrameListener frameListener);
-
设置本地音频数据监听
Parameters-
frameListener: QAudioFrameListener
音频帧回调
Returns void -
pause
- void pause();
-
暂停
Returns void
resume
- void resume();
-
恢复
Returns void
setDefaultBeauty
- void setDefaultBeauty(QBeautySetting beautySetting);
-
设置默认免费版美颜参数
Parameters-
beautySetting: QBeautySetting
美颜参数
Returns void -
文档反馈
(如有产品使用问题,请 提交工单)