Class StreamInfo
- java.lang.Object
-
- org.schabi.newpipe.extractor.Info
-
- org.schabi.newpipe.extractor.stream.StreamInfo
-
- All Implemented Interfaces:
java.io.Serializable
public class StreamInfo extends Info
Info object for opened contents, i.e. the content ready to play.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StreamInfo.StreamExtractException
-
Constructor Summary
Constructors Constructor Description StreamInfo(int serviceId, java.lang.String url, java.lang.String originalUrl, StreamType streamType, java.lang.String id, java.lang.String name, int ageLimit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getAgeLimit()
java.util.List<AudioStream>
getAudioStreams()
java.lang.String
getCategory()
java.lang.String
getDashMpdUrl()
Description
getDescription()
long
getDislikeCount()
Get the number of dislikes.long
getDuration()
Get the duration in secondsjava.lang.String
getHlsUrl()
java.lang.String
getHost()
static StreamInfo
getInfo(java.lang.String url)
static StreamInfo
getInfo(StreamExtractor extractor)
static StreamInfo
getInfo(StreamingService service, java.lang.String url)
java.util.Locale
getLanguageInfo()
java.lang.String
getLicence()
long
getLikeCount()
Get the number of likes.java.util.List<MetaInfo>
getMetaInfo()
java.util.List<Frameset>
getPreviewFrames()
StreamExtractor.Privacy
getPrivacy()
java.util.List<InfoItem>
getRelatedItems()
java.util.List<InfoItem>
getRelatedStreams()
Deprecated.long
getStartPosition()
java.util.List<StreamSegment>
getStreamSegments()
StreamType
getStreamType()
Get the stream typejava.util.List<Image>
getSubChannelAvatars()
java.lang.String
getSubChannelName()
java.lang.String
getSubChannelUrl()
java.util.List<SubtitlesStream>
getSubtitles()
java.lang.String
getSupportInfo()
java.util.List<java.lang.String>
getTags()
java.lang.String
getTextualUploadDate()
java.util.List<Image>
getThumbnails()
Get the thumbnail urlDateWrapper
getUploadDate()
java.util.List<Image>
getUploaderAvatars()
java.lang.String
getUploaderName()
long
getUploaderSubscriberCount()
java.lang.String
getUploaderUrl()
java.util.List<VideoStream>
getVideoOnlyStreams()
java.util.List<VideoStream>
getVideoStreams()
long
getViewCount()
boolean
isShortFormContent()
boolean
isUploaderVerified()
void
setAgeLimit(int ageLimit)
void
setAudioStreams(java.util.List<AudioStream> audioStreams)
void
setCategory(java.lang.String category)
void
setDashMpdUrl(java.lang.String dashMpdUrl)
void
setDescription(Description description)
void
setDislikeCount(long dislikeCount)
void
setDuration(long duration)
void
setHlsUrl(java.lang.String hlsUrl)
void
setHost(java.lang.String host)
void
setLanguageInfo(java.util.Locale locale)
void
setLicence(java.lang.String licence)
void
setLikeCount(long likeCount)
void
setMetaInfo(java.util.List<MetaInfo> metaInfo)
void
setPreviewFrames(java.util.List<Frameset> previewFrames)
void
setPrivacy(StreamExtractor.Privacy privacy)
void
setRelatedItems(java.util.List<InfoItem> relatedItems)
void
setRelatedStreams(java.util.List<InfoItem> relatedItemsToSet)
Deprecated.void
setShortFormContent(boolean isShortFormContent)
void
setStartPosition(long startPosition)
void
setStreamSegments(java.util.List<StreamSegment> streamSegments)
void
setStreamType(StreamType streamType)
void
setSubChannelAvatars(java.util.List<Image> subChannelAvatars)
void
setSubChannelName(java.lang.String subChannelName)
void
setSubChannelUrl(java.lang.String subChannelUrl)
void
setSubtitles(java.util.List<SubtitlesStream> subtitles)
void
setSupportInfo(java.lang.String support)
void
setTags(java.util.List<java.lang.String> tags)
void
setTextualUploadDate(java.lang.String textualUploadDate)
void
setThumbnails(java.util.List<Image> thumbnails)
void
setUploadDate(DateWrapper uploadDate)
void
setUploaderAvatars(java.util.List<Image> uploaderAvatars)
void
setUploaderName(java.lang.String uploaderName)
void
setUploaderSubscriberCount(long uploaderSubscriberCount)
void
setUploaderUrl(java.lang.String uploaderUrl)
void
setUploaderVerified(boolean uploaderVerified)
void
setVideoOnlyStreams(java.util.List<VideoStream> videoOnlyStreams)
void
setVideoStreams(java.util.List<VideoStream> videoStreams)
void
setViewCount(long viewCount)
-
Methods inherited from class org.schabi.newpipe.extractor.Info
addAllErrors, addError, getErrors, getId, getName, getOriginalUrl, getService, getServiceId, getUrl, setOriginalUrl, toString
-
-
-
-
Constructor Detail
-
StreamInfo
public StreamInfo(int serviceId, java.lang.String url, java.lang.String originalUrl, StreamType streamType, java.lang.String id, java.lang.String name, int ageLimit)
-
-
Method Detail
-
getInfo
public static StreamInfo getInfo(java.lang.String url) throws java.io.IOException, ExtractionException
- Throws:
java.io.IOException
ExtractionException
-
getInfo
public static StreamInfo getInfo(@Nonnull StreamingService service, java.lang.String url) throws java.io.IOException, ExtractionException
- Throws:
java.io.IOException
ExtractionException
-
getInfo
public static StreamInfo getInfo(@Nonnull StreamExtractor extractor) throws ExtractionException, java.io.IOException
- Throws:
ExtractionException
java.io.IOException
-
getStreamType
public StreamType getStreamType()
Get the stream type- Returns:
- the stream type
-
setStreamType
public void setStreamType(StreamType streamType)
-
getThumbnails
@Nonnull public java.util.List<Image> getThumbnails()
Get the thumbnail url- Returns:
- the thumbnail url as a string
-
setThumbnails
public void setThumbnails(@Nonnull java.util.List<Image> thumbnails)
-
getTextualUploadDate
public java.lang.String getTextualUploadDate()
-
setTextualUploadDate
public void setTextualUploadDate(java.lang.String textualUploadDate)
-
getUploadDate
public DateWrapper getUploadDate()
-
setUploadDate
public void setUploadDate(DateWrapper uploadDate)
-
getDuration
public long getDuration()
Get the duration in seconds- Returns:
- the duration in seconds
-
setDuration
public void setDuration(long duration)
-
getAgeLimit
public int getAgeLimit()
-
setAgeLimit
public void setAgeLimit(int ageLimit)
-
getDescription
public Description getDescription()
-
setDescription
public void setDescription(Description description)
-
getViewCount
public long getViewCount()
-
setViewCount
public void setViewCount(long viewCount)
-
getLikeCount
public long getLikeCount()
Get the number of likes.- Returns:
- The number of likes or -1 if this information is not available
-
setLikeCount
public void setLikeCount(long likeCount)
-
getDislikeCount
public long getDislikeCount()
Get the number of dislikes.- Returns:
- The number of likes or -1 if this information is not available
-
setDislikeCount
public void setDislikeCount(long dislikeCount)
-
getUploaderName
public java.lang.String getUploaderName()
-
setUploaderName
public void setUploaderName(java.lang.String uploaderName)
-
getUploaderUrl
public java.lang.String getUploaderUrl()
-
setUploaderUrl
public void setUploaderUrl(java.lang.String uploaderUrl)
-
getUploaderAvatars
@Nonnull public java.util.List<Image> getUploaderAvatars()
-
setUploaderAvatars
public void setUploaderAvatars(@Nonnull java.util.List<Image> uploaderAvatars)
-
isUploaderVerified
public boolean isUploaderVerified()
-
setUploaderVerified
public void setUploaderVerified(boolean uploaderVerified)
-
getUploaderSubscriberCount
public long getUploaderSubscriberCount()
-
setUploaderSubscriberCount
public void setUploaderSubscriberCount(long uploaderSubscriberCount)
-
getSubChannelName
public java.lang.String getSubChannelName()
-
setSubChannelName
public void setSubChannelName(java.lang.String subChannelName)
-
getSubChannelUrl
public java.lang.String getSubChannelUrl()
-
setSubChannelUrl
public void setSubChannelUrl(java.lang.String subChannelUrl)
-
getSubChannelAvatars
@Nonnull public java.util.List<Image> getSubChannelAvatars()
-
setSubChannelAvatars
public void setSubChannelAvatars(@Nonnull java.util.List<Image> subChannelAvatars)
-
getVideoStreams
public java.util.List<VideoStream> getVideoStreams()
-
setVideoStreams
public void setVideoStreams(java.util.List<VideoStream> videoStreams)
-
getAudioStreams
public java.util.List<AudioStream> getAudioStreams()
-
setAudioStreams
public void setAudioStreams(java.util.List<AudioStream> audioStreams)
-
getVideoOnlyStreams
public java.util.List<VideoStream> getVideoOnlyStreams()
-
setVideoOnlyStreams
public void setVideoOnlyStreams(java.util.List<VideoStream> videoOnlyStreams)
-
getDashMpdUrl
public java.lang.String getDashMpdUrl()
-
setDashMpdUrl
public void setDashMpdUrl(java.lang.String dashMpdUrl)
-
getHlsUrl
public java.lang.String getHlsUrl()
-
setHlsUrl
public void setHlsUrl(java.lang.String hlsUrl)
-
getRelatedItems
public java.util.List<InfoItem> getRelatedItems()
-
getRelatedStreams
@Deprecated public java.util.List<InfoItem> getRelatedStreams()
Deprecated.
-
setRelatedItems
public void setRelatedItems(java.util.List<InfoItem> relatedItems)
-
setRelatedStreams
@Deprecated public void setRelatedStreams(java.util.List<InfoItem> relatedItemsToSet)
Deprecated.
-
getStartPosition
public long getStartPosition()
-
setStartPosition
public void setStartPosition(long startPosition)
-
getSubtitles
public java.util.List<SubtitlesStream> getSubtitles()
-
setSubtitles
public void setSubtitles(java.util.List<SubtitlesStream> subtitles)
-
getHost
public java.lang.String getHost()
-
setHost
public void setHost(java.lang.String host)
-
getPrivacy
public StreamExtractor.Privacy getPrivacy()
-
setPrivacy
public void setPrivacy(StreamExtractor.Privacy privacy)
-
getCategory
public java.lang.String getCategory()
-
setCategory
public void setCategory(java.lang.String category)
-
getLicence
public java.lang.String getLicence()
-
setLicence
public void setLicence(java.lang.String licence)
-
getLanguageInfo
public java.util.Locale getLanguageInfo()
-
setLanguageInfo
public void setLanguageInfo(java.util.Locale locale)
-
getTags
public java.util.List<java.lang.String> getTags()
-
setTags
public void setTags(java.util.List<java.lang.String> tags)
-
setSupportInfo
public void setSupportInfo(java.lang.String support)
-
getSupportInfo
public java.lang.String getSupportInfo()
-
getStreamSegments
public java.util.List<StreamSegment> getStreamSegments()
-
setStreamSegments
public void setStreamSegments(java.util.List<StreamSegment> streamSegments)
-
setMetaInfo
public void setMetaInfo(java.util.List<MetaInfo> metaInfo)
-
getPreviewFrames
public java.util.List<Frameset> getPreviewFrames()
-
setPreviewFrames
public void setPreviewFrames(java.util.List<Frameset> previewFrames)
-
getMetaInfo
@Nonnull public java.util.List<MetaInfo> getMetaInfo()
-
isShortFormContent
public boolean isShortFormContent()
-
setShortFormContent
public void setShortFormContent(boolean isShortFormContent)
-
-