pub struct PlayItemRequest {Show 13 fields
pub id: String,
pub title: String,
pub stream_url: String,
pub video_codec: String,
pub needs_transcoding: bool,
pub transport: Option<Transport>,
pub artist: Option<String>,
pub primary_image_tag: Option<String>,
pub server_id: Option<String>,
pub duration_seconds: Option<f64>,
pub item_type: Option<String>,
pub series_id: Option<String>,
pub subtitles: Vec<SubtitleTrack>,
}Expand description
Request to play a single video item
Simplified to video playback only. Audio playback uses player_play_tracks to avoid Tauri Android serialization issues with complex objects.
Fields§
§id: String§title: String§stream_url: String§video_codec: StringVideo codec (e.g., “h264”, “hevc”) for video media
needs_transcoding: boolWhether the video requires server-side transcoding
transport: Option<Transport>How this item’s stream is fetched, as the backend decided it.
Carried on the queue item so a later seek/reload does not have to guess.
None for items queued by a path that never negotiated (audio tracks,
direct URLs) and for anything queued before this field existed, where the
caller falls back to needs_transcoding — every transcode this app
requests is HLS (DR-140), so that fallback is exact rather than a guess.
TRACES: UR-003, UR-004, UR-079 | DR-225, DR-230
artist: Option<String>Optional now-playing metadata. Used by the background-audio handoff so the lockscreen/miniplayer show the item (title/subtitle/artwork). Defaulted so existing video-only callers need not send them.
primary_image_tag: Option<String>§server_id: Option<String>§duration_seconds: Option<f64>Total media duration (seconds). Threaded through the background-audio handoff so the lockscreen MediaSession advertises a real duration — a zero-duration session renders no scrubber, even with ACTION_SEEK_TO set.
item_type: Option<String>Item type (e.g. “Episode”, “Movie”, “Audio”). Carried through the background-audio handoff so an episode played as audio-only is still recognised as an episode by autoplay (UR-040) and advances to the next one.
series_id: Option<String>Series ID for TV episodes. Needed alongside item_type so the backend can
look up the next episode when a background-audio track ends.
subtitles: Vec<SubtitleTrack>Subtitle tracks to sideload, with URLs the frontend has already resolved.
Only the native backends use these: on Android they become the
MediaItem.SubtitleConfigurations ExoPlayer renders. The HTML5 path
builds its own <track> children instead and ignores this list.
Order is the contract. player_set_subtitle_track(n) reaches
JellyTauPlayer.setSubtitleTrack(n), which indexes into ExoPlayer’s
text track groups — i.e. the position of the sideloaded configuration,
not the Jellyfin stream index (which is kept on each entry for the UI’s
benefit). So n must be a position in this very array, and the array
must not be reordered or filtered between building it and sending it.
nativeSubtitleArrayIndex() on the frontend computes n from the same
list that is sent here, for exactly this reason.
Defaulted so the background-audio handoff and the autoplay/next-episode callers, which have no subtitles to offer, need not send the field.
TRACES: UR-020 | IR-016, JA-008 | UT-145
Trait Implementations§
Source§impl Debug for PlayItemRequest
impl Debug for PlayItemRequest
Source§impl<'de> Deserialize<'de> for PlayItemRequest
impl<'de> Deserialize<'de> for PlayItemRequest
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 NamedType for PlayItemRequest
impl NamedType for PlayItemRequest
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 Type for PlayItemRequest
impl Type for PlayItemRequest
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 PlayItemRequest
Auto Trait Implementations§
impl Freeze for PlayItemRequest
impl RefUnwindSafe for PlayItemRequest
impl Send for PlayItemRequest
impl Sync for PlayItemRequest
impl Unpin for PlayItemRequest
impl UnsafeUnpin for PlayItemRequest
impl UnwindSafe for PlayItemRequest
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
§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