Automatic linebreaking of WebVTT subtitles is not supported |
||||
Issue descriptionFrom the spec: https://w3c.github.io/webvtt/#introduction-multiple-lines "Line breaks in cues are honored. User agents will also insert extra line breaks if necessary to fit the cue in the cue’s width. In general, therefore, authors are encouraged to write cues all on one line except when a line break is definitely necessary." This page uses the example from the specification: https://people.igalia.com/fwang/webvtt-tests/subtitle-linebreaking.html Linebreaking happens for the long (third) subtitle in Gecko, but not in Chromium. On Chromium/Linux, the subtitle goes out of the screen while on Chrome/macOS the size of the subtitle becomes smaller to remain inside the video width. I have not tried on Windows (yet).
,
Nov 4 2017
I'm pretty sure this isn't entirely broken, but haven't looked into what's going on here.
,
Nov 4 2017
I think srirama may have just fixed this via issue 551245 , since that same block also applied 'white-space: pre' to the cue (for, to me, unknown reasons...)
,
Nov 7 2017
Yes, verified and it wraps properly after the patch.
,
Nov 7 2017
Thanks for the quick reply. It looks like https://chromium.googlesource.com/chromium/src.git/+/e6b16d301f0da8a22bfba7ab5997771af0459cf5%5E%21/#F2 could be easily ported to WebKit, I'll give a try later (for the record it's https://bugs.webkit.org/show_bug.cgi?id=179237). |
||||
►
Sign in to add a comment |
||||
Comment 1 by ligim...@chromium.org
, Nov 3 2017