main
|
Last change
on this file since 5a4c0b0 was cb01666, checked in by Robin Genis <roboburr@…>, 3 months ago |
|
feat: lite mode (KLONKT_AUDIO=off) — audio disabled, single codebase
Boot flag that skips the entire audio feature: no audio/playlist/download/
embed routes (no ffmpeg calls), no tracks loaded, own-audio shortcodes
(track/album/playlist) stripped, audio buttons in admin/profile
hidden. Hub and Circles keep working; external embeds (YouTube/SoundCloud/
Spotify) keep working too. Default = on (full version unchanged).
This lets Klonkt run as a lightweight blog/photo/EPK site on an environment
without ffmpeg.
Co-Authored-By: Claude <noreply@…>
|
-
Property mode
set to
100644
|
|
File size:
619 bytes
|
| Rev | Line | |
|---|
| [cb01666] | 1 | // Feature-flags (boot-tijd, via env).
|
|---|
| 2 | //
|
|---|
| 3 | // Lite-modus: zet KLONKT_AUDIO=off in .env om de HELE audio-feature uit te
|
|---|
| 4 | // schakelen — geen audio-/playlist-/download-/embed-routes, geen ffmpeg-aanroep,
|
|---|
| 5 | // geen speler en geen [[track]]/[[playlist]]-shortcodes. Zo draait Klonkt als
|
|---|
| 6 | // lichte blog/foto/EPK-site op een omgeving zónder ffmpeg/exec. Hub én Cirkels
|
|---|
| 7 | // blijven gewoon werken (die hangen niet van audio af).
|
|---|
| 8 | //
|
|---|
| 9 | // Default = aan (volledige versie). Alleen de letterlijke waarde 'off' schakelt uit.
|
|---|
| 10 | export function audioEnabled() {
|
|---|
| 11 | return String(process.env.KLONKT_AUDIO ?? 'on').toLowerCase() !== 'off';
|
|---|
| 12 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.