# m3u8-reader

> Read and parse m3u8 playlist into array

Latest version **1.1.0** (published 2016-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install m3u8-reader
pnpm add m3u8-reader
yarn add m3u8-reader
bun add m3u8-reader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-12-15 |
| First published | 2016-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Dmitry Tsvettsikh |
| Maintainers | reklatsmasters |
| Keywords | m3u, m3u8, twich, twitch |

## Links

- npm: https://www.npmjs.com/package/m3u8-reader
- Repository: https://github.com/reklatsmasters/m3u8-reader
- Homepage: https://github.com/reklatsmasters/m3u8-reader#readme
- Issues: https://github.com/reklatsmasters/m3u8-reader/issues
- npm.io page: https://npm.io/package/m3u8-reader

## Recent versions

- 1.1.0 (latest) — 2016-12-15
- 1.0.0 — 2016-05-01

## README

# m3u8-reader
[![travis](https://travis-ci.org/ReklatsMasters/m3u8-reader.svg)](https://travis-ci.org/ReklatsMasters/m3u8-reader)
[![npm](https://img.shields.io/npm/v/m3u8-reader.svg)](https://npmjs.org/package/m3u8-reader)
[![license](https://img.shields.io/npm/l/m3u8-reader.svg)](https://npmjs.org/package/m3u8-reader)
[![downloads](https://img.shields.io/npm/dm/m3u8-reader.svg)](https://npmjs.org/package/m3u8-reader)

Read and parse m3u8 playlist into array

## Example

#### input
```
#EXTM3U
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="chunked",NAME="Source",AUTOSELECT=YES,DEFAULT=YES
http://1.example.com/index.m3u8
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10,
```

#### output
```json
[
  { "MEDIA": { 
      "TYPE": "VIDEO",
      "GROUP-ID": "chunked",
      "NAME": "Source",
      "AUTOSELECT": "YES",
      "DEFAULT": "YES" 
    }
  },
  "http://1.example.com/index.m3u8",
  { "PLAYLIST-TYPE": "VOD" },
  { "EXTINF": "10" }
]
```

## Usage

```js
const m3u = require('m3u8-reader')
const fs = require('fs')

console.log(m3u(fs.readFileSync('test.m3u8', 'utf8')))
````

## Related
* [m3u8-write](https://github.com/ReklatsMasters/m3u8-write) - create .m3u8 playlist from an array of objects
* [m3u8-stream-list](https://github.com/ReklatsMasters/m3u8-stream-list) - read list of streams from .m3u8 playlist

## License
MIT, 2016 (c) Dmitry Tsvettsikh

---
_Source: https://npm.io/package/m3u8-reader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
