Skip to content
Back to top
View this page

# LivePhoto

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

  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.

  Use In

  `telegram.Bot.send_live_photo()`

  Available In

  - `telegram.ExternalReplyInfo.live_photo`

  - `telegram.Message.effective_attachment`

  - `telegram.Message.live_photo`

  - `telegram.PaidMediaLivePhoto.live_photo`

  - `telegram.PollMedia.live_photo`

  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

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

    Type:

      `str`

  file_unique_id

    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

    Video width as defined by the sender.

    Type:

      `int`

  height

    Video height as defined by the sender.

    Type:

      `int`

  duration

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

    Type:

      `datetime.timedelta`

  photo

    Optional. Available sizes of the corresponding static photo.

    Type:

      tuple[`telegram.PhotoSize`]

  mime_type

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

    Type:

      `str`

  file_size

    Optional. File size in bytes.

    Type:

      `int`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.