-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Enhancement] RFC8216 - support X-TIMESTAMP-MAP #38
Comments
A simple workaround could look something like this, but presumably merely pretending it's valid is not acceptable as a PR: diff --git a/parser.js b/parser.js
index fa80072..ff97920 100644
--- a/parser.js
+++ b/parser.js
@@ -67,6 +67,10 @@
/* HEADER */
while(lines[linePos] != "" && lines[linePos] != undefined) {
+ if(lines[linePos].indexOf("X-TIMESTAMP-MAP") != -1) {
+ linePos++
+ continue
+ }
err("No blank line after the signature.")
if(lines[linePos].indexOf("-->") != -1) {
alreadyCollected = true There seems to already be a |
Hmm, this is not strictly conformant with the spec: https://www.w3.org/TR/webvtt1/#file-structure |
closing until/unless the spec is updated to make this valid |
Thanks @Frenzie, @silviapfeiffer and @dontcallmedom. The challenge is that there is a bit of a spec fight between W3C and RFC. WebVTT team have deprecated header support. Roger Pantos over at Apple did not get the memo, so it has ended up in the final RFC for HLS, but not in W3C. Here's Roger Pantos' (The Grandfather of HTTP Live Streaming) take: From a WebVTT support in HLS perspective, Pantos takes the view that "At this point there’s probably more VTT content containing X-TIMESTAMP-MAP out there in the world than not, so we have to continue to support that syntax.", so it has remained in the RFC. Would webvtt.js consider an "Warning (or Info): Headers are not standard in the official W3C webVTT spec, but are acceptable in HTTP Live Streaming in accordance with RFC8216"? The compromise may satisfy both camps (W3C and HLS RFC) and allow end-users to validate their files without loglevel of error. One of the major use-cases of webVTT out there is HTTP Live Streaming, and RFC is a genuine RFC. Thanks for listening. |
The HLS RFC8216 https://datatracker.ietf.org/doc/html/rfc8216#section-3.5 has extended the webVTT spec to support
X-TIMESTAMP-MAP
.Although
X-TIMESTAMP-MAP
is not part of the w3c spec,X-TIMESTAMP-MAP
is now part of an official RFC.It would be useful if webvtt.js supported this header without generating error, so that HLS segmented webVTTs can be validated using webvtt.js.
Test case using https://quuz.org/webvtt/
Current behavior "Line 2: No blank line after the signature."
Expected behavior "This is boring, your WebVTT is valid! (1ms)"
Thanks!
The text was updated successfully, but these errors were encountered: