Agora Java API Reference for Android
Classes | Public Member Functions | List of all members
io.agora.rtc2.IVideoEffectObject Interface Reference

Provides methods to manage and configure video effects, such as beauty, style makeup, and filter. More...

Classes

enum  VIDEO_EFFECT_ACTION
 Actions that can be performed on video effect nodes. More...
 
enum  VIDEO_EFFECT_NODE_ID
 Types of applicable video effect nodes. More...
 

Public Member Functions

int addOrUpdateVideoEffect (int nodeId, String templateName)
 Adds or updates the video effect for the specified node ID and template. More...
 
int removeVideoEffect (int nodeId)
 Removes the video effect with the specified node ID. More...
 
int performVideoEffectAction (int nodeId, VIDEO_EFFECT_ACTION actionId)
 Performs an action on the specified video effect node. More...
 
int setVideoEffectFloatParam (String option, String key, float value)
 Sets the float parameter for video effects. More...
 
int setVideoEffectIntParam (String option, String key, int value)
 Sets an integer parameter for video effects. More...
 
int setVideoEffectBoolParam (String option, String key, boolean value)
 Sets the boolean parameter for video effects. More...
 
float getVideoEffectFloatParam (String option, String key)
 Retrieves float type parameters in video effects. More...
 
int getVideoEffectIntParam (String option, String key)
 Retrieves integer parameters in video effects. More...
 
boolean getVideoEffectBoolParam (String option, String key)
 Gets the boolean parameter in video effects. More...
 

Detailed Description

Provides methods to manage and configure video effects, such as beauty, style makeup, and filter.

Since
v4.6.0

Member Function Documentation

◆ addOrUpdateVideoEffect()

int io.agora.rtc2.IVideoEffectObject.addOrUpdateVideoEffect ( int  nodeId,
String  templateName 
)

Adds or updates the video effect for the specified node ID and template.

Since
v4.6.0
Note
Priority rules:
Parameters
nodeIdThe unique identifier or combination of identifiers for the video effect node. See VIDEO_EFFECT_NODE_ID.
templateNameThe name of the effect template. If set to null or an empty string, the SDK loads the default parameter configuration from the resource package.
Returns
  • 0: Success.
  • < 0: Failure. See the error codes in AgoraBaseConstants.

◆ removeVideoEffect()

int io.agora.rtc2.IVideoEffectObject.removeVideoEffect ( int  nodeId)

Removes the video effect with the specified node ID.

Since
v4.6.0
Parameters
nodeIdThe unique identifier of the video effect node to remove.
Returns
  • 0: Success.
  • < 0: Failure.

◆ performVideoEffectAction()

int io.agora.rtc2.IVideoEffectObject.performVideoEffectAction ( int  nodeId,
VIDEO_EFFECT_ACTION  actionId 
)

Performs an action on the specified video effect node.

Since
v4.6.0
Parameters
nodeIdThe unique identifier of the video effect node.
actionIdThe action to perform on the video effect node. See VIDEO_EFFECT_ACTION.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setVideoEffectFloatParam()

int io.agora.rtc2.IVideoEffectObject.setVideoEffectFloatParam ( String  option,
String  key,
float  value 
)

Sets the float parameter for video effects.

Since
v4.6.0
Parameters
optionThe identifier of the parameter category.
keyThe key name of the parameter.
valueThe float parameter value to set.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setVideoEffectIntParam()

int io.agora.rtc2.IVideoEffectObject.setVideoEffectIntParam ( String  option,
String  key,
int  value 
)

Sets an integer parameter for video effects.

Since
v4.6.0
Parameters
optionThe identifier of the parameter category.
keyThe key name of the parameter.
valueThe integer value to set.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setVideoEffectBoolParam()

int io.agora.rtc2.IVideoEffectObject.setVideoEffectBoolParam ( String  option,
String  key,
boolean  value 
)

Sets the boolean parameter for video effects.

Since
v4.6.0
Parameters
optionThe identifier of the parameter category.
keyThe key name of the parameter.
valueThe boolean value to set.
  • true: Set to enabled.
  • false: Set to disabled.
Returns
  • 0: Success.
  • < 0: Failure.

◆ getVideoEffectFloatParam()

float io.agora.rtc2.IVideoEffectObject.getVideoEffectFloatParam ( String  option,
String  key 
)

Retrieves float type parameters in video effects.

Since
v4.6.0

Used to retrieve the value of a float type parameter corresponding to the specified option and key in video effects.

Parameters
optionThe identifier of the parameter category.
keyThe key name of the parameter.
Returns
  • If the method call succeeds, returns the current float value.
  • If the method call fails, returns 0.0f.

◆ getVideoEffectIntParam()

int io.agora.rtc2.IVideoEffectObject.getVideoEffectIntParam ( String  option,
String  key 
)

Retrieves integer parameters in video effects.

Since
v4.6.0

Used to retrieve integer-type parameters in video effects.

Parameters
optionThe identifier of the parameter category.
keyThe key name of the parameter.
Returns
  • If the method call succeeds, returns the current parameter value.
  • If the method call fails, returns 0.

◆ getVideoEffectBoolParam()

boolean io.agora.rtc2.IVideoEffectObject.getVideoEffectBoolParam ( String  option,
String  key 
)

Gets the boolean parameter in video effects.

Since
v4.6.0
Parameters
optionThe identifier of the parameter category.
keyThe key name of the parameter.
Returns
  • true: The parameter is enabled.
  • false: The parameter is not enabled or does not exist.
io.agora.rtc2.IVideoEffectObject.VIDEO_EFFECT_NODE_ID.STYLE_MAKEUP
STYLE_MAKEUP
Definition: IVideoEffectObject.java:23
io.agora.rtc2.IVideoEffectObject.addOrUpdateVideoEffect
int addOrUpdateVideoEffect(int nodeId, String templateName)
Adds or updates the video effect for the specified node ID and template.
io.agora.rtc2.IVideoEffectObject.VIDEO_EFFECT_NODE_ID.FILTER
FILTER
Definition: IVideoEffectObject.java:27
io.agora.rtc2.IVideoEffectObject.removeVideoEffect
int removeVideoEffect(int nodeId)
Removes the video effect with the specified node ID.