Bug 168715 - Implement WebVTT VTTCue lineAlign and positionAlign attributes
Summary: Implement WebVTT VTTCue lineAlign and positionAlign attributes
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-22 03:08 PST by Simon Pieters (:zcorpan)
Modified: 2023-10-12 17:39 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pieters (:zcorpan) 2017-02-22 03:08:57 PST
VTTCue.lineAlign and VTTCue.positionAlign are not supported.

In the WebVTT syntax these are specified after a "," in position and line settings.

Spec:
http://w3c.github.io/webvtt/#webvtt-cue-position-alignment
http://w3c.github.io/webvtt/#webvtt-cue-line-alignment
http://w3c.github.io/webvtt/#parse-the-webvtt-cue-settings
http://w3c.github.io/webvtt/#the-vttcue-interface

Tests:
http://w3c-test.org/webvtt/api/VTTCue/lineAlign.html
http://w3c-test.org/webvtt/api/VTTCue/positionAlign.html

These are supported in Gecko. Bug for Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=633690

I think the use case is basically better control in positioning things.

See http://w3c.github.io/webvtt/#example-0c2976c9 for an example.

00:00:00.000 --> 00:00:04.000 position:10%,line-left align:left size:35%
Where did he go?

Without position-align you need to set position to some value that doesn't correspond to what the author actually intends:

00:00:00.000 --> 00:00:04.000 position:27.5% align:left size:35%
Where did he go?

27.5% here is: intended position (10%) + size/2 (35%/2). Not intuitive.

Having this also makes the mapping from other subtitle formats to WebVTT (and back) more straightforward.
Comment 1 Ahmad Saleem 2023-10-12 17:39:10 PDT
lineAlign & positionAlign.html passing in STP180: https://wpt.fyi/results/webvtt/api/VTTCue/lineAlign.html?label=experimental&label=master&aligned

https://wpt.fyi/results/webvtt/api/VTTCue/positionAlign.html?label=experimental&label=master&aligned

___

Marking this as 'RESOLVED CONFIGURATION CHANGED'. Thanks!

Please reopen, if there is something else to fix here.