Posts

Showing posts from December, 2020

how to access video and audio stream on web using webRTC

Image
 Hi, reader in this blog you gonna read how to access video and audio stream using JavaScript. we will cover up this tutorial with code snippet and explanation  We will use navigator object that provide access to your hardware equipment  like media devices , bluetooth , geolocation etc.. We will focus on accessing camera. Perquisites:  - Camera and Mic - Browser with JavaScript support Lets start let   stream  =  await   navigator . mediaDevices . getUserMedia ( {              video :   true ,              audio :   true ,          } ) ; console . log ( 'stream' ,   stream ) //html side //  <video   id = " cam " ></video> //To bind this stream with html let   videoNode  =  document . getElementById ( 'cam' ) ;     ...