4
我試圖讓fullduration我的MP3文件,但它返回我的NaN,不能讓我的MP3文件fullduration中的Flowplayer
這裏是我的代碼:
<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>
我也收到同樣的錯誤......請幫我太 – 2011-05-23 10:58:05
你嘗試'的console.log(這一點。 getClip()。fullDuration)'並且看看它實際上是你想要解析爲一個整數嗎? – 2012-03-07 14:09:48
@MikeL。它應該是一個浮動。 – 2012-03-11 17:01:42