1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-14 16:00:17 +00:00
musix-oss/node_modules/m3u8stream/dist/index.d.ts

28 lines
886 B
TypeScript
Raw Normal View History

2020-03-03 20:30:50 +00:00
/// <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;