Spec-Zone.ru › OpenJavaFX 8
javafx.scene.media

Class Track

java.lang.Object
  • javafx.scene.media.Track

Direct Known Subclasses:

AudioTrack, SubtitleTrack, VideoTrack



public abstract class Track
extends Object
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

    All MethodsInstance MethodsConcrete Methods
    Modifier and Type Method and Description
    Locale getLocale()
    The Locale specifying the language and possibly the country that the Track contents are formatted for.
    Map<String,Object> getMetadata()
    String getName()
    Retrieves the name of the track.
    long getTrackID()
    Get the track ID as defined by the media container format.
    String toString()
    • Methods inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Detail

    • getName

      public final String getName()
      Retrieves the name of the track.

      Returns:

      the track name or null.

    • getLocale

      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:

      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 each Track must be unique for its source Media.

      Returns:

      the Tracks unique ID

      Since:

      JavaFX 8.0

    • getMetadata

      public final Map<String,Object> getMetadata()

      Returns:

      a Map containing all known metadata for this Track

      Since:

      JavaFX 8.0

    • toString

      public final String toString()

      Overrides:

      toString in class Object

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API