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

Split metadata strings on first colon only #38

Merged
merged 3 commits into from
Aug 6, 2020

Conversation

jaimefps
Copy link

@jaimefps jaimefps commented Jul 3, 2020

fixes #37

Code change to handle metadata fields that contain multiple colons.
For example: X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:0

See WebVtt specs:
https://tools.ietf.org/html/rfc8216#section-3.5

Thanks for this awesome module.

This PR only prevents the code from breaking when multiple colons are present in the metadata string.
It does not include actual full support for X-TIMESTAMP-MAP

Also seeing some work around this metadata in this code:
https://github.com/osk/node-webvtt/blob/master/lib/hls.js#L17

But that line does not match the specs for X-TIMESTAMP-MAP.
Please let me know if you rather I focus on that part of the code, instead of my current PR.

test/parser.test.js Show resolved Hide resolved
Copy link
Collaborator

@goatandsheep goatandsheep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a closer look at the PR. It looks good!

@goatandsheep goatandsheep requested a review from osk August 5, 2020 19:12
@jaimefps
Copy link
Author

jaimefps commented Aug 6, 2020

@osk Please let me know if there is anything you'd like me to focus on to get this into master.

@goatandsheep goatandsheep merged commit 8d1f00c into osk:master Aug 6, 2020
@osk
Copy link
Owner

osk commented Aug 7, 2020

@goatandsheep & @jaimefps thanks both. I've released v1.9.1

@jaimefps, I'm currently not working in the video space so I'm not up-to-date on everything. If there are any features/fixes according to spec/things to make live easier, I'm all ears!

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.

FEATURE: X-TIMESTAMP-MAP/MPEGTS metadata
3 participants