Class SubtitlesStream
- java.lang.Object
-
- org.schabi.newpipe.extractor.stream.Stream
-
- org.schabi.newpipe.extractor.stream.SubtitlesStream
-
- All Implemented Interfaces:
java.io.Serializable
public final class SubtitlesStream extends Stream
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubtitlesStream.Builder
Class to buildSubtitlesStream
objects.
-
Field Summary
-
Fields inherited from class org.schabi.newpipe.extractor.stream.Stream
FORMAT_ID_UNKNOWN, ID_UNKNOWN, ITAG_NOT_AVAILABLE_OR_NOT_APPLICABLE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equalStats(Stream cmp)
Reveals whether two streams have the same statistics (media format
anddelivery method
).java.lang.String
getDisplayLanguageName()
Get the display language name of the subtitles.java.lang.String
getExtension()
Get the extension of the subtitles.ItagItem
getItagItem()
No subtitles which are currently extracted use anItagItem
, sonull
is returned by this method.java.lang.String
getLanguageTag()
Get the language tag of the subtitles.java.util.Locale
getLocale()
Get thelocale
of the subtitles.boolean
isAutoGenerated()
Return whether if the subtitles are auto-generated.-
Methods inherited from class org.schabi.newpipe.extractor.stream.Stream
containSimilarStream, getContent, getDeliveryMethod, getFormat, getFormatId, getId, getManifestUrl, getUrl, isUrl
-
-
-
-
Method Detail
-
getExtension
public java.lang.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
anddelivery method
).If the
media format
of the stream is unknown, the streams are compared by using only thedelivery method
and their ID.Note: This method always returns false if the stream passed is null.
- Overrides:
equalStats
in classStream
- 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 java.lang.String getDisplayLanguageName()
Get the display language name of the subtitles.- Returns:
- the display language name of the subtitles
-
getLanguageTag
public java.lang.String getLanguageTag()
Get the language tag of the subtitles.- Returns:
- the language tag of the subtitles
-
getLocale
public java.util.Locale getLocale()
Get thelocale
of the subtitles.- Returns:
- the
locale
of the subtitles
-
getItagItem
@Nullable public ItagItem getItagItem()
No subtitles which are currently extracted use anItagItem
, sonull
is returned by this method.- Specified by:
getItagItem
in classStream
- Returns:
null
-
-