0 Replies Latest reply on Jul 19, 2010 9:59 AM by tehxike1

    When can VideoPlayer seek()?

    tehxike1 Level 1

      I'm attempting to tell VideoPlayer to seek to a certain part of a  video as soon as it starts loading the video.  The video is being hosted  by FMS and streamed over RTMP.  If I call seek() immediately after  setting the source, it's completely ignored.  It's horribly sloppy, but  this is the only thing I've gotten to work:

       

      private  var _seeked:Boolean;

       

      protected function  videoPlayer_mediaPlayerStateChangeHandler(event:MediaPlayerStateChangeEvent):void
      {
           if (!_seeked && videoPlayer.currentTime != _seekTo)
           {
               videoPlayer.seek(_seekTo);
           }
           else
           {
               _seeked = true;
           }
      }

       

      Is there a better way to do this?