java.lang.Object
javafx.scene.media.Track
- Direct Known Subclasses:
 AudioTrack,SubtitleTrack,VideoTrack
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
 
- 
Method Summary
Modifier and TypeMethodDescriptionfinal LocaleTheLocalespecifying the language and possibly the country that theTrackcontents are formatted for.Gets theMapcontaining all known metadata for thisTrack.final StringgetName()Retrieves the name of the track.final longGet the track ID as defined by the media container format.final StringtoString() 
- 
Method Details
- 
getName
Retrieves the name of the track.- Returns:
 - the track name or 
null. 
 - 
getLocale
TheLocalespecifying the language and possibly the country that theTrackcontents are formatted for. ForAudioTracks this will be the language spoken, forSubtitleTracks this will be the language presented in the captions. Not allTracks will have an associated language, in which case this method will return null.- Returns:
 - the 
Tracks language information or null - Since:
 - JavaFX 8.0
 
 - 
getTrackID
public final long getTrackID()Get the track ID as defined by the media container format. The ID of eachTrackmust be unique for its sourceMedia.- Returns:
 - the 
Tracks unique ID - Since:
 - JavaFX 8.0
 
 - 
getMetadata
Gets theMapcontaining all known metadata for thisTrack.- Returns:
 - the 
Mapcontaining all known metadata for thisTrack - Since:
 - JavaFX 8.0
 
 - 
toString
 
 -