Class MediaTrack
- java.lang.Object
-
- ch.sahits.game.openpatrician.sound.impl.MediaTrack
-
- All Implemented Interfaces:
IPlayableTrack
public class MediaTrack extends java.lang.Object implements IPlayableTrack
- Author:
- Andi Hotz, (c) Sahits GmbH, 2015 Created on Jun 17, 2015
-
-
Constructor Summary
Constructors Constructor Description MediaTrack(double length, java.lang.String fileUrl, java.util.concurrent.ScheduledExecutorService uiScheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetLength()Retrieve the length of the track in secondsvoidplay()Start playing the track.javafx.beans.property.ReadOnlyBooleanPropertyplayingProperty()Property indicating if the track is playing.voidstop()Stop playing the track.
-
-
-
Method Detail
-
getLength
public double getLength()
Description copied from interface:IPlayableTrackRetrieve the length of the track in seconds- Specified by:
getLengthin interfaceIPlayableTrack- Returns:
- length of the track in seconds
-
play
public void play()
Description copied from interface:IPlayableTrackStart playing the track.- Specified by:
playin interfaceIPlayableTrack
-
stop
public void stop()
Description copied from interface:IPlayableTrackStop playing the track.- Specified by:
stopin interfaceIPlayableTrack
-
playingProperty
public javafx.beans.property.ReadOnlyBooleanProperty playingProperty()
Description copied from interface:IPlayableTrackProperty indicating if the track is playing.- Specified by:
playingPropertyin interfaceIPlayableTrack- Returns:
- boolean property indicating if the track is currently playing.
-
-