Commit graph

54 commits

Author SHA1 Message Date
mister-ben
ba6e7cbafe
feat: add support for #EXT-X-DEFINE (#185)
* feat: add support for EXT-X-DEFINE

* tests

* readme

* cleanup

* work with relative URLs

* missing return

* fix typo

Co-authored-by: Dzianis Dashkevich <98566601+dzianis-dashkevich@users.noreply.github.com>

* lint

* lint

---------

Co-authored-by: Dzianis Dashkevich <98566601+dzianis-dashkevich@users.noreply.github.com>
2024-08-21 18:10:14 +02:00
André M.
e5dbdb6288
feat: add support for #EXT-X-I-FRAMES-ONLY (#173)
* feat: add support for #EXT-X-I-FRAMES-ONLY

Handles I-frames-only `segments`, providing a basis for the creation of trick-play functionality.

**parse-stream.js**

- add match statement for parsing the `EXT-X-I-FRAMES-ONLY` tag
- add test case

**parser.js**

- add a property `iFramesOnly` to the `manifest`
- add a function to validate the minimum version required
- trigger a `warn` event if the minimum version required is not supported or undefined, as required by the specification
- add test case

https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.3.6

- update `README.md` documentation

* Update src/parse-stream.js

* Update test for #171 changes

---------

