diff --git a/Frontend/library/src/Config/Config.ts b/Frontend/library/src/Config/Config.ts index 8f2c8e7d..b4892b6a 100644 --- a/Frontend/library/src/Config/Config.ts +++ b/Frontend/library/src/Config/Config.ts @@ -23,7 +23,6 @@ export class Flags { static FakeMouseWithTouches = 'FakeMouseWithTouches' as const; static IsQualityController = 'ControlsQuality' as const; static MatchViewportResolution = 'MatchViewportRes' as const; - static PreferSFU = 'preferSFU' as const; static StartVideoMuted = 'StartVideoMuted' as const; static SuppressBrowserKeys = 'SuppressBrowserKeys' as const; static UseMic = 'UseMic' as const; @@ -315,17 +314,6 @@ export class Config { ) ); - this.flags.set( - Flags.PreferSFU, - new SettingFlag( - Flags.PreferSFU, - 'Prefer SFU', - 'Try to connect to the SFU instead of P2P.', - false, - useUrlParams - ) - ); - this.flags.set( Flags.IsQualityController, new SettingFlag( diff --git a/Frontend/library/src/WebRtcPlayer/WebRtcPlayerController.ts b/Frontend/library/src/WebRtcPlayer/WebRtcPlayerController.ts index b693ad94..390d701e 100644 --- a/Frontend/library/src/WebRtcPlayer/WebRtcPlayerController.ts +++ b/Frontend/library/src/WebRtcPlayer/WebRtcPlayerController.ts @@ -1384,12 +1384,6 @@ export class WebRtcPlayerController { if (messageStreamerList.ids.length == 1) { // If there's only a single streamer, subscribe to it regardless of what is in the URL autoSelectedStreamerId = messageStreamerList.ids[0]; - } else if ( - this.config.isFlagEnabled(Flags.PreferSFU) && - messageStreamerList.ids.includes('SFU') - ) { - // If the SFU toggle is on and there's an SFU connected, subscribe to it regardless of what is in the URL - autoSelectedStreamerId = 'SFU'; } else if ( urlParams.has(OptionParameters.StreamerId) && messageStreamerList.ids.includes( @@ -1398,10 +1392,6 @@ export class WebRtcPlayerController { ) { // If there's a streamer ID in the URL and a streamer with this ID is connected, set it as the selected streamer autoSelectedStreamerId = urlParams.get(OptionParameters.StreamerId); - } else if (messageStreamerList.ids.length > 0 && this.config.isFlagEnabled(Flags.WaitForStreamer)) { - // we're waiting for a streamer and there are multiple connected but none were auto selected - // select the first - autoSelectedStreamerId = messageStreamerList.ids[0]; } if (autoSelectedStreamerId !== null) { this.config.setOptionSettingValue( @@ -1410,7 +1400,7 @@ export class WebRtcPlayerController { ); } else { // no auto selected streamer - if (this.config.isFlagEnabled(Flags.WaitForStreamer)) { + if (messageStreamerList.ids.length == 0 && this.config.isFlagEnabled(Flags.WaitForStreamer)) { this.closeSignalingServer(); this.startAutoJoinTimer(); } diff --git a/Frontend/ui-library/src/Config/ConfigUI.ts b/Frontend/ui-library/src/Config/ConfigUI.ts index f4ea65bd..e28c1aff 100644 --- a/Frontend/ui-library/src/Config/ConfigUI.ts +++ b/Frontend/ui-library/src/Config/ConfigUI.ts @@ -174,10 +174,6 @@ export class ConfigUI { psSettingsSection, this.flagsUi.get(Flags.StartVideoMuted) ); - this.addSettingFlag( - psSettingsSection, - this.flagsUi.get(Flags.PreferSFU) - ); this.addSettingFlag( psSettingsSection, this.flagsUi.get(Flags.IsQualityController)