m3u8-write
v1.0.0
Published
Simple create .m3u8 playlists using array of lines
Downloads
156
Readme
m3u8-write
Simple create .m3u8 playlists using array of lines
Example
input
[
{ "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
const m3u = require('m3u8-write')
console.log(m3u([
{ "EXTINF": 4 },
"http://1.example.com/index.m3u8"
]))
License
MIT, 2016 (c) Dmitry Tsvettsikh