From 8de73deac88f17f9d3109e450e6b8fa181e7c070 Mon Sep 17 00:00:00 2001
From: Zixer1 <99333209+Zixer1@users.noreply.github.com>
Date: Tue, 21 Jul 2026 23:43:15 -0400
Subject: [PATCH] Feat/featured stream (#4335)
**Add approved & assigned issue number here:**
Resolves #4333
## Description:
Adds a small homepage panel that embeds a live Twitch stream, shown only
while a configured channel is actually live. When nothing configured is
live, it renders nothing.
Config-gated and off by default. The client reads a served config like
news.json: an on/off toggle plus the Twitch channel(s), with a bundled
fallback so it stays off until the backend serves config. So OF admins
control whether it is on and which channel is linked, no redeploy. First
live channel in the list wins.
You can drag the panel between the corners or minimise it, both
persisted across refresh. Clicking it opens the channel on Twitch. It
shows the live broadcast title, fetched from a third party with a clean
fallback to the channel name if that is unavailable.
Mainly designed OFM tournament streams, but OF can point it at its own
channel for major releases.
Notes:
- Off by default, no impact until OF turns it on. Activation needs the
matching backend config endpoint (`featured-stream.json`), which I will
follow up on the infra side.
- Twitch requires the embed to stay visible while playing, so
"minimised" stays a small visible thumbnail and the panel pauses during
a game instead of hiding (The stream can still be muted, but will keep
being played, although it can be paused. This is so that the viewership
still is present on twitch, and players in OF can see what is
happening).
Showcase of how it would look like:
https://github.com/user-attachments/assets/4874bcd6-e7e8-49d8-94ab-20512ab1f71c
## Please complete the following:
- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
## Please put your Discord username so you can be contacted if a bug or
regression is found:
zixer._
---
index.html | 6 +
resources/featured-stream.json | 4 +
resources/lang/en.json | 6 +
src/client/Api.ts | 26 +-
src/client/FeaturedStream.ts | 396 ++++++++++++++++++
src/client/Main.ts | 1 +
src/core/ApiSchemas.ts | 21 +
.../client/components/FeaturedStream.test.ts | 125 ++++++
8 files changed, 584 insertions(+), 1 deletion(-)
create mode 100644 resources/featured-stream.json
create mode 100644 src/client/FeaturedStream.ts
create mode 100644 tests/client/components/FeaturedStream.test.ts
diff --git a/index.html b/index.html
index 8d363cc4a..51e4d8200 100644
--- a/index.html
+++ b/index.html
@@ -382,6 +382,12 @@
+
+
+