Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tags array on HlsMediaPlaylist Segment #7021

Open
philmoss321 opened this issue Feb 27, 2020 · 0 comments
Open

Support tags array on HlsMediaPlaylist Segment #7021

philmoss321 opened this issue Feb 27, 2020 · 0 comments

Comments

@philmoss321
Copy link

philmoss321 commented Feb 27, 2020

[REQUIRED] Use case description

I'm building a stitching library and I need to be able to get custom tags on each individual hls segment as I'm parsing the playlist. Currently, the tags array is only on the media playlist object, rather than on individual segments, making it difficult to parse tags for each segment. Since the HlsPlaylistParser class and the HlsMediaPlaylist class are final, I can't extend to add this behavior. NOTE: This is not to get tags on currently playing segments, this is pre-playback when the manifest is being parsed, so I can stitch the manifests as needed.

Proposed solution

In playlist parser, when the tags are being created on the playlist, you can also assign these tags to the segment objects as it's looping through the playlist. Then add a property on the Segment in the Media Playlist class. I currently have a fork doing just that, I'm willing to create a PR if you believe this is beneficial.

Alternatives considered

Make the respective classes not final, so I can extend them to add custom logic.

OR

If there's something in place already for getting individual segment tags, I'd love to know. I can't find anything for doing this without adding extra loops in my code to assign tags to each segment. I'd prefer this to be as efficient as possible, so doing it in the actual parser class is optimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants