Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > afb4c294e8f553dc8d6909c852dc1564 > files > 1379

java-1.8.0-openjfx-1.8.0.76-1.b04.1.1.mga5.i586.rpm

<!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 Wed Apr 06 14:51:59 UTC 2016 -->
<title>Media (JavaFX 8)</title>
<meta name="date" content="2016-04-06">
<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="Media (JavaFX 8)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":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};
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/Media.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&nbsp;8</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../javafx/scene/media/EqualizerBand.html" title="class in javafx.scene.media"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../javafx/scene/media/MediaErrorEvent.html" title="class in javafx.scene.media"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?javafx/scene/media/Media.html" target="_top">Frames</a></li>
<li><a href="Media.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 Media" class="title">Class Media</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.Media</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">Media</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>Media</code> class represents a media resource. It is instantiated
 from the string form of a source URI. Information about the media such as
 duration, metadata, tracks, and video resolution may be obtained from a
 <code>Media</code> instance. The media information is obtained asynchronously
 and so not necessarily available immediately after instantiation of the class.
 All information should however be available if the instance has been
 associated with a <a href="../../../javafx/scene/media/MediaPlayer.html" title="class in javafx.scene.media"><code>MediaPlayer</code></a> and that player has transitioned to
 <a href="../../../javafx/scene/media/MediaPlayer.Status.html#READY"><code>MediaPlayer.Status.READY</code></a> status. To be notified when metadata or
 <a href="../../../javafx/scene/media/Track.html" title="class in javafx.scene.media"><code>Track</code></a>s are added, observers may be registered with the collections
 returned by <a href="../../../javafx/scene/media/Media.html#getMetadata--"><code>getMetadata()</code></a>and <a href="../../../javafx/scene/media/Media.html#getTracks--"><code>getTracks()</code></a>, respectively.</p>

 <p>The same <code>Media</code> object may be shared among multiple
 <code>MediaPlayer</code> objects. Such a shared instance might manage a single
 copy of the source media data to be used by all players, or it might require a
 separate copy of the data for each player. The choice of implementation will
 not however have any effect on player behavior at the interface level.</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/MediaPlayer.html" title="class in javafx.scene.media"><code>MediaPlayer</code></a>, 
<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media"><code>MediaException</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#durationProperty">duration</a></span></code>
<div class="block">The duration in seconds of the source media.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#errorProperty">error</a></span></code>
<div class="block">A property set to a MediaException value when an error occurs.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<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/Media.html#heightProperty">height</a></span></code>
<div class="block">The height in pixels of the source media.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<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>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#onErrorProperty">onError</a></span></code>
<div class="block">Event handler called when an error occurs.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<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/Media.html#widthProperty">width</a></span></code>
<div class="block">The width in pixels of the source media.</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">&nbsp;</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/Media.html#Media-java.lang.String-">Media</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;source)</code>
<div class="block">Constructs a <code>Media</code> instance.</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#durationProperty--">durationProperty</a></span>()</code>
<div class="block">The duration in seconds of the source media.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#errorProperty--">errorProperty</a></span>()</code>
<div class="block">A property set to a MediaException value when an error occurs.</div>
</td>
</tr>
<tr id="i2" 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/Media.html#getDuration--">getDuration</a></span>()</code>
<div class="block">Retrieve the duration in seconds of the media.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<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/Media.html#getError--">getError</a></span>()</code>
<div class="block">Return any error encountered in the media.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#getHeight--">getHeight</a></span>()</code>
<div class="block">Retrieve the height in pixels of the media.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../javafx/collections/ObservableMap.html" title="interface in javafx.collections">ObservableMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#getMarkers--">getMarkers</a></span>()</code>
<div class="block">Retrieve the markers defined on this <code>Media</code> instance.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../javafx/collections/ObservableMap.html" title="interface in javafx.collections">ObservableMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<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>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#getMetadata--">getMetadata</a></span>()</code>
<div class="block">Retrieve the metadata contained in this media source.</div>
</td>
</tr>
<tr id="i7" 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/Media.html#getOnError--">getOnError</a></span>()</code>
<div class="block">Retrieve the error handler to be called if an error occurs.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#getSource--">getSource</a></span>()</code>
<div class="block">Retrieve the source URI of the media.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../javafx/collections/ObservableList.html" title="interface in javafx.collections">ObservableList</a>&lt;<a href="../../../javafx/scene/media/Track.html" title="class in javafx.scene.media">Track</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#getTracks--">getTracks</a></span>()</code>
<div class="block">Retrieve the tracks contained in this media source.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#getWidth--">getWidth</a></span>()</code>
<div class="block">Retrieve the width in pixels of the media.</div>
</td>
</tr>
<tr id="i11" 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/Media.html#heightProperty--">heightProperty</a></span>()</code>
<div class="block">The height in pixels of the source media.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<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>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.html#onErrorProperty--">onErrorProperty</a></span>()</code>
<div class="block">Event handler called when an error occurs.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/media/Media.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>&nbsp;value)</code>
<div class="block">Set the event handler to be called when an error occurs.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<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/Media.html#widthProperty--">widthProperty</a></span>()</code>
<div class="block">The width in pixels of the source media.</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&nbsp;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&nbsp;<a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>&gt; errorProperty</pre>
<div class="block">A property set to a MediaException value when an error occurs.
 If <code>error</code> is non-<code>null</code>, then the media could not
 be loaded and is not usable. If <a href="../../../javafx/scene/media/Media.html#onErrorProperty--"><code>onError</code></a> is non-<code>null</code>,
 it will be invoked when the <code>error</code> property is set.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.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&nbsp;<a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<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>&gt; onErrorProperty</pre>
