8 Replies Latest reply on Jul 29, 2010 7:28 AM by tomipont

    FLVPlayback 2.5 buffering state never ends

    tomipont Level 1

      I'm using the FLVPlayback to load streaming videos from a FMS. The bug that I'm running into is with the

      buffering state. Several times the video will enter a buffering state that never ends. The
      last video event that's fired in this scenario is the BUFFERING_STATE_ENTERED.
      But if I seek the video on the seekbar, it's playing away.


      Any idea?


      Best regards, tomipont!

        • 1. Re: FLVPlayback 2.5 buffering state never ends
          rtalton Level 4

          I don't think it can be buffering and playing at the same time. Are you sure?

          • 2. Re: FLVPlayback 2.5 buffering state never ends
            Amit Kumar Adobe Employee

            I think you are right FLVPlayback always sets the final state to buffering, even when the video is actually playing.


            The BUFFERING_STATE_ENTERED event of the FLVPlayback component is designed to notify when the instance reaches its buffer threshold and begins the buffering process. Unfortunately, there is one critical state that fails to be reported by this event. If, during normal playback, the buffering threshold is reached, the video should pause and enter the buffering state until the bufferTime value is met. However, while a pause state is entered, buffering is not. Moreover, the buffering property is still false, and stateResponsive is still true. I would definitely assume that in a buffering state these values should be true and false, respectively. Subsuquently, the only way to discern a buffer initiated pause from a user initiated pause is to track all other pause occurences, and flag them as user initiated by tracking a boolean value. If, when the PAUSED_STATE_ENTERED event is fired, that boolean value is false, then you know that a buffering state has been entered.

            This is still problematic, no doubt. going about this method of ensuring you are in a buffering state means you absolutely have to catch all occurences of pauses, whether triggered by the FLVPlayback package or by the user,and flag them, to make sure you have isolated buffering related pauses only.




            • 3. Re: FLVPlayback 2.5 buffering state never ends
              rtalton Level 4

              I tested this and confirmed that the FLVPlayback component can only be in one state at a time. It cannot be"playing" and "buffering".

              Put in a event listener for the fl.video.VideoEvent.STATE_CHANGE, and trace the value out or better put it in a text field on the stage. You will see the state change in response to user interaction or other changes to the player or stream, but the video cannot be playing and buffering simultaneously.


              Using Flex 3.5; Flash Player 10.1; FLVPLayback component from Adobe Flash CS3


              Here is some test code you can use to verify what is happening with your video. Just swap the video for one of your own.



              <?xml version="1.0" encoding="utf-8"?>
              <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"


                          import fl.video.FLVPlayback;
                          import fl.video.VideoScaleMode;
                          import fl.video.VideoEvent;


                          private var playback:FLVPlayback = new FLVPlayback();


                          private function addPlayer():void {
                              //Adds the video player to the UIComponent.        
                              playback.addEventListener(fl.video.VideoEvent.STATE_CHANGE, stateChanged);
                              playback.source = "assets/video/WIB_banner_JF2009.flv";
                              playback.skin = "assets/skins/SkinUnderAllNoFullNoCaption.swf";               
                              playback.autoRewind = true;
                              //Settings for 'Clear' skin:
                              playback.skinBackgroundColor = 0xffffff;
                              playback.skinBackgroundAlpha = 0.20;
                              playback.skinAutoHide = false;
                              playback.autoPlay = false;
                              playback.bufferingBarHidesAndDisablesOthers = true;
                              playback.scaleMode = fl.video.VideoScaleMode.NO_SCALE;
                              playback.width = 775;
                              playback.height = 250;


                          private function stateChanged(event:VideoEvent):void {
                              txtCurrentState.text = event.state;




                      text="Current Video State:"



              • 4. Re: FLVPlayback 2.5 buffering state never ends
                Amit Kumar Adobe Employee

                I tried at my end and I was getting playing and buffering at same time


                private function stateChanged(event:VideoEvent):void {
                                txtCurrentState.text = event.state + "" + new date();



                • 5. Re: FLVPlayback 2.5 buffering state never ends
                  rtalton Level 4

                  The code you posted to print out the state string is pretty much the same as mine. All I can tell you is that it is impossible for that string to display more than one state at a time, since it is overwritten each time FLVPlayback enters a new state.


                  Can you detail exactly how you are arriving at the conclusion that FLVPlayback is in two states simultaneously? Do you have any code which would demonstrate this?

                  • 6. Re: FLVPlayback 2.5 buffering state never ends
                    tomipont Level 1

                    Sorry for my late!


                    You're right. It's not buffering and playing at the same time. Sorry if I was ambigouos. The FLVPlayback play and the next time it is in the buffering state and this state never ends. It is randomly and it is not on the video's end, but anywhere in the video. The play and pause button not works. If in this state I seeked the video on the seekbar, then playing again.


                    This problem is exists on the original FLVPlayback with no extra code too.



                    • 7. Re: FLVPlayback 2.5 buffering state never ends
                      rtalton Level 4

                      I have no experience with Flash Media Server, but I suspect that's where the issue is.

                      Have you tried using the same component with a progressive download FLV file from your web server to see if you can reproduce the issue? Does it happen with any video streamed in from FMS? Are you using multiple bitrates? Is this a live stream? Hopefully you can narrow down the circumstances and someone with experienced with FMS will have an answer for you.

                      • 8. Re: FLVPlayback 2.5 buffering state never ends
                        tomipont Level 1



                        I have to test on my local Developer FMS on my PC, and from this FMS playing the same videos without this error.