-
-
Save zontan/0ab069d5685928e52ecfa36749c03c35 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
import AgoraUIKit | |
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
let userName = liveUsers[indexPath.row] | |
let agoraAudienceView = AgoraVideoViewController(appID: "YOUR_AGORA_APP_ID", token: nil, channel: userName) | |
agoraAudienceView.setMaxStreams(streams: 1) | |
agoraAudienceView.setIsAudience() | |
agoraAudienceView.hideVideoMute() // Hide buttons we don't need | |
agoraAudienceView.hideAudioMute() | |
agoraAudienceView.hideSwitchCamera() | |
agoraAudienceView.controlOffset = 60 // Make sure the controls are above the tab bar | |
navigationController?.pushViewController(agoraAudienceView, animated: true) | |
tableView.deselectRow(at: indexPath, animated: true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment