node-dash-client

1.1.2 • Public • Published

Node Dash Client

a sample tiny dash client for Nodejs, only implement the main function of dash.

sample usage

import { NodeDashClient } from 'node-dash-client';

const app: NodeDashClient = new NodeDashClient({
    mpdFile: 'https://example.com/radio.mpd'
});

await app.init();
const data: Buffer[] = [];

const firstFregment: TFirstFregment = await app.getFirstFregment();
data.push(firstFregment.data);

while(true) {
    const mediaFregment: {fregmentId: number, data: Buffer} = await app.getMediaFregment();
    data.push(mediaFregment.data);
}


...


Buffer.contat(data); // radio.mp4

Readme

Keywords

none

Package Sidebar

Install

npm i node-dash-client

Weekly Downloads

15

Version

1.1.2

License

none

Unpacked Size

25.5 kB

Total Files

17

Last publish

Collaborators

  • perterpon