Support pausing after hiding the video.

This commit is contained in:
Tw93
2023-05-02 22:44:34 +08:00
parent a8b0eba7f5
commit 1414dbe7db
2 changed files with 5 additions and 1 deletions

View File

@@ -56,7 +56,10 @@ pub fn run_app() {
.on_window_event(|event| {
if let tauri::WindowEvent::CloseRequested { api, .. } = event.event() {
#[cfg(target_os = "macos")]
event.window().minimize().unwrap();
{
event.window().minimize().unwrap();
event.window().eval("toggleVideoPlayback(true);").unwrap();
}
#[cfg(not(target_os = "macos"))]
event.window().close().unwrap();