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

Custom Tag Support #138

Closed mjneil closed 5 years ago

mjneil commented 5 years ago

Hello, thanks for an awesome m3u8 project. We came across the need to read and write custom tags to m3u8 so I've implemented it through an interface in my fork, but would love to get this upstream so we don't have to use a fork. I've implemented this in a way that should allow for the parsing of any format as the user will have to implement the interface. This way we do not have to pollute the source code with parsing/writing for non-standard tags that only a few users have need for or that cant be made open source. I've also included example template files for how to implement your own custom tag readers and writers.

I noticed there is an issue as well that this will help resolve #82

coveralls commented 5 years ago

Coverage Status

Coverage increased (+1.2%) to 75.365% when pulling b6f2ecc8d3d81c8c4e68508c3554ef477fd1f339 on mjneil:custom into 920643e7fcabbe6078c26b65e6b38ae9306f5b33 on grafov:master.

mjneil commented 5 years ago

Summary of changes in latest commits:

mjneil commented 5 years ago

Thanks for the review, I've updated with comments on exports.

mjneil commented 5 years ago

@leikao have you had a chance to take another look at this?

mjneil commented 5 years ago

@leikao I updated my PR to do the custom tag parsing first before other tags to support the ability to custom parse already existing tags without conflicts

tmm1 commented 5 years ago

This would be a great addition to the m3u8 library. The diff looks very clean and well tested. :+1: from me.

@leikao What do you think?

mjneil commented 5 years ago

@leikao any update on this?

leikao commented 5 years ago

Thank you for contributing.

mjneil commented 5 years ago

Thanks @leikao I appreciate your time working with me on this. Would you be able to also release a new version tag with these changes please?

leikao commented 5 years ago

A new version v0.11.1 was made @mjneil