1 | <?php |
||
16 | */ |
||
17 | class Video extends TelegramTypes |
||
18 | { |
||
19 | /** |
||
20 | * Unique identifier for this file |
||
21 | * @var string |
||
22 | */ |
||
23 | public $file_id = ''; |
||
24 | |||
25 | /** |
||
26 | * Video width as defined by sender |
||
27 | * @var int |
||
28 | */ |
||
29 | public $width = 0; |
||
30 | |||
31 | /** |
||
32 | * Video height as defined by sender |
||
33 | * @var int |
||
34 | */ |
||
35 | public $height = 0; |
||
36 | |||
37 | /** |
||
38 | * Duration of the video in seconds as defined by sender |
||
39 | * @var int |
||
40 | */ |
||
41 | public $duration = 0; |
||
42 | |||
43 | /** |
||
44 | * Optional. Video thumbnail |
||
45 | * @var PhotoSize |
||
46 | */ |
||
47 | public $thumb = null; |
||
48 | |||
49 | /** |
||
50 | * Optional. Mime type of a file as defined by sender |
||
51 | * @var string |
||
52 | */ |
||
53 | public $mime_type = ''; |
||
54 | |||
55 | /** |
||
56 | * Optional. File size |
||
57 | * @var int |
||
58 | */ |
||
59 | public $file_size = 0; |
||
60 | |||
61 | protected function mapSubObjects(string $key, array $data): TelegramTypes |
||
62 | { |
||
63 | switch ($key) { |
||
64 | case 'thumb': |
||
65 | return new PhotoSizeArray($data, $this->logger); |
||
66 | } |
||
67 | |||
71 |