2 Replies Latest reply on Apr 9, 2010 4:14 PM by RyanOConnell

    Trouble getting Seek Event


      I’m working with progressive video. I am simulating seek functionality. To do this I must first monitor when someone attempt to seek. In the sprint 10 release I was listening for the SeekEvent.SEEKING_CHANGE however this is no longer working for me in the latest code. What do I need to do differently now? It gets as far as the listener being attached but the onSeekChange method never gets called.


      private function loadURL(url:String):void



                      if (media)


                                      media.addEventListener(MediaErrorEvent.MEDIA_ERROR, onMediaError, false, 0, true);

                                      media.addEventListener(MediaElementEvent.TRAIT_ADD, onTraitAdd);




      private function onTraitAdd(event:MediaElementEvent):void


                      switch (event.traitType)


                                      case MediaTraitType.SEEK:

                                                      _seekTrait = media.getTrait(MediaTraitType.SEEK) as SeekTrait;

                                                      if (_seekTrait != null)


                                                                      _seekTrait.addEventListener(SeekEvent.SEEKING_CHANGE, onSeekChange);




        • 1. Re: Trouble getting Seek Event
          WebAppEngineer Level 1




          I found a way to add the same listener to the player




          I have also figured out that both ways work with streaming video but neither works with progressive video.


          I am assuming seeking is somehow disable. How can I re-enable it?

          • 2. Re: Trouble getting Seek Event
            RyanOConnell Level 2

            There are a couple of ways for seeking to fail.  The first is if the video is progressive and you are attempting to seeking into a portion that hasn't downloaded yet.  The second is if the video has no metadata related to it's duration.  Could you post or email me the URL that you are using?



            Ryan O'Connell