Enx_UIKit_iOS is an iOS Video UI Kit designed to help developers quickly build customized audio and video call interfaces using the EnableX Video SDK. It simplifies the development process by handling the underlying complexities and managing all necessary methods and functions internally. With Enx_UIKit_iOS, developers can create feature-rich, tailored Video UIs without having to dive deep into API documentation or manage intricate implementation details.
For API documentation, see the library's official documentation in Xcode or on the Web.
To use the Enx_UIKit_iOS library in a SwiftPM project,
add the following line to the dependencies in your Package.swift file:
.package(url: "https://github.com/EnableX/Enx_UIKit_iOS.git", from: "2.1.12"),Go to your class, where you wanted to implement the Video/Audio/Chat feature, import the libraray
import Enx_UIKit_iOSCreate the objects for required SDK classes
var enxView : EnxVideoViewClass!This is the object of EnxVideoViewClass class. Its will give a UIView.
How to use Enx_UIKit_iOS SDK?
You need to initiate Enx_UIKit_iOS class as code given below -
enxView = EnxVideoViewClass(token: token, delegate: self, embedUrl: nil)
self.view.addSubview(enxView)
senxView.frame = self.view.bounds
enxView.autoresizingMask = [.flexibleHeight,.flexibleWidth]Function Parameters
tokenis must be a valid EnableX session token as string.delegateis instance of class where you receive events notifications.embedUrlthis is an optional, avoid for now.
Callbacks
-
On getting connected with EnableX Room, following callbacks are received:
func connect(toRoom enxRoom: EnxRoom?, roomMetadata: [String : Any]?) -
On failing to connect with Enablex Room, following callback are received:
func connectError(reason: [Any]?) -
On being disconnected from EnableX Room, following callbacks are received:
func disconnect(response: [Any]?)
Note: Developers must implement the above mentioned Callbacks as they are mandatory to handle. All other Callbacks, given in Developer Documentation; are optional and may be implemented if needed.