• admin released this 2026-04-30 19:37:44 -06:00 | 0 commits to main since this release

    Highlights

    HLS Adaptive Bitrate Streaming (with MP4 fallback)

    Videos now stream as multi-bitrate HLS (360p / 720p / 1080p) instead of a single MP4 served via HTTP range requests. Range-request bursts were the root cause of stutter through the Newt tunnel; HLS chunks are small and tunnel-friendly, and the player adapts bitrate to bandwidth.

    What's new:

    • New BullMQ hls-transcode queue (in-process worker, concurrency 1) that runs FFmpeg single-pass with aligned keyframes
    • Master + variant playlists served at /api/{videos|public}/{id}/hls/* with HMAC-signed URLs
    • Player prefers HLS when ready; MP4 fallback engages automatically on 2 NETWORK_ERRORs
    • useHls() hook lazy-imports hls.js (~75 KB gzipped) — never enters the main bundle
    • Native HLS on Safari / iOS, hls.js on Chrome / Firefox / Edge
    • ShortsPage prefetches the next 3 master manifests via <link rel="prefetch">
    • Hover-preview cards stay on MP4 (avoids 200 ms hls.js init latency)

    Operator opt-in:

    • Feature flag: ENABLE_HLS_TRANSCODE (default false) — when off, uploads are tagged SKIPPED and the player falls back to MP4 (fully reversible)
    • Backfill existing videos: docker compose exec api npm run backfill:hls (~2 min per 1080p video, ~30 / hour throughput)
    • media-api resource limits bumped to 4 CPU / 2 GB for FFmpeg headroom
    • Schema migration 20260430225432_add_hls_fields adds HlsStatus enum + 6 fields on Video + index — applies automatically on prisma migrate deploy

    Video serving fixes

    • New per-URL HMAC media signing (POST /api/media/sign) replaces the legacy ?token=<JWT> pattern that was removed server-side on 2026-04-12. Admin previews of unpublished media work again, and signature TTL refresh logic prevents mid-playback expiry.
    • useSignedMediaUrl hook caches signed URLs in-memory and de-duplicates in-flight sign requests, so a 50-thumbnail list issues 50 requests on first mount and zero on subsequent renders within TTL.
    • Cleanup of legacy media URL helpers across VideoCard, VideoPlayer, VideoViewerModal, AlbumCard, AlbumDetailDrawer, PhotoCard, PhotoViewerModal.

    Docs & screenshots

    • Added 13 mobile/desktop screenshots covering volunteer flows: dashboard, achievements, activity, canvass map, discover, feed, friends, notifications, profile, routes, shifts.
    • Updated volunteer docs (achievements.md, canvassing.md, index.md, shifts.md, social.md) to reference the new screenshots.
    • Removed the public SECURITY_REDTEAM_2026-04-12.md writeup from the repo (red-team artifacts shouldn't ship in the source tree).

    Upgrade notes

    • Schema migration runs automatically on first start: prisma migrate deploy is part of the api entrypoint.
    • HLS is off by default. Set ENABLE_HLS_TRANSCODE=true in .env and restart api + media-api to enable. Then run docker compose exec api npm run backfill:hls to transcode pre-existing videos.
    • Disk planning: HLS variants add ~1.5–2× the original MP4 size per video (3 renditions + segments). Check df -h /media/local/hls before backfilling a large library.
    • No breaking changes for existing MP4 streaming — the fallback path is preserved.

    Install / Upgrade

    # New install
    curl -fsSL https://gitea.bnkops.com/admin/changemaker.lite/raw/branch/main/scripts/install.sh | bash
    
    # Upgrade existing install
    ./scripts/upgrade.sh
    # Or fast-path with pre-built images:
    ./scripts/upgrade.sh --use-registry
    

    Commits in this release

    • 1f240ad Docs updates
    • 21208b5 feat(media): HLS adaptive bitrate streaming with MP4 fallback
    • 2ae7d8b Bug fixes for video serving and updates to documentation for mobile use screenshots
    Downloads