Skip to content

GramIO API Reference / @gramio/contexts/dist / VideoAttachment

Class: VideoAttachment ​

Defined in: contexts/index.d.ts:840

This object represents a video file.

Extends ​

Constructors ​

Constructor ​

new VideoAttachment(payload): VideoAttachment

Defined in: contexts/index.d.ts:425

Parameters ​

ParameterType
payloadTelegramVideo

Returns ​

VideoAttachment

Inherited from ​

FileAttachment.constructor

Properties ​

PropertyModifierTypeDescriptionOverridesInherited fromDefined in
attachmentTypepublicAttachmentTypeReturns attachment's type (e.g. 'audio', 'photo')FileAttachment.attachmentType-contexts/index.d.ts:841
payloadprotectedTelegramVideo--FileAttachment.payloadcontexts/index.d.ts:422

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

Defined in: contexts/index.d.ts:412

MDN

Returns ​

string

Inherited from ​

FileAttachment.[toStringTag]


cover ​

Get Signature ​

get cover(): PhotoSize[]

Defined in: contexts/index.d.ts:857

Video cover

Returns ​

PhotoSize[]


duration ​

Get Signature ​

get duration(): number

Defined in: contexts/index.d.ts:847

Duration of the video in seconds as defined by sender

Returns ​

number


fileId ​

Get Signature ​

get fileId(): string

Defined in: contexts/index.d.ts:427

Identifier for this file, which can be used to download or reuse the file

Returns ​

string

Inherited from ​

FileAttachment.fileId


fileName ​

Get Signature ​

get fileName(): string

Defined in: contexts/index.d.ts:851

Original filename as defined by sender

Returns ​

string


fileSize ​

Get Signature ​

get fileSize(): number

Defined in: contexts/index.d.ts:855

File size

Returns ​

number


fileUniqueId ​

Get Signature ​

get fileUniqueId(): string

Defined in: contexts/index.d.ts:432

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.

Returns ​

string

Inherited from ​

FileAttachment.fileUniqueId


height ​

Get Signature ​

get height(): number

Defined in: contexts/index.d.ts:845

Video height as defined by sender

Returns ​

number


mimeType ​

Get Signature ​

get mimeType(): string

Defined in: contexts/index.d.ts:853

Mime type of a file as defined by sender

Returns ​

string


qualities ​

Get Signature ​

get qualities(): VideoQuality[]

Defined in: contexts/index.d.ts:861

Optional. List of available qualities of the video

Returns ​

VideoQuality[]


startTimestamp ​

Get Signature ​

get startTimestamp(): number

Defined in: contexts/index.d.ts:859

Start timestamp

Returns ​

number


thumbnail ​

Get Signature ​

get thumbnail(): PhotoSize

Defined in: contexts/index.d.ts:849

Video thumbnail

Returns ​

PhotoSize


width ​

Get Signature ​

get width(): number

Defined in: contexts/index.d.ts:843

Video width as defined by sender

Returns ​

number