Meeting SDK for iOS API Reference
Loading...
Searching...
No Matches
MobileRTCFaceROIInfo Class Reference

Per-frame face ROI metadata accessor. More...

#include <MobileRTCFaceROIInfo.h>

Inherits NSObject.

Instance Methods

(NSUInteger) - getFaceCount
 Number of valid face ROIs available for the current frame.
(nullable MobileRTCFaceROI *) - getFaceROIByIndex:
 Get a face ROI by zero-based index.

Detailed Description

Per-frame face ROI metadata accessor.

Face ROI data is generated on the sender's device and embedded in the video stream. The receiver SDK only surfaces what the sender provides; no face detection is performed locally. Individual participants may deliver frames with zero detected faces — for example, when their device does not support face detection or detection is not currently active.

Reachable from two raw video delegate callbacks:

Note
Face ROI is only supported on video streams.

Definition at line 44 of file MobileRTCFaceROIInfo.h.

Method Documentation

◆ getFaceCount

- (NSUInteger) getFaceCount

Number of valid face ROIs available for the current frame.

When multiple faces are present, the ROIs are ordered by the area of the detected region in descending order — index 0 corresponds to the largest (typically closest or most prominent) face.

Returns
The face count in [0, 50]. Zero indicates no face was detected, the sender has not enabled detection, or face metadata was not delivered for this frame.

References getFaceCount.

Referenced by getFaceCount.

◆ getFaceROIByIndex:

- (nullable MobileRTCFaceROI *) getFaceROIByIndex: (NSUInteger) index

Get a face ROI by zero-based index.

Faces are sorted by detected region area in descending order; index 0 is always the largest face in the frame.

Parameters
indexThe zero-based index, must be < -getFaceCount.
Returns
The face ROI on success, or nil if index is out of range.