0.0.6 • Published 5 years ago

hlx-http-put v0.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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

NameTypeRequiredDefaultDescription
optionsobjectYesN/ASee below

options

NameTypeDefaultDescription
endpointstringN/AURL of the destination (webdav server endpoint)
rootPathstringThe path included in urlWill be used when the playlist contains relative urls
agenthttp.AgentundefinedProxy agent

return value

An instance of TransformStream.

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago