//! 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(_: &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 set_rect(&mut self, _: &WebviewWindow, _: 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(); }