Class InputMediaVideo

java.lang.Object
io.github.natanimn.telebof.types.input.InputMediaBuilder<InputMediaVideo>
io.github.natanimn.telebof.types.input.InputMediaVideo
All Implemented Interfaces:
InputMedia, Serializable

public class InputMediaVideo extends InputMediaBuilder<InputMediaVideo>
Represents a video to be sent.
Since:
3 March 2025
See Also:
  • Constructor Details

    • InputMediaVideo

      public InputMediaVideo(String media)
      Required
      Parameters:
      media - File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), or pass an HTTP URL for Telegram to get a file from the Internet.
    • InputMediaVideo

      public InputMediaVideo(File media)
      Required
      Parameters:
      media - File to send. Pass an object of File to upload from your local machine.
  • Method Details

    • thumbnail

      public InputMediaVideo 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
      Returns:
      InputMediaVideo
    • width

      public InputMediaVideo width(int width)
      Optional
      Parameters:
      width - video width
      Returns:
      InputMediaVideo
    • height

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

      public InputMediaVideo duration(int duration)
      Optional
      Parameters:
      duration - Video duration in seconds
      Returns:
      InputMediaVideo
    • supportsStreaming

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

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

      public InputMediaVideo cover(String cover)
      Optional
      Parameters:
      cover - Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended)
      Returns:
      InputMediaVideo
    • cover

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

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