Agora SDK API
This section lists the APIs related to using extensions with the Agora SDK.
Java
Objective-C
FaceUnity key-value overview
The key corresponds to the name of the FaceUnity API, and the value corresponds to the parameters of the FaceUnity API.
In this section, if the value is the same as the parameters of the FaceUnity API, the link leads to the FaceUnity documentation; if the value is different from the parameters of the FaceUnity API, the link leads to subsequent sections on this page.
Method keys
Method keys refer to the keys you pass in when calling the setExtensionProperty
/setExtensionPropertyWithVendor
method of the Agora SDK.
Initialization
Method keys |
Description |
fuSetup |
Initializes the extension and authenticates the user. This key must be executed before any other keys; otherwise, a crash can occur. |
fuLoadAIModelFromPackage |
Preloads AI capabilities. |
fuReleaseAIModel |
Frees up resources occupied by AI capabilities. |
Prop package loading
Destruction
Method keys |
Description |
fuDestroyItem |
Destroys a specified item. |
fuDestroyAllItems |
Destroys all loaded items and releases all occupied resources. |
fuOnDeviceLost |
Resets the system's GL state. Use this key when the OpenGL context is released/destroyed by external resources. |
fuDestroyLibData |
Frees up the memory allocated to the face tracking module after calling fuSetup . |
System functions
Algorithm functions
Callback keys
Callback keys refer to the keys returned in the onEvent
callback of the Agora SDK.
Method key description
fuSetup
Its value contains the following parameters:
Value parameters |
Description |
authdata |
String. The path to the certificate file. |
fuLoadAIModelFromPackage
Its value contains the following parameters:
Value parameters |
Description |
data |
String. The path of the AI capability model file ai_xxx.bundle . Such model files are located in the assets/AI_Model directory of the resource package. |
type |
Int. The AI capability type corresponding to the bundle file. Possible values are listed in enum FUAITYPE. |
fuCreateItemFromPackage
Its value contains the following parameters:
Value parameters |
Description |
data |
String. The path to the prop package you want to load. A prop package usually has the suffix .bundle . |
fuLoadTongueModel
Its value contains the following parameters:
Value parameters |
Description |
data |
String. The path of the tongue model data file tongue.bundle . |
fuItemSetParam
Its value contains the following parameters:
Value parameters |
Description |
obj_handle |
String. The path of the prop package passed in when calling fuCreateItemFromPackage. |
name`` |
String. The name of the variable to set in the prop package. |
value |
Object. The variable value to be set. |
For details on the variable names and values in the prop package, refer to the FaceUnity documentation.
fuDestroyItem
Its value contains the following parameters:
Value parameters |
Description |
item |
String. The path of the prop package passed in when calling fuCreateItemFromPackage. |
fuBindItems
Its value contains the following parameters:
Value parameters |
Description |
obj_handle |
String. The path of the target item. |
p_items |
String Array. The paths to the resource items you want to bind. |
fuUnbindItems
Its value contains the following parameters:
Value parameters |
Description |
obj_handle |
String. The path of the target item. |
p_items |
String Array. The paths to the resource items you want to unbind. |
fuIsTracking
Its value contains the following parameters:
Value parameters |
Description |
enable |
Bool. Whether to get the number of faces being tracked. If set to true , you can receive the fuIsTracking callback. |
fuHumanProcessorGetNumResults
Its value contains the following parameters:
Value parameters |
Description |
enable |
Bool. Whether to get the number of human bodies tracked by the HumanProcessor algorithm module. If set to true , you can receive the fuHumanProcessorGetNumResults callback. |
fuHandDetectorGetResultNumHands
Its value contains the following parameters:
Value parameters |
Description |
enable |
Bool. Whether to get the number of gestures tracked by the HandGesture algorithm module. If set to true , you can receive the fuHandDetectorGetResultNumHands callback. |
Callback key description
fuIsTracking
Its value contains the following parameters:
Value parameters |
Description |
faces |
Int. The number of faces being tracked. |
fuHumanProcessorGetNumResults
Its value contains the following parameters:
Value parameters |
Description |
people |
Int. The number of bodies being tracked. |
fuHandDetectorGetResultNumHands
Its value contains the following parameters:
Value parameters |
Description |
hands |
Int. The number of gestures being tracked. |
fuDestroyLibData
Its value contains no parameters.