...

View Full Version : JwPlayer :: Exact postition with getPosition()



phantom007
07-15-2011, 09:04 AM
HI

I was able to get the position of the video by using the jwplayer().getPosition() function but I get something like 171.97 but the timer on the video showed me 2:51. How can I exactly get the position as 2:51 instead of 171.97?

Screenshot: http://i.imgur.com/NzMxk.png

My Code:



<script type="text/javascript">
jwplayer("mediaplayer").setup({
flashplayer: "player.swf",
file: "mane.mp4",
image: "preview.jpg",
events: {
onPlay: function(event) {
timeMsg();
}
}
});


function timeMsg()
{
var t=setTimeout("alertMsg()",100);
}
function alertMsg()
{
var timeline = ( jwplayer().getPosition());
$('#position').text(timeline);
timeMsg();
}

</script>




Any help is appreciated.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum