grafov / m3u8

Parser and generator of M3U8-playlists for Apple HLS. Library for Go language. :cinema:
http://tools.ietf.org/html/draft-pantos-http-live-streaming
BSD 3-Clause "New" or "Revised" License
1.23k stars 313 forks source link

Question: #EXT-X-DISCONTINUITY-SEQUENCE support #118

Closed devangvdesai closed 5 years ago

devangvdesai commented 5 years ago

I noticed that there is #EXT-X-DISCONTINUITY support as seen in m3u8.md

| EXT-X-DISCONTINUITY | MED | 1 | 0.2 |

Is there future support for the #EXT-X-DISCONTINUITY-SEQUENCE (though it's part of protocol version 6)

| EXT-X-DISCONTINUITY-SEQUENCE | MED | 6 | |

Based on my analysis, the EXT-X-DISCONTINUITY-SEQUENCE would be part of MediaPlaylist in structure.go and the reader.go can add a case like so:

case strings.HasPrefix(line, "#EXT-X-DISCONTINUITY-SEQUENCE:"):

and eventually the writer.go can inject it while Encoding.

leikao commented 5 years ago

Hello @devangvdesai , the latest m3u8 supports (un)marshaling EXT-X-DISCONTINUITY-SEQUENCE tag. This PR #112 add feature to support this, welcome to try.

devangvdesai commented 5 years ago

👍 I wanted to open a PR with similar changes. I'm glad this got added.