Skip to main content

## Module player

Source
Expand description

TRACES: UR-003, UR-004, UR-005, UR-010, UR-020, UR-021 | JA-022, JA-023, JA-024, JA-025, JA-026 | DR-001

## Re-exports§

`pub use queue::*;`
`pub use remote::*;`
`pub use session::*;`
`pub use settings::*;`
`pub use timers::*;`

## Modules§

queue 🔒
  Queue manipulation commands (add / remove / move / skip).
remote 🔒
  Remote Jellyfin session control commands (casting to another device).
session 🔒
  Media session state commands.
settings 🔒
  Audio and video playback settings commands.
timers 🔒
  Sleep-timer and autoplay commands.

## Structs§

BackgroundAudioPlan 🔒
  How a background-audio handoff must start playback, given where its audio actually begins.
MediaSessionManagerWrapper
  Media session manager wrapper for Tauri state management
MergedMediaItem
  Lightweight media item for merged playback state Converts from both local MediaItem and remote NowPlayingItem
PlayAlbumTrackRequest
  Request to play a track from an album (backend fetches all tracks)
PlayItemRequest
  Request to play a single video item
PlayQueueRequest
  Request to play a queue of items
PlayTracksRequest
  Request to play tracks by ID (backend fetches metadata)
PlaybackCapabilities
  What playback facilities this platform’s backend actually provides.
PlayerStateWrapper
  Player state wrapper for Tauri.
PlayerStatus
  Response for player state queries
PreloadResult
  Response for preload operation
QueueStatus
  Response for queue queries
SmartCacheWrapper
  SmartCache wrapper for Tauri state management
VideoSettingsWrapper
  Video settings state wrapper for Tauri

## Enums§

AudioTrackSwitchResponse
  Response for audio track switching operations
PlayQueueContext
  Queue context for remote transfer - what type of queue is this?
PlayTracksContext
  Context information for track playback
StreamQualityResponse
  Response for a mid-playback streaming-quality change.
VideoBackend
  Backend type for video playback
VideoSeekResponse
  Response for video seek operations

## Functions§

background_audio_plan 🔒
  Decide the base and the seek for a handoff at `position_seconds`.
background_audio_source 🔒
  Pick the source for an audio-only handoff.
check_for_local_download 🔒
  Check if an item has a completed download
create_media_item 🔒
  Helper function to create MediaItem from video request
get_player_status 🔒
get_queue_status 🔒
normalize_volume 🔒
  Normalise a volume arriving over IPC to the 0.0..=1.0 range every backend works in.
play_selection_on_remote 🔒
  Start a freshly-built queue on the active remote session.
player_background_action
  Exit background-audio mode: stop the native audio player and return its final position so the frontend can reload the WebView `<video>` there (UR-040).
player_configure_jellyfin
  Configure Jellyfin API client for automatic playback reporting
player_cycle_repeat
player_disable_jellyfin
  Disable Jellyfin automatic playback reporting
player_enter_background_audio
  Enter background-audio mode: hand playback of the currently-watched video off to the native ExoPlayer audio path so the audio keeps playing while the app is backgrounded/locked, with no client-side video decode (UR-040).
player_exit_background_audio
  TRACES: UR-040 | DR-052 | UT-061, IT-013
player_get_cache_config
  Get current SmartCache configuration
player_get_capabilities
  Report this platform’s playback capabilities to the frontend.
player_get_queue
player_get_status
player_local_media_path
  The on-disk path for a downloaded item, for playback surfaces that resolve their own source rather than going through the queue.
player_next
player_pause
player_play
player_play_album_track
  Play a track from an album - backend fetches all album tracks and builds queue
player_play_item
  Play a single media item (audio or video)
player_play_queue
  Play a queue of media items
player_play_tracks
  Play tracks by ID - backend fetches all metadata
player_preload_upcoming
  Preload upcoming tracks from the queue This queues background downloads for the next N tracks that aren’t already downloaded
player_previous
player_seek
player_seek_video
  Smart video seeking that decides between native and server-side seeking
player_set_audio_track
  Set the active audio track on a native backend directly.
player_set_cache_config
  Update SmartCache configuration
player_set_stream_quality
  Change the bandwidth ceiling of the video that is playing right now.
player_set_subtitle_track
  Set (or clear, with `None`) the active subtitle track on a native backend.
player_set_volume
player_stop
player_switch_audio_track
  Switch audio track. Note: Frontend should handle saving series preferences after this command succeeds
player_toggle
player_toggle_mute
player_toggle_shuffle
refresh_queue_local_sources 🔒
  Re-point queued streaming items at completed local downloads.
resolve_local_media_path 🔒
  Resolve the on-disk file backing a completed download, if there is one.
sanitize_filename 🔒
  Sanitize filename by removing invalid characters