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

add support for parsing HLS WebVTT X-TIMESTAMP-MAP tag #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

add support for parsing HLS WebVTT X-TIMESTAMP-MAP tag #25

wants to merge 3 commits into from

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