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 also 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, you'll 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, which you'll need to send to your agent to enable them to connect to your session.
Then, instead of calling startSession, you need to call startVideoCall, passing the Session Code that you defined earlier:
|The session that you'll need to send to your agent
|Delegate for customizing UI
|Pass "front" or "back" to set direction of the camera
|URL for your terms
After that, you'll see the screen below, tap Start Your Video:
Send the session to your Agent and wait until he/she accepts.
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.
If not logged in already, the agent will be asked to login, request credentials from Glance if you still don't have them:
Now, enter the Session Code and tap Join Session:
After that, you'll be able to see your mobile device screen.
Congratulations! Now you have a video call with your Agent.