MediaPlayer

scalafx.scene.media.MediaPlayer
See theMediaPlayer companion object
class MediaPlayer(val delegate: MediaPlayer) extends SFXDelegate[MediaPlayer]

Attributes

Companion
object
Graph
Supertypes
trait SFXDelegate[MediaPlayer]
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(media: Media)

Create a player for a specific media.

Create a player for a specific media.

Attributes

Concrete methods

The interval between spectrum updates in seconds.

The interval between spectrum updates in seconds.

Attributes

def audioSpectrumListener: ObjectProperty[AudioSpectrumListener]

A listener for audio spectrum updates.

A listener for audio spectrum updates.

Attributes

def audioSpectrumListener_=(v: AudioSpectrumListener): Unit

The number of bands in the audio spectrum.

The number of bands in the audio spectrum.

Attributes

The sensitivity threshold in decibels; must be non-positive.

The sensitivity threshold in decibels; must be non-positive.

Attributes

Whether playing should start as soon as possible.

Whether playing should start as soon as possible.

Attributes

The balance, or left-right setting, of the audio output.

The balance, or left-right setting, of the audio output.

Attributes

def balance_=(v: Double): Unit

The current buffer position indicating how much media can be played without stalling the MediaPlayer.

The current buffer position indicating how much media can be played without stalling the MediaPlayer.

Attributes

The number of completed playback cycles.

The number of completed playback cycles.

Attributes

The current rate of playback regardless of settings.

The current rate of playback regardless of settings.

Attributes

The current media playback time.

The current media playback time.

Attributes

The number of times the media will be played.

The number of times the media will be played.

Attributes

def cycleCount_=(v: Int): Unit

The amount of time between the startTime and stopTime of this player.

The amount of time between the startTime and stopTime of this player.

Attributes

def error: ReadOnlyObjectProperty[MediaException]

Observable property set to a MediaException if an error occurs.

Observable property set to a MediaException if an error occurs.

Attributes

def media: Media

Retrieves the Media instance being played.

Retrieves the Media instance being played.

Attributes

Whether the player audio is muted.

Whether the player audio is muted.

Attributes

def mute_=(v: Boolean): Unit
def onEndOfMedia: ObjectProperty[Runnable]

Event handler invoked when the player currentTime reaches stopTime and is not repeating.

Event handler invoked when the player currentTime reaches stopTime and is not repeating.

Attributes

def onEndOfMedia_=(v: Runnable): Unit
def onEndOfMedia_=(op: => Unit): Unit
def onError: ObjectProperty[Runnable]

Event handler invoked when an error occurs.

Event handler invoked when an error occurs.

Attributes

def onError_=(v: Runnable): Unit
def onError_=(op: => Unit): Unit
def onHalted: ObjectProperty[Runnable]

Event handler invoked when the status changes to HALTED.

Event handler invoked when the status changes to HALTED.

Attributes

def onHalted_=(v: Runnable): Unit
def onHalted_=(op: => Unit): Unit
def onMarker: ObjectProperty[EventHandler[MediaMarkerEvent]]

Event handler invoked when the player currentTime reaches a media marker.

Event handler invoked when the player currentTime reaches a media marker.

Attributes

def onMarker_=(v: EventHandler[MediaMarkerEvent]): Unit
def onPaused: ObjectProperty[Runnable]

Event handler invoked when the status changes to PAUSED.

Event handler invoked when the status changes to PAUSED.

Attributes

def onPaused_=(v: Runnable): Unit
def onPaused_=(op: => Unit): Unit
def onPlaying: ObjectProperty[Runnable]

Event handler invoked when the status changes to PLAYING.

Event handler invoked when the status changes to PLAYING.

Attributes

def onPlaying_=(v: Runnable): Unit
def onPlaying_=(op: => Unit): Unit
def onReady: ObjectProperty[Runnable]

Event handler invoked when the status changes to READY.

Event handler invoked when the status changes to READY.

Attributes

def onReady_=(v: Runnable): Unit
def onReady_=(op: => Unit): Unit
def onRepeat: ObjectProperty[Runnable]

Event handler invoked when the player currentTime reaches stopTime and will be repeating.

Event handler invoked when the player currentTime reaches stopTime and will be repeating.

Attributes

def onRepeat_=(v: Runnable): Unit
def onRepeat_=(op: => Unit): Unit
def onStalled: ObjectProperty[Runnable]

Event handler invoked when the status changes to STALLED.

Event handler invoked when the status changes to STALLED.

Attributes

def onStalled_=(v: Runnable): Unit
def onStalled_=(op: => Unit): Unit
def onStopped: ObjectProperty[Runnable]

Event handler invoked when the status changes to STOPPED.

Event handler invoked when the status changes to STOPPED.

Attributes

def onStopped_=(v: Runnable): Unit
def onStopped_=(op: => Unit): Unit

The rate at which the media should be played.

The rate at which the media should be played.

Attributes

def rate_=(v: Double): Unit
def startTime: ObjectProperty[Duration]

The time offset where media should start playing, or restart from when repeating.

The time offset where media should start playing, or restart from when repeating.

Attributes

The current state of the MediaPlayer.

The current state of the MediaPlayer.

Attributes

def stopTime: ObjectProperty[Duration]

The time offset where media should stop playing or restart when repeating.

The time offset where media should stop playing or restart when repeating.

Attributes

The total amount of play time if allowed to play until finished.

The total amount of play time if allowed to play until finished.

Attributes

The volume at which the media should be played.

The volume at which the media should be played.

Attributes

def volume_=(v: Double): Unit

Inherited methods

override def equals(ref: Any): Boolean

Verifies if a object is equals to this delegate.

Verifies if a object is equals to this delegate.

Value parameters

ref

Object to be compared.

Attributes

Returns

if the other object is equals to this delegate or not.

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def hashCode: Int

Attributes

Returns

The delegate hashcode

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def toString: String

Attributes

Returns

Returns the original delegate's toString() adding a [SFX] prefix.

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate

Concrete fields

override val delegate: MediaPlayer

JavaFX object to be wrapped.

JavaFX object to be wrapped.

Attributes