pub enum Event {
Show 15 variants
ShuttingDown,
ServerAddresses {
addrs: Vec<SocketAddr>,
relays: Vec<String>,
lookup: Option<String>,
},
PlaybackShare {
handle: PlaybackHandle,
max_bitrate: Option<u64>,
},
PlaylistChanged {
id: String,
revision: u64,
},
PlaylistGone {
id: String,
},
PinsChanged,
LikedChanged,
SubtitleTimingChanged {
id: MediaId,
track: u32,
timing: SubtitleTiming,
},
DownloadChanged {
id: String,
state: DownloadState,
},
LibrariesChanged,
PlaybackEnded {
handle: PlaybackHandle,
error: Error,
},
ProfileRemoved {
user: String,
},
PinChanged {
user: String,
required: bool,
},
WatchChanged {
items: Vec<MediaId>,
},
Unknown,
}Expand description
Something the server tells the client without being asked, on the events stream.
Variants§
ShuttingDown
The server is stopping; the connection will close.
ServerAddresses
Where this server can be reached, pushed to a connection as soon as it is signed in, and again whenever the list changes. Each one is the whole list: it replaces what was told before. Never sent to a connection that is not signed in.
Fields
addrs: Vec<SocketAddr>The addresses network.announce tells, with their port, as
text: 192.168.1.10:4433 or [2001:db8::1]:4433.
Playback handle’s share of the server’s WAN uplink changed:
another WAN playback started or ended, or the budget
changed. A playback in Quality::Auto re-plans with
ChangeQuality at its position (the SDK’s managed playback does
it by itself); max_bitrate is the new cap, None none. Sent only
for a move of 15% or more, a few seconds after the last start or
end. One of another quality may ignore it.
PlaylistChanged
A playlist the user sees was made or changed: its entries,
name, kinds or sharing. Read it again if it is shown. Only to a
client that listed spoolframe:playlists.
PlaylistGone
A playlist the user saw is gone to them: deleted, or no longer shared with them. Close it if it is shown.
PinsChanged
The user’s Pinned, or its notes, changed on another device or by
another user’s change: ListPlaylists again.
LikedChanged
The user liked or unliked a track, on any device: a device
that downloaded Liked asks what it holds now
(MusicDownloadChanges). Only to the user’s own connections that
listed spoolframe:music-downloads.
SubtitleTimingChanged
Item id’s subtitle track is timed anew: synced, its
sync done or set aside, or its offset changed, by anyone. What it
is served with changed: a player showing it reads it again (a
ReadSubtitle in progress answers SubtitleChanged), with no
restart. Only to a client that listed spoolframe:subtitle-sync,
on a connection that asked for the item’s Tracks or plays it.
DownloadChanged
Download id’s state moved: waiting, then converting
(told once per percent or every 2 s), writing, and ready or
failed. Only to the connections of the user whose it is, that
listed spoolframe:downloads.
LibrariesChanged
Experimental (federation): the libraries changed: a paired
server came online or went offline, or shared or stopped sharing a
library. Libraries again. Only to a client that named the
feature.
PlaybackEnded
Experimental (federation): playback handle, of a paired
server’s item, ended other than by its client’s stop: stopped by an
admin, idle past the limit, its session or its grant ended, or, on
the user’s own server playing it on, ended where it plays from.
error is what the client’s next use of it is told
(PlaybackStopped: do not start it again). Only for a play
token’s session’s playbacks, and those played through the user’s
own server.
ProfileRemoved
The profile of local user user (a user id, as WhoAmI names
it) is gone from this device: the user was disabled or deleted, or
an admin forgot this device for them. Their sessions here end with
it; the next request in one is Unauthenticated. Leave the profile,
and offer to sign in again only if the user is not deleted. Only to
that user’s connections, and sent only to a connection where the
spoolframe:october-2026 feature is on (both sides named it).
PinChanged
Local user user’s PIN changed: set, changed or removed, by them on
another device or by an admin. required is whether they have a PIN
now. A device that has their profile unlocked locks it again where
the PIN is asked for; one that kept the old PIN to check offline
forgets it. Only to that user’s connections, not the one that made
the change, and sent only to a connection where the
spoolframe:october-2026 feature is on (both sides named it).
WatchChanged
The user’s watch state of items changed on another connection:
marked watched or unwatched (a season’s or a show’s id marks its
episodes), hidden from or put back in Continue watching, synced
from offline, or played into progress, to watched, or stopped (not
each progress report). Read again what shows them (Home, an item’s page). Only
to that user’s other connections, and sent only to a connection
where the spoolframe:october-2026 feature is on (both sides
named it).
Unknown
An event type this build does not know; ignore it.