2 Replies Latest reply on Mar 18, 2010 3:16 PM by Randy Troppmann

    MediaPlayer.bufferTime sprint 10

    Randy Troppmann Level 2

      This problem still exists after implementing the sprint 10 drop:

       

      Setting the bufferTime on the MediaPlayer instance has no effect. I am testing using live video streamed from Adobe Media Encoder via FMS 3.5. I am setting the bufferTime property to 10 just after the mediaPlayer is instantiated. Then I trace these values on MediaPlayerEvent.PLAYHEAD_CHANGE:

       

      trace("MediaPlayerViewMediator handlePlayheadChange: " + [mediaPlayerView.mediaPlayer.bufferTime, mediaPlayerView.mediaPlayer.bufferLength, mediaPlayerView.mediaPlayer.canBuffer]);

      output:

       

      MediaPlayerViewMediator handlePlayheadChange: 0,0.133,true

      MediaPlayerViewMediator handlePlayheadChange: 0,0,true

      MediaPlayerViewMediator handlePlayheadChange: 0,0.133,true

      MediaPlayerViewMediator handlePlayheadChange: 0,0,true

      MediaPlayerViewMediator handlePlayheadChange: 0,0.334,true

      MediaPlayerViewMediator handlePlayheadChange: 0,0.533,true

      MediaPlayerViewMediator handlePlayheadChange: 0,0.267,true

       

      Any ideas? Should I submit a bug?

       

      - Randy

        • 1. Re: MediaPlayer.bufferTime sprint 10
          RyanOConnell Level 2

          I may have some insight into this problem.  The MediaPlayer didn't persist properties as of Sprint 10.  This means if bufferTime was set in the media player, and then later a VideoElement was added to the MediaPlayer, the bufferTime wouldn't be carried over to the VideoElement.   This persisting of properties is a feature this sprint, which is now in the trunk.  As a temporary work around, you can set the buffer right after the media is loaded.  To do this listen for ready or playing state, and the bufferLength will be carried over. 

           

          Ryan O'Connell

          OSMF Engineering

          1 person found this helpful
          • 2. Re: MediaPlayer.bufferTime sprint 10
            Randy Troppmann Level 2

            I just updated from the public trunk, and the setting the bufferTime works as expected in my setup. I didn't have to modify my code as you suggested Ryan.

             

            - Randy