making ice candidates write to DB properly
This commit is contained in:
@@ -479,8 +479,21 @@ public partial class MainPage : ContentPage
|
||||
|
||||
public async void WriteIceCandidate(string json)
|
||||
{
|
||||
IceCandidate? candidate = JsonSerializer.Deserialize<IceCandidate>(json);
|
||||
await ServerAPI.PostIceCandidateAsync(candidate);
|
||||
try
|
||||
{
|
||||
IceCandidate? candidate = JsonSerializer.Deserialize<IceCandidate>(json);
|
||||
DBIceCandidate DBCandidate = new DBIceCandidate
|
||||
{
|
||||
ChannelId = _currentChannelId,
|
||||
Username = _username,
|
||||
Candidate = candidate
|
||||
};
|
||||
await ServerAPI.PostIceCandidateAsync(DBCandidate);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SafeSendRawToWebView("WriteIceCandidate failed: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public async void IceCandidateCallback(string json)
|
||||
|
||||
Reference in New Issue
Block a user