From 572f15522f28320f671980a5892ec2cf10fd0d8e Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 5 Mar 2021 10:40:11 +0000 Subject: [PATCH] use a constant --- src/Livestream.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Livestream.ts b/src/Livestream.ts index cd8cdea179..2389132762 100644 --- a/src/Livestream.ts +++ b/src/Livestream.ts @@ -23,6 +23,9 @@ export function getConfigLivestreamUrl() { return SdkConfig.get()["audioStreamUrl"]; } +// Dummy rtmp URL used to signal that we want a special audio-only stream +const AUDIOSTREAM_DUMMY_URL = 'rtmp://audiostream.dummy/'; + async function createLiveStream(roomId: string) { const openIdToken = await MatrixClientPeg.get().getOpenIdToken(); @@ -47,6 +50,6 @@ export async function startJitsiAudioLivestream(widgetMessaging: ClientWidgetApi const streamId = await createLiveStream(roomId); await widgetMessaging.transport.send(ElementWidgetActions.StartLiveStream, { - rtmpStreamKey: 'rtmp://audiostream.dummy/' + streamId, + rtmpStreamKey: AUDIOSTREAM_DUMMY_URL + streamId, }); }