Closed ArthurHenriqueVieira closed 10 months ago
try making sure that the local user is added to the set on the main thread, sounds like that kind of issue.
I've made sure it's running on the main thread, no use.
Also, if I add this code:
public override func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinChannel channel: String, withUid uid: UInt, elapsed: Int) {
var users = allUsers
users.insert(uid)
userUpdate.send(users)
}
Not only it doesn't appear when joining the channel created, when another user joins he doesn't appear also.
the bizarre thing is, even if I hardcode the uid, it doesn't appear:
ScrollView(.vertical, showsIndicators: false) {
VStack(spacing: .zero) {
ForEach(Array([UInt(9)]), id: \.self) { uid in
AgoraVideoCanvasView(manager: dependencies.watchPartyScene.getManager(), uid: uid)
.aspectRatio(contentMode: .fit)
.cornerRadius(2.ds.quants)
.clipShape(Circle())
.allowsHitTesting(false)
}
}
.padding(4.ds.quants)
}
There's a bit too much unknown here, here's some debugging pointers though
dependencies.watchPartyScene.getManager()
function returning the same manager?If you're still having trouble, dial the implementation back to the examples in SwiftUIRtc, then add pieces from your code back in.
Here's further docs on SwiftUIRtc: https://agoraio-community.github.io/SwiftUIRtc/documentation/swiftuirtc/
Also try using the debug view hierarchy tool in Xcode.
We have many comprehensive examples using SwiftUI here: https://github.com/AgoraIO/video-sdk-samples-ios
going to close this due to inactivity
Hello!
I've been having this problem where when I start a channel, my camera icon is not appearing, only when another user joins in the channel, for some reason my user camera appears:
my code:
and I add users and remove them using the delegates: