//! 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(_: &WebviewWindow) -> Result { 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(&mut self, _: &WebviewWindow, _: Option<&Mpv>) {} } pub fn hold_awake(rx: std::sync::mpsc::Receiver<()>) { // TODO(macOS): IOPMAssertionCreateWithName(PreventUserIdleDisplaySleep). let _ = rx.recv(); }