Before starting my blog, I suppose you know the WebRTC technology. If you want more detail about WebRTC Technology, you can review the below URLs.
After learning the necessary information in the WebRTC Technology above, we can continue to our article.
Feature 1: Screen Share
You can use screen share feature in WebRTC. But screen share feature needs to Google Chrome extension. You can reach the Google Chrome extension to follow the link.
You can able to use screen share ability with below code snippets:
But, firstly you should check Google Chrome extension with below function:
For more detail, please follow this link -> WebRTC Screen Share Camera
Feature 2: Embed Camera in WebRTC Publish
You can embed your camera in WebRTC Publish Stream in a few basic changes.
You should add WebRTCAdapter variable definitions like below code snippets:
camera_location: "top", // top or bottom
camera_margin: 5, // in pixel, margin between edges
camera_percent: 15, //camera width percentage, it's width % of total view
You can reach an example in this link.
Feature 3: Control Mic/Camera Abilities
You can call turnOn/turnOff Camera in the below functions.
You can call mute/unMute Microphone in the below functions.
Feature 4: Get/Enable WebRTC Connection stats
You can get WebRTC Stream statistics. Statistics parameters are;
You can enable stats with 5 seconds interval in below function:
You can get Stats in below function:
We hope this tutorial will be helpful for you 🙂 please feel free in case you have any questions, just send an email (contact at antmedia.io) or contact us from the contact page.