Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RtcAudioDeviceManager

Hierarchy

  • EventEmitter
    • RtcAudioDeviceManager

Index

Constructors

constructor

Properties

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly errorMonitor

errorMonitor: unique symbol

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number

getPlayoutDeviceList

  • getPlayoutDeviceList(): Array<Object>
  • 获取音频播放设备

    Returns Array<Object>

    • 播放设备列表

getRecordDeviceList

  • getRecordDeviceList(): Array<Object>
  • 获取音频采集设备

    Returns Array<Object>

    • 录制设备列表

listenerCount

  • listenerCount(event: string | symbol): number

listeners

  • listeners(event: string | symbol): Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setDefaultPlayoutDevice

  • setDefaultPlayoutDevice(): number
  • 设置系统默认设备为当前使用的音频播放设备

    Returns number

    返回QResult来指示调用状态

setDefaultRecordDevice

  • setDefaultRecordDevice(): number
  • 设置系统默认设备为当前使用的音频采集设备

    Returns number

    返回QResult来指示调用状态

setLoudspeakerStatus

  • setLoudspeakerStatus(enable: boolean): number
  • 设置音频外放, 仅在移动设备上支持

    Parameters

    • enable: boolean

      ture/false 打开/关闭音频外放

    Returns number

    返回QResult来指示调用状态

setMaxListeners

  • setMaxListeners(n: number): this

setMicrophoneMuteStatus

  • setMicrophoneMuteStatus(enable: boolean): number
  • 设置麦克风采集数据静音状态(不包括伴音等其他声音)

    Parameters

    • enable: boolean

      静音开关, 打开/关闭 静音开关

    Returns number

    返回QResult来指示调用状态

setPlayoutDevice

  • setPlayoutDevice(deviceId: string): number
  • 设置当前使用的音频播放设备

    Parameters

    • deviceId: string

      音频设备ID

    Returns number

    返回QResult来指示调用状态

setPlayoutDeviceVolume

  • setPlayoutDeviceVolume(vol: number): number
  • 设置音频播放音量

    Parameters

    • vol: number

    Returns number

    返回QResult来指示调用状态

setRecordDevice

  • setRecordDevice(deviceId: string): number
  • 设置当前使用的音频采集设备

    Parameters

    • deviceId: string

      音频设备ID

    Returns number

    返回QResult来指示调用状态

setRecordDeviceVolume

  • setRecordDeviceVolume(vol: number): number
  • 设置音频采集音量

    Parameters

    • vol: number

    Returns number

    返回QResult来指示调用状态

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc