Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reklatsmasters/m3u8-write
Simple m3u8 writer
https://github.com/reklatsmasters/m3u8-write
Last synced: 24 days ago
JSON representation
Simple m3u8 writer
- Host: GitHub
- URL: https://github.com/reklatsmasters/m3u8-write
- Owner: reklatsmasters
- License: mit
- Created: 2016-05-07T08:31:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-04T19:26:32.000Z (over 3 years ago)
- Last Synced: 2024-09-14T09:52:47.783Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# m3u8-write
[![travis](https://travis-ci.org/ReklatsMasters/m3u8-write.svg)](https://travis-ci.org/ReklatsMasters/m3u8-write)
[![npm](https://img.shields.io/npm/v/m3u8-write.svg)](https://npmjs.org/package/m3u8-write)
[![license](https://img.shields.io/npm/l/m3u8-write.svg)](https://npmjs.org/package/m3u8-write)
[![downloads](https://img.shields.io/npm/dm/m3u8-write.svg)](https://npmjs.org/package/m3u8-write)Simple create .m3u8 playlists using array of lines
## Example
#### input
```json
[
{ "MEDIA": {
"TYPE": "VIDEO",
"GROUP-ID": "chunked",
"NAME": "Source",
"AUTOSELECT": "YES",
"DEFAULT": "YES"
}
},
"http://1.example.com/index.m3u8",
{ "PLAYLIST-TYPE": "VOD" },
{ "EXTINF": "10" }
]
```#### output
```
#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
```## Usage
```js
const m3u = require('m3u8-write')console.log(m3u([
{ "EXTINF": 4 },
"http://1.example.com/index.m3u8"
]))
```## License
MIT, 2016 (c) Dmitry Tsvettsikh