Video
This object represents a video file.
📝 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 |
file_name | String | Optional. Original 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 file, which can be used to download or reuse the file.
$videoFileId = $videoObject->getFileId();
getFileUniqueId()
Retrieves the unique identifier for this file, which remains constant over time and across different bots.
$videoFileUniqueId = $videoObject->getFileUniqueId();
getWidth()
Retrieves the width of the video as defined by the sender.
$videoWidth = $videoObject->getWidth();
getHeight()
Retrieves the height of the video as defined by the sender.
$videoHeight = $videoObject->getHeight();
getDuration()
Retrieves the duration of the video in seconds as defined by the sender.
$videoDuration = $videoObject->getDuration();
getFileName()
Retrieves the original filename of the video, if available.
$videoFileName = $videoObject->getFileName();
getMimeType()
Retrieves the MIME type of the video file, if available.
$videoMimeType = $videoObject->getMimeType();
getFileSize()
Retrieves the file size of the video in bytes, if available.
$videoFileSize = $videoObject->getFileSize();
➕ More
tip
For further information, refer to the official Bale documentation for more details.