Animation
This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
📝 Schema
Field | Type | Description |
---|---|---|
file_id | String | Identifier for this file, which can be used to download or reuse the file |
file_unique_id | String | Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. |
width | Integer | Video width as defined by the sender |
height | Integer | Video height as defined by the sender |
duration | Integer | Duration of the video in seconds as defined by the sender |
thumbnail | PhotoSize | Optional. Animation thumbnail as defined by the sender |
file_name | String | Optional. Original animation filename as defined by the sender |
mime_type | String | Optional. MIME type of the file as defined by the sender |
file_size | Integer | Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value. |
⚙️ Get methods
getFileId()
Retrieves the identifier for this animation file, which can be used to download or reuse the file.
$animationFileId = $animationObject->getFileId();
getFileUniqueId()
Retrieves the unique identifier for this animation file, which remains constant over time and across different bots.
$animationFileUniqueId = $animationObject->getFileUniqueId();
getWidth()
Retrieves the animation width as defined by the sender.
$animationWidth = $animationObject->getWidth();
getHeight()
Retrieves the animation height as defined by the sender.
$animationHeight = $animationObject->getHeight();
getDuration()
Retrieves the duration of the animation in seconds as defined by the sender.
$animationDuration = $animationObject->getDuration();
getThumbnail()
Retrieves the thumbnail of the animation as a PhotoSize object.
$animationThumbnail = $animationObject->getThumbnail();
getFileName()
Retrieves the original animation filename as defined by the sender.
$animationFileName = $animationObject->getFileName();
getMimeType()
Retrieves the MIME type of the animation file as defined by the sender.
$animationMimeType = $animationObject->getMimeType();
getFileSize()
Retrieves the file size of the animation in bytes, if available.
$animationFileSize = $animationObject->getFileSize();
➕ More
For further information, refer to the official Bale documentation for more details.