Alternative approach to scrolling, with demos

Hi all,

As promised, I have put together demos to illustrate how the
alternative approach to scrolling [1,2] would work in practice. The
way I have gone about this is to assume a baseline of WebVTT without
regions, and to try to solve each problem in the simplest way I could
find. The demos make use of basic TextTrack and WebVTT support. I've
tested them in Opera, Safari and Chrome.

== Scrolling as an overlap avoidance ==

Demo: http://people.opera.com/philipj/2014/03/vttscroll/simple.html

When a cue overlaps, it's moved down until it doesn't overlap, then
all the cues are moved up. Scrolling is implemented by moving cues,
not their container.

This approach makes things much more similar to the regular overlap
avoidance. You will end up with cues occupying approximately the same
space in both modes, the only difference is the order.

== Background box tweaking ==

Demo: http://people.opera.com/philipj/2014/03/vttscroll/background.html

WebVTT doesn't do a good job with the cue background right now. The
only thing you can put a background on is the line box. One small
improvement to this would be to allow a background on the cue box
instead. This demo does exactly that, and visually it looks the same
as a single region background.

== Clipping to a maximum number of lines ==

Demo: http://people.opera.com/philipj/2014/03/vttscroll/clip.html

In the demo captions there can be 4 lines visible at the same time,
but the top line is a bit distracting. This demo implements a possible
solution for this problem, by clipping the group of cues to a maximum
number of lines.

== Absolute positioning and scrolling ==

Demo: http://people.opera.com/philipj/2014/03/vttscroll/absolute.html

Finally, an idea for how scrolling might work with absolutely
positioned cues. You simply position all the cues at the point where
scrolling should begin, and they'll scroll up from there.

[1] http://lists.w3.org/Archives/Public/public-texttracks/2013Nov/0012.html
[2] http://lists.w3.org/Archives/Public/public-texttracks/2014Jan/0025.html

Philip

Received on Sunday, 30 March 2014 05:41:47 UTC