Avaya Client SDK

< Back to Package Overview

Working with Media Devices

This articles discusses basic concepts and features relating to working with devices. Media devices can be added or removed from the environment at any time, imposing requirements that must be understood and managed by your application.

The following articles are recommended to get you started:

Working with Audio Devices

You can use system API to list available devices and to set the selected device to be active.

Working with Video Devices

To check whether video camera is available or not, instantiate the CSVideoCapturerIOS object and use the hasVideoCameraAtPosition: method.

CSVideoCapturerIOS *videoCapturer = [[CSVideoCapturerIOS alloc] init];
bool hasBackCamera = 
    [videoCapturer hasVideoCameraAtPosition:CSVideoCameraPositionBack];
bool hasFrontCamera = 
    [videoCapturer hasVideoCameraAtPosition:CSVideoCameraPositionFront];

Start video capture from selected camera to set it to be active. Call the useVideoCameraAtPosition:completion: method of the CSVideoCapturerIOS object.

[videoCapturer useVideoCameraAtPosition:CSVideoCameraPositionFront
                             completion:nil];

// start local rendering
viewController.localVideoView.hidden = NO;