<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful chatbot that always answers in Uzbek.<|eot_id|><|start_header_id|>user<|end_header_id|>

React funktsional komponentida foydalanuvchining veb-kamerasini ko'rsatish uchun qanday qilib WebRTC dan foydalanish mumkin?<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Siz WebRTC API-ning bir qismi bo'lgan `getUserMedia() ` usulini ishlatishingiz kerak bo'ladi. Ushbu usul foydalanuvchining veb-kamerasidan foydalanish uchun argument sifatida `MediaStream` ob'ektini oladi. Nihoyat, siz oqimni React funktsional komponentida `<video>` tegga manba sifatida o'tkazib, foydalanishingiz mumkin. Mana misol: `` navigator.mediaDevices.getUserMedia({ video: true, audio: false }).(thenstream => { videoTag.Objectsrc = stream; videoTag.(play); }); ```<|eot_id|>