-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Refactor WebVTT building logic into WebVTT::Builder #4070
Conversation
# ``` | ||
# | ||
# Accepts an optional settings fields hash to add settings attribute to the resulting vtt file. | ||
def self.build(setting_fields : Hash(String, String)? = nil, &) |
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.
The setting_fields
here is mostly for backwards compatibility. I'm pretty sure — or at least I couldn't find any reference to it — that the fields Invidious adds aren't actually apart of WebVTT
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.
Yeah, it looks completely non-standard. I couldn't find anything about them on MDN
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.
You even wrote a spec for it <3
Can you please rebase your changes? |
Similar to JSON.Build
Co-authored-by: Samantaz Fox <[email protected]>
Removes the add_ prefix for consistency with the other methods in WebVTT::Builder
8caf414
to
a999438
Compare
Rebased |
It works like a charm :D |
Thanks for your PR :D |
#4001 (comment)
Syntax is similar to
JSON.build
.