3 Replies Latest reply on Jan 22, 2010 5:42 PM by rshin

    SerialElements 2nd VideoElement plays on after MediaPlayer.seek(0)


      Hello all,


      I am not sure if this is a bug or just my method.  As per a prior post recomendation I added my SerialElement to a MediaPlayer and call play, pause and seek on the parent MediaPlayer.


      view.mediaContainer.mediaPlayer.element = _serialElement;




      If I seek back to the first element (again through the MediaPlayer) and then call play on the CapabilityChangeEvent, I end up on the first serial element as expected however the play only affects the second element. Its sound plays in the background. Calling play again will start the first serial element timer and when it runs out the in progress second element is revealed. Calling play and pause on mouse events will only affect the element currently on display.


      It seems as though this disfunctional behavior is started by the event listener I have.




      Since the MediaPlayer was set to autoPlay = false. I used this event to call play().  For some reason it calls it on the element that is on display prior to the seek(0).  As soon as I took it out and set the MediaPlayer to autoPlay = true, everything works as expected.


      I am able to stop the second serial element while it plays in the background by accessing its trait directly.

      (_pausableVideoElement.getTrait(MediaTraitType.PLAY)as PlayTrait).stop();


      Thank you


        • 1. Re: SerialElements 2nd VideoElement plays on after MediaPlayer.seek(0)
          bringrags Level 4

          When you seek, I don't think you need to call play when the seek ends.  If you were playing before the seek, you should be playing afterwards.  That being said, please file a bug, as I don't think it should be possible for any combination of play and seek calls to get the SerialElement into that state (i.e. where a non-active element's audio is heard).

          • 2. Re: SerialElements 2nd VideoElement plays on after MediaPlayer.seek(0)
            Wout Lemmens

            The following snippet results in same kind of behavior; VideoElements sound still hearable in the background, but other VideoElement visible.


            I couldn't get the code any smaller or better reproducible. But when running the app, pressing the load button will play a movie. If you press the button 4 or 5 times very quickly, most of the times the loading gets mixed up, and you hear multiple videos play.


            When the autoPlay of the MediaPlayer is set to false (and thus an explicit press on the play button is required to start the mediaplayer), it runs without problem. So it seems the autoPlay is triggered multiple times, and some event firing and handling is mixed up.


            Any idea if this is the same kind of issue as reported in FM-330 (http://bugs.adobe.com/jira/browse/FM-330)? Or am I doing something wrong?




            • 3. Re: SerialElements 2nd VideoElement plays on after MediaPlayer.seek(0)
              rshin Level 3

              Hi I am not sure what you see with your example is identical to the FM330. However, I was able to reproduce and filed this as FM-358.   Our engineer will take a look in depth to see if this might be a flash player issue, but it appears to happen when you load a media before "ready" state, which mediaPlayer or mediaplayersprite should take care of unloading of the media.  As a workaround, you might try mediaPlayer.canLoad or canPlay before loading the same media twice or use loadTrait untill wait for the ready state to see if that works.