aboutsummaryrefslogtreecommitdiff
path: root/stream/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stream/src/lib.rs')
-rw-r--r--stream/src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/stream/src/lib.rs b/stream/src/lib.rs
index ee47857..833af3e 100644
--- a/stream/src/lib.rs
+++ b/stream/src/lib.rs
@@ -25,7 +25,7 @@ use tokio::{
io::{duplex, AsyncReadExt, AsyncSeekExt, AsyncWriteExt, DuplexStream},
};
use tokio_util::io::SyncIoBridge;
-use webvtt::webvtt_stream;
+use webvtt::vtt_stream;
pub struct StreamHead {
pub content_type: &'static str,
@@ -42,6 +42,7 @@ pub fn stream_head(spec: &StreamSpec) -> StreamHead {
StreamFormat::JhlsIndex => StreamHead { content_type: "application/jellything-seekindex+json", range_supported: false },
StreamFormat::Webvtt => StreamHead { content_type: "text/vtt", range_supported: false },
StreamFormat::Snippet => StreamHead { content_type: webm_or_mkv, range_supported: false },
+ StreamFormat::Jvtt => StreamHead { content_type: "applcation/jellything-vtt+json", range_supported: false },
}
}
@@ -87,7 +88,8 @@ pub async fn stream(
StreamFormat::HlsVariant => hls_variant_stream(node, local_tracks, spec, b).await?,
StreamFormat::JhlsIndex => jhls_index(node, &local_tracks, spec, b, perms).await?,
StreamFormat::Snippet => segment_stream(node, local_tracks, spec, b, perms).await?,
- StreamFormat::Webvtt => webvtt_stream(node, local_tracks, spec, b).await?,
+ StreamFormat::Webvtt => vtt_stream(false, node, local_tracks, spec, b).await?,
+ StreamFormat::Jvtt => vtt_stream(true, node, local_tracks, spec, b).await?,
}
Ok(a)