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 315 forks source link

Question: Custom TAGs #82

Closed md2k closed 5 years ago

md2k commented 7 years ago

Hi @grafov , i not sure maybe i overlooked, but do we have support of custom TAGs, for example it can be handy for implementation of custom DRM like system.

Thanks in advance.

grafov commented 7 years ago

No, you are not overlooked, the library doesn't support custom tags. I didn't think about such level of flexibility. If think about realization of such feature it would look like a handler function that accepts playlist type (master or media), token name and value. So when parser meets an unknown tag it calls this function.

hazcod commented 6 years ago

Would this mean the parsing of tvg-* tags?

#EXTINF:-1 tvg-id="Nat Geo HD BE" tvg-name="National Geographic HD BE" tvg-logo="http://picon.space/nationalgeographichd.png" group-title="group",National Geographic HD BE
bradleyfalzon commented 6 years ago

Yeah, with something like what I proposed in https://github.com/grafov/m3u8/pull/83#issuecomment-298267652 should do that.

xybydy commented 5 years ago

I am not sure if I should create a pull request since I didn't test it comprehensively but I have implemented custom tags support on my fork.