addOrUpdateVideoEffect

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

int addOrUpdateVideoEffect(int nodeId, String templateName);
Since:
Available since v4.6.0.

Attention: Priority rules:
  • The STYLE_MAKEUP node takes precedence over the FILTER parameter.
  • To apply the FILTER parameter, you must first remove the STYLE_MAKEUP node:
    removeVideoEffect(VIDEO_EFFECT_NODE_ID::STYLE_MAKEUP);
    addOrUpdateVideoEffect(VIDEO_EFFECT_NODE_ID::FILTER, "template name");

Restrictions

None.

Parameters

nodeId
The unique identifier or combination of identifiers for the video effect node. See VIDEO_EFFECT_NODE_ID.
templateName
The 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.