updated RtcOffer to reflect proper communication needs and added todo

This commit is contained in:
2026-04-03 16:24:13 -04:00
parent f24a255d12
commit cf70b82024
3 changed files with 11 additions and 8 deletions

View File

@@ -41,8 +41,9 @@ public sealed class RtcCallService
/// </summary>
/// <param name="channelId">The channel the offer belongs to.</param>
/// <param name="username">The user creating the offer.</param>
/// <param name="type">The RtcSession Type. </param>
/// <param name="sdp">The SDP offer payload.</param>
public async Task WriteOfferAsync(string channelId, string username, string sdp)
public async Task WriteOfferAsync(string channelId, string username, RtcSessionDescription sessionDescription)
{
var activeCalls = await _db.Select<RtcActiveCall>("rtc_active_calls");
var activeCall = activeCalls.FirstOrDefault(x => x.ChannelId == channelId && x.IsActive);
@@ -55,8 +56,8 @@ public sealed class RtcCallService
OfferUser = username,
Offer = new RtcSessionDescription
{
Type = "offer",
Sdp = sdp
Type = sessionDescription.Type,
Sdp = sessionDescription.Sdp
},
Answer = null,
CreatedAt = DateTime.UtcNow,
@@ -70,8 +71,8 @@ public sealed class RtcCallService
activeCall.OfferUser = username;
activeCall.Offer = new RtcSessionDescription
{
Type = "offer",
Sdp = sdp
Type = sessionDescription.Type,
Sdp = sessionDescription.Sdp
};
activeCall.UpdatedAt = DateTime.UtcNow;