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 classSubtitlesStream.BuilderClass to buildSubtitlesStreamobjects.
-
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 booleanequalStats(Stream cmp)Reveals whether two streams have the same statistics (media formatanddelivery method).java.lang.StringgetDisplayLanguageName()Get the display language name of the subtitles.java.lang.StringgetExtension()Get the extension of the subtitles.ItagItemgetItagItem()No subtitles which are currently extracted use anItagItem, sonullis returned by this method.java.lang.StringgetLanguageTag()Get the language tag of the subtitles.java.util.LocalegetLocale()Get thelocaleof the subtitles.booleanisAutoGenerated()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:
trueif the subtitles are auto-generated,falseotherwise
-
equalStats
public boolean equalStats(Stream cmp)
Reveals whether two streams have the same statistics (media formatanddelivery method).If the
media formatof the stream is unknown, the streams are compared by using only thedelivery methodand their ID.Note: This method always returns false if the stream passed is null.
- Overrides:
equalStatsin 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 thelocaleof the subtitles.- Returns:
- the
localeof the subtitles
-
getItagItem
@Nullable public ItagItem getItagItem()
No subtitles which are currently extracted use anItagItem, sonullis returned by this method.- Specified by:
getItagItemin classStream- Returns:
null
-
-