0.0.13 • Published 5 years ago

hlx-webdav-push v0.0.13

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-webdav-push

A writable stream to send HLS streams to an external WebDAV server

Features

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

Install

NPM

Usage

const hlx = require('hlx');
const {createWriteStream} = require('hlx-webdav-push');

const webdav = createWriteStream({
  url: 'http://foo.bar/webdav',
  user: '{webdav user}',
  pass: '{webdav password}'
});

// Send files to an external webdav endpoint
hlx.src('http://example.com/master.m3u8')
.pipe(decryptor)
.pipe(hlx.dest(webdav))
.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
urlstringN/AURL of the destination (webdav server endpoint)
userstringN/ABasic auth user name
passstringN/ABasic auth password for the server
digestbooleanfalseIf true and user/pass are both specified, digest-based authentication will be enabled
tokenobjectN/AAn object holding Access Token parameters issued by OAuth 2.0 auth server. Client must specify either token or user/path. token is ignored when user/pass are present.
inputDirstring/The root directory from which all the files are read (This option is only used in case of file urls)
concurrencynumber6Max number of requests concurrently sent
agenthttp.AgentundefinedProxy agent

return value

An instance of TransformStream.

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

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