通过 RTMP (Amazon CloudFront) 流式传输 mp3 时没有 TotalTime 属性?
我正在构建一个 Flash mp3 播放器来处理 Amazon CloudFront(使用 Flash Media Server)提供的流媒体 mp3。我使用 FLVPlayback 2.5 组件来完成大部分繁重的工作(我尝试了全 AS3 方法,但任何流都会在播放后 5 - 10 秒内自动停止)。当我追踪 FLVPlayback 的 totalTime
属性时,我得到 NaN
。这导致搜索栏根本无法工作。这似乎只影响 mp3,因为当我加载 FLV 时,我会得到 totalTime
的实际值。有谁知道为什么会发生这种情况,以及是否有任何解决方案?
谢谢!
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 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过大量研究后,我发现这个问题没有干净的解决方案。 Adobe 承认问题存在,但没有真正的解决方案。
totalTime
属性是读/写的,因此我只需为每首歌曲手动设置它。我应该注意到,可以使用服务器端 Actionscript 来确定 mp3 的持续时间(使用
Stream
对象),但截至目前,CloudFront 不支持服务器端 Actionscript。希望 Adobe 能够解决这个问题,否则下次出现此问题时我将考虑其他流媒体服务器。
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.