On 4/29/07, <b class="gmail_sendername">Brian Campbell</b> <<a href="mailto:Brian.P.Campbell@dartmouth.edu">Brian.P.Campbell@dartmouth.edu</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
For the sort of content that we produce, cue points are incredibly<br>important. Most of our content consists of a video or voiceover<br>playing while bullet points appear, animations play, and graphics are<br>revealed, all in sync with the video. We have a very simple system
<br>for doing cue points, that is extremely easy for the content authors<br>to write and is robust for paused media, media that is skipped to the<br>end, etc. We simply have a blocking call, WAIT, that waits until a<br>specific point or the end of a specified media element. For instance,
<br>in our language, you might see something like this:<br><br> (movie "Foo.mov" :name 'movie)<br> (wait @movie (tc 2 3))<br> (show @bullet-1)<br> (wait @movie)<br> (show @bullet-2)<br><br>If the user skips to the end of the media clip, that simply causes
<br>all WAITs on that media clip to return instantly. If they skip<br>forward in the media clip, without ending it, all WAITs before that<br>point will return instantly. If the user pauses the media clip, all<br>WAITs on the media clip will block until it is playing again.
<br><br>This is a nice system, but I can't see how even as simple a system as<br>this could be implemented given the current specification of cue<br>points. The problem is that the callbacks execute "when the current
<br>playback position of a media element reaches" the cue point. It seems<br>unclear to me what "reaching" a particular time means. If video<br>playback freezes for a second, and so misses a cue point, is that
<br>considered to have been "reached"? Is there any way that you can<br>guarantee that a cue point will be executed as long as video has<br>passed a particular cue point? With a lot of bookkeeping and the<br>"timeupdate" event along with the cue points, you may be able to keep
<br>track of the current time in the movie well enough to deal with the<br>user skipping forward, pausing, and the video stalling and restarting<br>due to running out of buffer. This doesn't address, as far as I can<br>
tell, issues like the thread displaying the video pausing for<br>whatever reason and so skipping forward after it resumes, which may<br>cause cue points to be lost, and which isn't specified to send a<br>"timeupdate" event.
<br><br>Basically, what is necessary is a way to specify that a cue point<br>should always be fired as long as playback has passed a certain time,<br>not just if it "reaches" a particular time. This would prevent us
<br>from having to do a lot of bookkeeping to make sure that cue points<br>haven't been missed, and make everything simpler and less fragile.<br><br></blockquote></div><br>In order to capture this kind of situations, with flexibility in mind, I think the concept of "cue points" may be changed to "cue periods"...
<br><br>Method names:<br><div style="margin-left: 40px;">addEnterCuePeriod(time1, time2, callback)<br></div><div style="margin-left: 40px;">removeEnterCuePeriod(time1, time2, callback)<br>
addLeaveCuePeriod(time1, time2, callback)<br></div><div style="margin-left: 40px;">removeLeaveCuePeriod(time1, time2, callback)<br>
</div><br>The callback function mentioned by addEnterCuePeriod will be invoked once when the video enter the period of time bounded by time1 and time2. How the video get to a frame between time1 and time2 doesn't matter.
i.e. the callback function may be invoked by a normally playing video reaching time1, a video being fast forward / wind back into the period between time1 & time2, or a particular timing between time1 & time2 of the video being directly seek for.
<br><br>The mechanism of LeaveCuePeriod is similar, while this time the callback is invoked when the video leave the specified cue period. (Or should this pair of methods left out?)<br><br>With these four methods, one can not only achieve the "bullet point" effect, but also video captions appearance and disappearance.
<br><br>Hope this helps.<br><br>郁<br>