WebRTC Live Audio Streaming / Broadcast

I am trying to solve WebRTC. I need to be able to capture and broadcast live sound through a web browser.

It’s just hard for me to find code examples that I can understand or update. If someone could help me with the first capture and playback of sound in the same browser using HTML5 / WebRTC, I think this will help me get started along the way.

Note. My only concern is that this works in Chrome (or Chrome Canary, for that matter!).

Thanks for any help!

+8
html5 html5-audio webrtc
source share
2 answers

WebRTC's HTML5 Rocks article is probably the best article explaining everything that happens to a layman.

For simple capture of local video / audio, you want to focus on the MediaStream API (i.e. getUserMedia). Once you get started, you will need to learn the RTCPeerConnection API.

The client code for the RTCPeerConnection API is fairly simple, but the server-side code required for signaling (i.e., establishing a peer-to-peer connection) can be complicated.

I ended up coding my own server-side solution in PHP, but it took about three weeks to hit my head against a wall (i.e. trying to decrypt the WebSocket specifications ) to make it work correctly. If you want to see the actual code, I can post some of my working code.

If you have a problem, I recommend trying the server-side script code itself, but otherwise, I would consider WebSocket libraries such as Socket.IO, which make all of the complex server application for you.

+12
source share

If you're talking about WebRTC Live Audio / Broadcast stream / broadcast , and not just peer-to-peer calls, WebRTC is not meant for broadcasts. Check WebRTC - Real-time Scalable Broadcast / Multicast Broadcast

+2
source share

All Articles