Socket
Socket
Sign inDemoInstall

hlx-lib

Package Overview
Dependencies
21
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.28 to 0.0.29

2

package.json
{
"name": "hlx-lib",
"version": "0.0.28",
"version": "0.0.29",
"description": "A library for processing HLS streams",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -66,3 +66,3 @@ [![Build Status](https://travis-ci.org/hlxjs/hlx-lib.svg?branch=master)](https://travis-ci.org/hlxjs/hlx-lib)

### `src(location)`
### `src(location[, options])`
Creates a new `stream.Readable` object.

@@ -73,5 +73,12 @@

| ------- | ------ | -------- | ------- | ------------- |
| location | string or stream.Readable | Yes | N/A | It should be either of a local file path, a url of the playlist, or a custom source object. |
| location | string or stream.Readable | Yes | N/A | It should be either of a local file path, a url of the playlist, or a custom source object (`stream.Readable`) |
| options | object | No | {} | See below |
#### options
| Name | Type | Default | Description |
| ----------- | ------ | ------- | --------------------------------- |
| noUriConversion | boolean | false | Passing `true` will prevent any URI conversions done internally. The default behavior is to convert all URIs into paths relative to the master playlist |
You can also pass the options for [`hlx-file-reader`'s `createReadStream`](https://github.com/hlxjs/hlx-file-reader#options) and [`hlx-url-rewriter`'s '`createUrlRewriter`](https://github.com/hlxjs/hlx-url-rewriter#options), which will be relayed to those modules internally.
#### return value

@@ -87,3 +94,3 @@ An instance of `stream.Readable`.

| ------- | ------ | -------- | ------- | ------------- |
| location | string or stream.Writable | No | null | It should be either of a local file path or a custom destination object. |
| location | string or stream.Writable | No | null | It should be either of a local file path or a custom destination object (`stream.Writable`) |
| options | object | No | {} | See below |

@@ -94,5 +101,5 @@

| ----------- | ------ | ------- | --------------------------------- |
| inputDir | string | / | The root directory from which all the files are read (This option is only used in case of file urls) |
| inputDir | string | / | The root directory from which all the files are read (This option is only used in case of file: urls) |
#### return value
When the `location` is a local file path, the `hlx-file-writer` stream will be created. Otherwise, the passed writable stream will be returned back.

@@ -14,2 +14,5 @@ const {Readable} = require('stream');

}
if (options.noUriConversion) {
return head;
}
return head.pipe(urlRewriter);

@@ -16,0 +19,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc