iheartradio / open-m3u8

Open Source m3u8 Parser
Other
248 stars 94 forks source link

Latest EXTINF format #34

Open abkNiazi opened 8 years ago

abkNiazi commented 8 years ago

This library is unable to parse m3u file given in link.

Wopple commented 8 years ago

@abkNiazi The latest specification does not provide support for "attributes" in the #EXTINF tag:

http://tools.ietf.org/html/draft-pantos-http-live-streaming-19#section-4.3.2.1

I've seen specially formatted titles contain key value pairs, but that has to come after the comma that separates the duration and title. We do support a parsing mode to parse a negative duration.

So basically, SS IPTV is producing playlists violating the specification. There's two ways to handle this:

  1. ask SS IPTV to change how they produce playlists
  2. create a special parsing mode to handle this case somehow

Option 1 would be best IMO. If that's not possible, I propose the following solution to option 2:

This is not ideal, but this library cannot build a consistent API if we assume too many special formats from 3rd parties.