<div class="block">Event handler called when an error occurs. This will happen
 if a malformed or invalid URL is passed to the constructor or there is
 a problem accessing the URL.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.html#getOnError--"><code>getOnError()</code></a>, 
<a href="../../../javafx/scene/media/Media.html#setOnError-java.lang.Runnable-"><code>setOnError(Runnable)</code></a></dd>
</dl>
</li>
</ul>
<a name="widthProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>width</h4>
<pre>public&nbsp;<a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a> widthProperty</pre>
<div class="block">The width in pixels of the source media.
 This may be zero if the media has no width, e.g., when playing audio,
 or if the width is currently unknown which may occur with streaming
 media.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.html#getWidth--"><code>getWidth()</code></a></dd>
</dl>
</li>
</ul>
<a name="heightProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>height</h4>
<pre>public&nbsp;<a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a> heightProperty</pre>
<div class="block">The height in pixels of the source media.
 This may be zero if the media has no height, e.g., when playing audio,
 or if the height is currently unknown which may occur with streaming
 media.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.html#getHeight--"><code>getHeight()</code></a></dd>
</dl>
</li>
</ul>
<a name="durationProperty">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>duration</h4>
<pre>public&nbsp;<a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>&gt; durationProperty</pre>
<div class="block">The duration in seconds of the source media. If the media duration is
 unknown then this property value will be <a href="../../../javafx/util/Duration.html#UNKNOWN"><code>Duration.UNKNOWN</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.html#getDuration--"><code>getDuration()</code></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="Media-java.lang.String-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Media</h4>
