mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 10:33:25 +00:00
Add headers and preferred headers to streams
This commit is contained in:
@@ -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<Record<Qualities, StreamFile>>;
|
||||
captions: Caption[];
|
||||
headers?: Record<string, string>; // these headers HAVE to be set to watch the stream
|
||||
preferredHeaders?: Record<string, string>; // these headers are optional, would improve the stream
|
||||
};
|
||||
|
||||
export type HlsBasedStream = {
|
||||
export type FileBasedStream = StreamCommon & {
|
||||
type: 'file';
|
||||
qualities: Partial<Record<Qualities, StreamFile>>;
|
||||
};
|
||||
|
||||
export type HlsBasedStream = StreamCommon & {
|
||||
type: 'hls';
|
||||
id: string; // only unique per output
|
||||
flags: Flags[];
|
||||
playlist: string;
|
||||
captions: Caption[];
|
||||
};
|
||||
|
||||
export type Stream = FileBasedStream | HlsBasedStream;
|
||||
|
Reference in New Issue
Block a user