aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/api.md51
1 files changed, 51 insertions, 0 deletions
diff --git a/doc/api.md b/doc/api.md
index bfa49c6..5713df7 100644
--- a/doc/api.md
+++ b/doc/api.md
@@ -103,3 +103,54 @@ Returns headshot of a person from that node.
Responds with the stream directly or a redirect to the actual source in case of
federation.
+
+# Planned stream api
+
+- `?whep&<track...>&<seek>`
+ - WHEP Endpoint for streaming that set of tracks. The format used is decided
+ by the server.
+- `?whepcontrol&<token>`
+ - WebSocket endpoint for controlling WHEP playback. TODO schema
+- `?remux&<track...>&<webm>`
+- `?hlssupermultivariant&<webm>`
+ - Returns m3u8/HLS playlist of all known multi-variant playlists, one for each
+ segment. The plylist is updated for live media.
+- `?hlsmultivariant&<segment>&<webm>`
+ - Returns m3u8/HLS playlist of all track formats' variant playlists.
+- `?hlsvariant&<segment>&<track>&<webm>&<format>`
+ - Returns m3u8/HLS playlist of all known fragments of this track format. The
+ playlist is updated for live media.
+- `?info&<segment?>`
+ - Returns JSON `SegmentInfo` if a segment index is provided, else `MediaInfo`
+- `?fragmentindex&<segment>&<track>`
+- `?fragment&<segment>&<track>&<index>&<webm>&<format>`
+
+```ts
+interface MediaInfo {
+ title: string;
+ live: bool;
+ segments: SegmentInfo[];
+}
+interface SegmentInfo {
+ title?: string;
+ duration?: number;
+ tracks: Track[];
+}
+interface Track {
+ title?: string;
+ language?: string;
+ kind: "video" | "audio" | "text";
+ formats: TrackFormat[];
+}
+interface TrackFormat {
+ codec: string;
+ bandwidth: number;
+ remux: bool;
+ title?: string;
+
+ a_sampling_frequency?: number;
+ a_channels?: number;
+ v_resolution_width?: number;
+ av_bit_depth?: number;
+}
+```