New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 663797 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
don't use this account. use chromiu...
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

WebVTT: VTTCue.align = 'center' is not supported

Project Member Reported by ismena@google.com, Nov 9 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Create a VTTCue object
2. Set it's 'align' property to 'center'.
3. 

What is the expected behavior?
The property is set and text of the cue is positioned in the middle of the cue box.

According to https://w3c.github.io/webvtt/#dom-vttcue-align valid align values are "start". "center", "end", "left" and "right".

What went wrong?
"center" is not supported as a valid enum value.
"Middle" is supported instead, but setting it does not result in the text being positioned in the middle of the cue box.

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes

Chrome version: 54.0.2840.71  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 23.0 r0
 
Cc: johnpallett@chromium.org
Components: -Internals>Media Blink>Media
Labels: -OS-Linux OS-All
Cc: renganat...@chromium.org foolip@chromium.org mlamouri@chromium.org
Status: Available (was: Unconfirmed)
Seems like this change is relatively new - noone seems to have touched the implementation in Chrome in a while.

Unless someone's working on it actively, something we could look at in 2017 if the spec is stable?

Comment 3 Deleted

Looks like setting cue align property works in JS:
http://ronallo.com/demos/webvtt-cue-settings/

Keyword for center alignment is 'middle' here:
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp?q=VTTCue.cpp&l=83



Tried using the following VTT file and alignment appeared to work correctly:

WEBVTT FILE

1
00:00:00.500 --> 00:00:05.000 align:right
This is aligned on the <b>right</b>

2
00:00:06.000 --> 00:00:09.000 align:left
This is aligned on the <b>left</b>

3
00:00:11.000 --> 00:00:14.000 align:middle
This is aligned in the <b>middle</b>

Comment 6 by foolip@chromium.org, Nov 11 2016

The spec is very unlikely to change again here, and this is a good first bug for anyone who wants to work on WebVTT. It makes no difference in the syntax because center is already the default, but you will be able to tell the difference in the VTTCue interface, where new VTTCue(0,0,'').align should be "center" but is not "middle".
Confirmed with ismena@ that alignment is working as intended.

The only requirement for this bug is to change the enum from 'middle' to 'center'.

Comment 8 by f...@opera.com, Feb 8 2017

Components: -Blink>Media Blink>Media>Track
This is a dupe of  issue 617989 .
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c129fcf7b932d95939244304d7e6db825c65117b

commit c129fcf7b932d95939244304d7e6db825c65117b
Author: maksim.sisov <maksim.sisov@intel.com>
Date: Thu Feb 16 08:49:13 2017

[WebVTT] Rename Middle to Center

BUG= 663797 

Review-Url: https://codereview.chromium.org/2683633006
Cr-Commit-Position: refs/heads/master@{#450901}

[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/external/wpt/webvtt/webvtt-api-for-browsers/vttcue-interface/align-expected.txt
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/opera/interfaces/VTTCue/align.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/opera/track/webvtt/parsing/001.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/opera/track/webvtt/parsing/support/settings-align.vtt
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/opera/track/webvtt/parsing/support/settings-multiple.vtt
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-add-remove-cue.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-cue-mutable.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-position-auto-rtl.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-position-auto.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc013-settings.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc014-alignment.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc016-align-positioning.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc020-cue-size-align.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc021-valign.html
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h
[modify] https://crrev.com/c129fcf7b932d95939244304d7e6db825c65117b/tools/metrics/histograms/histograms.xml

Owner: maksim.s...@intel.com
Status: Fixed (was: Available)

Comment 11 by f...@opera.com, Feb 16 2017

Cc: f...@opera.com
 Issue 617989  has been merged into this issue.

Sign in to add a comment