<pre>public&nbsp;Media(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;source)</pre>
<div class="block">Constructs a <code>Media</code> instance.  This is the only way to
 specify the media source. The source must represent a valid <code>URI</code>
 and is immutable. Only HTTP, HTTPS, FILE, and JAR <code>URL</code>s are supported. If the
 provided URL is invalid then an exception will be thrown.  If an
 asynchronous error occurs, the <a href="../../../javafx/scene/media/Media.html#errorProperty--"><code>error</code></a> property will be set. Listen
 to this property to be notified of any such errors.

 <p>If the source uses a non-blocking protocol such as FILE, then any
 problems which can be detected immediately will cause a <code>MediaException</code>
 to be thrown. Such problems include the media being inaccessible or in an
 unsupported format. If however a potentially blocking protocol such as
 HTTP is used, then the connection will be initialized asynchronously so
 that these sorts of errors will be signaled by setting the <a href="../../../javafx/scene/media/Media.html#errorProperty--"><code>error</code></a>
 property.</p>

 <p>Constraints:
 <ul>
 <li>The supplied URI must conform to RFC-2396 as required by
 <A href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html">java.net.URI</A>.</li>
 <li>Only HTTP, HTTPS, FILE, and JAR URIs are supported.</li>
 </ul>

 <p>See <A href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html">java.net.URI</A>
 for more information about URI formatting in general.
 JAR URL syntax is specified in <a href="https://docs.oracle.com/javase/8/docs/api/java/net/JarURLConnection.html">java.net.JarURLConnection</A>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - The URI of the source media.</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 the URI string is <code>null</code>.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the URI string does not conform to RFC-2396
 or, if appropriate, the Jar URL specification, or is in a non-compliant
 form which cannot be modified to a compliant form.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the URI string has a <code>null</code>
 scheme.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if the protocol specified for the
 source is not supported.</dd>
<dd><code><a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a></code> - if the media source cannot be connected
 (type <a href="../../../javafx/scene/media/MediaException.Type.html#MEDIA_INACCESSIBLE"><code>MediaException.Type.MEDIA_INACCESSIBLE</code></a>) or is not supported
 (type <a href="../../../javafx/scene/media/MediaException.Type.html#MEDIA_UNSUPPORTED"><code>MediaException.Type.MEDIA_UNSUPPORTED</code></a>).</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="getError--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getError</h4>
<pre>public final&nbsp;<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>&nbsp;getError()</pre>
<div class="block">Return any error encountered in the media.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media"><code>MediaException</code></a> or <code>null</code> if there is no error.</dd>
</dl>
</li>
</ul>
<a name="errorProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>errorProperty</h4>
<pre>public&nbsp;<a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../../javafx/scene/media/MediaException.html" title="class in javafx.scene.media">MediaException</a>&gt;&nbsp;errorProperty()</pre>
<div class="block">A property set to a MediaException value when an error occurs.
 If <code>error</code> is non-<code>null</code>, then the media could not
 be loaded and is not usable. If <a href="../../../javafx/scene/media/Media.html#onErrorProperty--"><code>onError</code></a> is non-<code>null</code>,
 it will be invoked when the <code>error</code> property is set.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.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&nbsp;void&nbsp;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>&nbsp;value)</pre>
<div class="block">Set the event handler to be called when an error occurs.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the error event handler.</dd>
</dl>
</li>
</ul>
<a name="getOnError--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOnError</h4>
<pre>public final&nbsp;<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>&nbsp;getOnError()</pre>
<div class="block">Retrieve the error handler to be called if an error occurs.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the error handler or <code>null</code> if none is defined.</dd>
</dl>
</li>
</ul>
<a name="onErrorProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onErrorProperty</h4>
<pre>public&nbsp;<a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<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>&gt;&nbsp;onErrorProperty()</pre>
<div class="block">Event handler called when an error occurs. This will happen
 if a malformed or invalid URL is passed to the constructor or there is
 a problem accessing the URL.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.html#getOnError--"><code>getOnError()</code></a>, 
<a href="../../../javafx/scene/media/Media.html#setOnError-java.lang.Runnable-"><code>setOnError(Runnable)</code></a></dd>
</dl>
</li>
</ul>
<a name="getMetadata--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMetadata</h4>
<pre>public final&nbsp;<a href="../../../javafx/collections/ObservableMap.html" title="interface in javafx.collections">ObservableMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<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>&gt;&nbsp;getMetadata()</pre>
<div class="block">Retrieve the metadata contained in this media source. If there are
 no metadata, the returned <a href="../../../javafx/collections/ObservableMap.html" title="interface in javafx.collections"><code>ObservableMap</code></a> will be empty.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the metadata contained in this media source.</dd>
