pub enum Event {
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,
},
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.
Unknown
An event type this build does not know; ignore it.