Class InlineQueryResultVideo
java.lang.Object
io.github.natanimn.telebof.types.inline.InlineQueryResultVideo
- All Implemented Interfaces:
InlineQueryResult,Serializable
Represents a link to a page containing an embedded video player or a video file.
By default, this video file will be sent by the user with an optional caption.
Alternatively, you can use
InputMessageContent to send a message with the specified content instead of the video.
If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube),
you must replace its content using InputMessageContent.- Since:
- 3 March 2025
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetCaption(String caption) OptionalsetCaptionEntities(MessageEntity[] captionEntities) OptionalsetDescription(String description) OptionalsetInputMessageContent(InputTextMessageContent inputMessageContent) OptionalsetParseMode(ParseMode parseMode) OptionalsetReplyMarkup(InlineKeyboardMarkup replyMarkup) OptionalsetShowCaptionAboveMedia(Boolean showCaptionAboveMedia) OptionalsetVideoDuration(Integer videoDuration) OptionalsetVideoHeight(Integer videoHeight) OptionalsetVideoWidth(Integer videoWidth) Optional
-
Constructor Details
-
InlineQueryResultVideo
public InlineQueryResultVideo(String id, String videoUrl, String mimeType, String thumbnailUrl, String title) Required- Parameters:
id- Unique identifier for this result, 1-64 bytesvideoUrl- A valid URL for the embedded video player or video filemimeType- MIME type of the content of the video URL, “text/html” or “video/mp4”thumbnailUrl- URL of the thumbnail (JPEG only) for the videotitle- Title for the result
-
-
Method Details
-
setVideoWidth
Optional- Parameters:
videoWidth- Video width- Returns:
InlineQueryResultVideo
-
setVideoHeight
Optional- Parameters:
videoHeight- Video height- Returns:
InlineQueryResultVideo
-
setVideoDuration
Optional- Parameters:
videoDuration- Video duration in seconds- Returns:
InlineQueryResultVideo
-
setDescription
Optional- Parameters:
description- Short description of the result- Returns:
InlineQueryResultVideo
-
setShowCaptionAboveMedia
Optional- Parameters:
showCaptionAboveMedia- Pass True, if the caption must be shown above the message media- Returns:
InlineQueryResultVideo
-
setInputMessageContent
Optional- Parameters:
inputMessageContent- Content of the message to be sent instead of the media(photo, audio, voice, etc)- Returns:
InlineQueryMediaResult
-
setReplyMarkup
Optional- Parameters:
replyMarkup-Inline keyboardattached to the message- Returns:
InlineQueryMediaResult
-
setCaption
Optional- Parameters:
caption- Caption of the photo to be sent, 0-1024 characters after entities parsing- Returns:
InlineQueryMediaResult
-
setCaptionEntities
Optional- Parameters:
captionEntities- List of special entities that appear in the caption, which can be specified instead ofsetParseMode(io.github.natanimn.telebof.enums.ParseMode)- Returns:
InlineQueryMediaResult
-
setParseMode
Optional- Parameters:
parseMode- Mode for parsing entities in the caption- Returns:
InlineQueryMediaResult
-