</dl>
</li>
</ul>
<a name="getWidth--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWidth</h4>
<pre>public final&nbsp;int&nbsp;getWidth()</pre>
<div class="block">Retrieve the width in pixels of the media.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the media width or zero if the width is undefined or unknown.</dd>
</dl>
</li>
</ul>
<a name="widthProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>widthProperty</h4>
<pre>public&nbsp;<a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a>&nbsp;widthProperty()</pre>
<div class="block">The width in pixels of the source media.
 This may be zero if the media has no width, e.g., when playing audio,
 or if the width is currently unknown which may occur with streaming
 media.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.html#getWidth--"><code>getWidth()</code></a></dd>
</dl>
</li>
</ul>
<a name="getHeight--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeight</h4>
<pre>public final&nbsp;int&nbsp;getHeight()</pre>
<div class="block">Retrieve the height in pixels of the media.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the media height or zero if the height is undefined or unknown.</dd>
</dl>
</li>
</ul>
<a name="heightProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>heightProperty</h4>
<pre>public&nbsp;<a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a>&nbsp;heightProperty()</pre>
<div class="block">The height in pixels of the source media.
 This may be zero if the media has no height, e.g., when playing audio,
 or if the height is currently unknown which may occur with streaming
 media.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.html#getHeight--"><code>getHeight()</code></a></dd>
</dl>
</li>
</ul>
<a name="getDuration--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDuration</h4>
<pre>public final&nbsp;<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>&nbsp;getDuration()</pre>
<div class="block">Retrieve the duration in seconds of the media.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the duration of the media, <a href="../../../javafx/util/Duration.html#UNKNOWN"><code>Duration.UNKNOWN</code></a> if unknown or <a href="../../../javafx/util/Duration.html#INDEFINITE"><code>Duration.INDEFINITE</code></a> for live streams</dd>
</dl>
</li>
</ul>
<a name="durationProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>durationProperty</h4>
<pre>public&nbsp;<a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>&gt;&nbsp;durationProperty()</pre>
<div class="block">The duration in seconds of the source media. If the media duration is
 unknown then this property value will be <a href="../../../javafx/util/Duration.html#UNKNOWN"><code>Duration.UNKNOWN</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javafx/scene/media/Media.html#getDuration--"><code>getDuration()</code></a></dd>
</dl>
</li>
</ul>
<a name="getTracks--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTracks</h4>
<pre>public final&nbsp;<a href="../../../javafx/collections/ObservableList.html" title="interface in javafx.collections">ObservableList</a>&lt;<a href="../../../javafx/scene/media/Track.html" title="class in javafx.scene.media">Track</a>&gt;&nbsp;getTracks()</pre>
<div class="block">Retrieve the tracks contained in this media source. If there are
 no tracks, the returned <a href="../../../javafx/collections/ObservableList.html" title="interface in javafx.collections"><code>ObservableList</code></a> will be empty.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the tracks contained in this media source.</dd>
</dl>
</li>
</ul>
<a name="getMarkers--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMarkers</h4>
<pre>public final&nbsp;<a href="../../../javafx/collections/ObservableMap.html" title="interface in javafx.collections">ObservableMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../javafx/util/Duration.html" title="class in javafx.util">Duration</a>&gt;&nbsp;getMarkers()</pre>
<div class="block">Retrieve the markers defined on this <code>Media</code> instance. If
 there are no markers the returned <a href="../../../javafx/collections/ObservableMap.html" title="interface in javafx.collections"><code>ObservableMap</code></a> will be empty.
 Programmatic markers may be added by inserting entries in the returned
 <code>Map</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the markers defined on this media source.</dd>
</dl>
</li>
</ul>
<a name="getSource--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getSource</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getSource()</pre>
<div class="block">Retrieve the source URI of the media.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the media source URI as a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a>.</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/Media.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&nbsp;8</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../javafx/scene/media/EqualizerBand.html" title="class in javafx.scene.media"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../javafx/scene/media/MediaErrorEvent.html" title="class in javafx.scene.media"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?javafx/scene/media/Media.html" target="_top">Frames</a></li>
<li><a href="Media.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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>