Reputation: 237
I am trying to get fullduration my MP3 file but it returns me NaN,
Here is my code:
<script>
$f("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
clip: {
// our song
url: '1.mp3',
// when music starts grab song's metadata and display it using content plugin
onStart: function(){
var fullduration = parseInt(this.getClip().fullDuration, 10);
alert(fullduration);
var p = this, c = p.getClip(), d;
timer = setInterval(function(){
d = showtime(c.fullDuration);
$("a[href=" + c.url + "] > samp").html(showtime(p.getTime()) + "/" + d);
}, 1000);
}
},
plugins: {
// content plugin settings
content: {
url: 'flowplayer.content-3.2.0.swf',
backgroundColor: '#002200',
top: 25,
right: 25,
width: 160,
height: 60
},
// and a bit of controlbar skinning
controls: {
backgroundColor: '#002200',
height: 30,
fullscreen: false,
autoHide: false,
volume: false,
mute: true,
time: true,
stop: false,
play: false
}
}
});
</script>
Upvotes: 4
Views: 949
Reputation: 11683
I had a look at your code using flowplayer version 3.2.7 and 3.2.8. With version 3.2.7 I get the same error and with 3.2.8 I get the duration in seconds which is what is expected. So you'll need to upgrade and change the following from
http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf
to
http://releases.flowplayer.org/swf/flowplayer-3.2.8.swf
Upvotes: 1