From c323d37c30aee8fe0b7365bee22c8bc329faabd8 Mon Sep 17 00:00:00 2001 From: senke Date: Thu, 30 Apr 2026 15:45:01 +0200 Subject: [PATCH] fix(web): flip HLS_STREAMING feature flag default to true MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backend default was flipped to HLS_STREAMING=true on Day 17 of the v1.0.9 sprint (config.go:418), and docker-compose.{prod,staging}.yml already pass HLS_STREAMING=true to the backend service. The frontend feature flag in apps/web/src/config/features.ts kept the old `false` default with a stale comment about matching the backend — so HLS playback was silently skipped on every deploy that didn't override VITE_FEATURE_HLS_STREAMING=true. Net effect: useAudioPlayerLifecycle treated `FEATURES.HLS_STREAMING` as false → fell through to the MP3 range fallback even when the transcoder had segments ready. Adaptive bitrate was on paper, off in practice. Flipped the default to true with a refreshed comment. Operators can still set VITE_FEATURE_HLS_STREAMING=false for unit tests or playback-regression bisection. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/web/src/config/features.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/web/src/config/features.ts b/apps/web/src/config/features.ts index 01b401c12..16ebbfa0d 100644 --- a/apps/web/src/config/features.ts +++ b/apps/web/src/config/features.ts @@ -49,14 +49,19 @@ export const FEATURES = { * HLS Streaming * Backend endpoints: /api/v1/tracks/:id/hls/info, /api/v1/tracks/:id/hls/status * - * Default is `false` to match backend `HLS_STREAMING` env (off by default). - * When off, playback goes through `/api/v1/tracks/:id/stream` (MP3 range requests). - * Enable via VITE_FEATURE_HLS_STREAMING=true in environments where the backend - * transcoder is actually running. + * Default flipped to `true` in v1.0.10 polish to match backend + * `HLS_STREAMING=true` (Day 17 of the v1.0.9 sprint). Adaptive + * bitrate via HLS is the canonical playback path; MP3 range + * requests via `/api/v1/tracks/:id/stream` remain a fallback when + * the browser can't play HLS or the transcoder hasn't produced + * segments yet. + * + * Set VITE_FEATURE_HLS_STREAMING=false to opt out (unit-test envs + * without a transcoder, or to bisect playback regressions). */ HLS_STREAMING: parseFeatureEnv( import.meta.env.VITE_FEATURE_HLS_STREAMING, - false, + true, ), /**