Hi,

Frankly, I don't think you'll ever get that to work reliably barring
receiving a notification from the player that the video has finished
playing (which would require that you use a specific player, which
isn't as desireable as just letting the user choose by sending the
movie data).  There are too many variables -- such as whether the user
paused the video for a minute to take a phone call, etc.  I wouldn't
be surprised if some browsers fired the window load event when the
video was ready to start playing rather than when it finishes copying
(I know it waits for images, but perhaps some vendors treat movies and
other long-running content differently), and so network delays in the
middle that hold up the video would mess up your timing.  Etc.
Instead, FWIW, I'd recommend revising the UI approach.
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jun 11, 9:15 pm, mb2000inc <[email protected]> wrote:
> I have a timer setup on the page, where I have a div tag that's
> playing a 20 second video.  When it's done, the div tag fades out.
> That's the great part... it works locally...
>
> However, when it's put out to the rest of the network, the timer isn't
> quite right.
>
> Anyone know how to tweak the timer across multiple browsers on the
> network?  (eventually, my site will go live and I need to have this
> working before the live date)
>
> Here's the code.
>
>         <script type="text/javascript" src="js/prototype.js"></script>
>         <script type="text/javascript" src="js/scriptaculous.js"></
> script>
>         <script type="text/javascript">
>         <!--
>         var browserName=navigator.appName;
>         if (browserName=="Microsoft Internet Explorer")
>          {
>         Event.observe(window, 'load', function() {
>                 var fade=setTimeout("fadeout()", 41500);
>                 var hide=setTimeout("$('DIVNAME').hide()", 42500);
>             });
>
>             function fadeout(){
>                 new Effect.Opacity("DIVNAME", {duration:1.0, from:1.0,
> to:0.0});
>             }
>                          }
>                          else
>                           {
>             Event.observe(window, 'load', function() {
>                 var fade=setTimeout("fadeout()", 40400);
>                 var hide=setTimeout("$('DIVNAME').hide()", 41500);
>             });
>
>             function fadeout(){
>                 new Effect.Opacity("DIVNAME", {duration:1.0, from:1.0,
> to:0.0});
>             }
>                            }
>          //-->
>         </script>
>
> Anyone know how to tweak the code so it's consistant across the board?
> I have a link, but because it's work related - I can only share that
> link privately.
> Discretion is the key.
>
> -mb
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to