Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-18866

VideoDisplay hangs when seeking a video with only 1 keyframe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.3 (Release)
    • None
    • mx: Video
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      This problem existed in Flex 2.0.1, and still exists in Flex 3.3.
      Steps to reproduce:
      Create a Flex project with the following application MXML:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
      <mx:VideoDisplay id="vid" source="http://comp.mixpo.com/ti/035a8078-3d4b-4937-850e-7d538d903030/FLV640.flv"
      autoRewind="false" autoPlay="false" />
      <mx:Text text="

      {vid.state}

      " />
      <mx:HBox>
      <mx:Button label="Play" click="vid.play()" />
      <mx:Button label="Pause" click="vid.pause()" />
      <mx:Button label="Seek" click="vid.playheadTime = 5" />
      </mx:HBox>
      </mx:Application>

      1. Compile and run it and watch the status message (which is the video state).
      2. When it is done loading, click Play.
      3. Click Seek to seek 5 seconds into the video.
      4. The video status is "seeking", and never changes.

      Actual Results:
      The video status is "seeking", and never changes.

      Expected Results:
      The video would seek to the beginning, and return to the "playing" or "stopped" state.
      This video file is very short (12 seconds) so it has only 1 keyframe. So Flash Player should discover this while attempting to seek further into the video, and eventually fall back to the beginning.

      Workaround (if any):
      Looking at the code for VideoPlayer, it appears to have some incomplete seek failure/recovery code. For example, there is a variable invalidSeekTime whose value is tested in a few places, but its value never changes from false!
      I fixed this seeking problem by modifying the VideoPlayer.httpOnStatus function, by changing the case for "NetStream.Play.Stop" to:
      case "NetStream.Play.Stop":
      delayedBufferingTimer.reset();
      if (invalidSeekRecovery)

      { invalidSeekTime = false; invalidSeekRecovery = false; setState(cachedState); seek(0); }

      else if (invalidSeekTime)

      { recoverInvalidSeek(); }

      else
      switch (_state)

      { case PLAYING: case BUFFERING: case SEEKING: httpDoStopAtEnd(); break; }

      break;

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: