I'm building a Flash mp3 player to handle streaming mp3s served by Amazon CloudFront (which uses Flash Media Server). I'm using an FLVPlayback 2.5 component to do most of the heavy lifting (I tried an all AS3 method, but any stream automatically stopped开发者_JAVA百科 within 5 - 10 seconds of playing). When I trace out the FLVPlayback's totalTime
property, I get NaN
. This is causing the seek bar to simply not work. This only seems to affect mp3s, as when I load an FLV I get a real value for totalTime
. Does anyone know why this is happening, and if there are any solutions?
Thanks!
After a lot more research, I found that there's no clean solution to this problem. Adobe acknowledges the problem exists, but there's no real fix. The totalTime
property is read/write, so I'm just going to manually set it for each song.
I should note that it may be possible to use server side Actionscript to determine the duration of an mp3 (using a Stream
object), but as of right now, CloudFront does not support server side Actionscript.
Hopefully Adobe remedies this, or I'll be looking at other streaming servers the next time this issue pops up.
精彩评论