I've been pasting together some (jQuery) code that i've gotten from
diff web sources to add custom controls to an html5 video player.

I've got a status bar that visually displays the progress of the
video.

I'm pretty sure that I can use the same code to show a numerical timer
(ex. "1:23") that starts at 0:00 and increments per second, but I'm
not sure how.

I've got this:

**********************************************************************************************************************
function initVideoProgress() {

      $('video').each(function(index, _video) {

            var $_controls=findControlsForVideo(_video);

            var $_progress_bars=
$_controls.find('.video_progress_bar');



            /* Bind The timeupdate Event For The Video */

                        $(_video).bind('timeupdate', function() {

                          var percentage=0;

                          if ( (typeof this.duration!="undefined") && 
(this.duration>0)) {

                                        
percentage=100*this.currentTime/this.duration;

                          }



                          $_progress_bars.css("width", percentage+"%");

                });

      });

*******************************************************************************************************

any ideas/insights would be mucho appreciated.

Thanks!

-Daniel

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to