Class MessageEmbed.VideoInfo
java.lang.Object
net.dv8tion.jda.api.entities.MessageEmbed.VideoInfo
- Enclosing class:
MessageEmbed
Represents the information provided to embed a video.
The videos represented are expected to be played using an HTML5 player from the site which the url belongs to.
The videos represented are expected to be played using an HTML5 player from the site which the url belongs to.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe media type, if available, ornull.The description of the video (alt text), ornullif none is set.@Unmodifiable Set<MessageEmbed.MessageEmbedMediaFlag> getFlags()Returns an unmodifiable set of allMessageEmbedMediaFlagspresent for this video.longReturns the raw media embed flags of this video.intThe height of the video.The placeholder of the video, ornull.getProxy()Returns aFileProxyfor this embed video.The url of the video, proxied by Discord
This url is used to access the video through Discord instead of directly to prevent ip scraping.getUrl()The url of the video.intgetWidth()The width of the video.inthashCode()
-
Constructor Details
-
VideoInfo
public VideoInfo(String url, String proxyUrl, int width, int height, String description, String contentType, ThumbHashPlaceholder placeholder, int flags)
-
-
Method Details
-
getUrl
The url of the video.- Returns:
- Possibly-null String containing the video url.
-
getProxyUrl
The url of the video, proxied by Discord
This url is used to access the video through Discord instead of directly to prevent ip scraping.- Returns:
- Possibly-null String containing the proxied video url.
-
getProxy
-
getWidth
public int getWidth()The width of the video.
This usually isn't the actual video width, but instead the starting embed window size.Basically: Don't rely on this to represent the actual video's quality or size.
- Returns:
- Non-negative, Non-zero int containing the width of the embedded video.
-
getHeight
public int getHeight()The height of the video.
This usually isn't the actual video height, but instead the starting embed window size.Basically: Don't rely on this to represent the actual video's quality or size.
- Returns:
- Non-negative, Non-zero int containing the height of the embedded video.
-
getDescription
The description of the video (alt text), ornullif none is set.- Returns:
- Description of the video, or
null
-
getContentType
- Returns:
- The media type, or
null
-
getPlaceholder
The placeholder of the video, ornull.- Returns:
- The placeholder or
null - See Also:
-
getFlagsRaw
public long getFlagsRaw()Returns the raw media embed flags of this video.- Returns:
- The raw media flags
- See Also:
-
getFlags
Returns an unmodifiable set of allMessageEmbedMediaFlagspresent for this video.- Returns:
- Unmodifiable set of present
MessageEmbedMediaFlags - See Also:
-
equals
-
hashCode
-