InputMediaVideo
extends InputPollMedia
in package
This file is generated from spec/openapi.json (Bot API 10.3) by tools/generate.php.
Do not edit it by hand - run composer spec:build instead.
Represents a video to be sent.
Tags
Table of Contents
Constants
- DISCRIMINATOR : mixed = null
- The attribute whose value names the concrete subtype.
- SUBTYPES : array<string, Part>>|array<int, Part>> = []
- The concrete classes a union parent may resolve to - keyed by discriminator value when there is one, a plain list otherwise. Empty on ordinary parts.
Properties
- $caption : string|null
- $caption_entities : Collection<string|int, MessageEntity>|null
- $cover : string|null
- $duration : int|null
- $has_spoiler : bool|null
- $height : int|null
- $media : string
- $parse_mode : string|null
- $show_caption_above_media : bool|null
- $start_timestamp : CarbonImmutable|null
- $supports_streaming : bool|null
- $thumbnail : string|null
- $type : string
- $width : int|null
- $casts : array<string, string>
- $dates : array<int, string>
- $fillable : array<int, string>
- $telegram : Telegram
Methods
- __construct() : mixed
- __debugInfo() : array<string, mixed>
- __get() : mixed
- __isset() : bool
- __set() : void
- __toString() : string
- attributeExists() : bool
- fill() : void
- getAttribute() : mixed
- getCasts() : array<string, string>
- getFillable() : array<int, string>
- getRawAttributes() : array<string, mixed>
- getTelegram() : Telegram
- jsonSerialize() : array<string, mixed>
- The payload this part would be sent back to Telegram as - nested parts and collections flattened, timestamps left as the integers they arrived as.
- offsetExists() : bool
- offsetGet() : mixed
- offsetSet() : void
- offsetUnset() : void
- resolveSubtype() : Part>
- The concrete class an incoming payload belongs to, for a union parent.
- setAttribute() : void
- factory() : Factory
- Builds another part from the same client - for nested objects.
- getRawAttribute() : mixed
- Reads straight from the attribute bag, skipping the `get{Key}Attribute` hook.
- setRawAttribute() : void
- Writes straight to the attribute bag, skipping the `set{Key}Attribute` hook and any cast. For use *inside* a mutator, which would otherwise have no way to store its shaped value without recursing through {@see setAttribute()}.
Constants
DISCRIMINATOR
The attribute whose value names the concrete subtype.
public
mixed
DISCRIMINATOR
= null
SUBTYPES
The concrete classes a union parent may resolve to - keyed by discriminator value when there is one, a plain list otherwise. Empty on ordinary parts.
public
array<string, Part>>|array<int, Part>>
SUBTYPES
= []
Properties
$caption
public
string|null
$caption
Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
$caption_entities
public
Collection<string|int, MessageEntity>|null
$caption_entities
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
$cover
public
string|null
$cover
Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
$duration
public
int|null
$duration
Optional. Video duration in seconds
$has_spoiler
public
bool|null
$has_spoiler
Optional. Pass True if the video needs to be covered with a spoiler animation
$height
public
int|null
$height
Optional. Video height
$media
public
string
$media
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
$parse_mode
public
string|null
$parse_mode
Optional. Mode for parsing entities in the video caption. See formatting options for more details.
$show_caption_above_media
public
bool|null
$show_caption_above_media
Optional. Pass True if the caption must be shown above the message media
$start_timestamp
public
CarbonImmutable|null
$start_timestamp
Optional. Start timestamp for the video in the message
$supports_streaming
public
bool|null
$supports_streaming
Optional. Pass True if the uploaded video is suitable for streaming
$thumbnail
public
string|null
$thumbnail
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
$type
public
string
$type
Type of the media, must be video
$width
public
int|null
$width
Optional. Video width
$casts
protected
array<string, string>
$casts
= ['caption_entities' => 'Array of MessageEntity']
$dates
protected
array<int, string>
$dates
= ['start_timestamp']
$fillable
protected
array<int, string>
$fillable
= ['type', 'media', 'thumbnail', 'cover', 'start_timestamp', 'caption', 'parse_mode', 'caption_entities', 'show_caption_above_media', 'width', 'height', 'duration', 'supports_streaming', 'has_spoiler']
$telegram read-only
protected
Telegram
$telegram
Methods
__construct()
public
__construct(Telegram $telegram[, array<string, mixed>|object $attributes = [] ]) : mixed
Parameters
- $telegram : Telegram
- $attributes : array<string, mixed>|object = []
__debugInfo()
public
__debugInfo() : array<string, mixed>
Return values
array<string, mixed>__get()
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
__toString()
public
__toString() : string
Return values
stringattributeExists()
public
attributeExists(string $key) : bool
Parameters
- $key : string
Return values
boolfill()
public
fill(array<string, mixed> $attributes) : void
Parameters
- $attributes : array<string, mixed>
getAttribute()
public
getAttribute(string $key) : mixed
Parameters
- $key : string
getCasts()
public
getCasts() : array<string, string>
Return values
array<string, string>getFillable()
public
getFillable() : array<int, string>
Return values
array<int, string>getRawAttributes()
public
getRawAttributes() : array<string, mixed>
Return values
array<string, mixed>getTelegram()
public
getTelegram() : Telegram
Return values
TelegramjsonSerialize()
The payload this part would be sent back to Telegram as - nested parts and collections flattened, timestamps left as the integers they arrived as.
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>offsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
resolveSubtype()
The concrete class an incoming payload belongs to, for a union parent.
public
static resolveSubtype(array<string, mixed> $attributes) : Part>
Tagged unions resolve on their discriminator. The handful Telegram leaves
untagged (InputMessageContent, and the rest), and any payload whose tag
this build does not recognise - a member added to the Bot API since it was
generated - resolve instead to the subtype whose attributes the payload
matches most closely.
Parameters
- $attributes : array<string, mixed>
Tags
Return values
Part>setAttribute()
public
setAttribute(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
factory()
Builds another part from the same client - for nested objects.
protected
factory() : Factory
Return values
FactorygetRawAttribute()
Reads straight from the attribute bag, skipping the `get{Key}Attribute` hook.
protected
getRawAttribute(string $key) : mixed
Parameters
- $key : string
setRawAttribute()
Writes straight to the attribute bag, skipping the `set{Key}Attribute` hook and any cast. For use *inside* a mutator, which would otherwise have no way to store its shaped value without recursing through {@see setAttribute()}.
protected
setRawAttribute(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed