w3c / webvtt

WebVTT Standard
https://w3c.github.io/webvtt/
Other
104 stars 29 forks source link

Lost captions at High or Low Position without Size or Alignment : Issue at spec level? #500

Open chrislachance opened 3 years ago

chrislachance commented 3 years ago

Wrote to the Public TTWG group this morning about this. I'll copy what I wrote there here. However TLDR is, high or low position value set without alignment or size in most browser either crushes or hides the caption completely. I believe it is an issue with the way the spec is written, not the browser implementation itself.

Initial thread "Hi all, not sure if you are the right group, but I’m seeing consistent cross-browser issues with the rending of VTT tracks where position is set to a high number or low number – alignment and size are not.

In each case text is either lost, or crushed to a single character, and it seems it has something to do with the spec’s expectations themselves.

You can see the issue live in any browser here by increasing position to 100. https://ronallo.com/demos/webvtt-cue-settings/

There are slews of other cross-browser issues as well – https://chrislachance.com/web-captions-3-caption-styling-challenges/ which I’ve filed as bugs for each modern browser."

Follow-up thread "I think it may have something to do with this line on entry 2 (https://www.w3.org/TR/webvtt1/#processing-cue-settings)

“If the computed position alignment is center, and the computed position is greater than 50. Let maximum size be the result of subtracting computed position from 100 and then multiplying the result by two.”

Whereas, I’d expect every cue to have some sort of minimum width once reaching N characters, if size or alignment isn’t set AND also still be on-screen even if a high/low position value would typically push it completely off-screen."