From: Steve McMillen <[EMAIL PROTECTED]>
Subject: Re: Javascript SetPosition() hangs on buffering
Try preloading the page with PREFETCH=TRUE in the EMBED/OBJECT tag to see if
that allows you to call SetPosition w/out having to start the stream first
with DoPlay. The reason I think this will work is set position establishes
the connection to the server immediately upon plugin load and also prefetches
information about the stream. It is essentially like hitting play and then
pausing the stream right before it begins.
[EMAIL PROTECTED]
RealForum wrote:
>
> From: Jamie Ciocco <[EMAIL PROTECTED]>
> Subject: Javascript SetPosition() hangs on buffering
>
> Hi all --
>
> I'm having a problem using SetPosition() javascript -- it works fine on
> the Mac, but on the PC, setting the position to a point just a couple
> minutes ahead causes the status to hang on "buffering" for a good 15
> minutes or so before the audio finally kicks into action. If I start the
> audio manually, then seek ahead manually, the performance is far better.
>
> Here's the relevant code of the JS function that's called:
>
> if (document.audio) {
> if (document.audio.CanPlay()) { document.audio.DoPlay() }
> document.audio.SetPosition(timeInMillisec);
> }
>
> A couple notes:
> - If the audio is already playing or paused, this code works fine.
> - I read on the forum that only Macs needed to use the DoPlay() command
> before calling SetPosition(), but when I tried it on the PC it didn't work
> without DoPlay().
> - I saw some code on the forum with a 'return true;' after the
> SetPosition(). Could this be the key to my problem? When I tried to
> experiment with this on the Mac, my control panel disappeared and the
> contents of the frame were replaced by the single word "true."
>
> Please let me know ASAP if you have any ideas as to the problem or if you
> have a brief example that you know works properly.
>
> Thanks so much!
> jamie ciocco
*******************************************************
The RealForum is an email discussion group focused on using RealNetworks
products. The RealForum is a place to post messages about the best methods
for creating content using RealNetworks technologies and the planning and
implementation of streaming-media web sites. Archives of RealForum can
be found at http://realforum.real.com
If you ever want to remove yourself from this mailing list,
you can send mail to <[EMAIL PROTECTED]> with the following
command in the body of your email message:
unsubscribe realforum
or from another account, besides the address you subscribed with:
unsubscribe realforum <[EMAIL PROTECTED]>