From 4b1e8288b81d08d8e2bc22191e8cad2f87076722 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Tue, 26 Dec 2023 16:14:10 +0100 Subject: [PATCH] Add headers and preferred headers to streams --- src/providers/streams.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/providers/streams.ts b/src/providers/streams.ts index 03ae873..d56d1a4 100644 --- a/src/providers/streams.ts +++ b/src/providers/streams.ts @@ -9,20 +9,22 @@ export type StreamFile = { export type Qualities = 'unknown' | '360' | '480' | '720' | '1080' | '4k'; -export type FileBasedStream = { - type: 'file'; +type StreamCommon = { id: string; // only unique per output flags: Flags[]; - qualities: Partial>; captions: Caption[]; + headers?: Record; // these headers HAVE to be set to watch the stream + preferredHeaders?: Record; // these headers are optional, would improve the stream }; -export type HlsBasedStream = { +export type FileBasedStream = StreamCommon & { + type: 'file'; + qualities: Partial>; +}; + +export type HlsBasedStream = StreamCommon & { type: 'hls'; - id: string; // only unique per output - flags: Flags[]; playlist: string; - captions: Caption[]; }; export type Stream = FileBasedStream | HlsBasedStream;