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.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/stream/src/lib.rs b/stream/src/lib.rs
index 3f6e93f..801f29c 100644
--- a/stream/src/lib.rs
+++ b/stream/src/lib.rs
@@ -18,7 +18,7 @@ use fragment::fragment_stream;
use fragment_index::fragment_index_stream;
use hls::{hls_multivariant_stream, hls_variant_stream};
use jellycache::Cache;
-use jellystream_types::StreamSpec;
+use jellystream_types::{StreamSpec, TrackKind};
use serde::{Deserialize, Serialize};
use std::{
collections::BTreeSet,
@@ -56,6 +56,7 @@ pub struct StreamHead {
}
pub fn stream_head(spec: &StreamSpec) -> StreamHead {
+ let kind = TrackKind::Video; // TODO
use StreamSpec::*;
let range_supported = matches!(spec, Remux { .. } | Original { .. });
let content_type = match spec {
@@ -65,9 +66,9 @@ pub fn stream_head(spec: &StreamSpec) -> StreamHead {
Info => "application/jellything-stream-info+json",
Dash => "application/dash+xml",
FragmentIndex { .. } => "application/jellything-frag-index+json",
- FragmentInit { container, .. } => container.mime_type(),
- Fragment { container, .. } => container.mime_type(),
- Remux { container, .. } => container.mime_type(),
+ FragmentInit { container, .. } => container.mime_type(kind),
+ Fragment { container, .. } => container.mime_type(kind),
+ Remux { container, .. } => container.mime_type(kind),
};
StreamHead {
content_type,