2017-03-11 19:54:51 +01:00
|
|
|
---
|
|
|
|
title: video
|
|
|
|
description: Describes video file
|
|
|
|
---
|
|
|
|
## Constructor: video
|
|
|
|
[Back to constructors index](index.md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Describes video file
|
|
|
|
|
|
|
|
### Attributes:
|
|
|
|
|
|
|
|
| Name | Type | Required | Description |
|
2017-08-20 11:05:56 +02:00
|
|
|
|----------|---------------|----------|-------------|
|
2017-03-11 19:54:51 +01:00
|
|
|
|duration|[int](../types/int.md) | Yes|Duration of the video in seconds as defined by sender|
|
|
|
|
|width|[int](../types/int.md) | Yes|Video width as defined by sender|
|
|
|
|
|height|[int](../types/int.md) | Yes|Video height as defined by sender|
|
|
|
|
|file\_name|[string](../types/string.md) | Yes|Original name of a file as defined by sender|
|
|
|
|
|mime\_type|[string](../types/string.md) | Yes|MIME type of a file as defined by sender|
|
|
|
|
|has\_stickers|[Bool](../types/Bool.md) | Yes|True, if some stickers was added to the photo|
|
|
|
|
|thumb|[photoSize](../types/photoSize.md) | Yes|Video thumb as defined by sender, nullable|
|
|
|
|
|video|[file](../types/file.md) | Yes|File with the video|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Type: [Video](../types/Video.md)
|
|
|
|
|
|
|
|
|
|
|
|
### Example:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
$video = ['_' => 'video', 'duration' => int, 'width' => int, 'height' => int, 'file_name' => 'string', 'mime_type' => 'string', 'has_stickers' => Bool, 'thumb' => photoSize, 'video' => file];
|
2017-03-11 19:54:51 +01:00
|
|
|
```
|
|
|
|
|
2017-07-23 16:11:02 +02:00
|
|
|
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
{"_": "video", "duration": int, "width": int, "height": int, "file_name": "string", "mime_type": "string", "has_stickers": Bool, "thumb": photoSize, "video": file}
|
2017-07-23 16:11:02 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2017-03-11 19:54:51 +01:00
|
|
|
Or, if you're into Lua:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
video={_='video', duration=int, width=int, height=int, file_name='string', mime_type='string', has_stickers=Bool, thumb=photoSize, video=file}
|
2017-03-11 19:54:51 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|