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