How It Works
All of the code that controls audio playback and recording in the Vonage Video iOS SDK is open sourced as a sample application [link]. If no audio device is set prior to the first instantiation of OTSession, the default driver internal to the SDK will be used. Using the sample audio device is the best way to debug runtime audio issues encountered during app development.
Common Issues
Interruption and Route Handling
Apart from debugging, another reason to adopt an external audio driver is to override default behaviors for handling audio events on the end user's device. Incoming phone calls, Siri activations, app switches, and device plugins are some of the events that will interrupt an active audio session working with Vonage Video. The default implementation in the SDK attempts to handle all of these situations gracefully, however in some cases it may be prudent to provide alternative event handling behavior.
Corrupted Audio
In some situations, audio may become corrupted by misconfigured sessions or interfering other audio classes, for example MPMoviePlayerController or AVAudioPlayer. The best approach for diagnosing and solving audio integrity issues is to make sure that compatible sample rates and formats are used, and to ensure that the audio session for the app is being properly managed between contending resources.
Sample Formats and Rates
The notes in the README for the external audio device sample application have the most up to date information on known working (and breaking) configurations.
Articles in this section
- OpenTok iOS SDK crash: -[OTSubscriber renderer:didReceiveFrame:]_block_invoke
- Updating iOS SDK to latest version
- Managing Audio Sessions in iOS with Vonage Video API
- What are the supported Video Dimensions, Aspect Ratios, and Rendering on Mobile SDKs?
- Handling Reconnection and Network Migration on Mobile Devices
- Where can I see the sample code for Vonage Video iOS SDK?
- What devices does Vonage Video iOS SDK support?
- iOS 14 Requesting Permission in Relayed Sessions
- Streaming Video has Letterbox Effect