Accessibility/IA2 1.3: Difference between revisions

clean-up on the cue text handling for video
(clean-up on the cue text handling for video)
Line 252: Line 252:
   HRESULT play();
   HRESULT play();
   HRESULT pause();
   HRESULT pause();
  HRESULT stop();
   HRESULT un/mute();
   HRESULT un/mute();
   HRESULT get/setVolume();
   HRESULT get/setVolume();
Line 264: Line 263:
     [out, retval] number);
     [out, retval] number);


   IAccessibleTextTrack[] getTextTracks();
   IAccessibleTrack[] getTextTracks();
   IAccessibleMediaTrack[] getAudioTracks();
   IAccessibleTrack[] getAudioTracks();
   IAccessibleMediaTrack[] getVideoTracks();
   IAccessibleTrack[] getVideoTracks();
}
}
</pre>
</pre>


<pre>
<pre>
interface IAccessibleTextTrack : public IUnknown
interface IAccessibleTrack : public IUnknown
{
  HRESULT kind;
  HRESULT label;
  HRESULT language;
  HRESULT enabled;
  IAccessibleTextTrackCue[] getCues();
}
</pre>
 
<pre>
interface IAccessibleMediaTrack : public IUnknown
{
{
   HRESULT kind;
   HRESULT kind;
Line 295: Line 283:
Propose: provide a way to handle text descriptions and other text cues.
Propose: provide a way to handle text descriptions and other text cues.


[Note: here's a mix of my and Silvia suggestions, we get it clear after chat].
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)


AT server fires event (MEDIA_TEXT_CUE_CHANGE) when text cue of a track changes while video/audio is played. AT client handles it and gets current cue text by


<pre>
<pre>
Line 313: Line 308:
   HRESULT startTime;
   HRESULT startTime;
   HRESULT endTime;
   HRESULT endTime;
  HRESULT pauseOnExit;
}
}
</pre>
</pre>


If next event is fired before screen reader finished reading then AT server stops media until AT client gets the current text description, after that AT server makes sure media is playing.


===Text Descriptions and Subtitles for Video and Audio [Silvia description]===
===Text Descriptions and Subtitles for Video and Audio [Silvia description]===