aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/routes')
-rw-r--r--server/src/routes/stream.rs7
-rw-r--r--server/src/routes/ui/player.rs2
2 files changed, 5 insertions, 4 deletions
diff --git a/server/src/routes/stream.rs b/server/src/routes/stream.rs
index 1b2c741..4fbc990 100644
--- a/server/src/routes/stream.rs
+++ b/server/src/routes/stream.rs
@@ -15,15 +15,16 @@ use std::path::PathBuf;
use tokio::io::{duplex, DuplexStream};
use tokio_util::io::SyncIoBridge;
-pub fn stream_uri(path: &PathBuf, tracks: &Vec<u64>) -> String {
+pub fn stream_uri(path: &PathBuf, tracks: &Vec<u64>, webm: bool) -> String {
format!(
- "/stream/{}?tracks={}",
+ "/stream/{}?tracks={}&webm={}",
path.to_str().unwrap().to_string(),
tracks
.iter()
.map(|v| format!("{v}"))
.collect::<Vec<_>>()
- .join(",")
+ .join(","),
+ if webm { "1" } else { "0" }
)
}
diff --git a/server/src/routes/ui/player.rs b/server/src/routes/ui/player.rs
index 4b66f04..ed7e4f7 100644
--- a/server/src/routes/ui/player.rs
+++ b/server/src/routes/ui/player.rs
@@ -49,7 +49,7 @@ pub fn r_player(
Ok(LayoutPage {
title: item.info.title.to_owned(),
content: markup::new! {
- video[src=stream_uri(&item.lib_path, &tracks), controls];
+ video[src=stream_uri(&item.lib_path, &tracks, true), controls];
},
})
}