0.0.3 • Published 2 years ago

@musakui/kaizoku v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

kaizoku

download HLS video

npm

usage

import { Readable } from 'node:stream'
import { createWriteStream } from 'node:fs'
import { HlsVideo } from '@musakui/kaizoku'

const video = new HlsVideo('[playlist url]', { key: '[key]' })
Readable.from(video).pipe(createWriteStream('video.m2ts'))

// iterate manually to track progress
const writeStream = createWriteStream('video.m2ts')

for await (const chunk of video) {
	writeStream.write(Buffer.from(chunk))

	// notify progress
	// ...
}
0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago