aboutsummaryrefslogtreecommitdiff
path: root/stream
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-12-23 00:43:42 +0100
committermetamuffin <metamuffin@disroot.org>2023-12-23 00:43:42 +0100
commit0b53d68b214b022a4ae6292785c165ad95e71696 (patch)
tree1532b6619fd2598af1c73018b7ec339145d81602 /stream
parent75949cebdd61dd8f0d06f2e47081c460e2a442f0 (diff)
downloadjellything-0b53d68b214b022a4ae6292785c165ad95e71696.tar
jellything-0b53d68b214b022a4ae6292785c165ad95e71696.tar.bz2
jellything-0b53d68b214b022a4ae6292785c165ad95e71696.tar.zst
rework ~~import~~ system pt. 8.1: update the player to new format
Diffstat (limited to 'stream')
-rw-r--r--stream/src/hls.rs2
-rw-r--r--stream/src/lib.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/stream/src/hls.rs b/stream/src/hls.rs
index 74f18b4..fb7276d 100644
--- a/stream/src/hls.rs
+++ b/stream/src/hls.rs
@@ -61,7 +61,7 @@ pub async fn hls_variant_stream(
writeln!(out, "#EXTM3U")?;
writeln!(out, "#EXT-X-VERSION:4")?;
- spec.format = StreamFormat::Segment;
+ spec.format = StreamFormat::Snippet;
for (i, Range { start, end }) in snips.iter().enumerate() {
writeln!(out, "#EXTINF:{},", end - start)?;
spec.index = Some(i);
diff --git a/stream/src/lib.rs b/stream/src/lib.rs
index e86230c..8d4ee3a 100644
--- a/stream/src/lib.rs
+++ b/stream/src/lib.rs
@@ -39,9 +39,9 @@ pub fn stream_head(spec: &StreamSpec) -> StreamHead {
StreamFormat::Original => StreamHead { content_type: "video/x-matroska", range_supported: true },
StreamFormat::Matroska => StreamHead { content_type: webm_or_mkv, range_supported: true },
StreamFormat::HlsMaster | StreamFormat::HlsVariant => StreamHead { content_type: "application/vnd.apple.mpegurl", range_supported: false },
- StreamFormat::Jhls => StreamHead { content_type: "application/jellything-jhls+json", range_supported: false },
+ StreamFormat::JhlsIndex => StreamHead { content_type: "application/jellything-jhls+json", range_supported: false },
StreamFormat::Webvtt => StreamHead { content_type: "text/vtt", range_supported: false },
- StreamFormat::Segment => StreamHead { content_type: webm_or_mkv, range_supported: false },
+ StreamFormat::Snippet => StreamHead { content_type: webm_or_mkv, range_supported: false },
}
}
@@ -85,8 +85,8 @@ pub async fn stream(
StreamFormat::Matroska => remux_stream(node, local_tracks, spec, range, b).await?,
StreamFormat::HlsMaster => hls_master_stream(node, local_tracks, spec, b).await?,
StreamFormat::HlsVariant => hls_variant_stream(node, local_tracks, spec, b).await?,
- StreamFormat::Jhls => jhls_index(node, &local_tracks, spec, b, perms).await?,
- StreamFormat::Segment => segment_stream(node, local_tracks, spec, b, perms).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?,
}