1. Install the video SDK
To use the Two-Way video, you'll need to install the Glance_iOSVideo SDK (instead of Glance_iOS) which is available for installation via Cocoapods or Manual integration.
2. Initialize the SDK
Use the same initialization from Screenshare, but this time, importing Glance_iOSVideo:
3. Enable camera permission
Add Privacy - Camera Usage Description to your Info.plist.
NOTE: You will need this before starting any video calls with your agent.
4. Start Two-Way video
Before you continue, you will need to define a Session Code. A Session Code is a 5-digit numerical code which will enable the agent to connect to your session.
Then, instead of calling startSession, you need to call startVideoCall, passing the Session Code that you defined earlier:
|_: String||The session that you'll need to send to your agent|
|delegate: GlanceVideoDefaultUIDelegate||Delegate for customizing UI|
|camera: String||Pass "front" or "back" to set direction of the camera|
|termsUrl: String||URL for your terms|
After that, you'll see the screen below, click Start Your Video:
Send the session code to your Agent and wait until they accept.
5. Testing the Agent
To confirm the integration is working, start the session and note the session key.
Now, to simulate the Agent, go to: https://www.glance.net/agentjoin/AgentJoin.aspx.
The agent will be asked to login to Glance.
Enter the Session Code and click Join Session:
After that, you'll be able to see your mobile device screen.