Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8122980

MediaPlayer.play() method stops execution by almost 2 minutes while it must be asynchronous

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      8.0-graphics-scrum-b1894-x64

      Description

      According to the following quote of MediaPlayer javadoc, any requests to play() method are asynchronous.

      However, in AudioAreaChart sample in Ensemble8 I encountered 1 min 50 sec lag in play() (or even in setAutoPlay(true)) method when audio was not accessible due to network outage and setAudioSpectrumListener() is attached.

      "The operation of a MediaPlayer is inherently asynchronous. A player is not prepared to respond to commands quasi-immediately until its status has transitioned to MediaPlayer.Status.READY, which in effect generally occurs when media pre-roll completes. Some requests made of a player prior to its status being READY will however take effect when that status is entered. These include invoking play() without an intervening invocation of pause() or stop() before the READY transition, as well as setting any of the autoPlay, balance, mute, rate, startTime, stopTime, and volume properties."

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                almatvee Alexander Matveev
                Reporter:
                mrkam Alexander Kuznetcov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: