Class InputPaidMediaVideo

java.lang.Object
io.github.natanimn.telebof.types.input.InputPaidMediaVideo
All Implemented Interfaces:
InputMedia, InputPaidMedia, Serializable

public class InputPaidMediaVideo extends Object implements InputPaidMedia
The paid media to send is a video.
Since:
3 March 2025
See Also:
  • Constructor Details

    • InputPaidMediaVideo

      public InputPaidMediaVideo(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.
    • InputPaidMediaVideo

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

    • setThumbnail

      public InputPaidMediaVideo 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 InputPaidMediaVideo setThumbnail(File thumbnail)
      Optional.
      Parameters:
      thumbnail - Thumbnail file to upload from your local machine
    • setWidth

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

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

      public InputPaidMediaVideo setDuration(Integer duration)
      Optional.
      Parameters:
      duration - Video duration in seconds
    • setSupportsStreaming

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

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

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

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

      public boolean hasFile()
      Description copied from interface: InputMedia
      Used only for internal purpose
      Specified by:
      hasFile in interface InputMedia
      Returns:
      boolean
    • getFiles

      public List<File> getFiles()
      Description copied from interface: InputMedia
      Used only for internal purpose
      Specified by:
      getFiles in interface InputMedia
      Returns:
      boolean