Kaleido-Desktop/src-tauri/src/platform/macos.rs
Elijah 00d72e70f4 Create Kaleido Desktop, a cinematic Plex client for Windows
Tauri 2 shell with a React/TypeScript interface and libmpv playback composed
beneath the web view (DirectComposition on Windows). Shared code with per-OS
platform modules and configs so macOS and Linux can follow.

- Plex sign-in (browser, plex.tv/link or manual), server selection, Plex Home
- Home, Movies and TV Shows (Discover, Library, Collections), search, people
- Title pages with logos, ratings, cast, extras, seasons and episodes
- Direct play with Plex conversion fallback, tracks, markers, autoplay
- Metadata editing, artwork, fix match, refresh, analyze and deletion
- Resumable offline downloads
- App settings and Plex server administration with a live dashboard
- Signed updater feed and Forgejo CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:26:37 -07:00

31 lines
1.1 KiB
Rust

//! macOS: render mpv through its render API (libplacebo) into a CAMetalLayer
//! placed beneath the WKWebView, 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.2.dylib", "libmpv.dylib"];
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 hold_awake(rx: std::sync::mpsc::Receiver<()>) {
// TODO(macOS): IOPMAssertionCreateWithName(PreventUserIdleDisplaySleep).
let _ = rx.recv();
}