Adding Mic and Camera Toggles
So far in your work with WebRTC, you’ve streamed only silent video from one peer to the other. (Raise your hand if you’ve grown sick and tired of looking at yourself.) Video has been great for setting up and testing out peer connections, but no app streaming user media is complete if it can’t stream audio, too.
As you have read in earlier chapters, there are some genuine safety concerns to consider when you are developing with streaming audio coming off a microphone. The possible feedback is not just unpleasant: in the worst cases, it could damage your hearing and your audio equipment.
With your knowledge of data channels, you’re now prepared to build logic and controls to toggle audio on and off. That logic is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access