In order to begin using WebRTC you need to get camera and microphone permission.For that you need following things:
adapter.js, you can get it from here
Now once you have this file, create a html file with following code:
Once done, save this file and run in the browser. When you run the browser will ask you to allow this webpage to access your webcam and microphone. Allow it and whola!, you will see the preview on the webpage.