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
InlineQueryMediaResult.inputMessageContent(io.github.natanimn.telebof.types.input.InputTextMessageContent)
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 InlineQueryMediaResult.inputMessageContent(io.github.natanimn.telebof.types.input.InputTextMessageContent)
.- Since:
- 3 March 2025
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptionalcaptionEntities
(MessageEntity[] caption_entities) Optionaldescription
(String description) OptionalinputMessageContent
(InputTextMessageContent input_message_content) OptionalOptionalreplyMarkup
(InlineKeyboardMarkup keyboard) OptionalshowCaptionAboveMedia
(boolean show_caption_above_media) OptionalvideoDuration
(int video_duration) OptionalvideoHeight
(int video_height) OptionalvideoWidth
(int video_width) Optional
-
Field Details
-
type
-
id
-
caption
-
parse_mode
-
caption_entities
-
input_message_content
-
reply_markup
-
-
Constructor Details
-
InlineQueryResultVideo
public InlineQueryResultVideo(String id, String video_url, String mime_type, String thumbnail_url, String title) Required- Parameters:
id
- Unique identifier for this result, 1-64 bytesvideo_url
- A valid URL for the embedded video player or video filemime_type
- MIME type of the content of the video URL, “text/html” or “video/mp4”thumbnail_url
- URL of the thumbnail (JPEG only) for the videotitle
- Title for the result
-
-
Method Details
-
videoWidth
Optional- Parameters:
video_width
- Video width- Returns:
InlineQueryResultVideo
-
videoHeight
Optional- Parameters:
video_height
- Video width- Returns:
InlineQueryResultVideo
-
videoDuration
Optional- Parameters:
video_duration
- Video duration in seconds- Returns:
InlineQueryResultVideo
-
description
Optional- Parameters:
description
- Short description of the result- Returns:
InlineQueryResultVideo
-
showCaptionAboveMedia
Optional- Parameters:
show_caption_above_media
- Pass True, if the caption must be shown above the message media- Returns:
InlineQueryResultVideo
-
inputMessageContent
Optional- Parameters:
input_message_content
- Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).- Returns:
InlineQueryResultVideo
-
replyMarkup
Optional- Parameters:
keyboard
-Inline keyboard
attached to the message- Returns:
T
-
caption
Optional- Parameters:
caption
- Caption of the photo to be sent, 0-1024 characters after entities parsing- Returns:
T
-
captionEntities
Optional- Parameters:
caption_entities
- List of special entities that appear in the caption, which can be specified instead ofparseMode(io.github.natanimn.telebof.enums.ParseMode)
- Returns:
T
-
parseMode
Optional- Parameters:
parse_mode
- Mode for parsing entities in the caption- Returns:
T
-