-
Enhancement
-
Resolution: Fixed
-
P3
-
fx2.0
Currently media markers (cue points) are implemented by means of the ObjectProperty<Pair<String,Duration>>-valued property "currentMarker." This creates a problematic situation when the media player is looping the content and there is only a single marker within the [startTime,stopTime] interval (see RT-14255). In this case the media loops and currentMarker is set to a new Pair<String,Duration> which is the same according to the equals() method as the previous object. The property change notification therefore does not fire for the marker except on the first pass through the media.
One means of resolving the situation would be to set the currentMarker to null when seeking to a time at or before the time value of currentMarker. This would however provoke a notification of listeners of currentMarker with a null-valued property. This is an extraneous notification which would require that listeners are prepared to handle a null property.
A better solution would be to replace the currentMarker property with an onMarker property defined as
public javafx.beans.property.ObjectProperty<MarkerListener> onMarker;
Summary:
1) Add javafx.scene.media.MarkerListener.
2) Remove currentMarker property and associated methods from MediaPlayer.
3) Add onMarker property to MediaPlayer, as well as associated methods setOnMarker() and getOnMarker().
--- CCR information ---
Justification: Without this change the marker event mechanism is awkward as described above so not making the change now will leave us with a suboptimal design. No existing classes other than javafx.scene.media.MediaPlayer itself are affected in the Presidio forest.
Development effort: The development effort is zero as the change has already been made and tested by the development team.
SQE effort: The SQE impact would be at most one person-day to modify the extant marker tests with no effect on TDC.
One means of resolving the situation would be to set the currentMarker to null when seeking to a time at or before the time value of currentMarker. This would however provoke a notification of listeners of currentMarker with a null-valued property. This is an extraneous notification which would require that listeners are prepared to handle a null property.
A better solution would be to replace the currentMarker property with an onMarker property defined as
public javafx.beans.property.ObjectProperty<MarkerListener> onMarker;
Summary:
1) Add javafx.scene.media.MarkerListener.
2) Remove currentMarker property and associated methods from MediaPlayer.
3) Add onMarker property to MediaPlayer, as well as associated methods setOnMarker() and getOnMarker().
--- CCR information ---
Justification: Without this change the marker event mechanism is awkward as described above so not making the change now will leave us with a suboptimal design. No existing classes other than javafx.scene.media.MediaPlayer itself are affected in the Presidio forest.
Development effort: The development effort is zero as the change has already been made and tested by the development team.
SQE effort: The SQE impact would be at most one person-day to modify the extant marker tests with no effect on TDC.
- blocks
-
JDK-8113052 MarkerOutOfRangeRepeatTest fails
-
- Closed
-