-
Notifications
You must be signed in to change notification settings - Fork 163
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 WebVTT #223
Conversation
Use <https://www.iana.org/assignments/media-types/text/vtt> for magic numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add the checks for EOF too because IANA recommends so.
Unfortunately prefix
cannot handle EOF so you'll have to write Vtt
function yourself, similar to zstd for example. You can use bytes.HasPrefix
for non-EOF cases and bytes.Equal
for EOF cases.
When it comes to MIME types and magic numbers IANA is THE authority, so I try to follow them as much as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, sorry for the late reply. I left two suggestions.
Hi, Thank you for the comments. Should be fine now, but please let me know if I need to change anything else. |
I use https://www.iana.org/assignments/media-types/text/vtt for magic numbers, as suggested here.
I have very little experience with file signatures, so maybe that's stupid but I've excluded the fifth and last byte sequences in the link because they end with
EOF
; or is there a way to represent this using the existing functions?