Add generated UI notification sounds
This commit is contained in:
@@ -7,3 +7,7 @@
|
||||
/halls/**/*.json
|
||||
/static/**/*.d.ts
|
||||
/static/third-party/tasks-vision
|
||||
/distro-packages/Arch-Linux/skald-git/pkg/
|
||||
/distro-packages/Arch-Linux/skald-git/skald/
|
||||
/distro-packages/Arch-Linux/skald-git/src/
|
||||
/distro-packages/Arch-Linux/skald-git/*.pkg.tar.*
|
||||
|
||||
+7
-2
@@ -164,12 +164,12 @@
|
||||
</select>
|
||||
|
||||
<form>
|
||||
<input id="preprocessingbox" type="checkbox" checked/>
|
||||
<input id="preprocessingbox" type="checkbox"/>
|
||||
<label for="preprocessingbox">Noise suppression</label>
|
||||
</form>
|
||||
|
||||
<form>
|
||||
<input id="hqaudiobox" type="checkbox"/>
|
||||
<input id="hqaudiobox" type="checkbox" checked/>
|
||||
<label for="hqaudiobox">High-quality audio</label>
|
||||
</form>
|
||||
|
||||
@@ -179,6 +179,11 @@
|
||||
<fieldset>
|
||||
<legend>Other Settings</legend>
|
||||
|
||||
<form>
|
||||
<input id="notificationsoundsbox" type="checkbox" checked/>
|
||||
<label for="notificationsoundsbox">Notification sounds</label>
|
||||
</form>
|
||||
|
||||
<form id="sendform">
|
||||
<label for="sendselect" class="sidenav-label-first">Send:</label>
|
||||
<select id="sendselect" class="select select-inline">
|
||||
|
||||
+176
-9
@@ -76,6 +76,7 @@ let probingState = null;
|
||||
|
||||
* @property {boolean} [preprocessing]
|
||||
* @property {boolean} [hqaudio]
|
||||
* @property {boolean} [notificationSounds]
|
||||
* @property {boolean} [forceRelay]
|
||||
*/
|
||||
|
||||
@@ -248,10 +249,150 @@ function reflectSettings() {
|
||||
store = true;
|
||||
}
|
||||
|
||||
if(settings.hasOwnProperty('notificationSounds')) {
|
||||
getInputElement('notificationsoundsbox').checked =
|
||||
settings.notificationSounds;
|
||||
} else {
|
||||
settings.notificationSounds =
|
||||
getInputElement('notificationsoundsbox').checked;
|
||||
store = true;
|
||||
}
|
||||
|
||||
if(store)
|
||||
storeSettings(settings);
|
||||
}
|
||||
|
||||
/** @type {AudioContext} */
|
||||
let notificationAudioContext = null;
|
||||
let userNotificationSoundsReady = false;
|
||||
|
||||
function notificationSoundsEnabled() {
|
||||
return !!getSettings().notificationSounds;
|
||||
}
|
||||
|
||||
function getNotificationAudioContext() {
|
||||
if(!notificationSoundsEnabled())
|
||||
return null;
|
||||
|
||||
let AudioContextConstructor =
|
||||
window.AudioContext || window.webkitAudioContext;
|
||||
if(!AudioContextConstructor)
|
||||
return null;
|
||||
|
||||
if(!notificationAudioContext)
|
||||
notificationAudioContext = new AudioContextConstructor();
|
||||
|
||||
if(notificationAudioContext.state === 'suspended')
|
||||
notificationAudioContext.resume().catch(e => {
|
||||
console.warn('Could not resume notification audio:', e);
|
||||
});
|
||||
|
||||
return notificationAudioContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} start
|
||||
* @param {number} duration
|
||||
* @param {number} fromFrequency
|
||||
* @param {number} toFrequency
|
||||
* @param {number} gainValue
|
||||
* @param {OscillatorType} [type]
|
||||
*/
|
||||
function scheduleGlide(start, duration, fromFrequency, toFrequency, gainValue, type) {
|
||||
let context = getNotificationAudioContext();
|
||||
if(!context)
|
||||
return;
|
||||
|
||||
let oscillator = context.createOscillator();
|
||||
let gain = context.createGain();
|
||||
oscillator.type = type || 'sine';
|
||||
oscillator.frequency.setValueAtTime(fromFrequency, start);
|
||||
oscillator.frequency.exponentialRampToValueAtTime(toFrequency, start + duration);
|
||||
gain.gain.setValueAtTime(0, start);
|
||||
gain.gain.linearRampToValueAtTime(gainValue, start + 0.02);
|
||||
gain.gain.exponentialRampToValueAtTime(0.0001, start + duration);
|
||||
oscillator.connect(gain);
|
||||
gain.connect(context.destination);
|
||||
oscillator.start(start);
|
||||
oscillator.stop(start + duration + 0.02);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @param {number} duration
|
||||
* @param {number} frequency
|
||||
* @param {number} gainValue
|
||||
* @param {OscillatorType} [type]
|
||||
*/
|
||||
function scheduleTone(offset, duration, frequency, gainValue, type) {
|
||||
let context = getNotificationAudioContext();
|
||||
if(!context)
|
||||
return;
|
||||
|
||||
let start = context.currentTime + offset;
|
||||
let oscillator = context.createOscillator();
|
||||
let gain = context.createGain();
|
||||
oscillator.type = type || 'sine';
|
||||
oscillator.frequency.setValueAtTime(frequency, start);
|
||||
gain.gain.setValueAtTime(0, start);
|
||||
gain.gain.linearRampToValueAtTime(gainValue, start + 0.015);
|
||||
gain.gain.exponentialRampToValueAtTime(0.0001, start + duration);
|
||||
oscillator.connect(gain);
|
||||
gain.connect(context.destination);
|
||||
oscillator.start(start);
|
||||
oscillator.stop(start + duration + 0.02);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
*/
|
||||
function playNotificationSound(name) {
|
||||
let context = getNotificationAudioContext();
|
||||
if(!context)
|
||||
return;
|
||||
|
||||
let now = context.currentTime;
|
||||
switch(name) {
|
||||
case 'hand-raised':
|
||||
scheduleGlide(now, 0.36, 420, 1320, 0.035, 'sine');
|
||||
break;
|
||||
case 'hand-lowered':
|
||||
scheduleGlide(now, 0.34, 1180, 360, 0.03, 'sine');
|
||||
break;
|
||||
case 'user-joined':
|
||||
scheduleTone(0, 0.18, 660, 0.035, 'sine');
|
||||
scheduleTone(0.18, 0.26, 880, 0.032, 'sine');
|
||||
break;
|
||||
case 'user-left':
|
||||
scheduleTone(0, 0.16, 660, 0.025, 'triangle');
|
||||
scheduleTone(0.14, 0.22, 440, 0.022, 'triangle');
|
||||
break;
|
||||
case 'recording-started':
|
||||
scheduleTone(0, 0.16, 523.25, 0.03, 'sine');
|
||||
scheduleTone(0.09, 0.18, 659.25, 0.026, 'sine');
|
||||
scheduleTone(0.18, 0.24, 783.99, 0.024, 'sine');
|
||||
break;
|
||||
case 'recording-stopped':
|
||||
scheduleTone(0, 0.16, 783.99, 0.026, 'sine');
|
||||
scheduleTone(0.12, 0.18, 659.25, 0.024, 'sine');
|
||||
scheduleTone(0.24, 0.24, 392, 0.022, 'sine');
|
||||
break;
|
||||
case 'chat-message':
|
||||
scheduleTone(0, 0.09, 880, 0.018, 'triangle');
|
||||
scheduleTone(0.08, 0.11, 1174.66, 0.014, 'triangle');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function unlockNotificationAudio() {
|
||||
getNotificationAudioContext();
|
||||
}
|
||||
|
||||
document.addEventListener('pointerdown', unlockNotificationAudio);
|
||||
document.addEventListener('keydown', unlockNotificationAudio);
|
||||
|
||||
/**
|
||||
* Returns true if we should use the mobile layout. This should be kept
|
||||
* in sync with the CSS.
|
||||
@@ -589,6 +730,15 @@ getInputElement('hqaudiobox').onchange = function(e) {
|
||||
updateSettings({hqaudio: this.checked});
|
||||
};
|
||||
|
||||
getInputElement('notificationsoundsbox').onchange = function(e) {
|
||||
e.preventDefault();
|
||||
if(!(this instanceof HTMLInputElement))
|
||||
throw new Error('Unexpected type for this');
|
||||
updateSettings({notificationSounds: this.checked});
|
||||
if(this.checked)
|
||||
getNotificationAudioContext();
|
||||
};
|
||||
|
||||
document.getElementById('mutebutton').onclick = function(e) {
|
||||
e.preventDefault();
|
||||
let localMute = getSettings().localMute;
|
||||
@@ -1053,7 +1203,7 @@ async function addLocalMedia(localId) {
|
||||
/** @type{boolean|MediaTrackConstraints} */
|
||||
let audio = false;
|
||||
if(settings.audio === 'default') {
|
||||
audio = true;
|
||||
audio = {};
|
||||
} else if(settings.audio && settings.audio !== 'off') {
|
||||
audio = {deviceId: settings.audio};
|
||||
}
|
||||
@@ -1609,7 +1759,7 @@ function addUser(id, userinfo) {
|
||||
user.classList.add("user-p");
|
||||
user.setAttribute('role', 'button');
|
||||
user.setAttribute('tabindex', '0');
|
||||
setUserStatus(id, user, userinfo);
|
||||
setUserStatus(id, user, userinfo, false);
|
||||
user.addEventListener('click', function(e) {
|
||||
let elt = e.currentTarget;
|
||||
if(!elt || !(elt instanceof HTMLElement))
|
||||
@@ -1664,32 +1814,36 @@ function changeUser(id, userinfo) {
|
||||
console.warn('Unknown user ' + id);
|
||||
return;
|
||||
}
|
||||
setUserStatus(id, elt, userinfo);
|
||||
setUserStatus(id, elt, userinfo, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {HTMLElement} elt
|
||||
* @param {user} userinfo
|
||||
* @param {boolean} notify
|
||||
*/
|
||||
function setUserStatus(id, elt, userinfo) {
|
||||
function setUserStatus(id, elt, userinfo, notify) {
|
||||
let username = userinfo.username ? userinfo.username : '(anon)';
|
||||
elt.textContent = username;
|
||||
|
||||
let wasRaised = elt.classList.contains('user-status-raisehand');
|
||||
let isRemote = id !== (serverConnection && serverConnection.id);
|
||||
if(userinfo.data.raisehand) {
|
||||
elt.classList.add('user-status-raisehand');
|
||||
elt.setAttribute('aria-label', `${username} (hand raised)`);
|
||||
// Announce when hand is newly raised (not on initial load)
|
||||
if(!wasRaised && id !== (serverConnection && serverConnection.id)) {
|
||||
if(notify && !wasRaised) {
|
||||
let announcement = document.getElementById('chat-announcements');
|
||||
if(announcement) {
|
||||
if(announcement && isRemote) {
|
||||
announcement.textContent = `${username} raised their hand`;
|
||||
}
|
||||
playNotificationSound('hand-raised');
|
||||
}
|
||||
} else {
|
||||
elt.classList.remove('user-status-raisehand');
|
||||
elt.setAttribute('aria-label', username);
|
||||
if(notify && wasRaised)
|
||||
playNotificationSound('hand-lowered');
|
||||
}
|
||||
|
||||
let microphone=false;
|
||||
@@ -1727,10 +1881,14 @@ function gotUser(id, kind) {
|
||||
switch(kind) {
|
||||
case 'add':
|
||||
addUser(id, serverConnection.users[id]);
|
||||
if(userNotificationSoundsReady && id !== serverConnection.id)
|
||||
playNotificationSound('user-joined');
|
||||
if(Object.keys(serverConnection.users).length == 3)
|
||||
reconsiderSendParameters();
|
||||
break;
|
||||
case 'delete':
|
||||
if(userNotificationSoundsReady && id !== serverConnection.id)
|
||||
playNotificationSound('user-left');
|
||||
delUser(id);
|
||||
if(Object.keys(serverConnection.users).length < 3)
|
||||
scheduleReconsiderParameters();
|
||||
@@ -1869,6 +2027,9 @@ async function gotJoined(kind, hall, perms, status, data, error, message) {
|
||||
serverConnection.username
|
||||
);
|
||||
openSafariStream();
|
||||
window.setTimeout(() => {
|
||||
userNotificationSoundsReady = true;
|
||||
}, 1000);
|
||||
if(kind === 'change')
|
||||
return;
|
||||
break;
|
||||
@@ -2121,10 +2282,14 @@ function gotUserMessage(id, dest, username, time, privileged, kind, error, messa
|
||||
return;
|
||||
}
|
||||
let text = '' + message;
|
||||
if(text === 'Recording started')
|
||||
if(text === 'Recording started') {
|
||||
announceUrgent(text);
|
||||
else
|
||||
playNotificationSound('recording-started');
|
||||
} else {
|
||||
announceChat(text);
|
||||
if(text === 'Recording stopped')
|
||||
playNotificationSound('recording-stopped');
|
||||
}
|
||||
displayMessage(text);
|
||||
break;
|
||||
}
|
||||
@@ -2462,6 +2627,8 @@ function addToChatbox(id, peerId, dest, nick, time, privileged, history, kind, m
|
||||
if(serverConnection && peerId === serverConnection.id)
|
||||
speaker = 'You';
|
||||
announceChat(speaker ? `${speaker}: ${messageText}` : messageText);
|
||||
if(serverConnection && peerId && peerId !== serverConnection.id)
|
||||
playNotificationSound('chat-message');
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -1,238 +1,154 @@
|
||||
# Skald Hard Fork - Master TODO
|
||||
# Skald Recording Quality Roadmap
|
||||
#
|
||||
# Current state:
|
||||
# The original hard-fork checklist is retired. Skald is live on the user's
|
||||
# server, Galene rooms have been migrated as Skald halls, and basic recording
|
||||
# has been verified with real users.
|
||||
#
|
||||
# Goal:
|
||||
# Turn this Galene-derived repository into Skald: a new, audio-only,
|
||||
# hall-based conferencing server. This is a hard fork, so compatibility with
|
||||
# Galene names, URLs, video behavior, and recording format is intentionally
|
||||
# not the default.
|
||||
# Make Skald's single mixed Ogg Opus recordings sound good, stay reliable
|
||||
# under larger audio-only halls, and avoid avoidable CPU/process overhead.
|
||||
#
|
||||
# Legend:
|
||||
# - item = needs doing
|
||||
# + item = implemented, needs testing
|
||||
# X item = tested and done
|
||||
# - item = needs doing.
|
||||
# + item = implemented, needs testing.
|
||||
# X item = tested and done.
|
||||
#
|
||||
# Non-negotiable target state:
|
||||
# - Project name is Skald everywhere.
|
||||
# - Halls replace groups/rooms everywhere user-facing and in internal code
|
||||
# where practical.
|
||||
# - Video is removed, not hidden.
|
||||
# - Incoming video is rejected.
|
||||
# - The browser UI is audio-only and accessible.
|
||||
# - Recordings are single mixed Ogg Opus audio files.
|
||||
# - No legacy Galene compatibility paths or fallback shims unless explicitly
|
||||
# added later by choice.
|
||||
# Constraints:
|
||||
# - Keep recordings as one mixed Ogg Opus file per hall recording session.
|
||||
# - Preserve clear recording start/stop announcements and operator feedback.
|
||||
# - Do not block WebRTC packet handling on recording work.
|
||||
# - Favor small, testable stages over one large rewrite.
|
||||
# - Keep live-server safety in mind; staged improvements should be deployable
|
||||
# independently.
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 0: BASELINE INVENTORY AND GUARDRAILS
|
||||
# PHASE 0: BASELINE AND MEASUREMENT
|
||||
# ============================================================================
|
||||
|
||||
X Record the current upstream/fork point in CHANGES or a new fork note
|
||||
X Capture current baseline: `go test ./...` result before behavior changes
|
||||
X Capture current baseline: `go build ./...` result before behavior changes
|
||||
X Inventory generated/static assets, including static/example and third-party assets
|
||||
X Inventory all public URLs: /group/, /public-groups.json, /recordings/, /galene-api/
|
||||
X Inventory all config/data paths: groups/, data/, recordings/, skaldctl.json
|
||||
X Inventory all Galene binary/service names in docs, scripts, examples, and tests
|
||||
X Decide whether existing stored data will be migrated manually or treated as incompatible
|
||||
X Keep the old LICENSE intact and preserve required attribution
|
||||
X Confirm the current live deployment can start and stop a Skald recording.
|
||||
X Confirm migrated Galene rooms work as Skald halls on meet.stormux.org.
|
||||
- Document the current recording pipeline in skald.md for maintainers:
|
||||
incoming Opus RTP -> per-source ffmpeg decoder -> PCM mixer -> ffmpeg Opus
|
||||
encoder -> Ogg Opus file.
|
||||
- Add lightweight recording metrics in logs or debug output:
|
||||
active recorded sources, dropped source frames, mixer write errors, ffmpeg
|
||||
decoder starts/stops, and encoder failures.
|
||||
- Add a synthetic recording benchmark or smoke tool that can simulate multiple
|
||||
active Opus sources without needing browser clients.
|
||||
- Record baseline CPU, process count, and output quality for 1, 5, 10, and 25
|
||||
active sources on a representative server.
|
||||
- Define practical target limits for "normal hall", "large moderated hall",
|
||||
and "stress test" recording scenarios.
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 1: FOUNDATION AND TOTAL REBRANDING
|
||||
# PHASE 1: MIX QUALITY BEFORE PIPELINE REWRITE
|
||||
# ============================================================================
|
||||
|
||||
X Rename Go module: github.com/jech/galene -> git.stormux.org/storm/skald
|
||||
X Update all internal Go import paths across source and tests
|
||||
X Rename galene.go -> skald.go and keep the main package entrypoint working
|
||||
X Rename galenectl/ directory and binary to skaldctl/
|
||||
X Rename static/galene.css -> static/skald.css
|
||||
X Rename static/galene.js -> static/skald.js
|
||||
X Rename static/galene.html -> static/skald.html
|
||||
X Update webserver static serving to load skald.html and renamed assets
|
||||
X Update all HTML, JS, CSS, docs, tests, and examples that reference renamed assets
|
||||
X Rename galene-*.md docs to skald-*.md
|
||||
X Replace "Galene", "Galène", and "galene" with "Skald" and "skald" where they refer to this project
|
||||
X Keep historical upstream references only where they are attribution, changelog history, or license context
|
||||
X Rename default binary, service, and install examples from galene to skald
|
||||
X Rename galenectl config file to skaldctl.json
|
||||
X Update CHANGES with Skald fork point and first Skald development section
|
||||
X Verify `go test ./...` compiles after the pure project rename pass
|
||||
X Search for remaining Galene names and classify each survivor as attribution/history or a bug
|
||||
- Add mixer tests for multiple simultaneous PCM sources, including clipping
|
||||
cases and quiet/loud source combinations.
|
||||
- Replace raw summing with a safer mix strategy:
|
||||
per-source attenuation, headroom, or another deterministic approach that
|
||||
reduces clipping when multiple users speak.
|
||||
- Add a simple limiter to prevent harsh clipping in the final mixed PCM.
|
||||
- Add tests proving the limiter preserves normal speech-level samples and
|
||||
bounds overloaded samples.
|
||||
- Add optional per-source level tracking so logs or future UI can identify
|
||||
sources that dominate the recording.
|
||||
- Verify recordings with 2-5 simultaneous speakers sound cleaner than the
|
||||
current clamped sum.
|
||||
- Verify the limiter does not create pumping, distortion, or excessive volume
|
||||
loss for a single speaker.
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 2: HALL TERMINOLOGY AND DATA MODEL
|
||||
# PHASE 2: SOURCE LIFECYCLE AND SILENCE HANDLING
|
||||
# ============================================================================
|
||||
|
||||
X Rename Go package group/ to hall/ if the package-wide rename stays tractable
|
||||
X Rename package declarations, types, variables, funcs, tests, and comments from group to hall
|
||||
X Rename Group type to Hall and update all compile errors intentionally
|
||||
X Rename group description files/concepts to hall description files/concepts
|
||||
X Rename default directory flag: -groups -> -halls
|
||||
X Rename default data directory: groups/ -> halls/
|
||||
X Rename public listing concept from public groups to public halls
|
||||
X Rename subgroups to subhalls everywhere, including JSON fields and commands
|
||||
X Rename auto-subgroups -> auto-subhalls
|
||||
X Rename allow-subgroups -> allow-subhalls
|
||||
X Rename include-subgroups -> include-subhalls
|
||||
X Rename group action names to hall action names where exposed to clients
|
||||
X Rename chat/help commands such as /subgroups to /subhalls
|
||||
X Update tests to use generic placeholder names, not real usernames
|
||||
X Verify no runtime user-facing "group", "groups", "room", or "rooms" remain except attribution/history
|
||||
X Verify old group JSON/config paths are not silently accepted unless explicitly reintroduced later
|
||||
- Track whether each recording source is active, silent, stalled, or closed.
|
||||
- Treat missing frames as silence without blocking the mixer.
|
||||
- Drop or de-prioritize stale silent sources after a short timeout.
|
||||
- Ensure mute/unmute transitions do not leave stale audio in the mixed output.
|
||||
- Ensure participant join/leave during recording never stops the recording file.
|
||||
- Add tests for source join, leave, mute, unmute, stall, and recovery during an
|
||||
active recording.
|
||||
- Verify a long recording remains valid when sources repeatedly join and leave.
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 3: URLS, API, PROTOCOL, AND CONTROL TOOL
|
||||
# PHASE 3: REDUCE PROCESS OVERHEAD
|
||||
# ============================================================================
|
||||
|
||||
X Rename browser hall URLs from /group/name/ to /hall/name/
|
||||
X Rename /public-groups.json to /public-halls.json
|
||||
X Rename /galene-api/ to /skald-api/
|
||||
X Rename API collection paths from .groups to .halls
|
||||
X Rename protocol join fields from group to hall
|
||||
X Rename protocol callbacks/events from joined group semantics to joined hall semantics
|
||||
X Update static/protocol.js public API: ServerConnection.join and related callbacks
|
||||
X Update static/management.js to use /skald-api/v0/.halls/
|
||||
X Update static/mainpage.js to open /hall/ URLs and fetch /public-halls.json
|
||||
X Update stats endpoint naming only if it exposes Skald/group terminology
|
||||
X Update skaldctl command names: create-hall, update-hall, delete-hall, list-halls
|
||||
X Update skaldctl flags: -hall, -include-subhalls, -auto-subhalls, etc.
|
||||
X Update skaldctl help text and error messages
|
||||
X Update API and webserver tests for /hall/ and /skald-api/
|
||||
X Verify old /group/, /public-groups.json, /galene-api/, and .groups paths fail clearly
|
||||
X Verify runtime protocol backward compatibility with Skald is intentionally broken
|
||||
- Evaluate Go-native Opus decode options against the current ffmpeg decoder
|
||||
subprocesses:
|
||||
sound quality, maintenance risk, packaging impact, CGO requirements, and CPU.
|
||||
- Decide whether in-process Opus decoding is worth the dependency and packaging
|
||||
tradeoff.
|
||||
- If keeping ffmpeg decoders, pool or supervise decoder processes more
|
||||
deliberately and improve failure recovery.
|
||||
- If replacing ffmpeg decoders, implement one in-process decoder path behind
|
||||
tests before removing the subprocess path.
|
||||
- Verify recording still handles dynamic payload type, RTP sequence behavior,
|
||||
packet loss, and source restarts.
|
||||
- Measure CPU and process-count improvement with 10+ active sources.
|
||||
- Keep one final encoder path to Ogg Opus unless there is a proven reason to
|
||||
replace it too.
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 4: BACKEND - STRIP VIDEO COMPLETELY
|
||||
# PHASE 4: ENCODER AND CONTAINER HARDENING
|
||||
# ============================================================================
|
||||
|
||||
+ Remove video codec constants and helpers from codecs/ package
|
||||
+ Remove or rewrite video-only codec tests
|
||||
+ Strip video/vp8, video/vp9, video/av1, and video/h264 from SDP negotiation
|
||||
+ Ensure audio/opus remains negotiated correctly
|
||||
+ Reject incoming video m-lines/transceivers at WebRTC peer connection setup
|
||||
+ Reject or close incoming video tracks if a browser still sends them
|
||||
+ Ensure rejection is explicit in logs without crashing the hall
|
||||
+ Remove outgoing video track routing from rtpconn/ and hall/
|
||||
+ Remove simulcast and SVC handling
|
||||
+ Remove video bandwidth estimation and video throughput selection
|
||||
+ Remove video-specific RTCP behavior such as PLI/FIR/keyframe requests
|
||||
+ Remove screenshare backend support
|
||||
+ Remove presentation/file-as-video support if it depends on video tracks
|
||||
+ Remove background blur support and background-blur-worker.js from the served app
|
||||
X Remove video fields from hall descriptions, stats, API responses, and protocol docs
|
||||
+ Check WHIP/WHEP-style endpoints for video assumptions and either make audio-only or remove
|
||||
+ Ensure browsers that request audio+video get a working audio-only session or a clear video rejection
|
||||
X Verify two browser clients can join one hall and exchange audio only
|
||||
X Verify a client attempting camera or screenshare cannot publish video
|
||||
- Decide whether the final Ogg Opus encoder should remain ffmpeg or move
|
||||
in-process later.
|
||||
- Make encoder startup errors operator-visible and log the exact ffmpeg error.
|
||||
- Ensure encoder stdin writes cannot block the mixer indefinitely.
|
||||
- Ensure recorder close handles encoder failure, stdin close failure, and wait
|
||||
failure without leaving misleading successful output.
|
||||
- Verify interrupted or failed recordings are either clearly marked as failed or
|
||||
produce a playable partial file.
|
||||
- Verify completed files with ffprobe or equivalent in tests where available.
|
||||
- Verify completed files play in common players after long recordings.
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 5: FRONTEND - AUDIO-ONLY USER EXPERIENCE
|
||||
# PHASE 5: LARGE-HALL OPERATIONS
|
||||
# ============================================================================
|
||||
|
||||
+ Remove all <video> elements and video containers from skald.html
|
||||
+ Remove camera buttons and presentation buttons tied to camera/video behavior
|
||||
+ Remove screenshare button and related menu commands
|
||||
+ Remove video quality, resolution, throughput, simulcast, and collapse controls
|
||||
+ Remove video device selector and camera permission flow
|
||||
+ Remove hideVideo(), showVideo(), getMaxVideoThroughput(), and related JS paths
|
||||
+ Remove background blur UI, worker references, and CSS
|
||||
+ Keep microphone mute/unmute behavior intact
|
||||
+ Keep audio input and output device selection intact
|
||||
+ Keep chat, user list, moderation, locking, recording controls, and status messages
|
||||
+ Rename visible text in skald.html, index.html, stats.html, mainpage.js, management.js, and protocol errors
|
||||
+ Replace public groups UI with public halls UI
|
||||
+ Remove video CSS from skald.css and common.css
|
||||
- Check layout after removing the video pane; no dead space or hidden required controls
|
||||
- Preserve keyboard access with Tab and Shift+Tab through all controls
|
||||
- Ensure controls have labels or accessible names after icon/button cleanup
|
||||
X Verify audio-only UI loads without 404s for renamed assets
|
||||
X Verify joining, muting, chat, recording controls, and leaving work from keyboard
|
||||
- Add documentation for recommended large-hall permissions:
|
||||
most users observe/message, only presenters publish audio, operators control
|
||||
recording.
|
||||
- Document expected scaling limits in terms of active speakers, not just total
|
||||
connected users.
|
||||
- Add guidance for max-clients, TURN bandwidth, CPU monitoring, and recording
|
||||
expectations for 50, 100, and 250 user events.
|
||||
- Add an operator-facing warning or log message when active recorded sources
|
||||
exceed a conservative threshold.
|
||||
- Test a large moderated hall with many listeners and a few active speakers.
|
||||
- Test a stress hall with many active speakers and document the observed limit.
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 6: RECORDING REWRITE - SINGLE MIXED OGG OPUS
|
||||
# PHASE 6: FINAL CLEANUP AND RELEASE READINESS
|
||||
# ============================================================================
|
||||
|
||||
+ Remove diskwriter dependency on github.com/at-wat/ebml-go and WebM/Matroska writing
|
||||
+ Remove per-track/per-participant WebM recording logic
|
||||
+ Remove video recording fields such as hasVideo, width, height, keyframes, and video MIME handling
|
||||
X Decide final mixer implementation before coding:
|
||||
* Decode all active Opus RTP audio to 48 kHz PCM
|
||||
* Maintain a per-source jitter/timing buffer so join/leave does not corrupt the mix
|
||||
* Mix to stereo with clipping prevention or limiting
|
||||
* Insert silence for missing frames rather than blocking the mixer
|
||||
* Encode mixed PCM to Ogg Opus
|
||||
+ Evaluate Go-native decode/encode/container libraries versus ffmpeg subprocess
|
||||
+ If using ffmpeg, add a startup check and clear admin/operator error when ffmpeg is missing
|
||||
+ If using ffmpeg, use nonblocking stdin writes and drain stderr safely
|
||||
X If using ffmpeg, command shape starts from:
|
||||
ffmpeg -f s16le -ar 48000 -ac 2 -i pipe:0 -c:a libopus -b:a 128k output.ogg
|
||||
+ Ensure recording work cannot block WebRTC packet handling
|
||||
+ Name recording files skald-recording-YYYYMMDD-HHMMSS.ogg
|
||||
+ Avoid usernames or live personal identifiers in recording filenames
|
||||
+ Store one recording file per hall recording session
|
||||
+ Close recordings cleanly on explicit stop
|
||||
+ Close recordings cleanly when the hall empties
|
||||
+ Handle participant join/leave during recording without stopping the file
|
||||
+ Handle mute/unmute during recording without stale audio
|
||||
X Handle recording start when no one is speaking
|
||||
X Add focused mixer/recording tests with synthetic audio where possible
|
||||
X Verify produced Ogg Opus file with `ffprobe` or equivalent
|
||||
- Verify produced file plays in a standard audio player
|
||||
- Update skald.md and skald-install.md with the final recording architecture.
|
||||
- Update package dependencies if recording dependency choices change.
|
||||
- Run focused recording tests and webserver recording-control tests.
|
||||
- Run `go test ./...` in a clean tree without distro package build artifacts.
|
||||
- Run live browser testing for recording start, stop, join, leave, mute, and
|
||||
playback.
|
||||
- Do a final review for accidental regressions in recording announcements,
|
||||
hall permissions, and migrated-hall compatibility.
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 7: CONFIGURATION, INSTALLATION, AND DEPLOYMENT SURFACES
|
||||
# PHASE 7: WEB UI AUDIO DEFAULTS AND EVENT SOUNDS
|
||||
# ============================================================================
|
||||
|
||||
X Update command-line flags and help output for Skald and halls
|
||||
X Update default examples for halls/, data/, recordings/, and skaldctl.json
|
||||
X Update systemd service examples to skald user, binary, and paths
|
||||
X Update reverse proxy examples to /hall/ and /skald-api/
|
||||
X Update TURN/STUN docs only where project name or URLs changed
|
||||
X Update Docker/container or packaging files if present later
|
||||
X Update .gitignore for renamed binaries, config files, and generated artifacts
|
||||
X Verify there are no stale install commands that build or run skald/skaldctl
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 8: DOCUMENTATION
|
||||
# ============================================================================
|
||||
|
||||
X Rewrite README.md to describe Skald as audio-only hall conferencing
|
||||
X Rewrite skald-install.md for new project name, binary names, and hall paths
|
||||
X Rewrite skald.md admin/usage docs for audio-only behavior
|
||||
X Rewrite skald-client.md for audio-only client authors
|
||||
X Rewrite skald-protocol.md for hall terminology and audio-only tracks
|
||||
X Rewrite skald-api.md for /skald-api/ and .halls paths
|
||||
X Remove video, camera, screenshare, simulcast, SVC, and WebM recording instructions
|
||||
X Add Ogg Opus recording documentation
|
||||
X Document that incoming video is rejected by design
|
||||
X Document that Skald protocol/API compatibility is intentionally broken
|
||||
X Document any required external ffmpeg dependency if the recorder uses ffmpeg
|
||||
X Check docs for old real-person sample usernames and replace with placeholders
|
||||
|
||||
# ============================================================================
|
||||
# PHASE 9: VERIFICATION AND CLEANUP
|
||||
# ============================================================================
|
||||
|
||||
X Run `go test ./...` and fix failures caused by the fork work
|
||||
X Run `go vet ./...` and resolve real issues
|
||||
X Run focused webserver/API tests for /hall/ and /skald-api/
|
||||
X Run focused protocol/frontend checks if the project has a JS typecheck/test path
|
||||
X Search source/docs for remaining Galene names
|
||||
X Search source/docs for remaining /group/, .groups, public-groups, galenectl, and galene-api
|
||||
X Search source/docs for remaining video, camera, screenshare, simulcast, WebM, and Matroska references
|
||||
X Search source/docs for remaining group/room terminology in user-facing surfaces
|
||||
X Classify allowed survivors as attribution/history/third-party icon names only
|
||||
X Build skald binary
|
||||
X Build skaldctl binary
|
||||
X Run a local server and verify static pages load without 404s
|
||||
X Test: create a hall with skaldctl
|
||||
X Test: list halls with skaldctl
|
||||
X Test: join one hall from two browsers and confirm two-way audio
|
||||
X Test: attempt to publish video and confirm rejection
|
||||
X Test: start recording and confirm one Ogg Opus file appears
|
||||
- Test: join a third participant during recording and confirm the mix continues
|
||||
- Test: mute/unmute during recording and confirm the output reflects it
|
||||
X Test: leave all participants and confirm recording stops cleanly
|
||||
- Test: play the recording in a standard audio player
|
||||
X Test: restart server and verify halls/config load from the new paths
|
||||
X Remove obsolete files that are no longer served or built
|
||||
- Do a final diff review for accidental compatibility shims or stale Skald naming
|
||||
+ Default new sessions to high-quality audio.
|
||||
+ Default new sessions to no browser noise suppression, echo cancellation, or
|
||||
automatic gain control.
|
||||
+ Ensure the default microphone path also receives explicit audio constraints.
|
||||
+ Add generated browser notification sounds without binary sound assets.
|
||||
+ Add a user-facing Notification sounds setting.
|
||||
+ Play generated sounds for recording start, recording stop, raised hand,
|
||||
lowered hand, user join, user leave, and incoming chat message.
|
||||
- Verify sounds play after login in Chromium.
|
||||
- Verify sounds play after login in Firefox.
|
||||
- Verify sounds never replace screen-reader live-region announcements.
|
||||
- Tune sound levels and shapes with live users.
|
||||
|
||||
Reference in New Issue
Block a user