Accessibility/IA2 1.3: Difference between revisions

Line 280: Line 280:
===Text cues===
===Text cues===
Propose: provide a way to handle text descriptions and other text cues.
Propose: provide a way to handle text descriptions and other text cues.
1) when the browser has a new cue available for a text track, then the browser fires a "MEDIA_TEXT_CUE_CHANGE" event at AT
2) AT picks up the cue, which causes the browser to set a "pauseOnExit" flag to true on this cue; from here on, the AT and the video play asynchronously
2.a) AT reads out cue and calls "GET_NEXT_CUE" when it is finished, which causes the browser to set the "pauseOnExit" flag to false and unpauses the video if it is paused
2.b) in parallel the browser plays video until the end of the cue; if the "pauseOnExit" flag is true when it reaches the end time of the cue, the video pauses, otherwise it continues playing
repeat from 1)
It should be enough:


<pre>
<pre>
Line 303: Line 291:


   /**
   /**
   * Makes video paused when current cue end time is reached.
   * Switch the state that makes video paused when current cue end time is reached.
   */
   */
   HRESULT pauseOnExit(
   HRESULT pauseOnExit(
Line 310: Line 298:
</pre>
</pre>


[Silvia interface]
Silvia algorithm:
 
1) When the browser has a new cue available for a text track, then the browser fires a "MEDIA_TEXT_CUE_CHANGE" event at AT
2) AT picks up the cue, which causes the browser to set a "pauseOnExit" flag to true on this cue; from here on, the AT and the video play asynchronously
2.1) AT reads out cue and calls "cueText" property when it is finished, which causes the browser to set the "pauseOnExit" flag to false and unpauses the video if it is paused
2.2) in parallel the browser plays video until the end of the cue; if the "pauseOnExit" flag is true when it reaches the end time of the cue, the video pauses, otherwise it continues playing
repeat from 1)
 
Compare to original algorithm:
1) When the browser has a new cue available for a text track, then the browser fires a "MEDIA_TEXT_CUE_CHANGE" event at AT
2) AT handles event and picks up the cue and starts reading of it
3) Do 1) and if AT doesn't picks up the cue when it handles event then stop the video until AT pick up the cue.
 
The disadvantage of this: since video and browser works async then this algorithm may results in that video plays while AT still reads the previous cue. I don't know if it's problem in practice, since we shouldn't get big delays because of async communications.
 
[Track Cue interface]
<pre>
<pre>
interface IAccessibleTextTrackCue : public IUnknown
interface IAccessibleTextTrackCue : public IUnknown
Confirmed users
1,396

edits