videojs / m3u8-parser

An m3u8 parser.
Other
471 stars 98 forks source link

feat: add support for #EXT-X-DEFINE #185

Closed mister-ben closed 1 week ago

mister-ben commented 2 months ago

Adds support for #EXT-X-DEFINE.

This requires the parser to have additional information it currently doesn't know: the playlist's URI, and for a media playlist, any variables that have been defined in the main/multivariant playlist. The proposal is to pass an object with the url and defined variables as a constructor argument.

This would need changes to http-streaming to make use of it, to pass those options in.

mister-ben commented 2 months ago

I don't remember, do the error triggers stop the rest of the manifest from processing?

As is, no, it would be the responsibility of http-streaming or another consumer to listen to that error event and to reject the playlist. Throwing an error and not returning any manifest would be more spec compliant, if we want to do that.