Properties

defaultPlaybackDevice: PlaybackDevice

Gets the current default playback device.

isMuted: boolean

Gets or sets the mute state of the system's default playback device.

volume: number

Gets or sets the volume of the system's default playback device (0.0 to 1.0).

Methods

  • Registers a callback which will be called when the default playback device changes.

    Returns

    An event subscription which can be used to unsubscribe from the event.

    Parameters

    Returns EventSubscription

  • Registers a callback which will be called when the volume or mute state of the system's default playback device changes.

    Returns

    An event subscription which can be used to unsubscribe from the event.

    Parameters

    • callback: ((volume: number, isMuted: boolean) => void)

      The callback which will be called with the new volume and mute state.

        • (volume: number, isMuted: boolean): void
        • Parameters

          • volume: number
          • isMuted: boolean

          Returns void

    Returns EventSubscription

  • Sets the default playback device by its device id.

    Parameters

    • deviceId: string

      The id of the device to set as default.

    Returns void

Generated using TypeDoc