-
Bug
-
Resolution: Fixed
-
P4
-
7u15
-
32 and 64 bit Win-XP Windows-7 and Mac OSX
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8131951 | 7u40 | Kirill Kirichenko | P4 | Closed | Fixed |
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.
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.
- backported by
-
JDK-8131951 Playing media by providing StartTime and StopTime, it plays first 2-3 frame of the Media then it starts playing from the given position.
-
- Closed
-