Stereo attempted by default for screen share.
This commit is contained in:
1 parent
710bd7ab8c
commit
03338306c3
9 files changed
+240
-4
No files matched your search
@@ -2,7 +2,7 @@
|
||||
# shellcheck shell=bash disable=SC2034,SC2154
|
||||
|
||||
pkgname=skald-git
|
||||
pkgver=2026.10.31.r1565.g489733e
|
||||
pkgver=2026.10.31.r1566.g710bd7a
|
||||
pkgrel=1
|
||||
pkgdesc='Audio-only hall-based conferencing server'
|
||||
arch=('x86_64' 'aarch64')
|
||||
@@ -12,17 +12,22 @@ depends=('ffmpeg')
|
||||
makedepends=('git' 'go>=1.23')
|
||||
provides=('skald')
|
||||
conflicts=('skald')
|
||||
install=skald.install
|
||||
source=(
|
||||
'git+https://git.stormux.org/storm/skald.git'
|
||||
'skald.service'
|
||||
'skald.sysusers'
|
||||
'skald.tmpfiles'
|
||||
'data.README.md'
|
||||
'halls.README.md'
|
||||
)
|
||||
sha256sums=(
|
||||
'SKIP'
|
||||
'7048408e888e08c6f0751979848b85c0c5a0f0e7828b8bcf5594f7ceaf883f90'
|
||||
'd17bb4bfb320416da6e6ed43e9df8b8088f149b60808924d2dc0ac0b8e9b9a32'
|
||||
'ba8bb0933715c7eb19cdaf8d6dea4e33ff65ad676f1484f9b6a33930ec455f6e'
|
||||
'3cd99c2e4f6f4e69c19010bbdd5379563041e9384fb0579299de8158626ae30e'
|
||||
'1d56cbc748eff0574df49021dc62ce871bf1585b93c62a14171a0a75a0fcf9da'
|
||||
)
|
||||
|
||||
pkgver() {
|
||||
@@ -66,6 +71,9 @@ package() {
|
||||
install -d "$pkgdir/var/lib/skald/halls"
|
||||
install -d "$pkgdir/var/lib/skald/recordings"
|
||||
|
||||
install -Dm644 "$srcdir/data.README.md" "$pkgdir/var/lib/skald/data/README.md"
|
||||
install -Dm644 "$srcdir/halls.README.md" "$pkgdir/var/lib/skald/halls/README.md"
|
||||
|
||||
install -Dm644 "$srcdir/skald.service" "$pkgdir/usr/lib/systemd/system/skald.service"
|
||||
install -Dm644 "$srcdir/skald.sysusers" "$pkgdir/usr/lib/sysusers.d/skald.conf"
|
||||
install -Dm644 "$srcdir/skald.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/skald.conf"
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
# Skald server settings
|
||||
|
||||
Skald configuration lives in `/var/lib/skald`. Optional server settings go in
|
||||
`/var/lib/skald/data/config.toml`; hall definitions go in
|
||||
`/var/lib/skald/halls/`. See `/var/lib/skald/halls/README.md` to create a hall.
|
||||
This README is documentation and is not read as configuration.
|
||||
|
||||
## Initial setup
|
||||
|
||||
A missing or empty `config.toml` means default server settings. Nothing needs
|
||||
to go in it for basic hall use. To create the optional file on a new
|
||||
installation, run:
|
||||
|
||||
```sh
|
||||
sudo -u skald skaldctl -data /var/lib/skald/data -halls /var/lib/skald/halls initial-setup
|
||||
```
|
||||
|
||||
The resulting empty file is expected: the command does not create an
|
||||
administrator account or prompt for settings. Skip this command if the file
|
||||
already exists; it refuses to overwrite existing configuration.
|
||||
|
||||
## Running behind a reverse proxy
|
||||
|
||||
If people connect through a reverse proxy at `https://meet.example.com/`, add
|
||||
the following to `config.toml`, using your own public URL:
|
||||
|
||||
```toml
|
||||
proxyURL = "https://meet.example.com/"
|
||||
```
|
||||
|
||||
This tells Skald the public scheme and hostname to use in generated URLs,
|
||||
including when HTTPS terminates at the proxy and Skald receives plain HTTP.
|
||||
It does not configure the proxy itself. The proxy must forward the web
|
||||
interface and WebSocket connections. Audio still needs working firewall and
|
||||
ICE/TURN connectivity; see `/usr/share/doc/skald/skald-install.md`.
|
||||
|
||||
Optionally, redirect requests using other hostnames to your chosen hostname:
|
||||
|
||||
```toml
|
||||
canonicalHost = "meet.example.com"
|
||||
```
|
||||
|
||||
`canonicalHost` contains a hostname, without `https://` or a trailing slash.
|
||||
If you enable it, configure the proxy to preserve the public `Host` header.
|
||||
|
||||
## Other optional settings
|
||||
|
||||
- `recordingRetention = "168h"` automatically deletes completed recordings
|
||||
older than seven days. Leave it unset to keep recordings until manually
|
||||
deleted.
|
||||
- `writableHalls = true` allows authenticated server administrators to modify
|
||||
hall definitions through the HTTP administrative API. The default is
|
||||
`false`. Local `skaldctl` commands work without enabling it.
|
||||
- `[users.Username]` tables define server administrator accounts, with
|
||||
`permissions = "admin"` and a password, preferably hashed. These are separate
|
||||
from hall users and operators. They are optional for local administration.
|
||||
- `allowOrigin` and `allowAdminOrigin` permit additional HTTP origins for
|
||||
clients and the administrative API, respectively. Leave them unset for
|
||||
ordinary same-origin use.
|
||||
|
||||
Use only the settings you need. Put top-level settings such as `proxyURL`
|
||||
before any `[users.Username]` tables. Unknown configuration fields are
|
||||
rejected. For full examples and password hash syntax, see
|
||||
`/usr/share/doc/skald/skald.md`.
|
||||
|
||||
## Permissions and other files
|
||||
|
||||
Run local `skaldctl` commands as `skald`, with the directory options above.
|
||||
For `config.toml` created manually as root, set ownership and permissions:
|
||||
|
||||
```sh
|
||||
sudo chown skald:skald /var/lib/skald/data/config.toml
|
||||
sudo chmod 600 /var/lib/skald/data/config.toml
|
||||
```
|
||||
|
||||
Changes to `config.toml` are loaded automatically; no server restart is
|
||||
needed. Listening ports, plain HTTP mode, UDP ranges, and the built-in TURN
|
||||
listener are command-line options configured through a systemd service
|
||||
override, rather than entries in `config.toml`.
|
||||
|
||||
This directory can also contain `cert.pem` and `key.pem` for HTTPS,
|
||||
`ice-servers.json` for external ICE/TURN servers, and `var/tokens.jsonl` for
|
||||
runtime token state. ICE configuration and token state still use JSON.
|
||||
Avoid editing the runtime token file manually. Recordings are stored in
|
||||
`/var/lib/skald/recordings/`.
|
||||
@@ -0,0 +1,65 @@
|
||||
# Setting up Skald halls
|
||||
|
||||
Skald configuration lives in `/var/lib/skald`. This directory contains hall
|
||||
definitions such as `/var/lib/skald/halls/main.toml`. The hall name comes from
|
||||
the filename: `main.toml` is available at `/hall/main/` on your server.
|
||||
This README is documentation; Skald only loads `.toml` hall files.
|
||||
|
||||
## Guided setup
|
||||
|
||||
Run this on the server:
|
||||
|
||||
```sh
|
||||
sudo -u skald skaldctl -data /var/lib/skald/data -halls /var/lib/skald/halls create-hall -interactive
|
||||
```
|
||||
|
||||
The command asks for the hall name and settings, operator accounts, and an
|
||||
optional shared participant password. Passwords are stored as hashes.
|
||||
Operators have permission to moderate the hall. Creating a hall does not
|
||||
require `data/config.toml` or a server administrator account.
|
||||
|
||||
For a hall named `main`, visit `https://meet.example.com/hall/main/`, replacing
|
||||
the example hostname with your own public address. When connecting directly
|
||||
to Skald's default HTTPS listener, include port `8443` in the address.
|
||||
|
||||
## Editing a hall manually
|
||||
|
||||
You can also create a file such as `/var/lib/skald/halls/main.toml` with:
|
||||
|
||||
```toml
|
||||
displayName = "Main Hall"
|
||||
description = "An audio meeting hall"
|
||||
public = false
|
||||
|
||||
[users.Username]
|
||||
password = "Replace this example password"
|
||||
permissions = "op"
|
||||
```
|
||||
|
||||
`public = false` leaves the hall off the landing-page list; users can still
|
||||
join through its URL. Set it to `true` to list it. Keep hall settings before
|
||||
user table headers. A shared-password account uses a separate top-level
|
||||
`[wildcard-user]` table, outside `[users.Username]`.
|
||||
|
||||
Use your own username and password. To replace the example plaintext password
|
||||
with a hash, run the following and enter the new password when prompted:
|
||||
|
||||
```sh
|
||||
sudo -u skald skaldctl -data /var/lib/skald/data -halls /var/lib/skald/halls set-password -hall main -user Username
|
||||
```
|
||||
|
||||
Hall files must be readable by the `skald` service user. For files created
|
||||
manually as root, set ownership and permissions:
|
||||
|
||||
```sh
|
||||
sudo chown skald:skald /var/lib/skald/halls/main.toml
|
||||
sudo chmod 600 /var/lib/skald/halls/main.toml
|
||||
```
|
||||
|
||||
Hall changes are loaded automatically; no server restart is needed. Local
|
||||
`skaldctl` commands edit files directly, so keep the directory options shown
|
||||
above and run them as `skald` to avoid creating root-owned configuration.
|
||||
|
||||
For all hall settings and user permissions, see
|
||||
`/usr/share/doc/skald/skald.md`. Server settings and reverse proxy guidance
|
||||
are explained in `/var/lib/skald/data/README.md`.
|
||||
@@ -0,0 +1,17 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
post_install() {
|
||||
echo 'Skald configuration lives in /var/lib/skald:'
|
||||
echo ' halls/*.toml: hall definitions; see /var/lib/skald/halls/README.md'
|
||||
echo ' data/config.toml: optional server settings; see /var/lib/skald/data/README.md'
|
||||
echo
|
||||
echo 'For a new installation, create the optional default server configuration with:'
|
||||
echo ' sudo -u skald skaldctl -data /var/lib/skald/data -halls /var/lib/skald/halls initial-setup'
|
||||
echo 'An empty config.toml is normal. Skip initial-setup if the file already exists.'
|
||||
echo 'To create a hall with guided setup, run:'
|
||||
echo ' sudo -u skald skaldctl -data /var/lib/skald/data -halls /var/lib/skald/halls create-hall -interactive'
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
@@ -1338,6 +1338,10 @@ func Update() {
|
||||
log.Printf("Hall file %v: %v", path, err)
|
||||
return nil
|
||||
}
|
||||
// Packages install hall setup instructions alongside definitions.
|
||||
if filepath.Base(filename) == "README.md" {
|
||||
return nil
|
||||
}
|
||||
if !strings.HasSuffix(filename, ".toml") {
|
||||
log.Printf(
|
||||
"Unexpected extension for hall file %v",
|
||||
|
||||
+17
-3
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
@@ -283,6 +284,10 @@ func TestTOMLFilesAndReload(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestTOMLPublicDiscoveryAndReload(t *testing.T) {
|
||||
var logOutput bytes.Buffer
|
||||
oldLogWriter := log.Writer()
|
||||
log.SetOutput(&logOutput)
|
||||
t.Cleanup(func() { log.SetOutput(oldLogWriter) })
|
||||
oldDirectory, oldDataDirectory := Directory, DataDirectory
|
||||
oldHalls := halls.halls
|
||||
Directory, DataDirectory = t.TempDir(), t.TempDir()
|
||||
@@ -296,15 +301,24 @@ func TestTOMLPublicDiscoveryAndReload(t *testing.T) {
|
||||
}
|
||||
filename := filepath.Join(Directory, "nested", "public.toml")
|
||||
for file, content := range map[string]string{
|
||||
filename: "public = true\ndisplayName = 'Before'\nauto-subhalls = true\n",
|
||||
filepath.Join(Directory, "ignored.json"): `{"public":true}`,
|
||||
filepath.Join(Directory, ".hidden.toml"): "public = true\n",
|
||||
filename: "public = true\ndisplayName = 'Before'\nauto-subhalls = true\n",
|
||||
filepath.Join(Directory, "ignored.json"): `{"public":true}`,
|
||||
filepath.Join(Directory, ".hidden.toml"): "public = true\n",
|
||||
filepath.Join(Directory, "README.md"): "# Hall setup instructions\n",
|
||||
filepath.Join(Directory, "nested", "README.md"): "# Nested hall instructions\n",
|
||||
} {
|
||||
if err := os.WriteFile(file, []byte(content), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Update()
|
||||
if strings.Contains(logOutput.String(), "README.md") {
|
||||
t.Fatalf("hall documentation caused a warning: %s", logOutput.String())
|
||||
}
|
||||
if !strings.Contains(logOutput.String(), "Unexpected extension for hall file") ||
|
||||
!strings.Contains(logOutput.String(), "ignored.json") {
|
||||
t.Fatalf("unexpected hall files no longer produce warnings: %s", logOutput.String())
|
||||
}
|
||||
public := GetPublic(nil)
|
||||
if len(public) != 1 || public[0].Name != "nested/public" || public[0].DisplayName != "Before" {
|
||||
t.Fatalf("public hall discovery: %#v", public)
|
||||
|
||||
@@ -426,6 +426,17 @@ administered with:
|
||||
sudo -u skald skaldctl -data /var/lib/skald/data -halls /var/lib/skald/halls initial-setup
|
||||
```
|
||||
|
||||
`initial-setup` creates an empty `config.toml`, which is valid and uses the
|
||||
default server settings. It does not create administrator accounts. The file
|
||||
is optional for basic hall use; skip this command if it already exists.
|
||||
Run local commands as the service user so configuration remains readable by
|
||||
the server.
|
||||
|
||||
The Arch package installs setup guides in `/var/lib/skald/data/README.md`
|
||||
and `/var/lib/skald/halls/README.md`, and prints the setup commands after
|
||||
installation and upgrades. These guides explain the optional server settings
|
||||
(including `proxyURL` for reverse proxies), hall creation, and file ownership.
|
||||
|
||||
### Hall setup
|
||||
|
||||
For a guided setup, create a hall interactively:
|
||||
|
||||
@@ -82,6 +82,14 @@ to transmit. Starting and stopping sharing is announced through the polite
|
||||
live region, and participant names indicate who is sharing computer audio.
|
||||
Hall recordings include shared audio alongside microphone audio.
|
||||
|
||||
Skald requests stereo computer audio as a preference, so mono-only sources
|
||||
can still be shared. When sharing starts, a visible message and polite
|
||||
screen-reader announcement report the channel count returned by the browser:
|
||||
mono, stereo, another channel count, or unavailable. This describes the
|
||||
captured audio format; two channels do not guarantee that the source contains
|
||||
different left and right signals or that listeners receive stereo. Test with
|
||||
a known left/right audio sample on another participant's headphones.
|
||||
|
||||
Audio capture depends on the browser, operating system, and selected source.
|
||||
An available screen picker does not guarantee that audio is available. If no
|
||||
audio is returned, Skald explains this and releases the capture. Browser-tab
|
||||
|
||||
@@ -1467,6 +1467,23 @@ function can_share_computer_audio() {
|
||||
typeof navigator.mediaDevices.getDisplayMedia === 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Describe the capture format, which does not establish what peers hear.
|
||||
* @param {MediaStreamTrack[]} audioTracks
|
||||
*/
|
||||
function computer_audio_capture_status(audioTracks) {
|
||||
let channelCounts = audioTracks.map(track => track.getSettings().channelCount);
|
||||
let channelCount = channelCounts[0];
|
||||
if(!Number.isInteger(channelCount) || channelCount < 1 ||
|
||||
!channelCounts.every(count => count === channelCount))
|
||||
return 'Computer audio capture: channel count unavailable.';
|
||||
if(channelCount === 1)
|
||||
return 'Computer audio capture: mono (1 channel).';
|
||||
if(channelCount === 2)
|
||||
return 'Computer audio capture: stereo (2 channels).';
|
||||
return `Computer audio capture: ${channelCount} channels.`;
|
||||
}
|
||||
|
||||
async function share_computer_audio() {
|
||||
if(!can_share_computer_audio() || computerAudioRequest ||
|
||||
findUpMedia('computer-audio'))
|
||||
@@ -1484,6 +1501,8 @@ async function share_computer_audio() {
|
||||
let options = {
|
||||
video: true,
|
||||
audio: {
|
||||
// Prefer stereo without rejecting mono-only sources.
|
||||
channelCount: {ideal: 2},
|
||||
echoCancellation: false,
|
||||
noiseSuppression: false,
|
||||
autoGainControl: false,
|
||||
@@ -1525,6 +1544,9 @@ async function share_computer_audio() {
|
||||
return;
|
||||
}
|
||||
await setMedia(c);
|
||||
if(computerAudioRequest === request &&
|
||||
audioTracks.every(track => track.readyState === 'live'))
|
||||
displayMessage(computer_audio_capture_status(audioTracks));
|
||||
capture = null; // The upstream now owns the audio tracks.
|
||||
} catch(error) {
|
||||
if(c)
|
||||
@@ -4319,6 +4341,8 @@ function displayError(message, level, announce = true) {
|
||||
/** @ts-ignore */
|
||||
Toastify({
|
||||
text: text,
|
||||
// Dedicated live regions above own screen-reader announcements.
|
||||
ariaLive: 'off',
|
||||
duration: 8000, // Increased from 4000 for screen reader users
|
||||
close: true,
|
||||
position: position,
|
||||
|
||||
Reference in new issue
Block a user