human: 如何处理七牛云的实时音视频QNRemoteAudioTrack

gpt: [实时音视频](https://developer.qiniu.com/rtc) > API 文档 > Android
>QNRemoteAudioTrack

#  QNRemoteAudioTrack

最近更新时间: 2022-05-12 20:09:33

音频远端 Track 类

Hierarchy

  * [QNTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8693/QNTrack)
    * [QNLocalTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8662/QNLocalTrack)
      * [QNLocalVideoTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8663/QNLocalVideoTrack)
        * [QNCameraVideoTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8640/QNCameraVideoTrack)
        * [QNScreenVideoTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8687/QNScreenVideoTrack)
        * [QNCustomVideoTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8649/QNCustomVideoTrack)
      * [QNLocalAudioTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8660/QNLocalAudioTrack)
        * [QNMicrophoneAudioTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8667/QNMicrophoneAudioTrack)
        * [QNCustomAudioTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8646/QNCustomAudioTrack)
    * [QNRemoteTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8676/QNRemoteTrack)
      * [QNRemoteVideoTrack](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8680/QNRemoteVideoTrack)
      * QNRemoteAudioTrack 

Index

Core Methods

  * getTrackID
  * getUserID
  * getTag
  * isAudio
  * isVideo
  * isMuted
  * isSubscribed
  * setTrackInfoChangedListener
  * setVolume
  * getVolumeLevel
  * setAudioFrameListener

Core Methods

getTrackID

  * String getTrackID()
  * 获取 TrackID

Returns String

getUserID

  * String getUserID()
  * 获取 UserID

Returns String

getTag

  * String getTag()
  * 获取 Tag

Returns String

isAudio

  * boolean isAudio()
  * 是否为音频 Track

Returns boolean

isVideo

  * boolean isVideo()
  * 是否为视频 Track

Returns boolean

isMuted

  * boolean isMuted()
  * 该 Track 是否处于静默状态

Returns boolean

isSubscribed

  * boolean isSubscribed()
  * 该 Track 是否被订阅

Returns boolean

setTrackInfoChangedListener

  * setTrackInfoChangedListener([QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8820/QNTrackInfoChangedListener) listener)
  * 设置当前轨道信息变化监听器

Parameters

    * listener: [QNTrackInfoChangedListener](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8820/QNTrackInfoChangedListener)

轨道信息变化监听器

setVolume

  * void setVolume(double volume)
  * 设置当前 Track 播放音量大小

> 音量值在 0.0 - 1.0 之间为软件缩小；1.0 为原始音量；大于 1.0 且小于 10.0 为软件放大
>
> 在需要放大时，应从 1.x 开始设置，用最小的放大值来取得合适的播放效果，过大将会导致音频音调异常
>
> 该设置可以用于适度对播放音量做放大或者缩小

Parameters

    * volume: double 

音量大小，[1.0-10.0], 默认为 1.0

getVolumeLevel

  * float getVolumeLevel()
  * 获取当前 Track 播放的音量大小

> 可通过定时调用该方法获取音量值的方式来判断当前用户是否在讲话
>
> 在安静的环境下，获取到 0.0x 大小的数值为预期现象，您可根据您的需求自行决定判断的阈值

Returns float

setAudioFrameListener

  * void setAudioFrameListener([QNAudioFrameListener](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8630/QNAudioFrameListener) listener)
  * 设置音频数据监听

Parameters

    * listener: [QNAudioFrameListener](https://developer.qiniu.com/rtc/8674/QNRemoteAudioTrack/8630/QNAudioFrameListener)

音频数据监听接口

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