documentAttributeVideo #

Defines a video

End-to-end schema #

===23===
documentAttributeVideo#5910cccb duration:int w:int h:int = DocumentAttribute;

===66===
documentAttributeVideo#0ef02ce6 flags:# duration:int w:int h:int = DocumentAttribute;

API schema #

Layer 223

documentAttributeVideo#43c57c48 flags:# round_message:flags.0?true supports_streaming:flags.1?true nosound:flags.3?true duration:double w:int h:int preload_prefix_size:flags.2?int video_start_ts:flags.4?double video_codec:flags.5?string = DocumentAttribute;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
round_messageflags.0?trueWhether this is a round video
supports_streamingflags.1?trueWhether the video supports streaming
nosoundflags.3?trueWhether the specified document is a video file with no audio tracks
durationdoubleDuration in seconds
wintVideo width
hintVideo height
preload_prefix_sizeflags.2?intNumber of bytes to preload when preloading videos (particularly video stories).
video_start_tsflags.4?doubleFloating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail.
video_codecflags.5?stringCodec used for the video, i.e. "h264", "h265", or "av1"

Type #

DocumentAttribute

Telegram Stories #

Telegram users and channels can easily post and view stories through the API.