pub enum PlayerStatusEvent {
Show 18 variants
PositionUpdate {
position: f64,
duration: f64,
},
StateChanged {
state: String,
media_id: Option<String>,
},
MediaLoaded {
duration: f64,
},
PlaybackEnded,
Buffering {
percent: u8,
},
Error {
message: String,
recoverable: bool,
},
VolumeChanged {
volume: f32,
muted: bool,
},
SleepTimerChanged {
mode: SleepTimerMode,
remaining_seconds: u32,
},
SleepTimerExpired,
ShowNextEpisodePopup {
current_episode: MediaItem,
next_episode: MediaItem,
countdown_seconds: u32,
auto_advance: bool,
},
CountdownTick {
remaining_seconds: u32,
},
QueueChanged {
items: Vec<MediaItem>,
current_index: Option<usize>,
shuffle: bool,
repeat: RepeatMode,
has_next: bool,
has_previous: bool,
},
SessionChanged {
session: MediaSessionType,
},
SessionsUpdated {
sessions: Vec<SessionInfo>,
},
PlaybackModeChanged {
mode: String,
session_id: Option<String>,
},
RemoteDisconnectRequested,
ControlCommand {
action: String,
position: Option<f64>,
},
WebviewAudioLoad {
url: String,
media_id: Option<String>,
position: f64,
autoplay: bool,
},
}Expand description
Events emitted by the player backend to the frontend via Tauri events.
These are distinct from PlayerEvent in state.rs, which handles internal
state machine transitions.
TRACES: UR-005, UR-019, UR-023, UR-026 | DR-001, DR-028, DR-047
Variants§
PositionUpdate
Playback position updated (emitted periodically during playback)
StateChanged
Player state changed
Fields
MediaLoaded
Media has finished loading and is ready to play
PlaybackEnded
Playback has ended naturally (reached end of media)
Buffering
Buffering state changed
Error
An error occurred during playback
VolumeChanged
Volume changed
SleepTimerChanged
Sleep timer state changed
Fields
mode: SleepTimerModeSleep timer mode
SleepTimerExpired
Time-based sleep timer expired: playback must stop. The backend stops its own (MPV/ExoPlayer) playback, but HTML5 video on Linux plays in the webview outside the backend’s control — the frontend pauses it on this event.
ShowNextEpisodePopup
Show next episode popup with countdown
Fields
CountdownTick
Countdown tick (emitted every second during autoplay countdown)
QueueChanged
Queue changed (items added, removed, reordered, or playback mode changed)
Fields
repeat: RepeatModeCurrent repeat mode
SessionChanged
Media session changed (activity context changed: Audio/Movie/TvShow/Idle)
Fields
session: MediaSessionTypeCurrent session state
SessionsUpdated
Remote sessions updated (for cast/remote control UI)
Fields
sessions: Vec<SessionInfo>All active controllable sessions from Jellyfin
PlaybackModeChanged
The authoritative playback mode changed in the Rust backend.
The Rust PlaybackModeManager is the single source of truth for which
device playback commands route to (local vs a remote session). The
frontend keeps a mirror store for the UI; without this event that mirror
drifts out of sync (e.g. a mode transition happens inside a transfer or a
local stop that the frontend never learns about), and controls then route
to the wrong device — the classic “it keeps playing on the remote” bug.
The frontend reconciles its store to this payload whenever it fires.
Fields
RemoteDisconnectRequested
The user asked to disconnect from the remote session and resume locally.
Emitted when the lockscreen Stop button is pressed while casting. The frontend owns the two-step remote->local transfer (it must reload the media item locally), so the native side only signals intent here.
ControlCommand
Backend-originated control command targeting the active frontend player adapter (the HTML5
Fields
WebviewAudioLoad
Ask the frontend webview <audio> element to load and play a stream.
Emitted by WebviewAudioBackend on platforms with no native audio
backend (e.g. Windows): audio-only playback is rendered by an <audio>
element in the webview, mirroring how all video already renders through
the webview <video>. The element then reports its state/position back
through the player_report_* commands, so the Rust controller stays the
single source of truth. Subsequent play/pause/seek/stop reach the element
via ControlCommand.
Trait Implementations§
Source§impl Clone for PlayerStatusEvent
impl Clone for PlayerStatusEvent
Source§fn clone(&self) -> PlayerStatusEvent
fn clone(&self) -> PlayerStatusEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlayerStatusEvent
impl Debug for PlayerStatusEvent
Source§impl<'de> Deserialize<'de> for PlayerStatusEvent
impl<'de> Deserialize<'de> for PlayerStatusEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Event for PlayerStatusEvent
impl Event for PlayerStatusEvent
Source§const NAME: &'static str = "player-status-event"
const NAME: &'static str = "player-status-event"
Event derive macro.§fn listen<F, R, H>(handle: &H, handler: F) -> u32where
R: Runtime,
H: Listener<R> + Manager<R>,
F: Fn(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
fn listen<F, R, H>(handle: &H, handler: F) -> u32where
R: Runtime,
H: Listener<R> + Manager<R>,
F: Fn(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
§fn listen_any<F, R, H>(handle: &H, handler: F) -> u32where
R: Runtime,
H: Listener<R> + Manager<R>,
F: Fn(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
fn listen_any<F, R, H>(handle: &H, handler: F) -> u32where
R: Runtime,
H: Listener<R> + Manager<R>,
F: Fn(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
§fn once<F, R, H>(handle: &H, handler: F) -> u32where
R: Runtime,
H: Listener<R> + Manager<R>,
F: FnOnce(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
fn once<F, R, H>(handle: &H, handler: F) -> u32where
R: Runtime,
H: Listener<R> + Manager<R>,
F: FnOnce(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
§fn once_any<F, R, H>(handle: &H, handler: F) -> u32where
R: Runtime,
H: Listener<R> + Manager<R>,
F: FnOnce(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
fn once_any<F, R, H>(handle: &H, handler: F) -> u32where
R: Runtime,
H: Listener<R> + Manager<R>,
F: FnOnce(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
Source§impl NamedType for PlayerStatusEvent
impl NamedType for PlayerStatusEvent
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl Serialize for PlayerStatusEvent
impl Serialize for PlayerStatusEvent
Source§impl Type for PlayerStatusEvent
impl Type for PlayerStatusEvent
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.impl Flatten for PlayerStatusEvent
Auto Trait Implementations§
impl Freeze for PlayerStatusEvent
impl RefUnwindSafe for PlayerStatusEvent
impl Send for PlayerStatusEvent
impl Sync for PlayerStatusEvent
impl Unpin for PlayerStatusEvent
impl UnsafeUnpin for PlayerStatusEvent
impl UnwindSafe for PlayerStatusEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<T> FunctionArg for Twhere
T: Type,
impl<T> FunctionArg for Twhere
T: Type,
§fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
DataType]. Read more