Expand description
§wavyzon-plugin
The plugin API of Wavyzon, and the data model every Wavyzon crate shares (tracks, failures, events, streams).
A plugin implements Plugin and, in Plugin::register, adds any of:
| Extension | Trait | Exposed as |
|---|---|---|
| Sources | Source (+ Playable, IsrcLookup, Recommender) | loadtracks prefixes and links, playback |
| Audio filters | FilterFactory → AudioFilter | filters.pluginFilters.<name> |
| Event listeners | EventListener | every player event |
| HTTP routes | [axum::Router] | /v1/plugins/<name>/… |
See docs/src/plugins.md in the repository for a full guide.
Re-exports§
pub use axum;pub use serde_json;
Structs§
- Event
- One event. Optional fields are omitted from JSON when unset.
- Failure
- Load
Result - Playlist
- Plugin
Context - What a plugin is given at startup.
- Plugin
Manifest - Static description of a plugin, shown in
GET /v1/infoandGET /v1/plugins. - Registry
- Everything plugins contribute.
- Stream
- An open audio stream.
- Track
- A playable (or mirrorable) recording.
Enums§
- EndReason
- Event
Type - Format
- How the bytes of a
Streamare encoded. - Load
Type - What a
loadtrackscall produced. - Plugin
Error - Severity
Constants§
- API_
VERSION - Version of this API. The node refuses plugins built for another major.
- CHANNELS
- Interleaved channels.
- FRAME_
SAMPLES - One 20 ms frame: 960 samples per channel, interleaved L/R.
- SAMPLE_
RATE - Sample rate of every frame handed to a filter.
Traits§
- Audio
Filter - A running filter instance. The player builds one instance per deck (so two
exist during a crossfade), and may call
FilterFactory::createonce more just to validate a configuration. - Event
Listener - Receives every player event of every session, including Wavyzon-specific events a Lavalink v4 client did not opt into. Runs on a dedicated task; slow listeners only delay themselves.
- Filter
Factory - Builds
AudioFilters from client JSON. - Isrc
Lookup - Playable
- A source that can stream audio.
- Plugin
- A Wavyzon plugin.
- Recommender
- Source
- Resolves searches, links and identifiers to tracks.