-
Bug
-
Resolution: Fixed
-
P3
-
fx2.1, 7u6
-
2.2-b15 and 2.1, Windows 7 x64
We used MediaPlayer to do slow motion replay and run into the following problem: seek + setRate combination was always changing the rate of the file but it was rewinding to correct position only in 50% of invocations. For the rest of invocations it was either just playing from the beginning or from the current position.
Here is the code we're using:
mp.setOnMarker(new EventHandler<MediaMarkerEvent>() {
@Override
public void handle(MediaMarkerEvent mme) {
if (mme.getMarker().getKey().startsWith("Stop")) {
if (mp.getRate() == 1) {
mp.seek(media.getMarkers().get("Start" + mme.getMarker().getKey().substring(4)));
mp.setRate(0.5);
} else {
mp.pause();
scene.setRoot(bpListView);
}
}
});
Video file is H.264 video in mp4 format.
Here is the code we're using:
mp.setOnMarker(new EventHandler<MediaMarkerEvent>() {
@Override
public void handle(MediaMarkerEvent mme) {
if (mme.getMarker().getKey().startsWith("Stop")) {
if (mp.getRate() == 1) {
mp.seek(media.getMarkers().get("Start" + mme.getMarker().getKey().substring(4)));
mp.setRate(0.5);
} else {
mp.pause();
scene.setRoot(bpListView);
}
}
});
Video file is H.264 video in mp4 format.