The ZegoEffects SDK provides video filters with different styles that can be used in a wide range of use cases, such as live video streaming, short videos, and more.
Before you begin to use the SDK's video filters in your project, make sure you complete the following steps:
The SDK provides video filters with the following styles:
In general, you can take the following steps to use a filter:
To turn on a filter, do the following:
Call the setFilter method, passing the absolute path of the corresponding filter to the path parameter.
Call the setFilterParam method to set the filter intensity.
The value range of the intensity property of ZegoEffectsFilterParam is [0, 100]. As this value gets larger, the filter effect gets more intense.
You can't superimpose the effects of different filters. Once you apply a new filter, the previous one (if any) will be overridden.
// Turn on a filter, passing in the absolute path of the corresponding filter.
mEffects.setFilter("/xxx/xxx/Night.bundle");
// Set the filter intensity. The value range is [0, 100].
ZegoEffectsFilterParam param = new ZegoEffectsFilterParam();
param.intensity = 100;
mEffects.setFilterParam(param);
To turn off the filter, call the setFilter method with the path parameter set to null.
// Turn off the filter.
mEffects.setFilter(null);
