Package com.banuba.sdk.effect_player
Interface EffectManager
- All Known Implementing Classes:
EffectManager.CppProxy
public interface EffectManager
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EffectManager.CppProxy
-
Method Summary
Modifier and Type Method Description void
addEffectActivatedListener(EffectActivatedListener effectActivatedListener)
Add callback to receive notifications on effect change.void
addEffectEventListener(EffectEventListener effectEventListener)
Add callback to receive events from effect.void
addErrorListener(ErrorListener errorListener)
Add callback to receive errors messages from Effect Player.void
addHintListener(HintListener hintListener)
Add callback to receive user-visible messages from effects.void
changeCacheQuota(int size, int count)
size in Mb, effects count Thread-safe.Effect
current()
get active Thread-safe.void
forceCacheReload()
Forces cache reload on the next load/load_async call Thread-safe.static EffectInfo
getEffectInfo(java.lang.String url)
Get effect info.Effect
load(java.lang.String url)
load and activate effect sync MUST be called from the render threadEffect
loadAsync(java.lang.String url)
load effect async, activate in the draw() call when it will be ready Thread-safe.void
removeEffectActivatedListener(EffectActivatedListener effectActivatedListener)
Remove callback to receive notifications on effect change.void
removeEffectEventListener(EffectEventListener effectEventListener)
Remove callback to receive events from effect.void
removeErrorListener(ErrorListener errorListener)
Remove callback to receive errors messages from Effect Player.void
removeHintListener(HintListener hintListener)
Remove callback to receive user-visible messages from effects.void
setEffectSize(int fxWidth, int fxHeight)
Changes effect player render size, should be called on render thread.void
setEffectVolume(float volume)
Set effect audio volume.void
unload(Effect effect)
Unload effect from cache.
-
Method Details
-
addErrorListener
Add callback to receive errors messages from Effect Player. Thread-safe. May be called from any thread -
removeErrorListener
Remove callback to receive errors messages from Effect Player. Thread-safe. May be called from any thread -
addHintListener
Add callback to receive user-visible messages from effects. You should display them on UI. Thread-safe. May be called from any thread -
removeHintListener
Remove callback to receive user-visible messages from effects. Thread-safe. May be called from any thread -
addEffectEventListener
Add callback to receive events from effect. Thread-safe. May be called from any thread -
removeEffectEventListener
Remove callback to receive events from effect. Thread-safe. May be called from any thread -
addEffectActivatedListener
Add callback to receive notifications on effect change. Thread-safe. May be called from any thread -
removeEffectActivatedListener
Remove callback to receive notifications on effect change. Thread-safe. May be called from any thread -
load
load and activate effect sync MUST be called from the render thread -
loadAsync
load effect async, activate in the draw() call when it will be ready Thread-safe. May be called from any thread -
unload
Unload effect from cache. if no currently loading effect - works the same way as load(""); launches empty effect loading. MUST be called from the render thread -
current
get active Thread-safe. May be called from any thread -
changeCacheQuota
void changeCacheQuota(int size, int count)size in Mb, effects count Thread-safe. May be called from any thread -
forceCacheReload
void forceCacheReload()Forces cache reload on the next load/load_async call Thread-safe. May be called from any thread -
setEffectVolume
void setEffectVolume(float volume)Set effect audio volume. Thread-safe. May be called from any thread- Parameters:
volume
- A value in range `[0, 1]`, where `1` means maximum volume.
-
setEffectSize
void setEffectSize(int fxWidth, int fxHeight)Changes effect player render size, should be called on render thread. MUST be called from the render thread -
getEffectInfo
Get effect info. May be called before loading effect "render type" and "recognizer features" fields won't be filled Thread-safe. May be called from any thread
-