Dynamic rich media component for ASP.Net Flash, Video and Audio controls for C# and VB.Net
Welcome Guest Search | Active Topics | Members | Log In | Register

OnFinish reliability Options · View
brian320fo
Posted: Friday, April 16, 2010 12:55:14 AM
Rank: Newbie
Groups: Member

Joined: 4/16/2010
Posts: 3
Points: 9
Location: USA
I have the following code at the bottom of my page.

<script type="text/javascript">
ASPNetMedia.FlashVideo("FlashVideo1").OnProgress = function(object, position)
{
document.getElementById('<%= Label5.ClientID %>').innerHTML =position;
sequence(position); // Function is located in content page.
}

ASPNetMedia.FlashVideo("FlashVideo1").OnFinish = function(object, position)
{
document.getElementById('<%= btNext.ClientID %>').disabled = false;
document.getElementById('<%= btNext.ClientID %>').style.backgroundColor
= "#000099";
}
</script>

The OnProgress function works just fine, I never have problems with it. However, the OnFinish function seems to only work occasionaly. Sometimes it works with a particular video then the next time I run the same video, the function fails. Some videos will execute the code often and other videos will rarely, if ever, execute the code. What am I missing?
Thank you,
Brian
Jake
Posted: Friday, April 16, 2010 7:52:29 AM
Rank: Administration
Groups: Administration

Joined: 7/26/2007
Posts: 676
Points: 1,728
Location: USA
Will look into the issue.

In teh mean time - can you work around with:

Code:
OnStop (object, position)


Checking of position is close to or at the end of the file? (GetDuration ())

http://www.aspnetflashvideo.com/ASPNetFlashVideo/documentation/?help=ASPNetFlashVideo_JavaScript_API

http://www.aspnetmedia.com
brian320fo
Posted: Saturday, April 17, 2010 11:59:52 PM
Rank: Newbie
Groups: Member

Joined: 4/16/2010
Posts: 3
Points: 9
Location: USA
Sorry, I just realized I posted this in the wrong forum. It should be in the FlashVideo forum.

I did try to use GetDuration but to be honest I find the SDK very vague and was not able to figure out how to incorporate this is an manner that would work. I would need to assign the duration to a variable in JavaScript to compare to actual position. What is the proper way of doing this without using a button as shown in the SDK?

Thanks for your help.

Brian
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.