1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 16:13:18 +00:00
musix-oss/node_modules/m3u8stream/dist/index.d.ts
2020-03-03 22:30:50 +02:00

28 lines
886 B
TypeScript

/// <reference types="node" />
import { PassThrough } from 'stream';
import miniget from 'miniget';
declare namespace m3u8stream {
interface Options {
begin?: number | string;
liveBuffer?: number;
chunkReadahead?: number;
highWaterMark?: number;
requestOptions?: miniget.Options;
parser?: 'm3u8' | 'dash-mpd';
id?: string;
}
interface Progress {
num: number;
size: number;
duration: number;
url: string;
}
interface Stream extends PassThrough {
end: () => void;
on(event: 'progress', progress: Progress, totalSegments: number, downloadedBytes: number): this;
on(event: string | symbol, listener: (...args: any) => void): this;
}
}
declare let m3u8stream: (playlistURL: string, options?: m3u8stream.Options) => m3u8stream.Stream;
export = m3u8stream;