IrisRtcMediaTrack Class Reference

Inherits from NSObject
Declared in IrisRtcStream.h

Overview

The IrisRtcMediaTrack class manages the video tracks which are created during the stream creation. When the stream API creates a stream i.e. when it opens the camera, the local preview will be associated with a media track.

This media track will be passed to the application via a callback onLocalStream(). When the application receives this callback, it can create IrisRtcRenderer and add the renderer to this track.

Warning: A renderer is a CPU intensive class and creating multiple renderers can cause significant drain in battery. In case of multiple participants, the renderer functionality should be used on need basis. for e.g show a limited number of renderers or participants on main screen.

Adding a renderer

– addRenderer:delegate:

Add a renderer to the media track.

- (void)addRenderer:(IrisRtcRenderer *)renderer delegate:(id<IrisRtcRendererDelegate>)delegate

Parameters

renderer

The renderer object created using IrisRtcRenderer API.

delegate

The delegate object for the track. The delegate will receive delegate messages during execution of the operation when output is generated and upon completion or failure of the operation.

Discussion

Add a renderer to the media track.

Declared In

IrisRtcStream.h

Removing a renderer

– removeRenderer:

Removes a renderer from the media track.

- (void)removeRenderer:(IrisRtcRenderer *)renderer

Parameters

renderer

The renderer object created using IrisRtcRenderer API.

Discussion

Removes a renderer from the media track.

Declared In

IrisRtcStream.h