LivePhoto

class telegram.LivePhoto(file_id, file_unique_id, width, height, duration, photo=None, mime_type=None, file_size=None, *, api_kwargs=None)[source]

Bases: telegram.TelegramObject

This object represents a live photo.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their file_unique_id is equal.

Added in version 22.8.

Parameters:
  • file_id (str) – Identifier for the video file which can be used to download or reuse the file.

  • file_unique_id (str) – 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.

  • width (int) – Video width as defined by the sender.

  • height (int) – Video height as defined by the sender.

  • duration (int | datetime.timedelta) – Duration of the video in seconds as defined by the sender.

  • photo (Sequence[telegram.PhotoSize], optional) – Available sizes of the corresponding static photo.

  • mime_type (str, optional) – MIME type of a file as defined by the sender.

  • file_size (int, optional) – File size in bytes.

file_id[source]

Identifier for the video file which can be used to download or reuse the file.

Type:

str

file_unique_id[source]

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.

Type:

str

width[source]

Video width as defined by the sender.

Type:

int

height[source]

Video height as defined by the sender.

Type:

int

duration[source]

Duration of the video in seconds as defined by the sender.

Type:

datetime.timedelta

photo[source]

Optional. Available sizes of the corresponding static photo.

Type:

tuple[telegram.PhotoSize]

mime_type[source]

Optional. MIME type of a file as defined by the sender.

Type:

str

file_size[source]

Optional. File size in bytes.

Type:

int

classmethod de_json(data, bot=None)[source]

See telegram.TelegramObject.de_json().