summaryrefslogtreecommitdiff
path: root/src/audio/mpv.rs
blob: a9b3bc145d169cad7c2b21850e7bc58ac79ebabe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::process::Command;
use tokio::sync::mpsc;

pub struct Mpv {}

impl Mpv {
    pub async fn play(&self, url: &str, _tx: mpsc::UnboundedSender<String>) {
        Command::new("mpv")
            .args([url])
            .output()
            .expect("Failed to start mpv, make sure it is installed.");
    }
}