Socket
Book a DemoInstallSign in
Socket

hls-playlist-parser

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hls-playlist-parser

A Javascript library to parse and edit Hls playlists. Based on specification https://tools.ietf.org/html/draft-pantos-http-live-streaming-23

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
4
-20%
Maintainers
1
Weekly downloads
 
Created
Source

A Javascript library to parse and edit Hls playlists. Based on specification https://tools.ietf.org/html/draft-pantos-http-live-streaming-23

Usage (Node JS)

npm install --save hls-playlist-parser

The library creates a programatically editable Object from the manifest. Supported tags are editable. Unsupported or unidentified tag are preserved but not editable. May be used to replace segments in server side ad-insertion.

const HlsParser = require('hls-playlist-parser').HlsParser

const parser = HlsParser("example.m3u8", "outfile.m3u8")
parser.readFile()
.then(() => {
  console.log(parser.manifest.tags) // all tags and segments in the manifest
  });

Supported tags

  • EXTM3U
  • EXT-X-VERSION
  • EXTINF
  • EXT-X-DISCONTINUITY
  • EXT-X-KEY
  • EXT-X-MAP
  • EXT-X-DATERANGE
  • EXT-X-TARGETDURATION
  • EXT-X-MEDIA-SEQUENCE
  • EXT-X-ENDLIST
  • EXT-X-BYTERANGE

Contributing

All contributions are welcome but before you submit a Pull Request make sure you follow the same code conventions and that you have written unit tests

Keywords

hls

FAQs

Package last updated on 04 Jul 2017

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.