i would hope that repainting a progress bar that has not moved 50x/second would not be a normal implementation too. 2x/second seems more realistic (a 300s video with a 600 pixel-wide playbar).<br><br><div class="gmail_quote">
On Mon, Nov 17, 2008 at 1:23 PM, Robert O'Callahan <span dir="ltr"><<a href="mailto:robert@ocallahan.org">robert@ocallahan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">On Tue, Nov 18, 2008 at 8:48 AM, Jonas Sicking <span dir="ltr"><jonas@sicking.cc></span> wrote:<br></div><div class="gmail_quote"><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">

It seems like a pretty big waste of resources to have the following script executing 50 times per second:<br><div>
<br>
function timeupdatehandler(e) {<br>
  video = e.target;<br>
  completed = video.currentTime / video.duration;<br>
  thumb = document.getElementById('thumb' + <a href="http://video.id" target="_blank">video.id</a>);<br>
  thumb.style.left =<br>
    calcScreenPositionUsingOffsetLeftRecursion(thumb.parentNode) +<br>
    thumb.parentNode.offsetWidth * completed;<br>
  progress = document.getElementById('progress' + <a href="http://video.id" target="_blank">video.id</a>);<br>
  progress.style.width =<br>
    progress.parentNode.offsetWidth * completed;<br>
}<br>
<br></div>
Sure, we can pull it off, but why do it? At it certainly doesn't seem to archive the goal of the event which apparently is to reduce the amount of CPU resources used.<font color="#888888"></font></blockquote></div><div>
 <br>
It ensures that the UI is always perfectly up to date. We can throttle timeupdate if we get too busy but otherwise, we may as well update the UI as frequently as the video rendering itself.<br></div></div><div><div></div>
<div class="Wj3C7c"><br clear="all">
Rob<br>-- <br>"He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]<br>


</div></div></blockquote></div><br>