Swift
Setting Up Authentication
In order to connect to a Vonage Video session, the client will need access to some authentication credentials — an application ID, session ID, and token. In a production application, these credentials should be generated by a Server SDKs, but to speed things up we will hard code the values for now:
- Start by copying the following code block and adding it to your
VonageVideoManager.swiftfile:
// Replace with your Vonage Video APP ID
let kAppId = ""
// Replace with your generated session ID
let kSessionId = ""
// Replace with your generated token
let kToken = ""
Add these lines right at the start of the class VonageVideoManager declaration.
- Adjust the code by hard coding the values for the
kAppId,kSessionIdandkToken. You can obtain them by following the instructions below:
- Sign up for or Log into your account.
- In the left-side menu of the dashboard, click
Applicationsand select a previous application or create a new one to view the Application ID.
- Make sure that Video is activated
- Head over to the The Video API Playground. Either enter the Application ID or find it in the dropdown. You can leave the default values for the other options. Click "Create".
- Your Session ID and Token will be created.
Important: You can continue to get the session ID and token values from your Account during testing and development, but before you go into production you must set up a server.
For more information on sessions, tokens, and servers, check out Video API Technical Details.
Basic video capture
Learn how set up a basic video capturer using the Vonage Video SDK.
Available on:
Steps
1
Introduction2
Getting Started3
Creating a New Project4
Adding the Vonage Video SDK5
Setting Up Authentication6
Initializing capture7
Capturing video frames8
Summary9
Conclusion