Skip to content

Commit cb7f186

Browse files
pblazejclaude
andcommitted
fix(data-tracks): adapt to split UniFFI signal handler API
Upstream livekit-uniffi replaced the generic `handleSignalResponse` with specific per-message handlers: - handleSfuRequestResponse (for RequestResponse) - handleSfuPublishResponse (for PublishDataTrackResponse) - handleSfuParticipantUpdate (for ParticipantUpdate) - handleSubscriberHandles (for DataTrackSubscriberHandles) Each handler returns UnsupportedType for messages it doesn't handle, so the simplest integration is to call all four with the raw bytes and let them filter internally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d300be7 commit cb7f186

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Sources/LiveKit/Core/Room+SignalClientDelegate.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,13 @@ extension Room: SignalClientDelegate {
407407
}
408408

409409
func signalClient(_: SignalClient, didReceiveRawResponse data: Data) async {
410-
try? localDataTrackManager?.handleSignalResponse(res: data)
410+
// Each manager has specific handler methods per message type.
411+
// Try them all — they return UnsupportedType for messages they don't handle.
412+
try? localDataTrackManager?.handleSfuRequestResponse(res: data)
413+
try? localDataTrackManager?.handleSfuPublishResponse(res: data)
414+
try? remoteDataTrackManager?.handleSubscriberHandles(res: data)
411415
if let identity = localParticipant.identity?.stringValue {
412-
try? remoteDataTrackManager?.handleSignalResponse(
416+
try? remoteDataTrackManager?.handleSfuParticipantUpdate(
413417
res: data,
414418
localParticipantIdentity: identity
415419
)

0 commit comments

Comments
 (0)