human: 如何处理七牛云的低代码QAudienceMicHandler

gpt: [低代码](https://developer.qiniu.com/lowcode) > API 文档 >
[互动直播](https://developer.qiniu.com/lowcode/api/12007/qlive-api) > [android
API文档](https://developer.qiniu.com/lowcode/api/12032/the-android-api-
documentation) > QAudienceMicHandler

#  QAudienceMicHandler

最近更新时间: 2022-07-11 09:58:46

interface com.qlive.linkmicservice.QAudienceMicHandler

观众连麦器

Index

方法

  * addLinkMicListener
  * removeLinkMicListener
  * startLink
  * isLinked
  * stopLink
  * switchCamera
  * muteCamera
  * muteMicrophone
  * setVideoFrameListener
  * setAudioFrameListener
  * setDefaultBeauty

方法

addLinkMicListener

  * void addLinkMicListener(LinkMicHandlerListener listener);
  * 添加连麦监听

Parameters

    * listener: [QAudienceMicHandler.LinkMicHandlerListener](https://developer.qiniu.com/lowcode/api/12090/QAudienceMicHandler.LinkMicHandlerListener)

监听

Returns void

removeLinkMicListener

  * void removeLinkMicListener(LinkMicHandlerListener listener);
  * 移除连麦监听

Parameters

    * listener: [QAudienceMicHandler.LinkMicHandlerListener](https://developer.qiniu.com/lowcode/api/12090/QAudienceMicHandler.LinkMicHandlerListener)

监听

Returns void

startLink

  * void startLink(HashMap<String, String> extension, QCameraParam cameraParams, QMicrophoneParam microphoneParams, QLiveCallBack<Void> callBack);
  * 开始上麦

Parameters

    * extension: HashMap 

麦位扩展字段

    * cameraParams: [QCameraParam](https://developer.qiniu.com/lowcode/api/12074/QCameraParam)

摄像头参数 空代表不开

    * microphoneParams: [QMicrophoneParam](https://developer.qiniu.com/lowcode/api/12073/QMicrophoneParam)

麦克参数 空代表不开

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

上麦成功失败回调

Returns void

isLinked

  * boolean isLinked();
  * 我是不是麦上用户

Returns boolean

stopLink

  * void stopLink(QLiveCallBack<Void> callBack);
  * 结束连麦

Parameters

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

操作回调

Returns void

switchCamera

  * void switchCamera(QLiveCallBack<QCameraFace> callBack);
  * 上麦后可以切换摄像头

Parameters

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

Returns void

muteCamera

  * void muteCamera(boolean muted, QLiveCallBack<Boolean> callBack);
  * 上麦后可以禁言本地视频流

Parameters

    * muted: boolean 

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

Returns void

muteMicrophone

  * void muteMicrophone(boolean muted, QLiveCallBack<Boolean> callBack);
  * 上麦后可以禁用本地音频流

Parameters

    * muted: boolean 

    * callBack: [QLiveCallBack](https://developer.qiniu.com/lowcode/api/12052/QLiveCallBack)

Returns void

setVideoFrameListener

  * void setVideoFrameListener(QVideoFrameListener frameListener);
  * 上麦后可以设置本地视频帧回调

Parameters

    * frameListener: [QVideoFrameListener](https://developer.qiniu.com/lowcode/api/12092/QVideoFrameListener)

Returns void

setAudioFrameListener

  * void setAudioFrameListener(QAudioFrameListener frameListener);
  * 上麦后可以设置音频帧回调

Parameters

    * frameListener: [QAudioFrameListener](https://developer.qiniu.com/lowcode/api/12091/QAudioFrameListener)

Returns void

setDefaultBeauty

  * void setDefaultBeauty(QBeautySetting beautySetting);
  * 上麦后可以设置免费的默认美颜参数

Parameters

    * beautySetting: [QBeautySetting](https://developer.qiniu.com/lowcode/api/12067/QBeautySetting)

Returns void

以上内容是否对您有帮助？