Skip to main content

Module player

Module player 

Source

Re-exports§

pub use autoplay::AutoplayDecision;
pub use autoplay::AutoplaySettings;
pub use backend::NullBackend;
pub use backend::PlayerBackend;
pub use backend::PlayerError;
pub use events::PlayerEventEmitter;
pub use events::PlayerStatusEvent;
pub use events::TauriEventEmitter;
pub use media::MediaItem;
pub use media::MediaSource;
pub use media::MediaType;
pub use media::QueueContext;
pub use media::SubtitleTrack;
pub use queue::QueueManager;
pub use queue::RepeatMode;
pub use seek::determine_video_seek_strategy;
pub use seek::VideoSeekStrategy;
pub use session::MediaSessionManager;
pub use session::MediaSessionType;
pub use sleep_timer::SleepTimerMode;
pub use sleep_timer::SleepTimerState;
pub use state::EndReason;
pub use state::PlayerState;
pub use mpv_backend::MpvBackend;

Modules§

autoplay
backend
background_policy
What playback should do when the app stops being visible.
events
Player events for frontend communication via Tauri events.
media
mpv_backend
queue
seek
Video seek strategy decision logic.
session
sleep_timer
state
stream_end
Telling a finished stream apart from a truncated one.

Structs§

LockscreenMetadata
Metadata for the lockscreen / media notification.
PlayerController
Central player controller that coordinates playback
ReporterSink 🔒
The production sink: hands each operation to the PlaybackReporter.

Constants§

RESUME_BACKOFF_STEP_SECS 🔒
Seconds added per attempt before retrying a stream that failed with an error.

Traits§

PlaybackReportSink
Where the player’s playback reports go.

Functions§

completion_report_position 🔒
The position to report when a stream ends naturally.
set_lockscreen_position_offset
Set the base offset (seconds) added to positions reported to the Android lockscreen scrubber. Used by the background-audio handoff: the audio stream starts at the handoff point (StartTimeTicks), so ExoPlayer’s position is relative and must be shifted back to absolute to match the full duration. Pass 0.0 to clear on exit. No-op off Android.
update_lockscreen_metadata
Push now-playing metadata to the Android lockscreen. No-op off Android, so the session poller can call it unconditionally and stay platform-agnostic.