实时音视频

  • 实时音视频 > API 文档 > Web >QNLocalAudioTrack

    QNLocalAudioTrack

    最近更新时间:2021-11-22 14:48:53

    本地音频 Track
    Hierarchy
    Index
    Event
    Core Methods
    Event
    audioFrame
    • (buffer: AudioBuffer): void
    • 原始音频数据返回

      track.on('audioFrame', function(buffer) {
          for (let channel = 0; channel < buffer.numberOfChannels; channel += 1) {
              console.log('audioFrame', channel, currentChannelData);
          } 
      })
      Parameters
      • buffer: AudioBuffer

        本地音频轨道的音频帧

    Core Methods
    setVolume
    • setVolume(volume: number): void
    • 设置音量

      Parameters
      • volume: number

        音量值为0-100

      Returns void
    getVolumeLevel
    • getVolumeLevel(): string | undefined
    • 获取当前音量

      Returns string | undefined
    getCurrentTimeDomainData
    • getCurrentTimeDomainData(): Uint8Array | undefined
    • 获取当前时域数据

      Returns Uint8Array | undefined
    getCurrentFrequencyDomainData
    • getCurrentFrequencyDomainData(): Uint8Array | undefined
    • 获取当前频域数据

      Returns Uint8Array | undefined
    getStats
    以上内容是否对您有帮助?
  • Qvm free helper
    Close