<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_77) on Fri Apr 22 13:46:47 UTC 2016 --> <title>MediaPlayer (JavaFX 8)</title> <meta name="date" content="2016-04-22"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="MediaPlayer (JavaFX 8)"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":10,"i78":10,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10,"i85":10,"i86":10,"i87":10,"i88":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/MediaPlayer.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?javafx/scene/media/MediaPlayer.html" target="_top">Frames</a></li> <li><a href="MediaPlayer.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li><a href="#nested.class.summary">Nested</a> | </li> <li><a href="#field.summary">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li><a href="#field.detail">Field</a> | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">javafx.scene.media</div> <h2 title="Class MediaPlayer" class="title">Class MediaPlayer</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> <li> <ul class="inheritance"> <li>javafx.scene.media.MediaPlayer</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public final class <span class="typeNameLabel">MediaPlayer</span> extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> <div class="block">The <code>MediaPlayer</code> class provides the controls for playing media. It is used in combination with the <a href="../../../javafx/scene/media/Media.html" title="class in javafx.scene.media"><code>Media</code></a> and <a href="../../../javafx/scene/media/MediaView.html" title="class in javafx.scene.media"><code>MediaView</code></a> classes to display and control media playback. <code>MediaPlayer</code> does not contain any visual elements so must be used with the <a href="../../../javafx/scene/media/MediaView.html" title="class in javafx.scene.media"><code>MediaView</code></a> class to view any video track which may be present. <p><code>MediaPlayer</code> provides the <a href="../../../javafx/scene/media/MediaPlayer.html#pause--"><code>pause()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#play--"><code>play()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#stop--"><code>stop()</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.html#seek-javafx.util.Duration-"><code>seek()</code></a> controls as well as the <a href="../../../javafx/scene/media/MediaPlayer.html#rateProperty--"><code>rate</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.html#autoPlayProperty--"><code>autoPlay</code></a> properties which apply to all types of media. It also provides the <a href="../../../javafx/scene/media/MediaPlayer.html#balanceProperty--"><code>balance</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#muteProperty--"><code>mute</code></a>, and <a href="../../../javafx/scene/media/MediaPlayer.html#volumeProperty--"><code>volume</code></a> properties which control audio playback characteristics. Further control over audio quality may be attained via the <a href="../../../javafx/scene/media/AudioEqualizer.html" title="class in javafx.scene.media"><code>AudioEqualizer</code></a> associated with the player. Frequency descriptors of audio playback may be observed by registering an <a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media"><code>AudioSpectrumListener</code></a>. Information about playback position, rate, and buffering may be obtained from the <a href="../../../javafx/scene/media/MediaPlayer.html#currentTimeProperty--"><code>currentTime</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#currentRateProperty--"><code>currentRate</code></a>, and <a href="../../../javafx/scene/media/MediaPlayer.html#bufferProgressTimeProperty--"><code>bufferProgressTime</code></a> properties, respectively. Media marker notifications are received by an event handler registered as the <a href="../../../javafx/scene/media/MediaPlayer.html#onMarkerProperty--"><code>onMarker</code></a> property.</p> <p>For finite duration media, playback may be positioned at any point in time between <code>0.0</code> and the duration of the media. <code>MediaPlayer</code> refines this definition by adding the <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a> properties which in effect define a virtual media source with time position constrained to <code>[startTime,stopTime]</code>. Media playback commences at <code>startTime</code> and continues to <code>stopTime</code>. The interval defined by these two endpoints is termed a <i>cycle</i> with duration being the difference of the stop and start times. This cycle may be set to repeat a specific or indefinite number of times. The total duration of media playback is then the product of the cycle duration and the number of times the cycle is played. If the stop time of the cycle is reached and the cycle is to be played again, the event handler registered with the <a href="../../../javafx/scene/media/MediaPlayer.html#onRepeatProperty--"><code>onRepeat</code></a> property is invoked. If the stop time is reached and the cycle is <i>not</i> to be repeated, then the event handler registered with the <a href="../../../javafx/scene/media/MediaPlayer.html#onEndOfMediaProperty--"><code>onEndOfMedia</code></a> property is invoked. A zero-relative index of which cycle is presently being played is maintained by <a href="../../../javafx/scene/media/MediaPlayer.html#currentCountProperty--"><code>currentCount</code></a>. </p> <p>The operation of a <code>MediaPlayer</code> is inherently asynchronous. A player is not prepared to respond to commands quasi-immediately until its status has transitioned to <a href="../../../javafx/scene/media/MediaPlayer.Status.html#READY"><code>MediaPlayer.Status.READY</code></a>, which in effect generally occurs when media pre-roll completes. Some requests made of a player prior to its status being <code>READY</code> will however take effect when that status is entered. These include invoking <a href="../../../javafx/scene/media/MediaPlayer.html#play--"><code>play()</code></a> without an intervening invocation of <a href="../../../javafx/scene/media/MediaPlayer.html#pause--"><code>pause()</code></a> or <a href="../../../javafx/scene/media/MediaPlayer.html#stop--"><code>stop()</code></a> before the <code>READY</code> transition, as well as setting any of the <a href="../../../javafx/scene/media/MediaPlayer.html#autoPlayProperty--"><code>autoPlay</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#balanceProperty--"><code>balance</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#muteProperty--"><code>mute</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#rateProperty--"><code>rate</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a>, and <a href="../../../javafx/scene/media/MediaPlayer.html#volumeProperty--"><code>volume</code></a> properties.</p> <p>The <a href="../../../javafx/scene/media/MediaPlayer.html#statusProperty--"><code>status</code></a> property may be monitored to make the application aware of player status changes, and callback functions may be registered via properties such as <a href="../../../javafx/scene/media/MediaPlayer.html#onReadyProperty--"><code>onReady</code></a> if an action should be taken when a particular status is entered. There are also <a href="../../../javafx/scene/media/MediaPlayer.html#errorProperty--"><code>error</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.html#onErrorProperty--"><code>onError</code></a> properties which respectively enable monitoring when an error occurs and taking a specified action in response thereto.</p> <p>The same <code>MediaPlayer</code> object may be shared among multiple <code>MediaView</code>s. This will not affect the player itself. In particular, the property settings of the view will not have any effect on media playback.</p></div> <dl> <dt><span class="simpleTagLabel">Since:</span></dt> <dd>JavaFX 2.0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/Media.html" title="class in javafx.scene.media"><code>Media</code></a>, <a href="../../../javafx/scene/media/MediaView.html" title="class in javafx.scene.media"><code>MediaView</code></a></dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== PROPERTY SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="property.summary"> <!-- --> </a> <h3>Property Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Property Summary table, listing properties, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Type</th> <th class="colLast" scope="col">Property and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#audioSpectrumIntervalProperty">audioSpectrumInterval</a></span></code> <div class="block">The interval between spectrum updates in seconds.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media">AudioSpectrumListener</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#audioSpectrumListenerProperty">audioSpectrumListener</a></span></code> <div class="block">A listener for audio spectrum updates.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#audioSpectrumNumBandsProperty">audioSpectrumNumBands</a></span></code> <div class="block">The number of bands in the audio spectrum.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#audioSpectrumThresholdProperty">audioSpectrumThreshold</a></span></code> <div class="block">The sensitivity threshold in decibels; must be non-positive.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#autoPlayProperty">autoPlay</a></span></code> <div class="block">Whether playing should start as soon as possible.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#balanceProperty">balance</a></span></code> <div class="block">The balance, or left-right setting, of the audio output.</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#bufferProgressTimeProperty">bufferProgressTime</a></span></code> <div class="block">The current buffer position indicating how much media can be played without stalling the <code>MediaPlayer</code>.</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#currentCountProperty">currentCount</a></span></code> <div class="block">The number of completed playback cycles.</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#currentRateProperty">currentRate</a></span></code> <div class="block">The current rate of playback regardless of settings.</div> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#currentTimeProperty">currentTime</a></span></code> <div class="block">The current media playback time.</div> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#cycleCountProperty">cycleCount</a></span></code> <div class="block">The number of times the media will be played.</div> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#cycleDurationProperty">cycleDuration</a></span></code> <div class="block">The amount of time between the <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a> of this player.</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#errorProperty">error</a></span></code> <div class="block">Observable property set to a <code>MediaException</code> if an error occurs.</div> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#muteProperty">mute</a></span></code> <div class="block">Whether the player audio is muted.</div> </td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onEndOfMediaProperty">onEndOfMedia</a></span></code> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches <code>stopTime</code>.</div> </td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onErrorProperty">onError</a></span></code> <div class="block">Event handler invoked when an error occurs.</div> </td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onHaltedProperty">onHalted</a></span></code> <div class="block">Event handler invoked when the status changes to <code>HALTED</code>.</div> </td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a><<a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media">MediaMarkerEvent</a>>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onMarkerProperty">onMarker</a></span></code> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches a media marker.</div> </td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onPausedProperty">onPaused</a></span></code> <div class="block">Event handler invoked when the status changes to <code>PAUSED</code>.</div> </td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onPlayingProperty">onPlaying</a></span></code> <div class="block">Event handler invoked when the status changes to <code>PLAYING</code>.</div> </td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onReadyProperty">onReady</a></span></code> <div class="block">Event handler invoked when the status changes to <code>READY</code>.</div> </td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onRepeatProperty">onRepeat</a></span></code> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches <code>stopTime</code> and <i>will be</i> repeating.</div> </td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onStalledProperty">onStalled</a></span></code> <div class="block">Event handler invoked when the status changes to <code>STALLED</code>.</div> </td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onStoppedProperty">onStopped</a></span></code> <div class="block">Event handler invoked when the status changes to <code>STOPPED</code>.</div> </td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#rateProperty">rate</a></span></code> <div class="block">The rate at which the media should be played.</div> </td> </tr> <tr id="i25" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty">startTime</a></span></code> <div class="block">The time offset where media should start playing, or restart from when repeating.</div> </td> </tr> <tr id="i26" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media">MediaPlayer.Status</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#statusProperty">status</a></span></code> <div class="block">The current state of the MediaPlayer.</div> </td> </tr> <tr id="i27" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty">stopTime</a></span></code> <div class="block">The time offset where media should stop playing or restart when repeating.</div> </td> </tr> <tr id="i28" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#totalDurationProperty">totalDuration</a></span></code> <div class="block">The total amount of play time if allowed to play until finished.</div> </td> </tr> <tr id="i29" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#volumeProperty">volume</a></span></code> <div class="block">The volume at which the media should be played.</div> </td> </tr> </table> </li> </ul> <!-- ======== NESTED CLASS SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="nested.class.summary"> <!-- --> </a> <h3>Nested Class Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static class </code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media">MediaPlayer.Status</a></span></code> <div class="block">Enumeration describing the different status values of a <a href="../../../javafx/scene/media/MediaPlayer.html" title="class in javafx.scene.media"><code>MediaPlayer</code></a>.</div> </td> </tr> </table> </li> </ul> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#INDEFINITE">INDEFINITE</a></span></code> <div class="block">A value representing an effectively infinite number of playback cycles.</div> </td> </tr> </table> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd"> </span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#MediaPlayer-javafx.scene.media.Media-">MediaPlayer</a></span>(<a href="../../../javafx/scene/media/Media.html" title="class in javafx.scene.media">Media</a> media)</code> <div class="block">Create a player for a specific media.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#audioSpectrumIntervalProperty--">audioSpectrumIntervalProperty</a></span>()</code> <div class="block">The interval between spectrum updates in seconds.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media">AudioSpectrumListener</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#audioSpectrumListenerProperty--">audioSpectrumListenerProperty</a></span>()</code> <div class="block">A listener for audio spectrum updates.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#audioSpectrumNumBandsProperty--">audioSpectrumNumBandsProperty</a></span>()</code> <div class="block">The number of bands in the audio spectrum.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#audioSpectrumThresholdProperty--">audioSpectrumThresholdProperty</a></span>()</code> <div class="block">The sensitivity threshold in decibels; must be non-positive.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#autoPlayProperty--">autoPlayProperty</a></span>()</code> <div class="block">Whether playing should start as soon as possible.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#balanceProperty--">balanceProperty</a></span>()</code> <div class="block">The balance, or left-right setting, of the audio output.</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#bufferProgressTimeProperty--">bufferProgressTimeProperty</a></span>()</code> <div class="block">The current buffer position indicating how much media can be played without stalling the <code>MediaPlayer</code>.</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#currentCountProperty--">currentCountProperty</a></span>()</code> <div class="block">The number of completed playback cycles.</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#currentRateProperty--">currentRateProperty</a></span>()</code> <div class="block">The current rate of playback regardless of settings.</div> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#currentTimeProperty--">currentTimeProperty</a></span>()</code> <div class="block">The current media playback time.</div> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#cycleCountProperty--">cycleCountProperty</a></span>()</code> <div class="block">The number of times the media will be played.</div> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#cycleDurationProperty--">cycleDurationProperty</a></span>()</code> <div class="block">The amount of time between the <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a> of this player.</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#dispose--">dispose</a></span>()</code> <div class="block">Free all resources associated with player.</div> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#errorProperty--">errorProperty</a></span>()</code> <div class="block">Observable property set to a <code>MediaException</code> if an error occurs.</div> </td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/scene/media/AudioEqualizer.html" title="class in javafx.scene.media">AudioEqualizer</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioEqualizer--">getAudioEqualizer</a></span>()</code> <div class="block">Retrieve the <a href="../../../javafx/scene/media/AudioEqualizer.html" title="class in javafx.scene.media"><code>AudioEqualizer</code></a> associated with this player.</div> </td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code>double</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumInterval--">getAudioSpectrumInterval</a></span>()</code> <div class="block">Retrieves the value of the audio spectrum notification interval in seconds.</div> </td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media">AudioSpectrumListener</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumListener--">getAudioSpectrumListener</a></span>()</code> <div class="block">Retrieves the listener of the audio spectrum.</div> </td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumNumBands--">getAudioSpectrumNumBands</a></span>()</code> <div class="block">Retrieves the number of bands in the audio spectrum.</div> </td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumThreshold--">getAudioSpectrumThreshold</a></span>()</code> <div class="block">Retrieves the audio spectrum threshold in decibels.</div> </td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code>double</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getBalance--">getBalance</a></span>()</code> <div class="block">Retrieves the audio balance.</div> </td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getBufferProgressTime--">getBufferProgressTime</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.html#bufferProgressTimeProperty--"><code>bufferProgressTime</code></a> value.</div> </td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentCount--">getCurrentCount</a></span>()</code> <div class="block">Retrieves the index of the current cycle.</div> </td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code>double</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentRate--">getCurrentRate</a></span>()</code> <div class="block">Retrieves the current playback rate.</div> </td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentTime--">getCurrentTime</a></span>()</code> <div class="block">Retrieves the current media time.</div> </td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getCycleCount--">getCycleCount</a></span>()</code> <div class="block">Retrieves the cycle count.</div> </td> </tr> <tr id="i25" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getCycleDuration--">getCycleDuration</a></span>()</code> <div class="block">Retrieves the cycle duration in seconds.</div> </td> </tr> <tr id="i26" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getError--">getError</a></span>()</code> <div class="block">Retrieve the value of the <a href="../../../javafx/scene/media/MediaPlayer.html#errorProperty--"><code>error</code></a> property or <code>null</code> if there is no error.</div> </td> </tr> <tr id="i27" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/scene/media/Media.html" title="class in javafx.scene.media">Media</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getMedia--">getMedia</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/Media.html" title="class in javafx.scene.media"><code>Media</code></a> instance being played.</div> </td> </tr> <tr id="i28" class="altColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnEndOfMedia--">getOnEndOfMedia</a></span>()</code> <div class="block">Retrieves the end of media event handler.</div> </td> </tr> <tr id="i29" class="rowColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnError--">getOnError</a></span>()</code> <div class="block">Retrieves the event handler for errors.</div> </td> </tr> <tr id="i30" class="altColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnHalted--">getOnHalted</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#HALTED"><code>MediaPlayer.Status.HALTED</code></a> event handler.</div> </td> </tr> <tr id="i31" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a><<a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media">MediaMarkerEvent</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnMarker--">getOnMarker</a></span>()</code> <div class="block">Retrieves the marker event handler.</div> </td> </tr> <tr id="i32" class="altColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnPaused--">getOnPaused</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PAUSED"><code>MediaPlayer.Status.PAUSED</code></a> event handler.</div> </td> </tr> <tr id="i33" class="rowColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnPlaying--">getOnPlaying</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PLAYING"><code>MediaPlayer.Status.PLAYING</code></a> event handler.</div> </td> </tr> <tr id="i34" class="altColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnReady--">getOnReady</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#READY"><code>MediaPlayer.Status.READY</code></a> event handler.</div> </td> </tr> <tr id="i35" class="rowColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnRepeat--">getOnRepeat</a></span>()</code> <div class="block">Retrieves the repeat event handler.</div> </td> </tr> <tr id="i36" class="altColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnStalled--">getOnStalled</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STALLED"><code>MediaPlayer.Status.STALLED</code></a> event handler.</div> </td> </tr> <tr id="i37" class="rowColor"> <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getOnStopped--">getOnStopped</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STOPPED"><code>MediaPlayer.Status.STOPPED</code></a> event handler.</div> </td> </tr> <tr id="i38" class="altColor"> <td class="colFirst"><code>double</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getRate--">getRate</a></span>()</code> <div class="block">Retrieves the playback rate.</div> </td> </tr> <tr id="i39" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getStartTime--">getStartTime</a></span>()</code> <div class="block">Retrieves the start time.</div> </td> </tr> <tr id="i40" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media">MediaPlayer.Status</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getStatus--">getStatus</a></span>()</code> <div class="block">Retrieves the current player status.</div> </td> </tr> <tr id="i41" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getStopTime--">getStopTime</a></span>()</code> <div class="block">Retrieves the stop time.</div> </td> </tr> <tr id="i42" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getTotalDuration--">getTotalDuration</a></span>()</code> <div class="block">Retrieves the total playback duration including all cycles (repetitions).</div> </td> </tr> <tr id="i43" class="rowColor"> <td class="colFirst"><code>double</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#getVolume--">getVolume</a></span>()</code> <div class="block">Retrieves the audio playback volume.</div> </td> </tr> <tr id="i44" class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#isAutoPlay--">isAutoPlay</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.html#autoPlayProperty--"><code>autoPlay</code></a> property value.</div> </td> </tr> <tr id="i45" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#isMute--">isMute</a></span>()</code> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.html#muteProperty--"><code>muteProperty()</code></a> value.</div> </td> </tr> <tr id="i46" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#muteProperty--">muteProperty</a></span>()</code> <div class="block">Whether the player audio is muted.</div> </td> </tr> <tr id="i47" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onEndOfMediaProperty--">onEndOfMediaProperty</a></span>()</code> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches <code>stopTime</code>.</div> </td> </tr> <tr id="i48" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onErrorProperty--">onErrorProperty</a></span>()</code> <div class="block">Event handler invoked when an error occurs.</div> </td> </tr> <tr id="i49" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onHaltedProperty--">onHaltedProperty</a></span>()</code> <div class="block">Event handler invoked when the status changes to <code>HALTED</code>.</div> </td> </tr> <tr id="i50" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a><<a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media">MediaMarkerEvent</a>>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onMarkerProperty--">onMarkerProperty</a></span>()</code> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches a media marker.</div> </td> </tr> <tr id="i51" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onPausedProperty--">onPausedProperty</a></span>()</code> <div class="block">Event handler invoked when the status changes to <code>PAUSED</code>.</div> </td> </tr> <tr id="i52" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onPlayingProperty--">onPlayingProperty</a></span>()</code> <div class="block">Event handler invoked when the status changes to <code>PLAYING</code>.</div> </td> </tr> <tr id="i53" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onReadyProperty--">onReadyProperty</a></span>()</code> <div class="block">Event handler invoked when the status changes to <code>READY</code>.</div> </td> </tr> <tr id="i54" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onRepeatProperty--">onRepeatProperty</a></span>()</code> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches <code>stopTime</code> and <i>will be</i> repeating.</div> </td> </tr> <tr id="i55" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onStalledProperty--">onStalledProperty</a></span>()</code> <div class="block">Event handler invoked when the status changes to <code>STALLED</code>.</div> </td> </tr> <tr id="i56" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#onStoppedProperty--">onStoppedProperty</a></span>()</code> <div class="block">Event handler invoked when the status changes to <code>STOPPED</code>.</div> </td> </tr> <tr id="i57" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#pause--">pause</a></span>()</code> <div class="block">Pauses the player.</div> </td> </tr> <tr id="i58" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#play--">play</a></span>()</code> <div class="block">Starts playing the media.</div> </td> </tr> <tr id="i59" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#rateProperty--">rateProperty</a></span>()</code> <div class="block">The rate at which the media should be played.</div> </td> </tr> <tr id="i60" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#seek-javafx.util.Duration-">seek</a></span>(<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> seekTime)</code> <div class="block">Seeks the player to a new playback time.</div> </td> </tr> <tr id="i61" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumInterval-double-">setAudioSpectrumInterval</a></span>(double value)</code> <div class="block">Sets the value of the audio spectrum notification interval in seconds.</div> </td> </tr> <tr id="i62" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumListener-javafx.scene.media.AudioSpectrumListener-">setAudioSpectrumListener</a></span>(<a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media">AudioSpectrumListener</a> listener)</code> <div class="block">Sets the listener of the audio spectrum.</div> </td> </tr> <tr id="i63" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumNumBands-int-">setAudioSpectrumNumBands</a></span>(int value)</code> <div class="block">Sets the number of bands in the audio spectrum.</div> </td> </tr> <tr id="i64" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumThreshold-int-">setAudioSpectrumThreshold</a></span>(int value)</code> <div class="block">Sets the audio spectrum threshold in decibels.</div> </td> </tr> <tr id="i65" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setAutoPlay-boolean-">setAutoPlay</a></span>(boolean value)</code> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.html#autoPlayProperty--"><code>autoPlay</code></a> property value.</div> </td> </tr> <tr id="i66" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setBalance-double-">setBalance</a></span>(double value)</code> <div class="block">Sets the audio balance.</div> </td> </tr> <tr id="i67" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setCycleCount-int-">setCycleCount</a></span>(int value)</code> <div class="block">Sets the cycle count.</div> </td> </tr> <tr id="i68" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setMute-boolean-">setMute</a></span>(boolean value)</code> <div class="block">Sets the value of <a href="../../../javafx/scene/media/MediaPlayer.html#muteProperty--"><code>muteProperty()</code></a>.</div> </td> </tr> <tr id="i69" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnEndOfMedia-java.lang.Runnable-">setOnEndOfMedia</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the end of media event handler.</div> </td> </tr> <tr id="i70" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnError-java.lang.Runnable-">setOnError</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the event handler to be called when an error occurs.</div> </td> </tr> <tr id="i71" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnHalted-java.lang.Runnable-">setOnHalted</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#HALTED"><code>MediaPlayer.Status.HALTED</code></a> event handler.</div> </td> </tr> <tr id="i72" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnMarker-javafx.event.EventHandler-">setOnMarker</a></span>(<a href="../../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a><<a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media">MediaMarkerEvent</a>> onMarker)</code> <div class="block">Sets the marker event handler.</div> </td> </tr> <tr id="i73" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnPaused-java.lang.Runnable-">setOnPaused</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PAUSED"><code>MediaPlayer.Status.PAUSED</code></a> event handler.</div> </td> </tr> <tr id="i74" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnPlaying-java.lang.Runnable-">setOnPlaying</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PLAYING"><code>MediaPlayer.Status.PLAYING</code></a> event handler.</div> </td> </tr> <tr id="i75" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnReady-java.lang.Runnable-">setOnReady</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#READY"><code>MediaPlayer.Status.READY</code></a> event handler.</div> </td> </tr> <tr id="i76" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnRepeat-java.lang.Runnable-">setOnRepeat</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the repeat event handler.</div> </td> </tr> <tr id="i77" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnStalled-java.lang.Runnable-">setOnStalled</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STALLED"><code>MediaPlayer.Status.STALLED</code></a> event handler.</div> </td> </tr> <tr id="i78" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setOnStopped-java.lang.Runnable-">setOnStopped</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</code> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STOPPED"><code>MediaPlayer.Status.STOPPED</code></a> event handler.</div> </td> </tr> <tr id="i79" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setRate-double-">setRate</a></span>(double value)</code> <div class="block">Sets the playback rate to the supplied value.</div> </td> </tr> <tr id="i80" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setStartTime-javafx.util.Duration-">setStartTime</a></span>(<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> value)</code> <div class="block">Sets the start time.</div> </td> </tr> <tr id="i81" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setStopTime-javafx.util.Duration-">setStopTime</a></span>(<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> value)</code> <div class="block">Sets the stop time.</div> </td> </tr> <tr id="i82" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#setVolume-double-">setVolume</a></span>(double value)</code> <div class="block">Sets the audio playback volume.</div> </td> </tr> <tr id="i83" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--">startTimeProperty</a></span>()</code> <div class="block">The time offset where media should start playing, or restart from when repeating.</div> </td> </tr> <tr id="i84" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media">MediaPlayer.Status</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#statusProperty--">statusProperty</a></span>()</code> <div class="block">The current state of the MediaPlayer.</div> </td> </tr> <tr id="i85" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#stop--">stop</a></span>()</code> <div class="block">Stops playing the media.</div> </td> </tr> <tr id="i86" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--">stopTimeProperty</a></span>()</code> <div class="block">The time offset where media should stop playing or restart when repeating.</div> </td> </tr> <tr id="i87" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#totalDurationProperty--">totalDurationProperty</a></span>()</code> <div class="block">The total amount of play time if allowed to play until finished.</div> </td> </tr> <tr id="i88" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/MediaPlayer.html#volumeProperty--">volumeProperty</a></span>()</code> <div class="block">The volume at which the media should be played.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ PROPERTY DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="property.detail"> <!-- --> </a> <h3>Property Detail</h3> <a name="errorProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>error</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>> errorProperty</pre> <div class="block">Observable property set to a <code>MediaException</code> if an error occurs.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getError--"><code>getError()</code></a></dd> </dl> </li> </ul> <a name="onErrorProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onError</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onErrorProperty</pre> <div class="block">Event handler invoked when an error occurs.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnError--"><code>getOnError()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnError-java.lang.Runnable-"><code>setOnError(Runnable)</code></a></dd> </dl> </li> </ul> <a name="autoPlayProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>autoPlay</h4> <pre>public <a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a> autoPlayProperty</pre> <div class="block">Whether playing should start as soon as possible. For a new player this will occur once the player has reached the READY state. The default value is <code>false</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#isAutoPlay--"><code>isAutoPlay()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAutoPlay-boolean-"><code>setAutoPlay(boolean)</code></a></dd> </dl> </li> </ul> <a name="rateProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>rate</h4> <pre>public <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a> rateProperty</pre> <div class="block">The rate at which the media should be played. For example, a rate of <code>1.0</code> plays the media at its normal (encoded) playback rate, <code>2.0</code> plays back at twice the normal rate, etc. The currently supported range of rates is <code>[0.0, 8.0]</code>. The default value is <code>1.0</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getRate--"><code>getRate()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setRate-double-"><code>setRate(double)</code></a></dd> </dl> </li> </ul> <a name="currentRateProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>currentRate</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> currentRateProperty</pre> <div class="block">The current rate of playback regardless of settings. For example, if <code>rate</code> is set to 1.0 and the player is paused or stalled, then <code>currentRate</code> will be zero.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentRate--"><code>getCurrentRate()</code></a></dd> </dl> </li> </ul> <a name="volumeProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>volume</h4> <pre>public <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a> volumeProperty</pre> <div class="block">The volume at which the media should be played. The range of effective values is <code>[0.0 1.0]</code> where <code>0.0</code> is inaudible and <code>1.0</code> is full volume, which is the default.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getVolume--"><code>getVolume()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setVolume-double-"><code>setVolume(double)</code></a></dd> </dl> </li> </ul> <a name="balanceProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>balance</h4> <pre>public <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a> balanceProperty</pre> <div class="block">The balance, or left-right setting, of the audio output. The range of effective values is <code>[-1.0, 1.0]</code> with <code>-1.0</code> being full left, <code>0.0</code> center, and <code>1.0</code> full right. The default value is <code>0.0</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getBalance--"><code>getBalance()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setBalance-double-"><code>setBalance(double)</code></a></dd> </dl> </li> </ul> <a name="startTimeProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startTime</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> startTimeProperty</pre> <div class="block">The time offset where media should start playing, or restart from when repeating. When playback is stopped, the current time is reset to this value. If this value is positive, then the first time the media is played there might be a delay before playing begins unless the play position can be set to an arbitrary time within the media. This could occur for example for a video which does not contain a lookup table of the offsets of intra-frames in the video stream. In such a case the video frames would need to be skipped over until the position of the first intra-frame before the start time was reached. The default value is <code>Duration.ZERO</code>. <p>Constraints: <code>0 ≤ startTime < <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a></code></div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getStartTime--"><code>getStartTime()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setStartTime-javafx.util.Duration-"><code>setStartTime(Duration)</code></a></dd> </dl> </li> </ul> <a name="stopTimeProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>stopTime</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> stopTimeProperty</pre> <div class="block">The time offset where media should stop playing or restart when repeating. The default value is <code><a href="../../../javafx/scene/media/MediaPlayer.html#getMedia--"><code>getMedia()</code></a>.getDuration()</code>. <p>Constraints: <code><a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a> < stopTime ≤ <a href="../../../javafx/scene/media/Media.html#durationProperty--"><code>Media.duration</code></a></code></div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getStopTime--"><code>getStopTime()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setStopTime-javafx.util.Duration-"><code>setStopTime(Duration)</code></a></dd> </dl> </li> </ul> <a name="cycleDurationProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>cycleDuration</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> cycleDurationProperty</pre> <div class="block">The amount of time between the <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a> of this player. For the total duration of the Media use the <a href="../../../javafx/scene/media/Media.html#durationProperty--"><code>Media.duration</code></a> property.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCycleDuration--"><code>getCycleDuration()</code></a></dd> </dl> </li> </ul> <a name="totalDurationProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>totalDuration</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> totalDurationProperty</pre> <div class="block">The total amount of play time if allowed to play until finished. If <code>cycleCount</code> is set to <code>INDEFINITE</code> then this will also be INDEFINITE. If the Media duration is UNKNOWN, then this will likewise be UNKNOWN. Otherwise, total duration will be the product of cycleDuration and cycleCount.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getTotalDuration--"><code>getTotalDuration()</code></a></dd> </dl> </li> </ul> <a name="currentTimeProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>currentTime</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> currentTimeProperty</pre> <div class="block">The current media playback time. This property is read-only: use <a href="../../../javafx/scene/media/MediaPlayer.html#seek-javafx.util.Duration-"><code>seek(javafx.util.Duration)</code></a> to change playback to a different stream position.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentTime--"><code>getCurrentTime()</code></a></dd> </dl> </li> </ul> <a name="statusProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>status</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media">MediaPlayer.Status</a>> statusProperty</pre> <div class="block">The current state of the MediaPlayer.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getStatus--"><code>getStatus()</code></a></dd> </dl> </li> </ul> <a name="bufferProgressTimeProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>bufferProgressTime</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> bufferProgressTimeProperty</pre> <div class="block">The current buffer position indicating how much media can be played without stalling the <code>MediaPlayer</code>. This is applicable to buffered streams such as those reading from network connections as opposed for example to local files. <p>Seeking to a position beyond <code>bufferProgressTime</code> might cause a slight pause in playback until an amount of data sufficient to permit playback resumption has been buffered.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getBufferProgressTime--"><code>getBufferProgressTime()</code></a></dd> </dl> </li> </ul> <a name="cycleCountProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>cycleCount</h4> <pre>public <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a> cycleCountProperty</pre> <div class="block">The number of times the media will be played. By default, <code>cycleCount</code> is set to <code>1</code> meaning the media will only be played once. Setting <code>cycleCount</code> to a value greater than 1 will cause the media to play the given number of times or until stopped. If set to <a href="../../../javafx/scene/media/MediaPlayer.html#INDEFINITE"><code>INDEFINITE</code></a>, playback will repeat until stop() or pause() is called. <p>constraints: <code>cycleCount ≥ 1</code></div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCycleCount--"><code>getCycleCount()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setCycleCount-int-"><code>setCycleCount(int)</code></a></dd> </dl> </li> </ul> <a name="currentCountProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>currentCount</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a> currentCountProperty</pre> <div class="block">The number of completed playback cycles. On the first pass, the value should be 0. On the second pass, the value should be 1 and so on. It is incremented at the end of each cycle just prior to seeking back to <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a>, i.e., when <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a> or the end of media has been reached.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentCount--"><code>getCurrentCount()</code></a></dd> </dl> </li> </ul> <a name="muteProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>mute</h4> <pre>public <a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a> muteProperty</pre> <div class="block">Whether the player audio is muted. A value of <code>true</code> indicates that audio is <i>not</i> being produced. The value of this property has no effect on <a href="../../../javafx/scene/media/MediaPlayer.html#volumeProperty--"><code>volume</code></a>, i.e., if the audio is muted and then un-muted, audio playback will resume at the same audible level provided of course that the <code>volume</code> property has not been modified meanwhile. The default value is <code>false</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#isMute--"><code>isMute()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setMute-boolean-"><code>setMute(boolean)</code></a></dd> </dl> </li> </ul> <a name="onMarkerProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onMarker</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a><<a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media">MediaMarkerEvent</a>>> onMarkerProperty</pre> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches a media marker.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnMarker--"><code>getOnMarker()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnMarker-javafx.event.EventHandler-"><code>setOnMarker(EventHandler)</code></a></dd> </dl> </li> </ul> <a name="onEndOfMediaProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onEndOfMedia</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onEndOfMediaProperty</pre> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches <code>stopTime</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnEndOfMedia--"><code>getOnEndOfMedia()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnEndOfMedia-java.lang.Runnable-"><code>setOnEndOfMedia(Runnable)</code></a></dd> </dl> </li> </ul> <a name="onReadyProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onReady</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onReadyProperty</pre> <div class="block">Event handler invoked when the status changes to <code>READY</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnReady--"><code>getOnReady()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnReady-java.lang.Runnable-"><code>setOnReady(Runnable)</code></a></dd> </dl> </li> </ul> <a name="onPlayingProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onPlaying</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onPlayingProperty</pre> <div class="block">Event handler invoked when the status changes to <code>PLAYING</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnPlaying--"><code>getOnPlaying()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnPlaying-java.lang.Runnable-"><code>setOnPlaying(Runnable)</code></a></dd> </dl> </li> </ul> <a name="onPausedProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onPaused</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onPausedProperty</pre> <div class="block">Event handler invoked when the status changes to <code>PAUSED</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnPaused--"><code>getOnPaused()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnPaused-java.lang.Runnable-"><code>setOnPaused(Runnable)</code></a></dd> </dl> </li> </ul> <a name="onStoppedProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onStopped</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onStoppedProperty</pre> <div class="block">Event handler invoked when the status changes to <code>STOPPED</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnStopped--"><code>getOnStopped()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnStopped-java.lang.Runnable-"><code>setOnStopped(Runnable)</code></a></dd> </dl> </li> </ul> <a name="onHaltedProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onHalted</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onHaltedProperty</pre> <div class="block">Event handler invoked when the status changes to <code>HALTED</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnHalted--"><code>getOnHalted()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnHalted-java.lang.Runnable-"><code>setOnHalted(Runnable)</code></a></dd> </dl> </li> </ul> <a name="onRepeatProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onRepeat</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onRepeatProperty</pre> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches <code>stopTime</code> and <i>will be</i> repeating. This callback is made prior to seeking back to <code>startTime</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnRepeat--"><code>getOnRepeat()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnRepeat-java.lang.Runnable-"><code>setOnRepeat(Runnable)</code></a></dd> </dl> </li> </ul> <a name="onStalledProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onStalled</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onStalledProperty</pre> <div class="block">Event handler invoked when the status changes to <code>STALLED</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnStalled--"><code>getOnStalled()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnStalled-java.lang.Runnable-"><code>setOnStalled(Runnable)</code></a></dd> </dl> </li> </ul> <a name="audioSpectrumNumBandsProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>audioSpectrumNumBands</h4> <pre>public <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a> audioSpectrumNumBandsProperty</pre> <div class="block">The number of bands in the audio spectrum. The default value is 128; minimum is 2. The frequency range of the audio signal will be divided into the specified number of frequency bins. For example, a typical digital music signal has a frequency range of <code>[0.0, 22050]</code> Hz. If the number of spectral bands were in this case set to 10, the width of each frequency bin in the spectrum would be <code>2205</code> Hz with the lower bound of the lowest frequency bin equal to <code>0.0</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumNumBands--"><code>getAudioSpectrumNumBands()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumNumBands-int-"><code>setAudioSpectrumNumBands(int)</code></a></dd> </dl> </li> </ul> <a name="audioSpectrumIntervalProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>audioSpectrumInterval</h4> <pre>public <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a> audioSpectrumIntervalProperty</pre> <div class="block">The interval between spectrum updates in seconds. The default is <code>0.1</code> seconds.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumInterval--"><code>getAudioSpectrumInterval()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumInterval-double-"><code>setAudioSpectrumInterval(double)</code></a></dd> </dl> </li> </ul> <a name="audioSpectrumThresholdProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>audioSpectrumThreshold</h4> <pre>public <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a> audioSpectrumThresholdProperty</pre> <div class="block">The sensitivity threshold in decibels; must be non-positive. Values below this threshold with respect to the peak frequency in the given spectral band will be set to the value of the threshold. The default value is -60 dB.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumThreshold--"><code>getAudioSpectrumThreshold()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumThreshold-int-"><code>setAudioSpectrumThreshold(int)</code></a></dd> </dl> </li> </ul> <a name="audioSpectrumListenerProperty"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>audioSpectrumListener</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media">AudioSpectrumListener</a>> audioSpectrumListenerProperty</pre> <div class="block">A listener for audio spectrum updates. When the listener is registered, audio spectrum computation is enabled; upon removing the listener, computation is disabled. Only a single listener may be registered, so if multiple observers are required, events must be forwarded. <p>An <code>AudioSpectrumListener</code> may be useful for example to plot the frequency spectrum of the audio being played or to generate waveforms for a music visualizer.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumListener--"><code>getAudioSpectrumListener()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumListener-javafx.scene.media.AudioSpectrumListener-"><code>setAudioSpectrumListener(AudioSpectrumListener)</code></a></dd> </dl> </li> </ul> </li> </ul> <!-- ============ FIELD DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="field.detail"> <!-- --> </a> <h3>Field Detail</h3> <a name="INDEFINITE"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>INDEFINITE</h4> <pre>public static final int INDEFINITE</pre> <div class="block">A value representing an effectively infinite number of playback cycles. When <a href="../../../javafx/scene/media/MediaPlayer.html#cycleCountProperty--"><code>cycleCount</code></a> is set to this value, the player will replay the <code>Media</code> until stopped or paused.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../constant-values.html#javafx.scene.media.MediaPlayer.INDEFINITE">Constant Field Values</a></dd> </dl> </li> </ul> </li> </ul> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="MediaPlayer-javafx.scene.media.Media-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>MediaPlayer</h4> <pre>public MediaPlayer(<a href="../../../javafx/scene/media/Media.html" title="class in javafx.scene.media">Media</a> media)</pre> <div class="block">Create a player for a specific media. This is the only way to associate a <code>Media</code> object with a <code>MediaPlayer</code>: once the player is created it cannot be changed. Errors which occur synchronously within the constructor will cause exceptions to be thrown. Errors which occur asynchronously will cause the <a href="../../../javafx/scene/media/MediaPlayer.html#errorProperty--"><code>error</code></a> property to be set and consequently any <a href="../../../javafx/scene/media/MediaPlayer.html#onErrorProperty--"><code>onError</code></a> callback to be invoked. <p>When created, the <a href="../../../javafx/scene/media/MediaPlayer.html#statusProperty--"><code>status</code></a> of the player will be <a href="../../../javafx/scene/media/MediaPlayer.Status.html#UNKNOWN"><code>MediaPlayer.Status.UNKNOWN</code></a>. Once the <code>status</code> has transitioned to <a href="../../../javafx/scene/media/MediaPlayer.Status.html#READY"><code>MediaPlayer.Status.READY</code></a> the player will be in a usable condition. The amount of time between player creation and its entering <code>READY</code> status may vary depending, for example, on whether the media is being read over a network connection or from a local file system.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>media</code> - The media to play.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if media is <code>null</code>.</dd> <dd><code><a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a></code> - if any synchronous errors occur within the constructor.</dd> </dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getAudioEqualizer--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAudioEqualizer</h4> <pre>public final <a href="../../../javafx/scene/media/AudioEqualizer.html" title="class in javafx.scene.media">AudioEqualizer</a> getAudioEqualizer()</pre> <div class="block">Retrieve the <a href="../../../javafx/scene/media/AudioEqualizer.html" title="class in javafx.scene.media"><code>AudioEqualizer</code></a> associated with this player.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the <code>AudioEqualizer</code> or <code>null</code> if player is disposed.</dd> </dl> </li> </ul> <a name="getError--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getError</h4> <pre>public final <a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a> getError()</pre> <div class="block">Retrieve the value of the <a href="../../../javafx/scene/media/MediaPlayer.html#errorProperty--"><code>error</code></a> property or <code>null</code> if there is no error.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>a <code>MediaException</code> or <code>null</code>.</dd> </dl> </li> </ul> <a name="errorProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>errorProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>> errorProperty()</pre> <div class="block">Observable property set to a <code>MediaException</code> if an error occurs.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getError--"><code>getError()</code></a></dd> </dl> </li> </ul> <a name="setOnError-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnError</h4> <pre>public final void setOnError(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the event handler to be called when an error occurs.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnError--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnError</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnError()</pre> <div class="block">Retrieves the event handler for errors.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler.</dd> </dl> </li> </ul> <a name="onErrorProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onErrorProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onErrorProperty()</pre> <div class="block">Event handler invoked when an error occurs.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnError--"><code>getOnError()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnError-java.lang.Runnable-"><code>setOnError(Runnable)</code></a></dd> </dl> </li> </ul> <a name="getMedia--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMedia</h4> <pre>public final <a href="../../../javafx/scene/media/Media.html" title="class in javafx.scene.media">Media</a> getMedia()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/Media.html" title="class in javafx.scene.media"><code>Media</code></a> instance being played.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the <code>Media</code> object.</dd> </dl> </li> </ul> <a name="setAutoPlay-boolean-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAutoPlay</h4> <pre>public final void setAutoPlay(boolean value)</pre> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.html#autoPlayProperty--"><code>autoPlay</code></a> property value.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - whether to enable auto-playback</dd> </dl> </li> </ul> <a name="isAutoPlay--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isAutoPlay</h4> <pre>public final boolean isAutoPlay()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.html#autoPlayProperty--"><code>autoPlay</code></a> property value.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the value.</dd> </dl> </li> </ul> <a name="autoPlayProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>autoPlayProperty</h4> <pre>public <a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a> autoPlayProperty()</pre> <div class="block">Whether playing should start as soon as possible. For a new player this will occur once the player has reached the READY state. The default value is <code>false</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#isAutoPlay--"><code>isAutoPlay()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAutoPlay-boolean-"><code>setAutoPlay(boolean)</code></a></dd> </dl> </li> </ul> <a name="play--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>play</h4> <pre>public void play()</pre> <div class="block">Starts playing the media. If previously paused, then playback resumes where it was paused. If playback was stopped, playback starts from the <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a>. When playing actually starts the <a href="../../../javafx/scene/media/MediaPlayer.html#statusProperty--"><code>status</code></a> will be set to <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PLAYING"><code>MediaPlayer.Status.PLAYING</code></a>.</div> </li> </ul> <a name="pause--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>pause</h4> <pre>public void pause()</pre> <div class="block">Pauses the player. Once the player is actually paused the <a href="../../../javafx/scene/media/MediaPlayer.html#statusProperty--"><code>status</code></a> will be set to <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PAUSED"><code>MediaPlayer.Status.PAUSED</code></a>.</div> </li> </ul> <a name="stop--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>stop</h4> <pre>public void stop()</pre> <div class="block">Stops playing the media. This operation resets playback to <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a>, and resets <a href="../../../javafx/scene/media/MediaPlayer.html#currentCountProperty--"><code>currentCount</code></a> to zero. Once the player is actually stopped, the <a href="../../../javafx/scene/media/MediaPlayer.html#statusProperty--"><code>status</code></a> will be set to <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STOPPED"><code>MediaPlayer.Status.STOPPED</code></a>. The only transitions out of <code>STOPPED</code> status are to <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PAUSED"><code>MediaPlayer.Status.PAUSED</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PLAYING"><code>MediaPlayer.Status.PLAYING</code></a> which occur after invoking <a href="../../../javafx/scene/media/MediaPlayer.html#pause--"><code>pause()</code></a> or <a href="../../../javafx/scene/media/MediaPlayer.html#play--"><code>play()</code></a>, respectively. While stopped, the player will not respond to playback position changes requested by <a href="../../../javafx/scene/media/MediaPlayer.html#seek-javafx.util.Duration-"><code>seek(javafx.util.Duration)</code></a>.</div> </li> </ul> <a name="setRate-double-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setRate</h4> <pre>public final void setRate(double value)</pre> <div class="block">Sets the playback rate to the supplied value. Its effect will be clamped to the range <code>[0.0, 8.0]</code>. Invoking this method will have no effect if media duration is <a href="../../../javafx/util/Duration.html#INDEFINITE"><code>Duration.INDEFINITE</code></a>.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the playback rate</dd> </dl> </li> </ul> <a name="getRate--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getRate</h4> <pre>public final double getRate()</pre> <div class="block">Retrieves the playback rate.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the playback rate</dd> </dl> </li> </ul> <a name="rateProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>rateProperty</h4> <pre>public <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a> rateProperty()</pre> <div class="block">The rate at which the media should be played. For example, a rate of <code>1.0</code> plays the media at its normal (encoded) playback rate, <code>2.0</code> plays back at twice the normal rate, etc. The currently supported range of rates is <code>[0.0, 8.0]</code>. The default value is <code>1.0</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getRate--"><code>getRate()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setRate-double-"><code>setRate(double)</code></a></dd> </dl> </li> </ul> <a name="getCurrentRate--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCurrentRate</h4> <pre>public final double getCurrentRate()</pre> <div class="block">Retrieves the current playback rate.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the current rate</dd> </dl> </li> </ul> <a name="currentRateProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>currentRateProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> currentRateProperty()</pre> <div class="block">The current rate of playback regardless of settings. For example, if <code>rate</code> is set to 1.0 and the player is paused or stalled, then <code>currentRate</code> will be zero.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentRate--"><code>getCurrentRate()</code></a></dd> </dl> </li> </ul> <a name="setVolume-double-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setVolume</h4> <pre>public final void setVolume(double value)</pre> <div class="block">Sets the audio playback volume. Its effect will be clamped to the range <code>[0.0, 1.0]</code>.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the volume</dd> </dl> </li> </ul> <a name="getVolume--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getVolume</h4> <pre>public final double getVolume()</pre> <div class="block">Retrieves the audio playback volume. The default value is <code>1.0</code>.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the audio volume</dd> </dl> </li> </ul> <a name="volumeProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>volumeProperty</h4> <pre>public <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a> volumeProperty()</pre> <div class="block">The volume at which the media should be played. The range of effective values is <code>[0.0 1.0]</code> where <code>0.0</code> is inaudible and <code>1.0</code> is full volume, which is the default.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getVolume--"><code>getVolume()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setVolume-double-"><code>setVolume(double)</code></a></dd> </dl> </li> </ul> <a name="setBalance-double-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setBalance</h4> <pre>public final void setBalance(double value)</pre> <div class="block">Sets the audio balance. Its effect will be clamped to the range <code>[-1.0, 1.0]</code>.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the balance</dd> </dl> </li> </ul> <a name="getBalance--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getBalance</h4> <pre>public final double getBalance()</pre> <div class="block">Retrieves the audio balance.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the audio balance</dd> </dl> </li> </ul> <a name="balanceProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>balanceProperty</h4> <pre>public <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a> balanceProperty()</pre> <div class="block">The balance, or left-right setting, of the audio output. The range of effective values is <code>[-1.0, 1.0]</code> with <code>-1.0</code> being full left, <code>0.0</code> center, and <code>1.0</code> full right. The default value is <code>0.0</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getBalance--"><code>getBalance()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setBalance-double-"><code>setBalance(double)</code></a></dd> </dl> </li> </ul> <a name="setStartTime-javafx.util.Duration-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStartTime</h4> <pre>public final void setStartTime(<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> value)</pre> <div class="block">Sets the start time. Its effect will be clamped to the range <code>[<a href="../../../javafx/util/Duration.html#ZERO"><code>Duration.ZERO</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a>)</code>. Invoking this method will have no effect if media duration is <a href="../../../javafx/util/Duration.html#INDEFINITE"><code>Duration.INDEFINITE</code></a>.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the start time</dd> </dl> </li> </ul> <a name="getStartTime--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStartTime</h4> <pre>public final <a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> getStartTime()</pre> <div class="block">Retrieves the start time. The default value is <code>Duration.ZERO</code>.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the start time</dd> </dl> </li> </ul> <a name="startTimeProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startTimeProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> startTimeProperty()</pre> <div class="block">The time offset where media should start playing, or restart from when repeating. When playback is stopped, the current time is reset to this value. If this value is positive, then the first time the media is played there might be a delay before playing begins unless the play position can be set to an arbitrary time within the media. This could occur for example for a video which does not contain a lookup table of the offsets of intra-frames in the video stream. In such a case the video frames would need to be skipped over until the position of the first intra-frame before the start time was reached. The default value is <code>Duration.ZERO</code>. <p>Constraints: <code>0 ≤ startTime < <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a></code></div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getStartTime--"><code>getStartTime()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setStartTime-javafx.util.Duration-"><code>setStartTime(Duration)</code></a></dd> </dl> </li> </ul> <a name="setStopTime-javafx.util.Duration-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStopTime</h4> <pre>public final void setStopTime(<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> value)</pre> <div class="block">Sets the stop time. Its effect will be clamped to the range <code>(<a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a>, <a href="../../../javafx/scene/media/Media.html#durationProperty--"><code>Media.duration</code></a>]</code>. Invoking this method will have no effect if media duration is <a href="../../../javafx/util/Duration.html#INDEFINITE"><code>Duration.INDEFINITE</code></a>.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the stop time</dd> </dl> </li> </ul> <a name="getStopTime--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStopTime</h4> <pre>public final <a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> getStopTime()</pre> <div class="block">Retrieves the stop time. The default value is <code><a href="../../../javafx/scene/media/MediaPlayer.html#getMedia--"><code>getMedia()</code></a>.getDuration()</code>. Note that <code><a href="../../../javafx/scene/media/Media.html#durationProperty--"><code>Media.duration</code></a></code> may have the value <code>Duration.UNKNOWN</code> if media initialization is not complete.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the stop time</dd> </dl> </li> </ul> <a name="stopTimeProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>stopTimeProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> stopTimeProperty()</pre> <div class="block">The time offset where media should stop playing or restart when repeating. The default value is <code><a href="../../../javafx/scene/media/MediaPlayer.html#getMedia--"><code>getMedia()</code></a>.getDuration()</code>. <p>Constraints: <code><a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a> < stopTime ≤ <a href="../../../javafx/scene/media/Media.html#durationProperty--"><code>Media.duration</code></a></code></div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getStopTime--"><code>getStopTime()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setStopTime-javafx.util.Duration-"><code>setStopTime(Duration)</code></a></dd> </dl> </li> </ul> <a name="getCycleDuration--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCycleDuration</h4> <pre>public final <a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> getCycleDuration()</pre> <div class="block">Retrieves the cycle duration in seconds.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the cycle duration</dd> </dl> </li> </ul> <a name="cycleDurationProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>cycleDurationProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> cycleDurationProperty()</pre> <div class="block">The amount of time between the <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a> and <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a> of this player. For the total duration of the Media use the <a href="../../../javafx/scene/media/Media.html#durationProperty--"><code>Media.duration</code></a> property.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCycleDuration--"><code>getCycleDuration()</code></a></dd> </dl> </li> </ul> <a name="getTotalDuration--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getTotalDuration</h4> <pre>public final <a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> getTotalDuration()</pre> <div class="block">Retrieves the total playback duration including all cycles (repetitions).</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the total playback duration</dd> </dl> </li> </ul> <a name="totalDurationProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>totalDurationProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> totalDurationProperty()</pre> <div class="block">The total amount of play time if allowed to play until finished. If <code>cycleCount</code> is set to <code>INDEFINITE</code> then this will also be INDEFINITE. If the Media duration is UNKNOWN, then this will likewise be UNKNOWN. Otherwise, total duration will be the product of cycleDuration and cycleCount.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getTotalDuration--"><code>getTotalDuration()</code></a></dd> </dl> </li> </ul> <a name="getCurrentTime--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCurrentTime</h4> <pre>public final <a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> getCurrentTime()</pre> <div class="block">Retrieves the current media time.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the current media time</dd> </dl> </li> </ul> <a name="currentTimeProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>currentTimeProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> currentTimeProperty()</pre> <div class="block">The current media playback time. This property is read-only: use <a href="../../../javafx/scene/media/MediaPlayer.html#seek-javafx.util.Duration-"><code>seek(javafx.util.Duration)</code></a> to change playback to a different stream position.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentTime--"><code>getCurrentTime()</code></a></dd> </dl> </li> </ul> <a name="seek-javafx.util.Duration-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>seek</h4> <pre>public void seek(<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> seekTime)</pre> <div class="block">Seeks the player to a new playback time. Invoking this method will have no effect while the player status is <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STOPPED"><code>MediaPlayer.Status.STOPPED</code></a> or media duration is <a href="../../../javafx/util/Duration.html#INDEFINITE"><code>Duration.INDEFINITE</code></a>. <p>The behavior of <code>seek()</code> is constrained as follows where <i>start time</i> and <i>stop time</i> indicate the effective lower and upper bounds, respectively, of media playback: <table border="1"> <tr><th>seekTime</th><th>seek position</th></tr> <tr><td><code>null</code></td><td>no change</td></tr> <tr><td><a href="../../../javafx/util/Duration.html#UNKNOWN"><code>Duration.UNKNOWN</code></a></td><td>no change</td></tr> <tr><td><a href="../../../javafx/util/Duration.html#INDEFINITE"><code>Duration.INDEFINITE</code></a></td><td>stop time</td></tr> <tr><td>seekTime < start time</td><td>start time</td></tr> <tr><td>seekTime > stop time</td><td>stop time</td></tr> <tr><td>start time ≤ seekTime ≤ stop time</td><td>seekTime</td></tr> </table> </p></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>seekTime</code> - the requested playback time</dd> </dl> </li> </ul> <a name="getStatus--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStatus</h4> <pre>public final <a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media">MediaPlayer.Status</a> getStatus()</pre> <div class="block">Retrieves the current player status.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the playback status</dd> </dl> </li> </ul> <a name="statusProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>statusProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media">MediaPlayer.Status</a>> statusProperty()</pre> <div class="block">The current state of the MediaPlayer.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getStatus--"><code>getStatus()</code></a></dd> </dl> </li> </ul> <a name="getBufferProgressTime--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getBufferProgressTime</h4> <pre>public final <a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a> getBufferProgressTime()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.html#bufferProgressTimeProperty--"><code>bufferProgressTime</code></a> value.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the buffer progress time</dd> </dl> </li> </ul> <a name="bufferProgressTimeProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>bufferProgressTimeProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>> bufferProgressTimeProperty()</pre> <div class="block">The current buffer position indicating how much media can be played without stalling the <code>MediaPlayer</code>. This is applicable to buffered streams such as those reading from network connections as opposed for example to local files. <p>Seeking to a position beyond <code>bufferProgressTime</code> might cause a slight pause in playback until an amount of data sufficient to permit playback resumption has been buffered.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getBufferProgressTime--"><code>getBufferProgressTime()</code></a></dd> </dl> </li> </ul> <a name="setCycleCount-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setCycleCount</h4> <pre>public final void setCycleCount(int value)</pre> <div class="block">Sets the cycle count. Its effect will be constrained to <code>[1,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><code>Integer.MAX_VALUE</code></a>]</code>. Invoking this method will have no effect if media duration is <a href="../../../javafx/util/Duration.html#INDEFINITE"><code>Duration.INDEFINITE</code></a>.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the cycle count</dd> </dl> </li> </ul> <a name="getCycleCount--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCycleCount</h4> <pre>public final int getCycleCount()</pre> <div class="block">Retrieves the cycle count.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the cycle count.</dd> </dl> </li> </ul> <a name="cycleCountProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>cycleCountProperty</h4> <pre>public <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a> cycleCountProperty()</pre> <div class="block">The number of times the media will be played. By default, <code>cycleCount</code> is set to <code>1</code> meaning the media will only be played once. Setting <code>cycleCount</code> to a value greater than 1 will cause the media to play the given number of times or until stopped. If set to <a href="../../../javafx/scene/media/MediaPlayer.html#INDEFINITE"><code>INDEFINITE</code></a>, playback will repeat until stop() or pause() is called. <p>constraints: <code>cycleCount ≥ 1</code></div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCycleCount--"><code>getCycleCount()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setCycleCount-int-"><code>setCycleCount(int)</code></a></dd> </dl> </li> </ul> <a name="getCurrentCount--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCurrentCount</h4> <pre>public final int getCurrentCount()</pre> <div class="block">Retrieves the index of the current cycle.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the current cycle index</dd> </dl> </li> </ul> <a name="currentCountProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>currentCountProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a> currentCountProperty()</pre> <div class="block">The number of completed playback cycles. On the first pass, the value should be 0. On the second pass, the value should be 1 and so on. It is incremented at the end of each cycle just prior to seeking back to <a href="../../../javafx/scene/media/MediaPlayer.html#startTimeProperty--"><code>startTime</code></a>, i.e., when <a href="../../../javafx/scene/media/MediaPlayer.html#stopTimeProperty--"><code>stopTime</code></a> or the end of media has been reached.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getCurrentCount--"><code>getCurrentCount()</code></a></dd> </dl> </li> </ul> <a name="setMute-boolean-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setMute</h4> <pre>public final void setMute(boolean value)</pre> <div class="block">Sets the value of <a href="../../../javafx/scene/media/MediaPlayer.html#muteProperty--"><code>muteProperty()</code></a>.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the <code>mute</code> setting</dd> </dl> </li> </ul> <a name="isMute--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isMute</h4> <pre>public final boolean isMute()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.html#muteProperty--"><code>muteProperty()</code></a> value.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the mute setting</dd> </dl> </li> </ul> <a name="muteProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>muteProperty</h4> <pre>public <a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a> muteProperty()</pre> <div class="block">Whether the player audio is muted. A value of <code>true</code> indicates that audio is <i>not</i> being produced. The value of this property has no effect on <a href="../../../javafx/scene/media/MediaPlayer.html#volumeProperty--"><code>volume</code></a>, i.e., if the audio is muted and then un-muted, audio playback will resume at the same audible level provided of course that the <code>volume</code> property has not been modified meanwhile. The default value is <code>false</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#isMute--"><code>isMute()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setMute-boolean-"><code>setMute(boolean)</code></a></dd> </dl> </li> </ul> <a name="setOnMarker-javafx.event.EventHandler-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnMarker</h4> <pre>public final void setOnMarker(<a href="../../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a><<a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media">MediaMarkerEvent</a>> onMarker)</pre> <div class="block">Sets the marker event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>onMarker</code> - the marker event handler.</dd> </dl> </li> </ul> <a name="getOnMarker--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnMarker</h4> <pre>public final <a href="../../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a><<a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media">MediaMarkerEvent</a>> getOnMarker()</pre> <div class="block">Retrieves the marker event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the marker event handler.</dd> </dl> </li> </ul> <a name="onMarkerProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onMarkerProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a><<a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media">MediaMarkerEvent</a>>> onMarkerProperty()</pre> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches a media marker.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnMarker--"><code>getOnMarker()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnMarker-javafx.event.EventHandler-"><code>setOnMarker(EventHandler)</code></a></dd> </dl> </li> </ul> <a name="setOnEndOfMedia-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnEndOfMedia</h4> <pre>public final void setOnEndOfMedia(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the end of media event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnEndOfMedia--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnEndOfMedia</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnEndOfMedia()</pre> <div class="block">Retrieves the end of media event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="onEndOfMediaProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onEndOfMediaProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onEndOfMediaProperty()</pre> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches <code>stopTime</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnEndOfMedia--"><code>getOnEndOfMedia()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnEndOfMedia-java.lang.Runnable-"><code>setOnEndOfMedia(Runnable)</code></a></dd> </dl> </li> </ul> <a name="setOnReady-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnReady</h4> <pre>public final void setOnReady(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#READY"><code>MediaPlayer.Status.READY</code></a> event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnReady--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnReady</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnReady()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#READY"><code>MediaPlayer.Status.READY</code></a> event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="onReadyProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onReadyProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onReadyProperty()</pre> <div class="block">Event handler invoked when the status changes to <code>READY</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnReady--"><code>getOnReady()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnReady-java.lang.Runnable-"><code>setOnReady(Runnable)</code></a></dd> </dl> </li> </ul> <a name="setOnPlaying-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnPlaying</h4> <pre>public final void setOnPlaying(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PLAYING"><code>MediaPlayer.Status.PLAYING</code></a> event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnPlaying--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnPlaying</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnPlaying()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PLAYING"><code>MediaPlayer.Status.PLAYING</code></a> event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="onPlayingProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onPlayingProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onPlayingProperty()</pre> <div class="block">Event handler invoked when the status changes to <code>PLAYING</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnPlaying--"><code>getOnPlaying()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnPlaying-java.lang.Runnable-"><code>setOnPlaying(Runnable)</code></a></dd> </dl> </li> </ul> <a name="setOnPaused-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnPaused</h4> <pre>public final void setOnPaused(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PAUSED"><code>MediaPlayer.Status.PAUSED</code></a> event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnPaused--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnPaused</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnPaused()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#PAUSED"><code>MediaPlayer.Status.PAUSED</code></a> event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="onPausedProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onPausedProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onPausedProperty()</pre> <div class="block">Event handler invoked when the status changes to <code>PAUSED</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnPaused--"><code>getOnPaused()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnPaused-java.lang.Runnable-"><code>setOnPaused(Runnable)</code></a></dd> </dl> </li> </ul> <a name="setOnStopped-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnStopped</h4> <pre>public final void setOnStopped(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STOPPED"><code>MediaPlayer.Status.STOPPED</code></a> event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnStopped--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnStopped</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnStopped()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STOPPED"><code>MediaPlayer.Status.STOPPED</code></a> event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="onStoppedProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onStoppedProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onStoppedProperty()</pre> <div class="block">Event handler invoked when the status changes to <code>STOPPED</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnStopped--"><code>getOnStopped()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnStopped-java.lang.Runnable-"><code>setOnStopped(Runnable)</code></a></dd> </dl> </li> </ul> <a name="setOnHalted-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnHalted</h4> <pre>public final void setOnHalted(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#HALTED"><code>MediaPlayer.Status.HALTED</code></a> event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnHalted--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnHalted</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnHalted()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#HALTED"><code>MediaPlayer.Status.HALTED</code></a> event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="onHaltedProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onHaltedProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onHaltedProperty()</pre> <div class="block">Event handler invoked when the status changes to <code>HALTED</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnHalted--"><code>getOnHalted()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnHalted-java.lang.Runnable-"><code>setOnHalted(Runnable)</code></a></dd> </dl> </li> </ul> <a name="setOnRepeat-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnRepeat</h4> <pre>public final void setOnRepeat(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the repeat event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnRepeat--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnRepeat</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnRepeat()</pre> <div class="block">Retrieves the repeat event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="onRepeatProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onRepeatProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onRepeatProperty()</pre> <div class="block">Event handler invoked when the player <code>currentTime</code> reaches <code>stopTime</code> and <i>will be</i> repeating. This callback is made prior to seeking back to <code>startTime</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnRepeat--"><code>getOnRepeat()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnRepeat-java.lang.Runnable-"><code>setOnRepeat(Runnable)</code></a></dd> </dl> </li> </ul> <a name="setOnStalled-java.lang.Runnable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOnStalled</h4> <pre>public final void setOnStalled(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> value)</pre> <div class="block">Sets the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STALLED"><code>MediaPlayer.Status.STALLED</code></a> event handler.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="getOnStalled--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOnStalled</h4> <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> getOnStalled()</pre> <div class="block">Retrieves the <a href="../../../javafx/scene/media/MediaPlayer.Status.html#STALLED"><code>MediaPlayer.Status.STALLED</code></a> event handler.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the event handler or <code>null</code>.</dd> </dl> </li> </ul> <a name="onStalledProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>onStalledProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>> onStalledProperty()</pre> <div class="block">Event handler invoked when the status changes to <code>STALLED</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getOnStalled--"><code>getOnStalled()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setOnStalled-java.lang.Runnable-"><code>setOnStalled(Runnable)</code></a></dd> </dl> </li> </ul> <a name="setAudioSpectrumNumBands-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAudioSpectrumNumBands</h4> <pre>public final void setAudioSpectrumNumBands(int value)</pre> <div class="block">Sets the number of bands in the audio spectrum.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the number of spectral bands; <code>value</code>must be ≥ 2</dd> </dl> </li> </ul> <a name="getAudioSpectrumNumBands--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAudioSpectrumNumBands</h4> <pre>public final int getAudioSpectrumNumBands()</pre> <div class="block">Retrieves the number of bands in the audio spectrum.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the number of spectral bands.</dd> </dl> </li> </ul> <a name="audioSpectrumNumBandsProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>audioSpectrumNumBandsProperty</h4> <pre>public <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a> audioSpectrumNumBandsProperty()</pre> <div class="block">The number of bands in the audio spectrum. The default value is 128; minimum is 2. The frequency range of the audio signal will be divided into the specified number of frequency bins. For example, a typical digital music signal has a frequency range of <code>[0.0, 22050]</code> Hz. If the number of spectral bands were in this case set to 10, the width of each frequency bin in the spectrum would be <code>2205</code> Hz with the lower bound of the lowest frequency bin equal to <code>0.0</code>.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumNumBands--"><code>getAudioSpectrumNumBands()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumNumBands-int-"><code>setAudioSpectrumNumBands(int)</code></a></dd> </dl> </li> </ul> <a name="setAudioSpectrumInterval-double-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAudioSpectrumInterval</h4> <pre>public final void setAudioSpectrumInterval(double value)</pre> <div class="block">Sets the value of the audio spectrum notification interval in seconds.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - a positive value specifying the spectral update interval</dd> </dl> </li> </ul> <a name="getAudioSpectrumInterval--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAudioSpectrumInterval</h4> <pre>public final double getAudioSpectrumInterval()</pre> <div class="block">Retrieves the value of the audio spectrum notification interval in seconds.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the spectral update interval</dd> </dl> </li> </ul> <a name="audioSpectrumIntervalProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>audioSpectrumIntervalProperty</h4> <pre>public <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a> audioSpectrumIntervalProperty()</pre> <div class="block">The interval between spectrum updates in seconds. The default is <code>0.1</code> seconds.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumInterval--"><code>getAudioSpectrumInterval()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumInterval-double-"><code>setAudioSpectrumInterval(double)</code></a></dd> </dl> </li> </ul> <a name="setAudioSpectrumThreshold-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAudioSpectrumThreshold</h4> <pre>public final void setAudioSpectrumThreshold(int value)</pre> <div class="block">Sets the audio spectrum threshold in decibels.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>value</code> - the spectral threshold in dB; must be ≤ <code>0</code>.</dd> </dl> </li> </ul> <a name="getAudioSpectrumThreshold--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAudioSpectrumThreshold</h4> <pre>public final int getAudioSpectrumThreshold()</pre> <div class="block">Retrieves the audio spectrum threshold in decibels.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the spectral threshold in dB</dd> </dl> </li> </ul> <a name="audioSpectrumThresholdProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>audioSpectrumThresholdProperty</h4> <pre>public <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a> audioSpectrumThresholdProperty()</pre> <div class="block">The sensitivity threshold in decibels; must be non-positive. Values below this threshold with respect to the peak frequency in the given spectral band will be set to the value of the threshold. The default value is -60 dB.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumThreshold--"><code>getAudioSpectrumThreshold()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumThreshold-int-"><code>setAudioSpectrumThreshold(int)</code></a></dd> </dl> </li> </ul> <a name="setAudioSpectrumListener-javafx.scene.media.AudioSpectrumListener-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAudioSpectrumListener</h4> <pre>public final void setAudioSpectrumListener(<a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media">AudioSpectrumListener</a> listener)</pre> <div class="block">Sets the listener of the audio spectrum.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>listener</code> - the spectral listener or <code>null</code>.</dd> </dl> </li> </ul> <a name="getAudioSpectrumListener--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAudioSpectrumListener</h4> <pre>public final <a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media">AudioSpectrumListener</a> getAudioSpectrumListener()</pre> <div class="block">Retrieves the listener of the audio spectrum.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the spectral listener or <code>null</code></dd> </dl> </li> </ul> <a name="audioSpectrumListenerProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>audioSpectrumListenerProperty</h4> <pre>public <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a><<a href="../../../javafx/scene/media/AudioSpectrumListener.html" title="interface in javafx.scene.media">AudioSpectrumListener</a>> audioSpectrumListenerProperty()</pre> <div class="block">A listener for audio spectrum updates. When the listener is registered, audio spectrum computation is enabled; upon removing the listener, computation is disabled. Only a single listener may be registered, so if multiple observers are required, events must be forwarded. <p>An <code>AudioSpectrumListener</code> may be useful for example to plot the frequency spectrum of the audio being played or to generate waveforms for a music visualizer.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/media/MediaPlayer.html#getAudioSpectrumListener--"><code>getAudioSpectrumListener()</code></a>, <a href="../../../javafx/scene/media/MediaPlayer.html#setAudioSpectrumListener-javafx.scene.media.AudioSpectrumListener-"><code>setAudioSpectrumListener(AudioSpectrumListener)</code></a></dd> </dl> </li> </ul> <a name="dispose--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>dispose</h4> <pre>public void dispose()</pre> <div class="block">Free all resources associated with player. Player SHOULD NOT be used after this function is called. Player will transition to <code>Status.DISPOSED</code> after this method is done. This method can be called anytime and regarding current player status.</div> <dl> <dt><span class="simpleTagLabel">Since:</span></dt> <dd>JavaFX 8.0</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/MediaPlayer.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../javafx/scene/media/MediaMarkerEvent.html" title="class in javafx.scene.media"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../javafx/scene/media/MediaPlayer.Status.html" title="enum in javafx.scene.media"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?javafx/scene/media/MediaPlayer.html" target="_top">Frames</a></li> <li><a href="MediaPlayer.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li><a href="#nested.class.summary">Nested</a> | </li> <li><a href="#field.summary">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li><a href="#field.detail">Field</a> | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><small><a href="https://docs.oracle.com/javase/8/docs/legal/cpyr.html">Copyright</a> (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.</small></small></p> </body> </html>