Skip to content

Commit

Permalink
Update ServerConfig page for IceServers.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed May 3, 2020
1 parent 088c180 commit 95055e0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
<br />
<span asp-validation-for="AppSettingsInput.UseHsts" class="text-danger"></span>
</div>

<div class="form-group">
<label asp-for="AppSettingsInput.UseWebRtc"></label>
<br />
Expand All @@ -201,6 +202,11 @@
<span asp-validation-for="AppSettingsInput.UseWebRtc" class="text-danger"></span>
</div>

<div class="form-group">
<label asp-for="AppSettingsInput.IceServers"></label>
<br />
<span class="text-muted">Must be edited in appsettings.json.</span>
</div>

<h4>Connection Strings</h4>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private async Task SaveAppSettings()
}

var settingsJson = JsonSerializer.Deserialize<IDictionary<string, object>>(await System.IO.File.ReadAllTextAsync(savePath));

AppSettingsInput.IceServers = Configuration.GetSection("ApplicationOptions:IceServers").Get<IceServerModel[]>();
settingsJson["ApplicationOptions"] = AppSettingsInput;
settingsJson["ConnectionStrings"] = ConnectionStrings;

Expand All @@ -154,6 +154,9 @@ public class AppSettingsModel
[Display(Name = "Enable Windows Event Log")]
public bool EnableWindowsEventLog { get; set; }

[Display(Name = "Ice Servers")]
public IceServerModel[] IceServers { get; set; }

[Display(Name = "Known Proxies")]
public string[] KnownProxies { get; set; }

Expand Down
12 changes: 10 additions & 2 deletions Server/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,16 @@
"DefaultPrompt": "~>",
"EnableWindowsEventLog": false,
"IceServers": [
{ "Url": "stun: stun.l.google.com:19302" },
{ "Url": "stun: stun4.l.google.com:19302" }
{
"Url": "stun: stun.l.google.com:19302",
"TurnPassword": null,
"TurnUsername": null
},
{
"Url": "stun: stun4.l.google.com:19302",
"TurnPassword": null,
"TurnUsername": null
}
],
"KnownProxies": [],
"MaxConcurrentUpdates": 10,
Expand Down
1 change: 0 additions & 1 deletion Server/wwwroot/scripts/RemoteControl/UI.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Server/wwwroot/scripts/RemoteControl/UI.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Server/wwwroot/scripts/RemoteControl/UI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ export function UpdateCursor(imageBytes: Uint8Array, hotSpotX: number, hotSpotY:
var base64 = ConvertUInt8ArrayToBase64(imageBytes);
ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${hotSpotX} ${hotSpotY}, default`;
}
console.log("Cursor updated: " + ScreenViewer.style.cursor);
}

export function UpdateDisplays(selectedDisplay: string, displayNames: string[]) {
Expand Down

0 comments on commit 95055e0

Please sign in to comment.