Class SubtitlesStream

java.lang.Object
org.schabi.newpipe.extractor.stream.Stream
org.schabi.newpipe.extractor.stream.SubtitlesStream
All Implemented Interfaces:
Serializable

public final class SubtitlesStream extends Stream
See Also:
  • Method Details

    • getExtension

      public String getExtension()
      Get the extension of the subtitles.
      Returns:
      the extension of the subtitles
    • isAutoGenerated

      public boolean isAutoGenerated()
      Return whether if the subtitles are auto-generated.

      Some streaming services can generate subtitles for their contents, like YouTube.

      Returns:
      true if the subtitles are auto-generated, false otherwise
    • equalStats

      public boolean equalStats(Stream cmp)
      Reveals whether two streams have the same statistics (media format and delivery method).

      If the media format of the stream is unknown, the streams are compared by using only the delivery method and their ID.

      Note: This method always returns false if the stream passed is null.

      Overrides:
      equalStats in class Stream
      Parameters:
      cmp - the stream object to be compared to this stream object
      Returns:
      whether the stream have the same stats or not, based on the criteria above
    • getDisplayLanguageName

      public String getDisplayLanguageName()
      Get the display language name of the subtitles.
      Returns:
      the display language name of the subtitles
    • getName

      @Nullable public String getName()
      Get the service-provided display name of the subtitles, if the service exposed one.

      This is useful when a video has multiple tracks that share the same language code (for example two "en" tracks). The service's own name field is the only reliable way to tell such tracks apart in a picker.

      Returns:
      the service-provided name of the track, or null if the service does not expose one
    • getLanguageTag

      public String getLanguageTag()
      Get the language tag of the subtitles.
      Returns:
      the language tag of the subtitles
    • getLocale

      public Locale getLocale()
      Get the locale of the subtitles.
      Returns:
      the locale of the subtitles
    • getItagItem

      @Nullable public ItagItem getItagItem()
      No subtitles which are currently extracted use an ItagItem, so null is returned by this method.
      Specified by:
      getItagItem in class Stream
      Returns:
      null