开发者

No totalTime property when streaming mp3s over RTMP (Amazon CloudFront)?

开发者 https://www.devze.com 2023-03-09 06:32 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消