public class MediaTrack extends Object implements IPlayableTrack
| Type | Property and Description |
|---|---|
javafx.beans.property.ReadOnlyBooleanProperty |
playing
Property indicating if the track is playing.
|
| Modifier and Type | Field and Description |
|---|---|
private double |
length |
private org.apache.logging.log4j.Logger |
logger |
private javafx.scene.media.MediaPlayer |
player |
private javafx.beans.property.BooleanProperty |
playing |
private ScheduledExecutorService |
timer |
| Constructor and Description |
|---|
MediaTrack(double length,
String fileUrl,
ScheduledExecutorService uiScheduler) |
| Modifier and Type | Method and Description |
|---|---|
double |
getLength()
Retrieve the length of the track in seconds
|
void |
play()
Start playing the track.
|
javafx.beans.property.ReadOnlyBooleanProperty |
playingProperty()
Property indicating if the track is playing.
|
void |
stop()
Stop playing the track.
|
public javafx.beans.property.ReadOnlyBooleanProperty playingProperty
playingProperty in interface IPlayableTrackprivate final org.apache.logging.log4j.Logger logger
private final double length
private javafx.scene.media.MediaPlayer player
private javafx.beans.property.BooleanProperty playing
private final ScheduledExecutorService timer
public MediaTrack(double length,
String fileUrl,
ScheduledExecutorService uiScheduler)
public double getLength()
IPlayableTrackgetLength in interface IPlayableTrackpublic void play()
IPlayableTrackplay in interface IPlayableTrackpublic void stop()
IPlayableTrackstop in interface IPlayableTrackpublic javafx.beans.property.ReadOnlyBooleanProperty playingProperty()
IPlayableTrackplayingProperty in interface IPlayableTrackCopyright © 2011-2016 Sahits GmbH. All Rights Reserved.