Fixed all underlying issues with the "Answer" call.

This commit is contained in:
2026-04-06 16:08:37 -04:00
parent aa7f6597c4
commit 7d8755ca71
6 changed files with 134 additions and 38 deletions

View File

@@ -49,15 +49,11 @@ public static class RtcEndpoints
// Store a new SDP answer for the specified channel call.
app.MapPost("/api/rtc/answer", async (RtcOffer request, RtcCallService rtcCallService) =>
{
Console.WriteLine($"RTC answer received for channel {request.ChannelId} from {request.Username}");
await rtcCallService.WriteAnswerAsync(request.ChannelId, request.SessionDescription);
//DON'T FUCKING HARDCODE STRINGS INTO API REQUESTS
// await rtcCallService.WriteAnswerAsync(
// request.ChannelId,
// new RtcSessionDescription
// {
// Type = "answer",
// Sdp = request.Sdp
// });
Console.WriteLine($"Broadcasting rtc_answer_updated for {request.ChannelId}");
RtcNotificationService.BroadcastToChannel(new RtcNotificationMessage
{