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

    • setThumbnail

      public InputMediaVideo setThumbnail(String thumbnail)
      Optional.
      Parameters:
      thumbnail - Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
    • setThumbnail

      public InputMediaVideo setThumbnail(File thumbnail)
      Optional.
      Parameters:
      thumbnail - Thumbnail file to upload from your local machine
    • setWidth

      public InputMediaVideo setWidth(Integer width)
      Optional.
      Parameters:
      width - Video width
    • setHeight

      public InputMediaVideo setHeight(Integer height)
      Optional.
      Parameters:
      height - Video height
    • setDuration

      public InputMediaVideo setDuration(Integer duration)
      Optional.
      Parameters:
      duration - Video duration in seconds
    • setHasSpoiler

      public InputMediaVideo setHasSpoiler(Boolean hasSpoiler)
      Optional.
      Parameters:
      hasSpoiler - Pass True if the video needs to be covered with a spoiler animation
    • setSupportsStreaming

      public InputMediaVideo setSupportsStreaming(Boolean supportsStreaming)
      Optional.
      Parameters:
      supportsStreaming - Pass True if the uploaded video is suitable for streaming
    • setCover

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

      public InputMediaVideo setCover(File cover)
      Optional.
      Parameters:
      cover - Cover file to upload from your local machine
    • setStartTimestamp

      public InputMediaVideo setStartTimestamp(Integer startTimestamp)
      Optional.
      Parameters:
      startTimestamp - Start timestamp for the video in the message