Skip to content

Feature: start server-to-client audio muted by default, re-enableable from client UI #187

Description

@jsapede

Feature request: start server-to-client audio muted by default, re-enableable from the client UI

Context

On LinuxServer.io Selkies-based containers (e.g. linuxserver/firefox), I would like the remote session to start with server-to-client audio muted, but let the user enable it later from the existing audio toggle in the web client sidebar.

This is a common pattern for shared/remote browsers: no surprise audio on connect, but audio available on demand.

Current behavior

There are only two possible states today:

  1. SELKIES_AUDIO_ENABLED=true (default): audio pipeline can start; whether sound plays depends on browser autoplay policy / user gesture.
  2. SELKIES_AUDIO_ENABLED=false: audio is hard-disabled server-side. When the client clicks the audio button and sends START_AUDIO, the server refuses it:
INFO:data_websocket:Received START_AUDIO command from client for server-to-client audio.
INFO:data_websocket:START_AUDIO: Starting pcmflux audio pipeline.
INFO:data_websocket:Server-to-client audio is disabled by server settings. Not starting pipeline.

The UI toggle stays visible (unless also locked via |locked), but clicking it does nothing — it is effectively a dead control.

What is missing

A middle-ground setting, something like:

  • SELKIES_AUDIO_START_MUTED=true — server starts with the pcmflux capture pipeline not running (audio_enabled stays true so START_AUDIO is honored), client UI shows the audio button in muted state; clicking it sends START_AUDIO and the server starts the pipeline.

From reading the source (selkies/settings.py, selkies.py::_start_pcmflux_pipeline, selkies.py::START_AUDIO handler), this looks straightforward:

  • Keep audio_enabled=True.
  • Add a new boolean setting, e.g. audio_start_muted (default false).
  • In _start_pcmflux_pipeline() / session init: if audio_start_muted is set, skip auto-start of the pcmflux pipeline.
  • The existing START_AUDIO handler already supports starting the pipeline on demand (await self._start_pcmflux_pipeline()), so the click path already exists.
  • Send the new flag in the server_settings payload so the client renders the toggle in "muted" state initially.

Environment

  • Container: lscr.io/linuxserver/firefox:latest (baseimage-selkies)
  • Mode: default websockets mode
  • Verified on image pulled 2026-08-25

Happy to test a patch or beta image if useful. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions