> For the complete documentation index, see [llms.txt](https://docs.dot-net.uz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dot-net.uz/c-.net/telegram-bot/starter/xabar-turlari-va-xabar-yuborish/video-and-video-note.md).

# Video & Video Note

Agarda siz yubormoqchi bo'lgan fayl ko'rinishi MP4 formatda bo'lsa, ularni **video** yoki **video note** ko'rinishida yuborish imkoniyati mavjud. Boshqa turdagi formatlar esa, dokument sifatida yuboriladi.&#x20;

Quyidagi misolda videolarni qanday yuborish mumkinligini ko'rishingiz mumkin.&#x20;

```csharp
private async void Xabar_Kelganda(object sender, MessageEventArgs e)
{
    if(e.Message.Text == "video yubor")
    {
        using (var stream = System.IO.File.OpenRead("D:/video.mp4"))
        {
            await client.SendVideoAsync(
                chatId: e.Message.Chat.Id,
                video: stream,
                /*
                // zoom rasm
                thumb: "http://inordic.ru/images/news/2019/cs.jpg",                 
                duration: 30, // davomiyligi                
                height: 300, // balandligi                
                width: 300, // kengligi
                */                
                supportsStreaming: true, // videoni yuklash davomida ochish
                replyToMessageId: e.Message.MessageId,
                disableNotification: true
            );
        }
    }
}
```

**Natija:**

![](/files/-MR5M8TE9qZXv11QRSEL)

Video fayllarda qo'shimcha tarzda **thumb** va **supportsStreaming** maydonlari mavjud.&#x20;

**thumb** - bu video yuklanishidan oldin video ustiga zoom holatda qo'yilgan rasm

![](/files/-MR5OfkMZEmk4mOqFNeL)

**supportsStreaming** - bu video yuklanmasdan ham uni ko'rish imkoniyati. Qiymat true bo'lsa ushbu imkoniyat amalga oshiriladi.

![](/files/-MR5PTC7zQt7Uiy146MR)

**Video note** - bu telegramda aylana ko'rinishida taqdim etiladi, hamda uning davomiyligi 1 minut yoki undan ham kamroq bo'lishi mumkin. Ularni faqatgina, 2 xil holatda yuklash mumkin: lokal komputer yoki file\_id. Qaysidur HTTP so'rov orqali yuklash hozrda qo'llab quvvatlanmaydi.

```csharp
private async void Xabar_Kelganda(object sender, MessageEventArgs e)
{
    if (e.Message.Text == "video yubor")
    {
        using (var stream = System.IO.File.OpenRead(@"D:\video.mp4"))
        {
            await client.SendVideoNoteAsync(
                chatId: e.Message.Chat.Id,
                videoNote: stream,                         
                duration: 30,               
                length: 360, // height va width                         
                replyToMessageId: e.Message.MessageId,
                disableNotification: true
            );
        }
    }
}
```

![](/files/-MR5TJBT3BqLSdr2TPeG)

{% hint style="info" %}
E"tiborli bo'ling, video note xabar turkumida - yuboriladigan video o'lchamlari bir xil bo'lishi kerak.
{% endhint %}
