
If the source uses a non-blocking protocol such as FILE, then any To this property to be notified of any such errors. If anĪsynchronous error occurs, the error property will be set. Provided URL is invalid then an exception will be thrown. Only HTTP, FILE, and JAR URLs are supported.


The source must represent a valid URIĪnd is immutable. Since: JavaFX 2.0 See Also: MediaPlayer,Ĭonstructs a Media instance. Not however have any effect on player behavior at the interface level. Separate copy of the data for each player. Such a shared instance might manage a singleĬopy of the source media data to be used by all players, or it might require a The same Media object may be shared among multiple Returned by getMetadata()and getTracks(), respectively.

Tracks are added, observers may be registered with the collections The media information is obtained asynchronouslyĪnd so not necessarily available immediately after instantiation of the class.Īll information should however be available if the instance has beenĪssociated with a MediaPlayer and that player has transitioned to Information about the media such asĭuration, metadata, tracks, and video resolution may be obtained from a It is instantiatedįrom the string form of a source URI. The Media class represents a media resource.
