-
-
Save zontan/898c86d72d85cc88c9ffa0b81a00214f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension AgoraVideoViewController: AgoraRtcEngineDelegate { | |
func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinedOfUid uid: UInt, elapsed: Int) { | |
remoteUserIDs.append(uid) | |
collectionView.reloadData() | |
} | |
func rtcEngine(_ engine: AgoraRtcEngineKit, didOfflineOfUid uid: UInt, reason: AgoraUserOfflineReason) { | |
if let index = remoteUserIDs.firstIndex(where: { $0 == uid }) { | |
remoteUserIDs.remove(at: index) | |
collectionView.reloadData() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment