summaryrefslogtreecommitdiff
path: root/src/audio/mpv.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/mpv.rs')
-rw-r--r--src/audio/mpv.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/audio/mpv.rs b/src/audio/mpv.rs
new file mode 100644
index 0000000..dddb6b2
--- /dev/null
+++ b/src/audio/mpv.rs
@@ -0,0 +1,13 @@
+use super::AudioBackend;
+use std::process::Command;
+
+pub struct Mpv {}
+
+impl AudioBackend for Mpv {
+ fn play(&self, url: &str) {
+ Command::new("mpv")
+ .args([url])
+ .output()
+ .expect("Failed to start mpv, make sure it is installed.");
+ }
+}