Skip to content

audio.speaker.isMuted() and audio.mic.isMuted() always return false after manually changing mute state via system settings on Linux #1

@zym0110

Description

@zym0110

Description:
The methods audio.speaker.isMuted() and audio.mic.isMuted() return the correct mute status only when the plugin is first initialized. If the user later changes the mute state of the speaker or microphone through the operating system's native settings (e.g., using alsamixer, pactl, or the desktop environment's sound settings on Linux), subsequent calls to these methods always return false, regardless of the actual mute state.

Steps to Reproduce:

  1. Initialize the plugin and call audio.speaker.isMuted() (or audio.mic.isMuted()). Observe the returned value (should reflect the current mute status).
  2. Manually mute the speaker or microphone using a Linux system tool:
    • For ALSA: run alsamixer and mute a channel, or
    • For PulseAudio: run pactl set-sink-mute @DEFAULT_SINK@ 1 (for speaker) or pactl set-source-mute @DEFAULT_SOURCE@ 1 (for microphone), or
    • Use the GNOME/KDE sound settings GUI to mute the device.
  3. Call the same method again.
  4. The method returns false, even though the device is muted.

Expected Behavior:
The methods should return the current mute status of the device at the time of the call, reflecting any changes made via system settings or command-line tools.

Actual Behavior:
After the initial read, the methods always return false, indicating they are not updating with system changes.

Environment:

  • Plugin version: [Please specify the version you are using]
  • Operating System: Linux (distribution and desktop environment if relevant, e.g., Ubuntu 22.04 with GNOME)
  • Audio backend: (e.g., ALSA, PulseAudio, PipeWire)
  • Browser/Electron/Node version (if applicable): [e.g., Chrome 98, Electron 15]

Additional Context:
This issue makes it impossible to monitor mute state changes that originate outside the plugin on Linux. A possible workaround would be to reinitialize the plugin, but that is not ideal for real‑time monitoring. The methods should either listen for system‑level mute events (e.g., via D-Bus for PulseAudio/PipeWire) or refresh their state on each call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions