#[non_exhaustive]pub struct StateSnapshot {
pub playback: PlaybackState,
pub episode: Option<EpisodeRef>,
pub position_secs: f64,
pub seek_target_secs: Option<f64>,
pub duration_secs: Option<f64>,
pub duration_approximate: bool,
pub seekable: bool,
pub source: Option<Source>,
pub downloads: Vec<DownloadProgress>,
pub favourites: Vec<String>,
pub spectrum: Option<Spectrum>,
pub error: Option<ErrorObject>,
}Expand description
The complete player state.
Every event carries one of these in full; the protocol defines no deltas, so a client that discards everything it has seen can still render from the next snapshot alone.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.playback: PlaybackState§episode: Option<EpisodeRef>§position_secs: f64The position of the audio actually being produced. Never reset or left stale by a seek, and never advanced past what is audible.
seek_target_secs: Option<f64>The target of the outstanding seek, and null when no seek is outstanding. At
most one seek is outstanding at a time; a later seek supersedes an earlier one.
duration_secs: Option<f64>§duration_approximate: boolTrue while duration_secs comes from the feed rather than from decoding.
seekable: bool§source: Option<Source>§downloads: Vec<DownloadProgress>§favourites: Vec<String>Every episode the listener has marked a favourite, by episode identifier.
spectrum: Option<Spectrum>The spectrum of the audio being played.
Absent when nothing is loaded, when playback is paused or stopped, and while a seek is in flight, so a client can tell “no audio to analyse” from “silence in the audio”. A client that ignores it is unaffected by its presence.
error: Option<ErrorObject>