APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.media

public abstract Class Track

extends Object
Class Inheritance
Known Direct Subclasses
javafx.scene.media.VideoTrack, javafx.scene.media.AudioTrack, javafx.scene.media.SubtitleTrack
Imports
java.util.Collections, .Locale, .Map

A class representing a track contained in a media resource. A media resource may have multiple parallel tracks, such as a video track with several audio tracks in different languages. The types of tracks supported by the system may be inferred from the existing subclasses of this class. Not all media resources will contain a track of each supported type, and the time span of a given track need not be commensurate with the time span of the containing media.
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private String
private Locale
private Map<String, Object>
private String
name

The name of the track or null if the track is unnamed.

private long

Constructor Summary

AccessConstructor and Description
pack-priv
Track(long trackID, Map<String, Object> metadata)

Method Summary

Modifier and TypeMethod and Description
public final Locale

Returns:

the Tracks language information or null
getLocale
()

The Locale specifying the language and possibly the country that the Track contents are formatted for.

public final Map<String, Object>

Returns:

the Map containing all known metadata for this Track
getMetadata
()

Gets the Map containing all known metadata for this Track.

public final String

Returns:

the track name or null.
getName
()

Retrieves the name of the track.

public final long

Returns:

the Tracks unique ID
getTrackID
()

Get the track ID as defined by the media container format.

public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

descriptionback to summary
private String description
localeback to summary
private Locale locale
metadataback to summary
private Map<String, Object> metadata
nameback to summary
private String name

The name of the track or null if the track is unnamed.

trackIDback to summary
private long trackID

Constructor Detail

Trackback to summary
pack-priv Track(long trackID, Map<String, Object> metadata)

Method Detail

getLocaleback to summary
public final Locale getLocale()

The Locale specifying the language and possibly the country that the Track contents are formatted for. For AudioTracks this will be the language spoken, for SubtitleTracks this will be the language presented in the captions. Not all Tracks will have an associated language, in which case this method will return null.

Returns:Locale

the Tracks language information or null

Since
JavaFX 8.0
getMetadataback to summary
public final Map<String, Object> getMetadata()

Gets the Map containing all known metadata for this Track.

Returns:Map<String, Object>

the Map containing all known metadata for this Track

Since
JavaFX 8.0
getNameback to summary
public final String getName()

Retrieves the name of the track.

Returns:String

the track name or null.

getTrackIDback to summary
public final long getTrackID()

Get the track ID as defined by the media container format. The ID of each Track must be unique for its source Media.

Returns:long

the Tracks unique ID

Since
JavaFX 8.0
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override