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

Playing media by providing StartTime and StopTime, it plays first 2-3 frame of the Media then it starts playing from the given position.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7u15
    • javafx
    • 32 and 64 bit Win-XP Windows-7 and Mac OSX

        Hi,

        I am developing a Video Editing software using JavaFx.
        I got a bug by following these steps.

        1. load a MediaFile in Media object
        2. Pass mediaObject in constructor of the MediaPlayer.
        3. Set the default behaviour of the player like setAutoPlay(true) etc.
        4. Set StartTime by calling mediaPlayer.setStartTime(startDuration);
        5. And setStopTime by calling mediaPlayer.setStopTime(stopDuration);

        I use the bellow code for this:

        String MEDIA_URL = new File(sourceMovieFile).toURI().toURL().toString();
        Media media = new Media(MEDIA_URL);
        MediaPlayer mediaPlayer = new MediaPlayer(media);
        mediaPlayer.setAutoPlay(true);

        mediaPlayer.setStartTime(startDuration);
        mediaPlayer.setStopTime(stopDuration);

        MediaViewBuilder mediaViewBuilder = MediaViewBuilder.create();
        MediaView mediaView = mediaViewBuilder.build();
        mediaView.setMediaPlayer(mediaPlayer);
        mediaView.setSmooth(true);


        On Executing the above code Media starts playing and it shows 2-3 starting frames of media file then it starts showing frames from the startTime position.

        The Desired behavior is:

        Where it should not shows the starting frames of the media file, it should show the frames from the position provided by calling setStartTime() method.



         

              stayer Kirill Kirichenko (Inactive)
              rahuljfx Rahul (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported: