diff options
author | metamuffin <metamuffin@disroot.org> | 2025-02-24 18:52:42 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-02-24 18:52:42 +0100 |
commit | 26d3a70b0be2809177076e155f987e18e2b2ceb2 (patch) | |
tree | 03abbc343cdd1add3904b9c9ea74f8dc9d74590c | |
parent | 77578836f7443b328d0125e3b247586a118346db (diff) | |
download | jellything-26d3a70b0be2809177076e155f987e18e2b2ceb2.tar jellything-26d3a70b0be2809177076e155f987e18e2b2ceb2.tar.bz2 jellything-26d3a70b0be2809177076e155f987e18e2b2ceb2.tar.zst |
plan new streming api
-rw-r--r-- | doc/api.md | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -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; +} +``` |