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

How to display Duration, Position in minutes Options · View
chanduu4u
Posted: Thursday, May 28, 2009 8:32:31 AM
Rank: Newbie
Groups: Member

Joined: 5/23/2009
Posts: 4
Points: 12
Location: India
Can any body help me in displaying Duration, Position in minutes.

thanks in advance

regards..
Chandra
Jake
Posted: Tuesday, June 09, 2009 2:08:15 AM
Rank: Administration
Groups: Administration

Joined: 7/26/2007
Posts: 673
Points: 1,719
Location: USA
HI

This is not currently a feature - but we will ad it to out list.
In the mean time - you can use the JavaScript API to write custom inspectors cor these properties.

http://www.aspnetmedia.com
dkong
Posted: Wednesday, August 12, 2009 10:43:01 AM
Rank: Newbie
Groups: Member

Joined: 8/11/2009
Posts: 5
Points: -235
Location: Perth
Hi, I was just wondering if there has been any progress on this feature, or at the very least if we could get some sample code to implement it ourselves.

I really want to buy these controls but only if I can get the duration/position to display in minutes/seconds, as this is the first thing my customers asked me when they looked at the demo version.
djpaul1963
Posted: Sunday, September 06, 2009 1:07:25 PM
Rank: Newbie
Groups: Member

Joined: 3/29/2009
Posts: 9
Points: 27
Location: Athens Greece
dkong wrote:
Hi, I was just wondering if there has been any progress on this feature, or at the very least if we could get some sample code to implement it ourselves.

I really want to buy these controls but only if I can get the duration/position to display in minutes/seconds, as this is the first thing my customers asked me when they looked at the demo version.


You can do it easilly with a javascript function inside your page. This is what I've done in an aspx page with the following snippet. TPosition is a simple Label. Code works the same for every aspnetmedia component having javascript extensions.

<script type="text/javascript">
setInterval("dp()", 1000);
function dp()
{
var position = ASPNetMedia.Audio("audio").GetPosition();
document.getElementById("TPosition").innerText = Math.floor(position / 60) + ":" + (Math.floor(position % 60).toString().length < 2 ? "0" + Math.floor(position % 60) : Math.floor(position % 60));
}
</script>

Cheers, Paul
tonyaduk
Posted: Wednesday, March 10, 2010 9:29:26 AM
Rank: Newbie
Groups: Member

Joined: 3/10/2010
Posts: 1
Points: 3
Location: Spain
This javascript is just what I'm looking for but is it complete?
I added it to my page and added a label with id = TPosition. When the page is run it works as normal but the label doesn't update with the position. doesn't the setInterval function need to be called somewhere??? Sorry but javascript isn't my strongest point!
Jake
Posted: Wednesday, March 10, 2010 11:07:07 AM
Rank: Administration
Groups: Administration

Joined: 7/26/2007
Posts: 673
Points: 1,719
Location: USA
Yeah - youll have to use a setInterval.

http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/

Code:
function myfunction(){
document.getElementById("FULL_CLIENTID_OF_YOUR_CONTROL").innerHTML="A Value";
}
setInterval(myfunction,100);



http://www.aspnetmedia.com
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.