InputMedia.video constructor
const
InputMedia.video({
- @JsonKey(name: 'type') @Default(InputMediaType.video) InputMediaType type,
- @JsonKey(name: 'media') @InputFileConverter() required InputFile media,
- @JsonKey(name: 'thumbnail') @InputFileConverter() InputFile? thumbnail,
- @JsonKey(name: 'caption') String? caption,
- @JsonKey(name: 'parse_mode') ParseMode? parseMode,
- @JsonKey(name: 'caption_entities') List<
MessageEntity> ? captionEntities, - @JsonKey(name: 'width') int? width,
- @JsonKey(name: 'height') int? height,
- @JsonKey(name: 'duration') int? duration,
- @JsonKey(name: 'supports_streaming') bool? supportsStreaming,
- @JsonKey(name: 'has_spoiler') bool? hasSpoiler,
- @JsonKey(name: 'show_caption_above_media') bool? showCaptionAboveMedia,
- @JsonKey(name: 'start_timestamp') int? startTimestamp,
- @JsonKey(name: 'cover') @InputFileConverter() InputFile? cover,
Represents a video to be sent.
Implementation
const factory InputMedia.video({
/// Type of input media.
@JsonKey(name: 'type')
@Default(InputMediaType.video)
final InputMediaType type,
/// The file to send
@JsonKey(name: 'media')
@InputFileConverter()
required final InputFile media,
/// Optional. Thumbnail of the file sent.
@JsonKey(name: 'thumbnail')
@InputFileConverter()
final InputFile? thumbnail,
/// Optional. Caption of the video to be sent, 0-1024 characters after
/// entities parsing
@JsonKey(name: 'caption') final String? caption,
/// Optional. Mode for parsing entities in the video caption. See formatting
/// options for more details.
@JsonKey(name: 'parse_mode') final ParseMode? parseMode,
/// Optional. List of special entities that appear in the caption, which can
/// be specified instead of parse_mode
@JsonKey(name: 'caption_entities')
final List<MessageEntity>? captionEntities,
/// Optional. Video width
@JsonKey(name: 'width') final int? width,
/// Optional. Video height
@JsonKey(name: 'height') final int? height,
/// Optional. Video duration in seconds
@JsonKey(name: 'duration') final int? duration,
/// Optional. Pass True if the uploaded video is suitable for streaming
@JsonKey(name: 'supports_streaming') final bool? supportsStreaming,
/// Optional. Pass True if the video needs to be covered with a spoiler
/// animation
@JsonKey(name: 'has_spoiler') final bool? hasSpoiler,
/// Optional. True, if the caption must be shown above the message media
@JsonKey(name: 'show_caption_above_media')
final bool? showCaptionAboveMedia,
/// Optional. Timestamp in seconds from which the video will play in the
/// message
@JsonKey(name: 'start_timestamp') final int? startTimestamp,
/// Optional. Cover for the video in the message.
@JsonKey(name: 'cover') @InputFileConverter() final InputFile? cover,
}) = InputMediaVideo;