Skip to content
Rymflux Documentation
Esc
navigateopen⌘Jpreview
On this page

Tauri event surface

Tauri event surface

Events are emitted from Rust backend via app_handle.emit_all(). Frontend subscribes with listen().

Event list

Event Payload When
playback_state_changed PlaybackState Playback status, position, volume, or track changes
track_changed TrackStub | null Track auto-advances or changes
queue_updated QueueState After every queue mutation (full state, not diff)
search_result SearchResultBatch Partial results as they arrive per-plugin
search_done { query_id: string } All plugins responded or timed out
search_error { query_id: string, plugin_id: string, error: string } Per-plugin search failure
plugin_status_changed { plugin_id: string, status: PluginStatus } Plugin enters/exits Ready, Crashed, or Disabled
library_updated { kind: "saved" | "removed", track_id: string } Library item saved or removed
platform_ready void All services initialized, UI can render
playback_error { error: string, source?: PlaySource } Stream URL fetch failure, decode failure, etc.

Payload types

interface PlaybackState {
  status: "idle" | "loading" | "playing" | "paused" | "seeking" | "error";
  position_ms: number;
  duration_ms: number | null;
  volume: number;               // 0.0–1.0
  track: TrackStub | null;
}

interface QueueState {
  items: TrackStub[];
  current_index: number | null;
}

interface SearchResultBatch {
  query_id: string;             // frontend correlates responses to queries
  plugin_id: string;
  results: SearchResult[];
}

// Subset surfaced to frontend — see plugin-runtime.md for full 8-state enum
type PluginStatus = "ready" | "busy" | "crashed" | "disabled";

References

  • ADR-005 (Tauri events for inter-component communication)
  • ADR-007 (search manager events)
  • ADR-010 (queue events)

Was this page helpful?