kaios-types
    Preparing search index...

    Interface AudioChannelManager

    The AudioChannelManager interface allows managing the audio channels of the device. It provides access to volume control and headphone status.

    audio-channel-telephony, audio-channel-ringer, audio-channel-alarm, audio-channel-notification, audio-channel-content

    media.useAudioChannelAPI

    interface AudioChannelManager {
        allowedAudioChannels: AudioChannelType[];
        headphones: boolean;
        onheadphonesstatuschanged:
            | ((this: AudioChannelManager, ev: Event) => any)
            | null;
        telephonySpeaker: boolean;
        volumeControlChannel: string;
        addEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dispatchEvent(event: Event): boolean;
        removeEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy

    • EventTarget
      • AudioChannelManager
    Index

    Properties

    allowedAudioChannels: AudioChannelType[]

    Returns a list of audio channels that are allowed to be used.

    headphones: boolean

    Indicates whether headphones are currently plugged in.

    onheadphonesstatuschanged:
        | ((this: AudioChannelManager, ev: Event) => any)
        | null

    Fired when the headphones status changes (plugged in or removed).

    telephonySpeaker: boolean

    Indicates whether the telephony speaker is currently enabled.

    volumeControlChannel: string

    Indicates which audio channel's volume is currently being controlled by the hardware volume keys.

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void