hlx-http-put

0.0.6 • Public • Published

Build Status Coverage Status Dependency Status Development Dependency Status Known Vulnerabilities XO code style

hlx-http-put

A writable stream to send HLS streams to an external HTTP/HTTPS server

Features

  • Being used with other hlx objects, it provides a functionality to send every HLS related files (playlist and segments) to an external HTTP/HTTPS endpoint.

Install

NPM

Usage

const hlx = require('hlx');
const {createWriteStream} = require('hlx-http-put');
 
const writable = createWriteStream({
  endpoint: 'http://foo.bar/input'
});
 
// Send files to the remote endpoint
hlx.src('http://example.com/master.m3u8')
.pipe(decryptor)
.pipe(hlx.dest(writable))
.on('error', err => {
  console.log(err.stack);
});

API

The features are built on top of the Node's transform streams.

createWriteStream(options)

Creates a new TransformStream object.

params

Name Type Required Default Description
options object Yes N/A See below

options

Name Type Default Description
endpoint string N/A URL of the destination (webdav server endpoint)
rootPath string The path included in url Will be used when the playlist contains relative urls
agent http.Agent undefined Proxy agent

return value

An instance of TransformStream.

Dependencies (3)

Dev Dependencies (6)

Package Sidebar

Install

npm i hlx-http-put

Weekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

7.23 kB

Total Files

6

Last publish

Collaborators

  • kuu