Initialize FaceAI

FaceAI analyzes video streams within an ongoing EnableX video session. To get started with analysis, bind the FaceAI object with the room in which the video session is in-progress.


Analyzes video streams during a live video session.

Method: EnxFaceAI.init(connectedRoomInfo, stream, callback)


  • connectedRoomInfo : JSON Object. Pass the Response-JSON returned as Callback of EnxRtc.joinRoom() or EnxRoom.connect() method.
  • stream : The Stream Object which will be analyzed. You may analyze Local Stream Object or Remote Stream Object (Stream Reference may be bound in Active Talkers List)
  • callback : Callback to know if the room is enabled for FaceAI Analysis an that the client point is connected to an active session

Sample Code

localStream = EnxRtc.joinRoom(token, config, (response, error) => {
if (error && error != null) { }
if (response && response != null) {
const FaceAI = new EnxFaceAI(); // Construct the Object
FaceAI.init(response, localStream, function (event) {
// event.result == 0 - All Ok to process