Initialize FaceAI

FaceAI analyzes the video streams within an ongoing video session. To get started with analysis, bind the FaceAI Object with the room in which the video session is taking place.

Method

To start analysis of a stream:

  • Class: EnxFaceAI
  • Method: public void initFaceAI(Activity activity, JSONObject roomMeta, EnxRoom room, EnxStream stream, EnxFaceAIObserver enxFaceAIObserver)

Parameters

  • activity : Current class instance or activity instance.
  • roomMeta : An NSDictionary object. It contains information about the connected room.
  • room : Instance of the connected room using the EnxRTCAndroid native SDK.
  • stream : The local stream object to analyze.
  • enxFaceAIObserver : To return the callback.

Sample Code

/*
After successful room connecction,
initiate EnxFaceAI on onRoomConnected Callback method
*/
EnxFaceAI enxFaceAI = new EnxFaceAI();
enxFaceAI.initFaceAI(this, roomMetaJsonObject, room, localStream, this);