Class StreamInfo
java.lang.Object
org.schabi.newpipe.extractor.Info
org.schabi.newpipe.extractor.stream.StreamInfo
- All Implemented Interfaces:
Serializable
Info object for opened contents, i.e. the content ready to play.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStreamInfo(int serviceId, String url, String originalUrl, StreamType streamType, String id, String name, int ageLimit) -
Method Summary
Modifier and TypeMethodDescriptionintlongGet the number of dislikes.longGet the duration in secondsgetHost()static StreamInfostatic StreamInfogetInfo(StreamExtractor extractor) static StreamInfogetInfo(StreamingService service, String url) longGet the number of likes.Deprecated.longGet the stream typegetTags()Get the thumbnail urllonglongbooleanbooleanbooleanvoidsetAgeLimit(int ageLimit) voidsetAudioStreams(List<AudioStream> audioStreams) voidsetCategory(String category) voidsetContentAvailability(ContentAvailability availability) voidsetDashMpdUrl(String dashMpdUrl) voidsetDescription(Description description) voidsetDislikeCount(long dislikeCount) voidsetDuration(long duration) voidvoidvoidsetLanguageInfo(Locale locale) voidsetLicence(String licence) voidsetLikeCount(long likeCount) voidsetLiveChat(boolean liveChat) voidsetLiveChatContinuation(String liveChatContinuation) voidsetMetaInfo(List<MetaInfo> metaInfo) voidsetPreviewFrames(List<Frameset> previewFrames) voidsetPrivacy(StreamExtractor.Privacy privacy) voidsetRelatedItems(List<InfoItem> relatedItems) voidsetRelatedStreams(List<InfoItem> relatedItemsToSet) Deprecated.voidsetShortFormContent(boolean isShortFormContent) voidsetStartPosition(long startPosition) voidsetStreamSegments(List<StreamSegment> streamSegments) voidsetStreamType(StreamType streamType) voidsetSubChannelAvatars(List<Image> subChannelAvatars) voidsetSubChannelName(String subChannelName) voidsetSubChannelUrl(String subChannelUrl) voidsetSubtitles(List<SubtitlesStream> subtitles) voidsetSupportInfo(String support) voidvoidsetTextualUploadDate(String textualUploadDate) voidsetThumbnails(List<Image> thumbnails) voidsetUploadDate(DateWrapper uploadDate) voidsetUploaderAvatars(List<Image> uploaderAvatars) voidsetUploaderName(String uploaderName) voidsetUploaderSubscriberCount(long uploaderSubscriberCount) voidsetUploaderUrl(String uploaderUrl) voidsetUploaderVerified(boolean uploaderVerified) voidsetVideoOnlyStreams(List<VideoStream> videoOnlyStreams) voidsetVideoStreams(List<VideoStream> videoStreams) voidsetViewCount(long viewCount) toString()Methods inherited from class org.schabi.newpipe.extractor.Info
addAllErrors, addError, getErrors, getId, getName, getOriginalUrl, getService, getServiceId, getUrl, setOriginalUrl
-
Constructor Details
-
StreamInfo
public StreamInfo(int serviceId, String url, String originalUrl, StreamType streamType, String id, String name, int ageLimit)
-
-
Method Details
-
toString
-
getInfo
- Throws:
IOExceptionExtractionException
-
getInfo
public static StreamInfo getInfo(@Nonnull StreamingService service, String url) throws IOException, ExtractionException - Throws:
IOExceptionExtractionException
-
getInfo
public static StreamInfo getInfo(@Nonnull StreamExtractor extractor) throws ExtractionException, IOException - Throws:
ExtractionExceptionIOException
-
getStreamType
Get the stream type- Returns:
- the stream type
-
setStreamType
-
getThumbnails
Get the thumbnail url- Returns:
- the thumbnail url as a string
-
setThumbnails
-
getTextualUploadDate
-
setTextualUploadDate
-
getUploadDate
-
setUploadDate
-
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
-
setDescription
-
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
-
setUploaderName
-
getUploaderUrl
-
setUploaderUrl
-
getUploaderAvatars
-
setUploaderAvatars
-
isUploaderVerified
public boolean isUploaderVerified() -
setUploaderVerified
public void setUploaderVerified(boolean uploaderVerified) -
getUploaderSubscriberCount
public long getUploaderSubscriberCount() -
setUploaderSubscriberCount
public void setUploaderSubscriberCount(long uploaderSubscriberCount) -
getSubChannelName
-
setSubChannelName
-
getSubChannelUrl
-
setSubChannelUrl
-
getSubChannelAvatars
-
setSubChannelAvatars
-
getVideoStreams
-
setVideoStreams
-
getAudioStreams
-
setAudioStreams
-
getVideoOnlyStreams
-
setVideoOnlyStreams
-
getDashMpdUrl
-
setDashMpdUrl
-
getHlsUrl
-
setHlsUrl
-
getRelatedItems
-
getRelatedStreams
Deprecated. -
setRelatedItems
-
setRelatedStreams
Deprecated. -
getStartPosition
public long getStartPosition() -
setStartPosition
public void setStartPosition(long startPosition) -
getSubtitles
-
setSubtitles
-
getHost
-
setHost
-
getPrivacy
-
setPrivacy
-
getCategory
-
setCategory
-
getLicence
-
setLicence
-
getLanguageInfo
-
setLanguageInfo
-
getTags
-
setTags
-
setSupportInfo
-
getSupportInfo
-
getStreamSegments
-
setStreamSegments
-
setMetaInfo
-
getPreviewFrames
-
setPreviewFrames
-
getMetaInfo
-
isShortFormContent
public boolean isShortFormContent() -
setShortFormContent
public void setShortFormContent(boolean isShortFormContent) -
getContentAvailability
-
setContentAvailability
-
hasLiveChat
public boolean hasLiveChat() -
setLiveChat
public void setLiveChat(boolean liveChat) -
getLiveChatContinuation
-
setLiveChatContinuation
-
getRelatedItems()