RtccDefaultVideoSource Class Reference

Inherits from NSObject
Conforms to RtccVideoSource
Declared in RtccDefaultVideoSource.h


This is a default implementation of a video source for the RtccCall videoOut. This source allows the application to switch between front and back camera.

The application must set this instance as the videoOut.source in order for video capture to work.

The video captured is rendered in a subview of the renderView. The renderView must be set (and retained) by the application.

Warning: Do not subclass this class. Implements the RtccVideoSource protocol to create your own source.


The source delegate should be set by the application in order to be informed of the size of the video that is captured and resize the render view that is used.

@property (nonatomic, weak) id<RtccDefaultVideoSourceDelegate> delegate
Declared In



This property must be set by application. Upon setting it, a subview is added that contains the camera render layer.

This subview is added with contraints to keep it the same size as the renderView.

The layer content is set to fit the subview. As such, it will always preserve the video ratio of the capture.

@property (nonatomic, weak) UIView *renderView
Declared In



The video size that is captured. When this size changes, the delegate is notified through the videoSourceSizeChanged: method.

@property (nonatomic, readonly) CGSize videoSize
Declared In



This property informs the application about the camera’s orientation (videoSource_front or videoSource_back) that is set. Upon camera instantiation, the value is set to videoSource_front.

@property (nonatomic) videoSource_t currentCamera
Declared In