InputPaidMedia.video constructor
- @Assert('type == InputPaidMediaType.video', 'type must be InputPaidMediaType.video')
- @Default(InputPaidMediaType.video) @JsonKey(name: 'type') InputPaidMediaType type,
- @InputFileConverter() @JsonKey(name: 'media') required InputFile media,
- @InputFileConverter() @JsonKey(name: 'thumbnail') InputFile? thumbnail,
- @JsonKey(name: 'width') int? width,
- @JsonKey(name: 'height') int? height,
- @JsonKey(name: 'duration') int? duration,
- @JsonKey(name: 'supports_streaming') bool? supportsStreaming,
- @JsonKey(name: 'start_timestamp') int? startTimestamp,
- @InputFileConverter() @JsonKey(name: 'cover') InputFile? cover,
The paid media to send is a video.
Implementation
@Assert(
'type == InputPaidMediaType.video',
'type must be InputPaidMediaType.video',
)
const factory InputPaidMedia.video({
/// Type of the media, must be "video".
@Default(InputPaidMediaType.video)
@JsonKey(name: 'type')
final InputPaidMediaType type,
/// File to send.
@InputFileConverter()
@JsonKey(name: 'media')
required final InputFile media,
/// Optional. Thumbnail of the file sent; can be ignored if thumbnail
/// generation for the file is supported server-side.
@InputFileConverter()
@JsonKey(name: 'thumbnail')
final InputFile? thumbnail,
/// 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. 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.
@InputFileConverter() @JsonKey(name: 'cover') final InputFile? cover,
}) = InputPaidMediaVideo;