Interface: UseVisualizerResult
Defined in: packages/player/src/hooks/useVisualizer.ts:33
What useVisualizer returns.
Properties
active
readonly active: boolean;
Defined in: packages/player/src/hooks/useVisualizer.ts:60
Whether a subscription is currently live.
This is false while the app is not in the foreground or the device's
display is off (unless pauseWhenInactive was turned off) — a paused
visualizer is genuinely not subscribed, not merely ignored.
error
readonly error: PlayerError | undefined;
Defined in: packages/player/src/hooks/useVisualizer.ts:52
Why the subscription failed, or undefined while it is healthy.
code: 'unsupported' means the linked libmpv has no PCM tap — it predates
the rn-media forks that add it (Android v1.1.9-rnmedia.3+, iOS
v0.7.2-rnmedia.3+). There is no permission failure to handle: tapping mpv
needs none, on either platform.
frame
readonly frame: VisualizerFrame | undefined;
Defined in: packages/player/src/hooks/useVisualizer.ts:43
The newest frame, or undefined before the first one arrives (and after
an error).
Remarks
The same VisualizerFrame object is never mutated in place — each frame is
a fresh snapshot — so it is safe to hold, compare by identity, and pass to
a memoised child.