Kaleido-Desktop/src-tauri/src/platform/linux.rs
Elijah 43c168da95 Address the first beta's bugs and requested changes
Startup now uses the Android iris animation, and playback can continue
in a corner miniplayer while browsing (the video is drawn into a corner
rectangle beneath a matching hole in the page). The player keeps the
window controls, hides its chrome when the pointer leaves, and gains
audio/subtitle tracks, audio sync, source bitrate and playback details
in its options. Subtitles can be styled in Settings with a live preview.
Categories replace Collections, the A–Z rail magnifies, descriptions
expand in place, downloads can be removed in bulk, and search keeps its
results while typing.

Fixes scroll jank from per-card and scrolling backdrop blurs, the hidden
colour wash, the cubic volume curve, loud theme music, the search focus
ring, a stray nav indicator, Continue Watching previews and the TV Shows
header overlap. Removes the star rating, the duplicate Settings menu
entry and the server settings' Show advanced switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:06:54 -07:00

32 lines
1.2 KiB
Rust

//! Linux: render mpv through its render API (OpenGL) beneath the WebKitGTK
//! view, then implement `VideoSurface` here.
//!
//! Browsing, downloads, settings and updates already work here; only native
//! video composition remains to be written.
use tauri::{Runtime, WebviewWindow};
use crate::mpv::Mpv;
pub const SURFACE_PROPERTIES: &[&str] = &[];
pub const MPV_LIBRARIES: &[&str] = &["libmpv.so.2", "libmpv.so"];
pub struct VideoSurface;
impl VideoSurface {
pub fn create<R: Runtime>(_: &WebviewWindow<R>) -> Result<VideoSurface, String> {
Err("Video playback is not available on this platform yet.".into())
}
pub fn mpv_options(&self) -> Vec<(&'static str, String)> {
Vec::new()
}
pub fn on_property(&mut self, _: &str, _: &serde_json::Value) {}
pub fn show(&mut self, _: bool) {}
pub fn fit<R: Runtime>(&mut self, _: &WebviewWindow<R>, _: Option<&Mpv>) {}
pub fn set_rect<R: Runtime>(&mut self, _: &WebviewWindow<R>, _: Option<&Mpv>, _: Option<(i32, i32, i32, i32)>) {}
}
pub fn hold_awake(rx: std::sync::mpsc::Receiver<()>) {
// TODO(Linux): org.freedesktop.ScreenSaver.Inhibit over D-Bus.
let _ = rx.recv();
}