开发者

How to get netstream bytesLoaded and bytesTotal from streaming .mp4?

开发者 https://www.devze.com 2022-12-25 05:25 出处:网络
I have a flex 3 app that uses netstream and a video object to stream .mp4 movies.I want to use the bytesLoaded and bytesTotal properties of the netstream to display the buffering information.I would a

I have a flex 3 app that uses netstream and a video object to stream .mp4 movies. I want to use the bytesLoaded and bytesTotal properties of the netstream to display the buffering information. I would also like to get any information about the number of frames that are dropped if possible.

When I've tested on .flv I'm able to get the information without a problem, but it doesn't seem to work on .mp4.

Is it possible to get this information streaming .mp4? Is there some configuration that I'm missing to make t开发者_JAVA百科hings work the same for .mp4 as .flv?

Thanks!

edit: I should also mention that the streaming is done over RTMP


I figured out that when using RTMP you can't get the byte information because the data isn't downloaded, it's purely streaming.

So instead I'm using the buffering info instead

Math.min(Math.round(ns.bufferLength/ns.bufferTime*100), 100);
0

精彩评论

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