Skip to content

Conversation

omerholz
Copy link
Contributor

@omerholz omerholz commented Oct 31, 2019

Adding support for parsing HLS WebVTT X-TIMESTAMP-MAP tag.
for more details see: https://tools.ietf.org/html/rfc8216#section-3.5

This PR keeps full backward compatibility. It adds a new structure TimestampMap to store the timestamp map, a new parser HlsWebVTTParser to parse webvtt payload that may or may not have X-TIMESTAMP-MAP tag and a new HlsWebVTT class to tie everything together:

vtt = HlsWebVTT.read('my_hls_subtitle_segment.vtt')
vtt.captions
vtt.timestamp_map.local
vtt.timestamp_map.mpegts

@omerholz
Copy link
Contributor Author

omerholz commented Nov 4, 2019

@glut23 would love your feedback

@glut23
Copy link
Owner

glut23 commented Nov 22, 2019

Hi @omerholz apologies for replying this late. I am thinking that we could incorporate this parsing functionality as part of the WebVTT class, so the user can parse a vtt file and read the HLS data if present. What do you think? Thanks for your contribution.

@omerholz
Copy link
Contributor Author

omerholz commented Dec 5, 2019

I'm game to place it there @glut23
I'll ping you once I get to it

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

Successfully merging this pull request may close these issues.

2 participants