play_video()¶
- async Client.play_video()¶
Stream a video file, remote stream, or Telegram media directly into group voice chat.
Telegram media objects (
Message,Video,Animation,Document, or file ID strings) are streamed directly in-memory on-the-fly with ZERO disk footprint.Usable by Users Bots- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.video (
str|MediaStream|Message|Video|Animation|Document) – Path to the video file (e.g. MP4, MKV), MediaStream descriptor, or Telegram media object.
- Returns:
GroupCall– On success, group call information is returned.
Example
# Play local MP4 video await app.play_video(chat_id, "video.mp4") # Play Telegram video directly without downloading to disk await app.play_video(chat_id, message.video) await app.play_video(chat_id, message)