- An Agora developer account (see How To Get Started with Agora)
- Xcode 11.0 or later
- iOS device with iOS 13.0 or later (as this project uses SF Symbols)
- A basic understanding of iOS development
platform :ios, ‘9.0’ target ‘Project-Name’ do pod ‘AgoraRtcEngine_iOS’, ‘~> 3.1.0’ end
pod init, and open the .xcworkspace file to get started.
Create the App
userVideoLookup, which will keep track of the broadcasters/streamers.
userVideoLookup is set or updated,
reorganiseVideos is called to organize all of the streamed video feeds into a grid formation. Of course, a grid formation is not required, but if you want to implement the same thing, the
reorganiseVideos method is provided in the example project. Here’s a link to it:
The hostButton has a target set as
toggleBroadcast. This method is found right at the bottom of the gist. As you can see, it toggles the value of
.audience, and then sets the client role using
setClientRole. When the local client starts streaming, additional buttons should appear (for audio and video settings) but those buttons are displayed only after the client role has been changed, which is signaled by the delegate callback.
AgoraRtcEngineDelegate, so we should add that protocol to our class, along with some callback methods.
isHiddenproperty of the button container is set to false or true, respectively.
Want to build Real-Time Engagement apps?
If you have questions, please call us at 408-879-5885. We’d be happy to help you add voice or video chat, streaming, and messaging into your apps.
Stay inspired by accessing all RTE2020 session recordings. Gain access to innovative Real-Time-Engagement content and start innovating today.