summaryrefslogtreecommitdiff
path: root/src/audio/mpv.rs
blob: dddb6b23f1ed37d54debcbf8f7837e17244ea44c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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.");
    }
}