Skip to content

Commit 76a1c09

Browse files
committed
Emit ReadyForRoomEventRequest to FFI from Room.cs#ConnectAsync
Replicate livekit/node-sdks#666
1 parent 65e5fc4 commit 76a1c09

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

LivekitRtc/Room.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,17 @@ public async Task ConnectAsync(
646646

647647
ConnectionState = Proto.ConnectionState.ConnConnected;
648648
DispatchEvent(() => ConnectionStateChanged?.Invoke(this, ConnectionState));
649+
650+
// Release the FFI room event gate after our listener and local state are ready.
651+
var readyRequest = new FfiRequest
652+
{
653+
ReadyForRoomEvent = new ReadyForRoomEventRequest
654+
{
655+
RoomHandle = _roomHandle!.HandleId,
656+
},
657+
};
658+
FfiClient.Instance.SendRequest(readyRequest);
659+
649660
DispatchEvent(() => Connected?.Invoke(this, EventArgs.Empty));
650661
}
651662

0 commit comments

Comments
 (0)