Class SubtitlesStream
java.lang.Object
org.schabi.newpipe.extractor.stream.Stream
org.schabi.newpipe.extractor.stream.SubtitlesStream
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
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
Modifier and TypeMethodDescriptionbooleanequalStats(Stream cmp) Reveals whether two streams have the same statistics (media formatanddelivery method).Get the display language name of the subtitles.Get the extension of the subtitles.No subtitles which are currently extracted use anItagItem, sonullis returned by this method.Get the language tag of the subtitles.Get thelocaleof the subtitles.getName()Get the service-provided display name of the subtitles, if the service exposed one.booleanReturn 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 Details
-
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
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
Get the display language name of the subtitles.- Returns:
- the display language name of the subtitles
-
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
nullif the service does not expose one
-
getLanguageTag
Get the language tag of the subtitles.- Returns:
- the language tag of the subtitles
-
getLocale
Get thelocaleof the subtitles.- Returns:
- the
localeof the subtitles
-
getItagItem
No subtitles which are currently extracted use anItagItem, sonullis returned by this method.- Specified by:
getItagItemin classStream- Returns:
null
-