Implement WebVTT VTTCue lineAlign and positionAlign attributes

Issue #11025599 • Assigned to Frank L.

Details

Created
Feb 22, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Chrome
  • Safari
  • Opera
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

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.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Venkat K.”

      Changed Assigned To from “Venkat K.” to “Frank L.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in