Class Caption

  • All Implemented Interfaces:
    android.os.Parcelable
    Direct Known Subclasses:
    ChaptersTrack

    public class Caption
    extends java.lang.Object
    implements android.os.Parcelable
    A caption track.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Caption.Builder
      Builder for Caption.
      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static android.os.Parcelable.Creator<Caption> CREATOR  
      • Fields inherited from interface android.os.Parcelable

        CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Caption​(Caption.Builder builder)  
    • Field Detail

      • CREATOR

        public static final android.os.Parcelable.Creator<Caption> CREATOR
    • Method Detail

      • getFile

        @Nullable
        public java.lang.String getFile()
        Returns:
        URL to the captions, chapters or thumbnails text track file.
      • getKind

        @NonNull
        public CaptionType getKind()
        Returns:
        The kind of text track.
      • getLabel

        @Nullable
        public java.lang.String getLabel()
        Returns:
        Label of the text track. Is only used in setups with multiple captions, where the label is displayed in the CC selection menu.
      • isDefault

        public boolean isDefault()
        Returns:
        Only for captions. Set this to true if you want a captions track to display by default
      • describeContents

        public int describeContents()
        Specified by:
        describeContents in interface android.os.Parcelable
      • writeToParcel

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object