[Ogg a11y] Review of TDHT

Silvia Pfeiffer silviapfeiffer1 at gmail.com
Tue Jan 6 05:09:41 PST 2009


Hi Chris,

On Tue, Jan 6, 2009 at 11:18 PM, Chris Double <chris.double at double.co.nz> wrote:
> Some comments from a quick read of the spec.

Thanks.

>>> I'm not sure what more can be done than making timed text layout skip to the
>>> front of the task queue on the main thread, but I'm not an expert here. (If
>>> Web content can make tasks skip to the front of the queue, I suspect there's
>>> a risk of remote content causing starvation so that some tasks don't get to
>>> run.)
>>
>> I think Chris Double may be able to answer this question.
>
> I'm not sure what the question is, can you elaborate? If it's
> specifically, can web content make tasks skip to the front of the
> queue, then I don't know the answer, sorry. I'm not an expert in the
> HTML 5 event model.

The more general question was whether it would be possible to get the
text in full sync with the video at the expected on and off times.
Some of this, you have replied to below.


>> In the javascript implementations, the "currentTime" attribute of the
>> <video> element in the DOM is polled using the setInterval time to
>> trigger the display of subtitles. This is also not 100% accurated, but
>> only accurate to the given polling interval, which is set to 100ms
>> there.  A time-aligned text that is off by milliseconds is probably
>> ok. But drift over a long time is not ok.
>
> The JavaScript implementations don't need to to do it that way. They
> could add an event listener for the 'timeupdate' event and get the
> time that way without polling. Even then though the event is
> dispatched asynchronously so it doesn't get run at the exact moment of
> the frame. But from within that event handler if you ask for the video
> elements currentTime then it will return the exact time of the current
> frame, not the frame when the event was dispatched.



More information about the Accessibility mailing list