Class SendVideo


public class SendVideo extends SendBuilder<SendVideo, Message>
SendMessage class. Returns Message on success.
Since:
3 March 2025
  • Constructor Details

  • Method Details

    • caption

      public SendVideo caption(String caption)
      Optional
      Parameters:
      caption - Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing
      Returns:
      SendVideo
    • captionEntities

      public SendVideo captionEntities(MessageEntity[] caption_entities)
      Optional
      Parameters:
      caption_entities - A list of special entities that appear in the caption, which can be specified instead of parse_mode
      Returns:
      SendVideo
    • hasSpoiler

      public SendVideo hasSpoiler(boolean has_spoiler)
      Optional
      Parameters:
      has_spoiler - Pass True if the video needs to be covered with a spoiler animation
      Returns:
      SendVideo
    • supportsStreaming

      public SendVideo supportsStreaming(boolean supports_streaming)
      Optional
      Parameters:
      supports_streaming - Pass True if the uploaded video is suitable for streaming
      Returns:
      SendVideo
    • thumbnail

      public SendVideo thumbnail(String thumbnail)
      Optional
      Parameters:
      thumbnail - Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Thumbnails can't be reused and can be only uploaded as a new file.
      Returns:
      SendVideo
    • thumbnail

      public SendVideo thumbnail(File thumbnail)
      Optional
      Parameters:
      thumbnail - Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Thumbnails can't be reused and can be only uploaded as a new file.
      Returns:
      SendVideo
    • width

      public SendVideo width(int width)
      Optional
      Parameters:
      width - Video width
      Returns:
      SendVideo
    • height

      public SendVideo height(int height)
      Optional
      Parameters:
      height - Video height
      Returns:
      SendVideo
    • duration

      public SendVideo duration(int duration)
      Optional
      Parameters:
      duration - Duration of sent video in seconds
      Returns:
      SendVideo
    • showCaptionAboveMedia

      public SendVideo showCaptionAboveMedia(boolean show_caption_above_media)
      Optional
      Parameters:
      show_caption_above_media - Pass True, if the caption must be shown above the message media
      Returns:
      SendVideo
    • cover

      public SendVideo cover(String cover)
      Optional
      Parameters:
      cover - Cover for the video in the message.
      Returns:
      SendVideo
    • cover

      public SendVideo cover(File cover)
      Optional
      Parameters:
      cover - Cover for the video in the message.
      Returns:
      SendVideo
    • startTimestamp

      public SendVideo startTimestamp(int start_timestamp)
      Optional
      Parameters:
      start_timestamp - Start timestamp for the video in the message
      Returns:
      SendVideo