Skip to content

Commit d4021da

Browse files
authored
chore: mtx dfomain (#186)
1 parent 3666450 commit d4021da

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

src/configs/app.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ export default (): {
1212
apiDomain: `https://${process.env.API_DOMAIN}`,
1313
relayDomain: `https://${process.env.RELAY_DOMAIN}`,
1414
demosDomain: `https://${process.env.DEMOS_DOMAIN}`,
15-
gameStreamHlsBase:
16-
process.env.GAME_STREAM_HLS_BASE || "https://hls.5stack.gg",
15+
gameStreamDomain: `https://${process.env.GAME_STREAM_DOMAIN}`,
1716
authCookieDomain:
1817
process.env.AUTH_COOKIE_DOMAIN || `.${process.env.WEB_DOMAIN}`,
1918
demoParserUrl: process.env.DEMO_PARSER_URL || "http://demo-parser:8080",

src/configs/types/AppConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export type AppConfig = {
77
apiDomain: string;
88
relayDomain: string;
99
demosDomain: string;
10-
gameStreamHlsBase: string;
10+
gameStreamDomain: string;
1111
authCookieDomain: string;
1212
demoParserUrl: string;
1313
};

src/matches/game-streamer/game-streamer.service.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export class GameStreamerService {
307307

308308
const sessionToken = randomBytes(24).toString("hex");
309309

310-
const streamUrl = `${this.appConfig.gameStreamHlsBase}/${matchId}/`;
310+
const streamUrl = `${this.appConfig.gameStreamDomain}/${matchId}/`;
311311

312312
const bootIso = new Date().toISOString();
313313
const { insert_match_demo_sessions_one } = await this.hasura.mutation({
@@ -1215,7 +1215,7 @@ export class GameStreamerService {
12151215
matchId: string,
12161216
mode: "live" | "tv",
12171217
): Promise<string> {
1218-
const link = `${this.appConfig.gameStreamHlsBase}/${matchId}/`;
1218+
const link = `${this.appConfig.gameStreamDomain}/${matchId}/`;
12191219
const nowIso = new Date().toISOString();
12201220
const statusHistory = JSON.stringify([{ status: "booting", at: nowIso }]);
12211221

@@ -1561,7 +1561,7 @@ export class GameStreamerService {
15611561
object: {
15621562
match_id: matchId,
15631563
title: GAME_STREAMER_TITLE,
1564-
link: `${this.appConfig.gameStreamHlsBase}/${matchId}/`,
1564+
link: `${this.appConfig.gameStreamDomain}/${matchId}/`,
15651565
priority: 0,
15661566
is_game_streamer: true,
15671567
...setClause,
@@ -1697,6 +1697,17 @@ export class GameStreamerService {
16971697
{ name: "DISPLAY_SIZEW", value: "1920" },
16981698
{ name: "DISPLAY_SIZEH", value: "1080" },
16991699
{ name: "OPENHUD_AUTO_OVERLAY", value: "1" },
1700+
// Forward the configured public HLS host so the streamer
1701+
// can log/print correct watch URLs (otherwise the scripts
1702+
// fall back to a hardcoded hls.5stack.gg).
1703+
...(process.env.GAME_STREAM_DOMAIN
1704+
? [
1705+
{
1706+
name: "GAME_STREAM_DOMAIN",
1707+
value: process.env.GAME_STREAM_DOMAIN,
1708+
},
1709+
]
1710+
: []),
17001711
// Steam credentials inlined from the API's own config
17011712
// rather than mounting a `steam-secrets` K8s Secret —
17021713
// matches game-server-node.service.ts (line ~519). The

0 commit comments

Comments
 (0)