Created Video avatars ("profile photos") (markdown)

Lonami 2020-08-07 12:35:33 +02:00
parent a002850cbd
commit d7ec108d5d

@ -0,0 +1,22 @@
As of layer 116, profiles can now add videos along with their profile photo, which will play when a user opens the profile. However, there are some limitations on the type of videos that can be used. In particular, the profile video requirements are:
* The file format must be a `.mp4` video (not `.gif` file).
* The video dimensions must be 800x800 pixels.
* The maximum video size must be less than 2MB.
* The maximum video duration must be less than 10 seconds.
This information was originally [posted in Telegram Beta Chat](https://t.me/tgbetachat/325956), later [mentioned in Telethon Chat](https://t.me/TelethonChat/235560).
To [use a video](https://tl.telethon.dev/methods/photos/upload_profile_photo.html) in your profile (as long as the file meets the above criteria):
```python
from telethon import TelegramClient, functions
client = ...
async def main():
await client(functions.photos.UploadProfilePhotoRequest(
video='/path/to/video.mp4'
))
client.loop.run_until_complete(main())
```