Interface EffectManager

All Known Implementing Classes:
EffectManager.CppProxy

public interface EffectManager
  • Method Details

    • addErrorListener

      void addErrorListener​(@Nullable ErrorListener errorListener)
      Add callback to receive errors messages from Effect Player. Thread-safe. May be called from any thread
    • removeErrorListener

      void removeErrorListener​(@Nullable ErrorListener errorListener)
      Remove callback to receive errors messages from Effect Player. Thread-safe. May be called from any thread
    • addHintListener

      void addHintListener​(@Nullable HintListener hintListener)
      Add callback to receive user-visible messages from effects. You should display them on UI. Thread-safe. May be called from any thread
    • removeHintListener

      void removeHintListener​(@Nullable HintListener hintListener)
      Remove callback to receive user-visible messages from effects. Thread-safe. May be called from any thread
    • addEffectEventListener

      void addEffectEventListener​(@Nullable EffectEventListener effectEventListener)
      Add callback to receive events from effect. Thread-safe. May be called from any thread
    • removeEffectEventListener

      void removeEffectEventListener​(@Nullable EffectEventListener effectEventListener)
      Remove callback to receive events from effect. Thread-safe. May be called from any thread
    • addEffectActivatedListener

      void addEffectActivatedListener​(@Nullable EffectActivatedListener effectActivatedListener)
      Add callback to receive notifications on effect change. Thread-safe. May be called from any thread
    • removeEffectActivatedListener

      void removeEffectActivatedListener​(@Nullable EffectActivatedListener effectActivatedListener)
      Remove callback to receive notifications on effect change. Thread-safe. May be called from any thread
    • load

      @Nullable Effect load​(@NonNull java.lang.String url)
      load and activate effect sync MUST be called from the render thread
    • loadAsync

      @Nullable Effect loadAsync​(@NonNull java.lang.String url)
      load effect async, activate in the draw() call when it will be ready Thread-safe. May be called from any thread
    • unload

      void unload​(@Nullable Effect effect)
      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

      @Nullable Effect 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

      @NonNull static EffectInfo getEffectInfo​(@NonNull java.lang.String url)
      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