This isn't FULLY functional, but it's what I've made thus far... I'm still working on a Ice Disconnect somewhere at least for me - welcome to test.
This commit is contained in:
@@ -111,6 +111,19 @@ public class ServerAPI
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
return JsonSerializer.Deserialize<RtcDescription>(json);
|
||||
}
|
||||
|
||||
public static async Task<List<string>> GetRtcParticipantsAsync(string? channelId)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(channelId))
|
||||
return new List<string>();
|
||||
|
||||
HttpResponseMessage response = await client.GetAsync($"api/rtc/participants/{channelId}");
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
|
||||
return JsonSerializer.Deserialize<List<string>>(json) ?? new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
public class RtcDescription
|
||||
|
||||
Reference in New Issue
Block a user