CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

AgoraUIKit 0.0.5

AgoraUIKit 0.0.5

Maintained by Jonathan Fotland.



  • By
  • Jonathan Fotland

AgoraUIKit

UI Kit for the Agora Video iOS SDK

How to use

AgoraUIKit is distributed through CocoaPods

  1. Import the Pod

Add the following to your Podfile:

pod 'AgoraUIKit'
  1. Create a video call view controller
let agoraView = AgoraVideoViewController(appID: "YOUR_APP_ID", token: "YOUR_TOKEN_OR_NIL", channel: channelName)
  1. Show the video view
navigationController?.pushViewController(agoraView, animated: true)

Global preferences

Global Agora preferences can be set using the AgoraPreferences singleton. You can use this to set your app ID and token, or to set the video configuration, e.g:

AgoraPreferences.shared.setVideoConfiguration(size: CGSize(width: 960, height: 720), frameRate: .fps30)

You can also access the AgoraRtcEngineKit object with AgoraPreferences.shared.getAgoraEngine(). The full list of available functions can be found in the Agora API.

Customizing AgoraVideoViewController

Several methods are provided to customize the call screen. You can hide non-essential buttons:

agoraView.hideSwitchCamera()
agoraView.hideVideoMute()
agoraView.hideAudioMute()

You can also change the maximum number of video streams to show:

agoraView.setMaxStreams(streams: 2)

And customize where the controls are located:

agoraView.controlLocation = .top
agoraView.controlOffset = 40

For a full list of available functions, see the AgoraVideoViewController API.

For advanced users, AgoraVideoViewController is fully subclassable, to allow you to fine-tune its appearance and behavior for your app.

Support