1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace TelegramBot\Api\Types\Inline; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class InlineQueryResultVideo |
8
|
|
|
* Represents link to a page containing an embedded video player or a video file. |
9
|
|
|
* |
10
|
|
|
* @package TelegramBot\Api\Types\Inline |
11
|
|
|
*/ |
12
|
|
|
class InlineQueryResultVideo extends AbstractInlineQueryResult |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* {@inheritdoc} |
16
|
|
|
* |
17
|
|
|
* @var array |
18
|
|
|
*/ |
19
|
|
|
static protected $requiredParams = ['type', 'id', 'video_url', 'mime_type', 'thumb_url']; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* {@inheritdoc} |
23
|
|
|
* |
24
|
|
|
* @var array |
25
|
|
|
*/ |
26
|
|
|
static protected $map = [ |
27
|
|
|
'type' => true, |
28
|
|
|
'id' => true, |
29
|
|
|
'video_url' => true, |
30
|
|
|
'mime_type' => true, |
31
|
|
|
'message_text' => true, |
32
|
|
|
'parse_mode' => true, |
33
|
|
|
'disable_web_page_preview' => true, |
34
|
|
|
'video_width' => true, |
35
|
|
|
'video_height' => true, |
36
|
|
|
'video_duration' => true, |
37
|
|
|
'thumb_url' => true, |
38
|
|
|
'title' => true, |
39
|
|
|
'description' => true |
40
|
|
|
]; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* A valid URL for the embedded video player or video file |
44
|
|
|
* |
45
|
|
|
* @var string |
46
|
|
|
*/ |
47
|
|
|
protected $videoUrl; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Mime type of the content of video url, “text/html” or “video/mp4” |
51
|
|
|
* |
52
|
|
|
* @var string |
53
|
|
|
*/ |
54
|
|
|
protected $mimeType; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* Optional. Video width |
58
|
|
|
* |
59
|
|
|
* @var int |
60
|
|
|
*/ |
61
|
|
|
protected $videoWidth; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* Optional. Video height |
65
|
|
|
* |
66
|
|
|
* @var int |
67
|
|
|
*/ |
68
|
|
|
protected $videoHeight; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Optional. Video duration in seconds |
72
|
|
|
* |
73
|
|
|
* @var int |
74
|
|
|
*/ |
75
|
|
|
protected $videoDuration; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* URL of the thumbnail (jpeg only) for the video |
79
|
|
|
* |
80
|
|
|
* @var |
81
|
|
|
*/ |
82
|
|
|
protected $thumb_url; |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* Optional. Short description of the result |
86
|
|
|
* |
87
|
|
|
* @var |
88
|
|
|
*/ |
89
|
|
|
protected $description; |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return string |
93
|
|
|
*/ |
94
|
|
|
public function getVideoUrl() |
95
|
|
|
{ |
96
|
|
|
return $this->videoUrl; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* @param string $videoUrl |
101
|
|
|
*/ |
102
|
|
|
public function setVideoUrl($videoUrl) |
103
|
|
|
{ |
104
|
|
|
$this->videoUrl = $videoUrl; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* @return string |
109
|
|
|
*/ |
110
|
|
|
public function getMimeType() |
111
|
|
|
{ |
112
|
|
|
return $this->mimeType; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @param string $mimeType |
117
|
|
|
*/ |
118
|
|
|
public function setMimeType($mimeType) |
119
|
|
|
{ |
120
|
|
|
$this->mimeType = $mimeType; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return int |
125
|
|
|
*/ |
126
|
|
|
public function getVideoWidth() |
127
|
|
|
{ |
128
|
|
|
return $this->videoWidth; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @param int $videoWidth |
133
|
|
|
*/ |
134
|
|
|
public function setVideoWidth($videoWidth) |
135
|
|
|
{ |
136
|
|
|
$this->videoWidth = $videoWidth; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* @return int |
141
|
|
|
*/ |
142
|
|
|
public function getVideoHeight() |
143
|
|
|
{ |
144
|
|
|
return $this->videoHeight; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* @param int $videoHeight |
149
|
|
|
*/ |
150
|
|
|
public function setVideoHeight($videoHeight) |
151
|
|
|
{ |
152
|
|
|
$this->videoHeight = $videoHeight; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* @return int |
157
|
|
|
*/ |
158
|
|
|
public function getVideoDuration() |
159
|
|
|
{ |
160
|
|
|
return $this->videoDuration; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @param int $videoDuration |
165
|
|
|
*/ |
166
|
|
|
public function setVideoDuration($videoDuration) |
167
|
|
|
{ |
168
|
|
|
$this->videoDuration = $videoDuration; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @return mixed |
173
|
|
|
*/ |
174
|
|
|
public function getThumbUrl() |
175
|
|
|
{ |
176
|
|
|
return $this->thumb_url; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* @param mixed $thumb_url |
181
|
|
|
*/ |
182
|
|
|
public function setThumbUrl($thumb_url) |
183
|
|
|
{ |
184
|
|
|
$this->thumb_url = $thumb_url; |
185
|
|
|
} |
186
|
|
|
|
187
|
|
|
/** |
188
|
|
|
* @return mixed |
189
|
|
|
*/ |
190
|
|
|
public function getDescription() |
191
|
|
|
{ |
192
|
|
|
return $this->description; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* @param mixed $description |
197
|
|
|
*/ |
198
|
|
|
public function setDescription($description) |
199
|
|
|
{ |
200
|
|
|
$this->description = $description; |
201
|
|
|
} |
202
|
|
|
} |
203
|
|
|
|