Co-authored-by: mister-ben <1676039+mister-ben@users.noreply.github.com>
2024-08-16 17:49:27 +02:00
Logan Song
3f49bb4331
EXT-X-CUE-IN ":" is not necessary (#181) 2024-07-06 07:43:15 +01:00
André M
990c6ced71
feat: add support for #EXT-X-I-FRAME-STREAM-INF (#171)
* feat: add support for #EXT-X-I-FRAME-STREAM-INF

Exposes I-frame playlists through the `iFramePlaylists` property, providing a basis for the creation of trick-play functionality.

**parse-stream.js**

- add match statement for parsing the `EXT-X-I-FRAME-STREAM-INF` tag
  - apply type conversions as indicated in the specification for attributes `BANDWIDTH`, `AVERAGE-BANDWIDTH`, `FRAME-RATE`
  - overwrite the `RESOLUTION` attribute with an object representing the resolution
- extract a function to parse the `RESOLUTION`
- add test case

https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.2

**parser.js**

- add an array property `iFramePlaylists` to the `manifest`
- add each `i-frame playlist` to `iFramePlaylists`
- trigger a `warn` event if the `BANDWIDTH` or `URI` attributes are missing, as required by the specification
- add test case

https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.3

- update `master-fmp4.js` to add `iFramePlaylists`
- update `README.md` documentation

* test: update fixtures to take iFramePlaylists property into account

* refactor(stream-inf): uses the parseResolution function to extract a resolution object

---------

Co-authored-by: mister-ben <1676039+mister-ben@users.noreply.github.com>
2024-07-06 07:41:01 +01:00
Adam Waldron
42472c5979
feat: parse content steering tags and attributes (#176) 2023-08-07 09:19:35 -07:00
Harisha Rajam Swaminathan
73d934ce58
fix: merge dateRange tags with same IDs and no conflicting attributes (#175) 2023-08-07 11:58:23 -04:00
Harisha Rajam Swaminathan
6944bb1b2f
fix: add dateTimeObject and dateTimeString for backward compatibility (#174) 2023-08-07 11:57:27 -04:00
Piotr Błażejewicz (Peter Blazejewicz)
4d3e6ce140
docs: correct customType option name (#147)
`Parser.addParser` is a pass through to `ParseStream.addParser`, which uses and
documents `customType`. The same is in public docs (README)

Thanks!
2023-07-07 20:01:09 -04:00
Harisha Rajam Swaminathan
e7c683f5f6
feat: Add PDT to each segment (#168) 2023-07-07 15:10:40 -04:00
Genteure
4adaa2c600
feat: output segment title from EXTINF (#158) 2023-07-06 19:03:35 -07:00
Harisha Rajam Swaminathan
516ab67d17
fix: rename daterange to dateRanges (#166) 2023-06-28 14:14:06 -04:00
Adam Waldron
8c47d81a6c
feat: add independent-segments support (#165) 2023-05-22 21:34:13 -07:00
hswaminathan
fc746e7d7f parse end-on-next 2023-05-01 17:23:03 -04:00
hswaminathan
33b24c4cb5 add support for multiple daterange tags and add tests 2023-04-22 01:07:58 -04:00
hswaminathan
1124e08af5 update docs, add warning and tests 2023-04-20 21:58:49 -04:00
hswaminathan
9e4c3ad0ba add test 2023-04-18 16:01:23 -04:00
hswaminathan
8059d61a73 Add support for Daterange 2023-04-18 00:47:17 -04:00
Essk
8d56f30c4d
fix: non standard tag match (#156)
Prevent non-standard tags from being erroneously matched as standard tags by enforcing the colon tag delimiter

BREAKING CHANGE: Missing colon (:) tag delimiters are no longer supported
Closes #22
2022-09-27 17:05:11 +01:00
Grzegorz Blaszczyk
d51e93fa75 feat: parse FRAME-RATE as a number (#150)
BREAKING CHANGE: parser changes an output type for 'FRAME-RATE'
attribute from a string to a number.
2022-08-02 12:18:20 -04:00
Brandon Casey
4e7c9ebdc1
fix: EXT-X-KEY support playready keyformat (#143) 2021-06-15 13:24:18 -04:00
Brandon Casey
ae5fa64118
feat: add key property to init segment/map (#141) 2021-05-19 10:42:32 -04:00
Brandon Casey
9f62c85ef0
fix: ignore fairplay content protection (#140) 2021-05-19 10:41:24 -04:00
Brandon Casey
31ed0528b1
refactor: llhls attributes to camel case (#138) 2021-03-04 13:32:52 -05:00
Brandon Casey
2c2dffe68f
feat(llhls): preloadSegment, associate parts/preloadHints with segments, unify byterange handling (#137) 2021-03-04 13:06:25 -05:00
Brandon Casey
98f0421468
feat: add version parsing and remove totalduration (#135) 2021-01-22 13:07:47 -05:00
Brandon Casey
4f4da3d52b
feat: add warn/info triggers and defaults for ll-hls tags (#131) 2021-01-22 13:06:53 -05:00
Brandon Casey
fb3b629357
chore: remove unused and non-standard tag #ZEN-TOTAL-DURATION (#133) 2021-01-21 15:38:22 -05:00
Brandon Casey
985ab68718
feat: add support for #EXT-X-PART-INF (#126)
https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_hls#3282434
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-4.4.3.7
2021-01-20 10:37:14 -05:00
Brandon Casey
03f4345096
feat: add support for #EXT-X-RENDITION-REPORT (#124)
https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_hls#3282435
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-4.4.5.4
2021-01-20 10:33:48 -05:00
Brandon Casey
7f82f53d49
feat: add support for #EXT-X-SERVER-CONTROL (#121)
https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_hls#3281374
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-4.4.3.8
2021-01-20 10:31:06 -05:00
Brandon Casey
4fd693a11c
feat: add support for #EXT-X-PRELOAD-HINT (#123)
https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_hls#3526694
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-4.4.5.3
2021-01-20 10:24:34 -05:00
Brandon Casey
9f5a224cd7
feat: add support for #EXT-X-PART (#127)
https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_hls#3282436
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-4.4.4.9
2021-01-20 10:12:38 -05:00
Brandon Casey
9cebc864b0
feat: add support for #EXT-X-SKIP (#122)
https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_hls#3282433
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-4.4.5.2
2021-01-20 10:01:28 -05:00
Brandon Casey
f701c0f8c7
chore: update to vhs-utils@3 (#118) 2021-01-11 16:38:45 -05:00
Garrett Singer
08aca73781
fix: fix default EXT-X-BYTERANGE offset to start after the previous segment (#98)
The default value for EXT-X-BYTERANGE is defined by the spec as the first byte
after the previous segment. Prior to this change, the default set by m3u8-parser
was 0.
2020-02-11 15:46:20 -05:00
Brandon Casey
7985794ca0
chore: update generator version and use @videojs/vhs-utils (#95) 2019-08-21 17:50:00 -04:00
Alex Barstow
d835fa88cf feat: parse key attributes for Widevine HLS (#88) 2019-06-25 11:21:16 -04:00
Joe Forbes
0ef040ab93
feat: custom tag mapping (#73) 2019-01-10 09:02:02 -08:00
Brandon Casey
35ff47183c chore: Update to plugin generator 7 standards (#53) 2018-09-07 12:18:05 -04:00
Mayde
6e1c36c942 fix some misspellings (#43) 2018-09-06 11:35:17 -07:00
Matthew Neil
44fc6f8323 feat: add program-date-time tag info to parsed segments (#27) 2018-02-23 11:21:00 -05:00
Ryan Struhl
69a499bb08 Allow parsing custom tags from m3u8 manifest (#30) 2018-01-19 15:49:31 -05:00
Pim
31b6d0bd29 EXT-X-START tag support (#31)
* add support for EXT-X-START tags

* warns about improper START tags
2017-11-20 16:39:02 -05:00
Gary Katsevman
47ef11f890 feat: Rollup (#24)
Update to use Rollup to generate the main and umd files.

BREAKING CHANGE: drop bower support.
2017-06-09 14:00:51 -04:00
Matthew Neil
86100b570c parse FORCED attribute of media-groups (#15) 2017-02-23 13:52:33 -05:00
Owen Edwards
5cb6ae78a5 Pass any CHARACTERISTICS value of a track with the track object (#14) 2017-02-23 11:12:50 -05:00
Zac Shenker
cd3e16dd44 Empty media playlists should have empty segment arrays (#12)
Manifest object is now initialized with an empty segments arrays so that the segments property is never null.
2017-01-10 18:38:37 -05:00
Patrick Wolfe
63dd2e4dad Linter update (#9)
* Added conditional to subsequent PROGRAM-DATE-TIME tags from being read. Now only the first tag encountered in a file is added to the manifest.

* Updated project to use most recent version of video.js standard; applied lint changes to entire project.

* Updated CHANGELOG HEAD section with latest changes.

* Removed node 0.10 and 0.12 from the Travis config.

* Updated date time test to include two #EXT-X-PROGRAM-DATE-TIME tags so that we can verify parser only takes the first instance of the date time tag.

* Reverted changes to make parser only read first #EXT-X-PROGRAM-DATE-TIME tag so that it remains compliant with the standard.

* Updated CHANGELOG to fit latest in head.
2016-09-22 10:29:14 -04:00
Brandon Casey
6d6cc0f0df Remove dependance on lodash and save lots o' bytes (#7)
* upgrade to babel 6 to use transform-object-assign
* remove the need for lodash-merge and reduce size by ~5000kb in gzip form

* change export default to module.exports
2016-07-26 15:13:44 -04:00
Matthew Neil
aef7a9df1a Parse CUE-* tags (#5)
* add watch script and add unknown tags to segments
* add unit test for unknown tags
2016-07-20 18:18:58 -04:00