Repository navigation
✨ Stream the tracker's sounds on the Activity Monitor Twitch stream - #15669
Conversation
…ll sink The Activity Monitor streamer ran Chromium --mute-audio and fed ffmpeg anullsrc, so the tracker's merge-zap and new-item-buzz never reached Twitch. - Dockerfile: install pulseaudio + pulseaudio-utils (multi-arch, bookworm); smoke test checks ffmpeg's pulse indev; STREAM_AUDIO=pulse default. - entrypoint.sh: run a per-user PulseAudio (-n, native socket under RUN_DIR, null sink 'hive') as a supervised child, set it default, wait for the sink; drop --mute-audio from Chromium; ffmpeg reads '-f pulse -i hive.monitor' (AAC 128k, 2ch, 44.1k). STREAM_AUDIO=silent restores the old mute + anullsrc path. Video settings unchanged. - dashboard kiosk mode (?kiosk=1): tracker sounds on by default, resumed at load without a gesture, no localStorage reads/writes; &sound=off keeps it quiet. Chip nag suppressed in kiosk. - docs, README, configmap, changelog fragment, kiosk sound test. Verified locally (arm64 docker): pactl lists sink 'hive', ffmpeg captures hive.monitor stereo, bounded runs complete in both pulse and silent modes. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
4f7ab70
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
stage 080-awaiting-merge-admission: no activity for 30m0s: merge-train:queued-behind#15637:7/11:0/0:dashboard-misc.md,dashboard-copy-inventory.md,dashboard-sections.md,labels-and-control-signals.md,+22 |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15667
What
The Activity Monitor Twitch stream carried a silent audio track (Chromium
--mute-audio, ffmpeganullsrc). This makes the stage tracker's sounds — the merge zap and the new-issue/PR buzz — audible on the stream.Streamer (
src/deploy/stream/)pulseaudio+pulseaudio-utils(bookworm, multi-arch; workflow untouched). Smoke test also checkspulseaudio --versionand that ffmpeg has thepulseindev.ENV STREAM_AUDIO=pulse.-n, native socket under$RUN_DIR/pulse,module-null-sink sink_name=hive) as a supervised child, waits for the sink, sets it default/unmuted. Chromium loses--mute-audio(keeps--autoplay-policy=no-user-gesture-required). ffmpeg reads-thread_queue_size 1024 -f pulse -i hive.monitor→ AAC 128k, 2ch, 44.1 kHz. Video settings identical.STREAM_AUDIO=silentrestores mute +anullsrc. Diagram comment updated.pulseaudio --start --daemonizesilently dropped the--loadmodules under-n(found in local verification), hence the foreground supervised child.STREAM_AUDIO: "pulse"), streaming doc (diagram, new Sound section documenting&sound=offandSTREAM_AUDIO=silent).Dashboard (kiosk mode)
boot.js: exposeswindow.HIVE_KIOSK_SOUND/hiveKioskSoundOn()— true in?kiosk=1unless&sound=off.tracker-sound.js: in kiosk modestageTrackerSoundInittakes a kiosk path: sound on (per URL), default volume, AudioContext created and resumed at load; no localStorage reads or writes (stageTrackerSetSoundOn/SetVolumeskipsetItemin kiosk); the "click to enable sound" nag is suppressed on the unattended display.go generate ./pkg/dashboard/webstatic/).TestKioskSoundDefault(wiring guards + node fixture forstageTrackerKioskSoundDefault).Verification
go test ./pkg/dashboard/webstatic/ ./pkg/dashboard/ -run 'Index|Kiosk|Sound|Static' -count=1— ok;go vetclean;bash -n entrypoint.shok.STREAM_OUTPUT="-f null -", no stream key,STREAM_AUDIO=pulse) logspulseaudio up; default sink hive,pactl list sinks short→0 hive module-null-sink.c s16le 2ch 48000Hz, ffmpeg starts withGuessed Channel Layout for Input Stream #1.0 : stereoand completes the bounded run.STREAM_AUDIO=silentalso completes. An flv test encode probes as h264 + aac/44100/2ch with no dts warnings. Not verified: amd64 build (CI/QEMU) and end-to-end audio on Twitch.Operator note
After merge the
stream-imageworkflow buildsghcr.io/hivecommons/hive-stream:v5-latest; thenkubectl --context hive-oke -n hive-stream rollout restart deploy/hive-stream.The kiosk sound default only takes effect once hive's hive rolls the dashboard change; until then the container streams whatever the current dashboard plays (silence, but a real audio track).