Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Removing PreferSFU option since this is now handled with the stream s…
Browse files Browse the repository at this point in the history
…election option. Fixing browser behaviour when multiple streamers detected (previous failed tests).
  • Loading branch information
mcottontensor committed Oct 25, 2023
1 parent 2ce5302 commit bbcfe8a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
12 changes: 0 additions & 12 deletions Frontend/library/src/Config/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down
12 changes: 1 addition & 11 deletions Frontend/library/src/WebRtcPlayer/WebRtcPlayerController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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();
}
Expand Down
4 changes: 0 additions & 4 deletions Frontend/ui-library/src/Config/ConfigUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bbcfe8a

Please # to comment.