From: "Rylan North" <[EMAIL PROTECTED]>
Subject: Re: callback examples?
Brad,
Thanks for taking the time to answer. Unfortunately, I had already tried
your suggestion. The problem seems to be that once DoPlay() is called the
player gets busy contacting and buffering and then forgets to start from
where I've told it to, instead starting from the beginning of the clip.
This morning I came up with a hack to get around the problem. I loop around
until buffering is completed and then I set the position. Here is a
fragment of a switch statement that resides in a function for changing the
position.
.................
var RVstate = V.GetPlayState();
switch (RVstate)
{
case 0: // player is stopped
if (V.CanPlay())
{
V.DoPlay(); // start the player
var nowState = 0;
do // loop to wait until playstate is 3
{
nowState = V.GetPlayState();
} while (nowState != 3);
V.SetPosition(m); // buffering is done, now I can set the position
}
break;
case 1: // player is contacting
................etc.
Even though it looks like I don't need callbacks to solve this problem my
curiousity is now awakened. Could anybody tell me of an instance where I
would need to use the onPositionChange() callback along with the code that
accomplishes it?
Thanks,
Rylan North
*******************************************************
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]>