🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

m3u8-stream-list

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m3u8-stream-list

Return all awailable streams from m3u8 playlist

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

m3u8-stream-list

travis npm license downloads

Return all awailable streams from m3u8 playlist

Example

input

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3454382,RESOLUTION=1280x720,VIDEO="chunked"
http://1.example.com/index-live.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1760000,RESOLUTION=1280x720,VIDEO="high"
http://2.example.com/index-live.m3u8

output

[ 
  { "BANDWIDTH": "3454382",
    "RESOLUTION": "1280x720",
    "VIDEO": "chunked",
    "url": "http://1.example.com/index-live.m3u8" 
  },
  { "BANDWIDTH": "1760000",
    "RESOLUTION": "1280x720",
    "VIDEO": "high",
    "url": "http://2.example.com/index-live.m3u8"
  }
]

Usage

const m3u8 = require('m3u8-stream-list')
const fs = require('fs')
const playlist = fs.readdirSync('test.m3u8', 'utf8')

console.log(m3u8(playlist))

API

module.exports = (data: String|Buffer): {url: string, ...}[]

License

MIT, 2016 (c) Dmitry Tsvettsikh

Keywords

twitch

FAQs

Package last updated on 01 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts