@kolabuk/hls
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@kolabuk/hls

m3u8 file parser

Importing

import { HLS } from "@kolabuk/hls";

Usage

const hls = HLS.get(`
    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:21
    #EXT-X-ALLOW-CACHE:YES
    #EXT-X-PLAYLIST-TYPE:VOD
    #EXT-X-MEDIA-SEQUENCE:0...
`);

Response example

{
  "segments": [
    {
      "key": {
        "method": "AES-128",
        "uri": "https://example.com/key.pub"
      },
      "duration": 3,
      "uri": "seg0.ts"
    },
    {
      "key": { "method": "NONE" },
      "duration": 19.992,
      "uri": "seg1.ts"
    }
  ],
  "duration": 22.99
}

Readme

Keywords

Package Sidebar

Install

npm i @kolabuk/hls

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

15.8 kB

Total Files

6

Last publish

Collaborators

  • kolabuk