Swift
Overview
By default, the Vonage iOS SDK captures and renders audio exclusively for live video chat. To support features like Ringtones, MP3 playback, or Audio Mixing while using the SDK, you must implement a custom OTAudioDevice.
This sample creates a AudioDeviceRingtone class that allows you to:
- Pause the live video chat audio stream.
- Play a local audio file (Ringtone) using
AVAudioPlayer. - Resume the live video chat audio stream automatically when a call connects.
Custom audio driver
Learn how to use a custom audio driver to customize publisher and subscriber stream audio. You will use the custom audio driver when you want to start and stop the audio, and play your own audio file. When you want to do "anything" with audio, other than the SDK default behavior of live video chat, you would use custom audio drivers.
Available on:
Steps
1
Introduction2
Getting Started3
Creating a New Project4
Adding the Vonage Video SDK5
Setting Up Authentication6
Overview7
Create the Custom Audio Driver Class8
Implement the "Play Ringtone" Logic9
Implement the "Stop Ringtone" Logic10
Integrate with Vonage Video Manager11
Control audio via Session Events12
How It Works13
Conclusion