tedconf / node-m3u8

Streaming parser for m3u8 files in node
MIT License
188 stars 77 forks source link

#EXT-X-ENDLIST is not added as a tag to the parsed m3u object #8

Open oferh opened 9 years ago

oferh commented 9 years ago

The parser ends the parsing when it finds a #EXT-X-ENDLIST tag but doesn't add it to the tags.

mkozjak commented 8 years ago

This is actually not an issue.

A type needs to be set:

parser.on('m3u', function(m3u) {
  m3u.set('playlistType', 'VOD')
})

EXT-X-ENDLIST will then be appended correctly.

https://github.com/tedconf/node-m3u8/blob/master/test/m3u.test.js#L189

oferh commented 8 years ago

it's a workaround but according to the spec 6.3.4 in the draft an EVENT playlist may also have EXT-X-ENDLIST tag

akhoury commented 8 years ago

I agree with @oferh.

EXT-X-PLAYLIST-TYPE is optional.

https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.7

The EXT-X-PLAYLIST-TYPE tag provides mutability information about the Playlist file. It applies to the entire Playlist file. It is optional.

if this PR https://github.com/tedconf/node-m3u8/pull/16 gets merged, it will take care of this issue.