How it works?
- It broadcasts media in one-way direction over number of peers.
- All peers can view/watch/listen the broadcast, anonymously.
- "Anonymously" means viewers will NEVER be prompted to allow webcam or mic or screen.
- Assume like a radio station inside the browser. Remember, it works only browser-to-browser.
How it works?
It is one-way broadcasting; media stream is attached only by the broadcaster.
It means that, if 10 people are watching your one-way broadcasted audio/video stream; on your system:
- 10 RTP ports are opened to send video upward i.e. outgoing video
- 10 RTP ports are opened to send audio upward i.e. outgoing audio
And on participants system:
- 10 RTP ports are opened to receive video i.e. incoming video
- 10 RTP ports are opened to receive audio i.e. incoming audio
Maximum bandwidth used by each video RTP port (media-track) is about 1MB. You're streaming audio and video tracks. You must be careful when streaming video over more than one peers. If you're broadcasting audio/video over 10 peers; it means that 20MB bandwidth is required on your system to stream-up (broadcast/transmit) your video. Otherwise; you'll face connection lost; CPU usage issues; and obviously audio-lost/noise/echo issues.
You can handle such things using "b=AS" (application specific bandwidth) session description parameter values to deliver a little bit low quality video.
// removing existing bandwidth lines sdp = sdp.replace( /b=AS([^\r\n]+\r\n)/g , ''); // setting "outgoing" audio RTP port's bandwidth to "50kbit/s" sdp = sdp.replace( /a=mid:audio\r\n/g , 'a=mid:audio\r\nb=AS:50\r\n'); // setting "outgoing" video RTP port's bandwidth to "256kbit/s" sdp = sdp.replace( /a=mid:video\r\n/g , 'a=mid:video\r\nb=AS:256\r\n');
- Blurry video experience
- Unclear voice and audio lost
- Bandwidth issues / slow streaming / CPU overwhelming
Solution? Obviously a media server or remote-stream-forwarding!