Skip to content

Vonage/vonage-video-ios-sdk-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Vonage iOS SDK Samples

This repository is meant to provide some examples for you to better understand the features of the Vonage iOS SDK. The sample applications are meant to be used with the latest version of the Vonage iOS SDK. Feel free to copy and modify the source code herein for your own projects. Please consider sharing your modifications with us, especially if they might benefit other developers using the Vonage iOS SDK. See the License for more information.

Table Of Contents

  1. Quick Start
  2. What's Inside
  3. Obtaining Vonage Credentials
  4. Contributing
  5. Help
  6. Further reading

Quick Start

  1. Get values for your Vonage App ID, session ID, and token. See Obtaining Vonage Credentials for important information.

  2. Add Vonage Client SDK Video iOS swift package by adding the https://github.com/vonage/vonage-video-client-sdk-swift.git repository as a Swift Package Dependency.

    To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL.

  3. In the VonageVideoManager.swift file, replace the following empty strings with the corresponding API key, session ID, and token values:

    // *** Fill the following variables using your own Project info  ***
    // *** https://developer.vonage.com/en/video/getting-started     ***
    // Replace with your Vonage application Id
    let kAppId = ""
    // Replace with your generated session Id
    let kSessionId = ""
    // Replace with your generated token
    let kToken = ""
  4. Use Xcode to build and run the app on an iOS simulator or device.

What's Inside

You can find various sample apps written in SwiftUI & UIKit that demonstrate the Vonage iOS SDK features:

SwiftUI

Basic Video Chat -- This basic application demonstrates a short path to getting started with the Vonage iOS SDK.

Basic Video Renderer -- This project demonstrates how to use a custom video renderer in Swift to display a black-and-white version of a OTPublisher video stream using the Vonage Video iOS SDK

Basic Video Capturer -- This project demonstrates how to make modifications to the video capturer in your Vonage application. The app uses a custom video capturer to publish random pixels (white noise). This example should be run on the iOS device.

Client Observability -- This application demonstrates how to access publisher and subscriber observability features, including sender-side statistics.

UIKit

Basic Video Chat -- This basic application demonstrates a short path to getting started with the Vonage iOS SDK.

Custom Audio Driver -- This project demonstrate how to use an external audio source with the Vonage SDK. This project utilizes CoreAudio and the AUGraph API to create an audio session suitable for voice and video communications.

Custom Video Driver -- This project provides classes that implement the OTVideoCapture and OTVideoRender interfaces of the core Publisher and Subscriber classes. Using these modules, we can see the basic workflow of sourcing video frames from the device camera in and out of Vonage, via the OTPublisherKit and OTSubscriberKit interfaces.

Live Photo Capture -- This project demonstrates how the AVFoundation media capture APIs can be used to simultaneously stream video and capture high-resolution photos from the same camera.

Screen Sharing -- This project demonstrates how to use a custom video capturer to publish a stream that uses a UIView (instead of a camera) as the video source.

Simple Multiparty -- This project demonstrates how to use the Vonage iOS SDK for a multi-party call. The application publishes audio/video from an iOS device and can connect to multiple subscribers. However it shows only one subscriber video at a time due to CPU limitations on iOS devices.

Picture In Picture -- This project demonstrates how to implement Picture In Picture on a subcribed video stream.

FrameMetadata -- This project shows how to set metadata (limited to 32 bytes) to a video frame, as well as how to read metadata from a video frame.

Obtaining Vonage Credentials

Step by step tutorial

To use the Vonage platform you need a session ID, token, and APP ID. You can get these values by creating a project in your Vonage Dashboard, using the project Tools. For production deployment, you must generate the session ID and token values using one of the Vonage Server SDKs.

Obtaining OpenTok Credentials

To use the OpenTok platform you need a session ID, token, and API key. You can get these values by creating a project on your OpenTok Account Page and scrolling down to the Project Tools section of your Project page. For production deployment, you must generate the session ID and token values using one of the OpenTok Server SDKs.

Development and Contributing

Interested in contributing? We ❤️ pull requests! See the Contribution guidelines.

Getting Help

We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:

Further Reading

About

Sample applications using the Vonage iOS SDK in Swift

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7