mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 16:57:00 +01:00
feat(app,player): page fade, Ctrl+S screenshots
- a page fades in over 140 ms when the page changes, rather than cutting - Ctrl+S in the player saves the frame, without subtitles, to Pictures/proton-stream as "Title S01E04 12-34.png"
This commit is contained in:
1 parent
d3325843a9
commit
9037e6c2d5
6 files changed
+102
-1
No files matched your search
@@ -476,6 +476,14 @@ impl Player {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Save the current frame, without subtitles or anything drawn over it,
|
||||
/// to `path`. The format follows the extension.
|
||||
pub fn screenshot(&self, path: &std::path::Path) -> Result<()> {
|
||||
let path = path.to_string_lossy();
|
||||
self.mpv.command("screenshot-to-file", &[&path, "video"])?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn stop(&self) -> Result<()> {
|
||||
self.mpv.command("stop", &[])?;
|
||||
Ok(())
|
||||
|
||||
Reference in new issue
Block a user