From 339aa088cc6c74e3647614a018a5a68a64ae6ad9 Mon Sep 17 00:00:00 2001 From: Matthew Cotton Date: Tue, 31 Oct 2023 09:17:26 +1100 Subject: [PATCH] Catching case where we're sanitizing a streamer id that is numeric. Updating docs to remove PreferSFU (SFU is just selected as a streamer now). --- Frontend/Docs/Settings Panel.md | 1 - SignallingWebServer/cirrus.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Frontend/Docs/Settings Panel.md b/Frontend/Docs/Settings Panel.md index d636f76a..54fd26e1 100644 --- a/Frontend/Docs/Settings Panel.md +++ b/Frontend/Docs/Settings Panel.md @@ -19,7 +19,6 @@ This page will be updated with new features and commands as they become availabl | **Browser send offer** | The browser will start the WebRTC handshake instead of the Unreal Engine application. This is an advanced setting for users customising the frontend. Primarily for backwards compatibility for 4.x versions of the engine. | | **Use microphone** | Will start receiving audio input from your microphone and transmit it to the Unreal Engine. | | **Start video muted** | Muted audio when the stream starts. | -| **Prefer SFU** | Will attempt to use the Selective Forwarding Unit (SFU), if you have one running. | | **Is quality controller?** | Makes the encoder of the Pixel Streaming Plugin use the current browser connection to determine the bandwidth available, and therefore the quality of the stream encoding. **See notes below** | | **Force mono audio** | Force the browser to request mono audio in the SDP. | | **Force TURN** | Will attempt to connect exclusively via the TURN server. Will not work without an active TURN server. | diff --git a/SignallingWebServer/cirrus.js b/SignallingWebServer/cirrus.js index 79d49298..fd2c0fa6 100644 --- a/SignallingWebServer/cirrus.js +++ b/SignallingWebServer/cirrus.js @@ -546,7 +546,8 @@ function sanitizeStreamerId(id) { for (let [streamerId, streamer] of streamers) { const idMatchRegex = /^(.*?)(\d*)$/; const [, baseId, postfix] = streamerId.match(idMatchRegex); - if (baseId != id) { + // if the id is numeric then base id will be empty and we need to compare with the postfix + if ((baseId != '' && baseId != id) || (baseId == '' && postfix != id)) { continue; } const numPostfix = Number(postfix);