Interface ITrack

All Superinterfaces:
IComponent<ITrack>, IHtmlBasedComponent<ITrack>, IXulElement<ITrack>

public interface ITrack extends IXulElement<ITrack>
Immutable Track component

It lets you specify some timed text tracks like captions or subtitles for media components such as IAudio or Video ([EE]).

Author:
jumperchen
See Also:
  • Track
  • Field Details

    • DEFAULT

      static final ITrack DEFAULT
      Constant for default attributes of this immutable component.
  • Method Details

    • getWidgetClass

      default String getWidgetClass()
      Returns the client widget class.

      Default: "zul.med.Track"

      Specified by:
      getWidgetClass in interface IComponent<ITrack>
    • isAsDefault

      default boolean isAsDefault()
      Returns if this track should be enabled by default.

      Default: false.

    • withAsDefault

      ITrack withAsDefault(boolean asDefault)
      Returns a copy of this immutable component with the specified asDefault.

      Sets if this track should be enabled by default.

      Parameters:
      asDefault - Whether this track should be enabled by default.

      Default: false.

      Returns:
      A modified copy of the this object
    • getKind

      @Nullable String getKind()
      Returns what kind of track it is.

      Default: null.

    • withKind

      ITrack withKind(@Nullable String kind)
      Returns a copy of this immutable component with the specified kind.

      Sets what kind of track it is. The following keywords are accepted:

      • subtitles
      • captions
      • descriptions
      • chapters
      • metadata
      Parameters:
      kind - What kind of track it is.

      Default: null.

      Returns:
      A modified copy of the this object
    • withKind

      default ITrack withKind(@Nullable ITrack.Kind kind)
      Returns a copy of this immutable component with the specified kind.

      Sets what kind of track it is. The following keywords are accepted:

      • subtitles
      • captions
      • descriptions
      • chapters
      • metadata
      Parameters:
      kind - What kind of track it is.

      Default: null.

      Returns:
      A modified copy of the this object
    • getLabel

      @Nullable String getLabel()
      Returns a readable description of this track.

      Default: null.

    • withLabel

      ITrack withLabel(@Nullable String label)
      Returns a copy of this immutable component with the specified label.

      Sets a readable description of this track.

      Parameters:
      label - A readable description of this track.

      Default: null.

      Returns:
      A modified copy of the this object
    • getSrc

      @Nullable String getSrc()
      Returns the source address of this track.

      Default: null.

    • withSrc

      ITrack withSrc(@Nullable String src)
      Returns a copy of this immutable component with the specified srclang.

      Sets the source address of this track. Must be a valid URL. This attribute must be specified. The URL must have the same origin as the parent <audio> or <video>, unless the crossorigin attribute is set.

      Parameters:
      src - The source address of this track.

      Default: null.

      Returns:
      A modified copy of the this object
    • getSrclang

      @Nullable String getSrclang()
      Returns the language of the source.

      Default: null.

      Returns:
      the language of the source.
    • withSrclang

      ITrack withSrclang(@Nullable String srclang)
      Returns a copy of this immutable component with the specified srclang.

      Sets the language of the source.

      Parameters:
      srclang - The language of the source.

      Default: null.

      Returns:
      A modified copy of the this object
    • of

      static ITrack of(String label)
      Returns the instance with the given label.
      Parameters:
      label - The label of the component.
    • ofSrc

      static ITrack ofSrc(String src)
      Returns the instance with the given src.
      Parameters:
      src - The src of the component.
    • ofKind

      static ITrack ofKind(ITrack.Kind kind)
      Returns the instance with the given kind.
      Parameters:
      kind - What kind of track it is.
    • ofId

      static ITrack ofId(String id)
      Returns the instance with the given id.
      Parameters:
      id - The id to identify this component