Skip to content

Commit 78b0bee

Browse files
committed
WIP: Drop track reference for now
1 parent 8376284 commit 78b0bee

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Sources/LiveKitComponents/UI/Participant/ParticipantView.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,16 @@ public struct ParticipantView: View {
2929

3030
public var body: some View {
3131
ZStack(alignment: .topLeading) {
32-
let cameraReference = TrackReference(participant: _participant.avatarWorker ?? _participant, source: .camera)
32+
// let cameraReference = TrackReference(participant: _participant.avatarWorker ?? _participant, source: .camera)
3333
let microphoneReference = TrackReference(participant: _participant.avatarWorker ?? _participant, source: .microphone)
3434

35-
if let cameraTrack = cameraReference.resolve(), !cameraTrack.isMuted {
36-
VideoTrackView(trackReference: cameraReference)
35+
if let cameraTrack = _participant.firstCameraVideoTrack {
36+
SwiftUIVideoView(cameraTrack)
3737
} else if let microphoneTrack = microphoneReference.resolve(), !microphoneTrack.isMuted,
3838
let audioTrack = microphoneTrack.track as? AudioTrack
3939
{
4040
BarAudioVisualizer(audioTrack: audioTrack, agentState: _participant.agentState).id(_participant.agentState)
41-
} else {
42-
_ui.noTrackView()
4341
}
44-
4542
if _showInformation {
4643
ParticipantInformationView()
4744
.padding(5)
@@ -51,6 +48,7 @@ public struct ParticipantView: View {
5148
}
5249
}
5350
.animation(.easeOut, value: _participant.trackPublications)
51+
.transition(.identity)
5452
.frame(maxWidth: .infinity, maxHeight: .infinity)
5553
}
5654
}

0 commit comments

Comments
 (0)