@amazon/vinyl-hls-parser 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +6 -6
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @amazon/vinyl-hls-parser
2
+
3
+ [![Website](https://img.shields.io/badge/website-amazonmusic.github.io%2Fvinyl-blue)](https://amazonmusic.github.io/vinyl)
4
+ [![npm](https://img.shields.io/npm/v/@amazon/vinyl-hls-parser.svg)](https://www.npmjs.com/package/@amazon/vinyl-hls-parser)
5
+ [![size](https://img.shields.io/bundlejs/size/@amazon/vinyl-hls-parser.svg?label=size)](https://bundlejs.com/?q=@amazon/vinyl-hls-parser)
6
+
7
+ A small, fast HLS playlist parser for browser and Node. Produces typed objects
8
+ for both the multivariant (main) playlist and the per-rendition media playlist.
9
+ Zero runtime dependencies.
10
+
11
+ ## Install
12
+
13
+ ```shell
14
+ npm install @amazon/vinyl-hls-parser
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```typescript
20
+ import { parseMainPlaylist, parseMediaPlaylist } from '@amazon/vinyl-hls-parser'
21
+
22
+ const main = parseMainPlaylist(await (await fetch(mainUri)).text())
23
+ const variant = main.variants[0]
24
+
25
+ const media = parseMediaPlaylist(await (await fetch(variant.uri)).text())
26
+
27
+ for (const segment of media.segments) {
28
+ console.log(segment.uri, segment.duration)
29
+ }
30
+ ```
31
+
32
+ `parseMediaPlaylist` accepts an optional second argument with HLS
33
+ variable-substitution values for playlists using `{$NAME}` interpolation.
34
+
35
+ ## License
36
+
37
+ Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amazon/vinyl-hls-parser",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "A fast HLS manifest parser for browser and Node.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -75,15 +75,15 @@
75
75
  "watch:release": "tsx buildSrc/build.ts --watch --release"
76
76
  },
77
77
  "devDependencies": {
78
- "@amazon/vinyl-build-utils": "^1.1.0",
79
- "@amazon/vinyl-jasmine-wrapper": "^1.1.0"
78
+ "@amazon/vinyl-build-utils": "^1.1.1",
79
+ "@amazon/vinyl-jasmine-wrapper": "^1.1.1"
80
80
  },
81
81
  "dependencies": {
82
- "@amazon/vinyl-util": "^1.1.0",
83
- "@amazon/vinyl-validation": "^1.1.0"
82
+ "@amazon/vinyl-util": "^1.1.1",
83
+ "@amazon/vinyl-validation": "^1.1.1"
84
84
  },
85
85
  "browserslist": [
86
86
  "defaults, chrome 52, firefox 54, edge 15, safari 8"
87
87
  ],
88
- "gitHead": "ea13070fb52c1903723f08f31c356465d2f3279e"
88
+ "gitHead": "e5a3429d802564132b16808a5b8a8e15a023a548"
89
89
  }