flash - How to detect when video is buffering? -
My question is today with Flash AS3 video buffering (streaming or progressive) when I'm buffering the video I want to be able to find out, so I can show some kind of animation which tells the user to wait a little while.
Currently starting my video Place it on frame 1 for 3-4 seconds and then play. Kinda has given the impression that the video is either paused or broken: (
update
Thanks I think that now I have to face in the right direction. I think the status of working in the key is "NetStream.Buffer.Empty"
, so I added some code to see if it would trigger my animation or trace statement. Not luck, but when buffer is done it triggers my code Rega: / Maybe my video is always somewhere between buffer and empty
and buffer. Completed
This is the reason why when I buffer empty
? < / P>
current code
public function netStatusHandler (Event: NetSatSevent): Zero {// NET Status Event Switch (Event.info.code) {Case: "NetStream.Buffer. Empty ": Trace (" buffering! "); // - Never add add-build (buffer loop); //" brake does not execute; "The case" NetStrea M.Buffer.Full ": Trace ( "☼☼☼ FULL!"); // & lt; - t Congress works here awayBild (buffer omitted); // & lt; - Some other code breaks it; Case "NetStream.Buffer.Flush": trace ("☼☼☼ FLUSH!"); // It is not sure that this is a critical break}}
Rolled player I know that the FLVPlayback client has a built-in one.
If you are not using FLVPlayback, the netstream object becomes a netstatus eve in which every time it starts or buffering stops you to capture that event and play your animation with it. Should be able to hide / hide.
Comments
Post a Comment