webrtc-broadcasting

所属分类:数据结构
开发工具:HTML
文件大小:10KB
下载次数:94
上传日期:2013-10-15 17:43:00
上 传 者huangjiajie
说明:  用webrtc写的会议代码,可以通过他来进行视频聊天,并且完成与他人的交流
(Meeting with webrtc write code, you can video chat through him, and to complete the exchange with others)

文件列表:
webrtc-broadcasting\broadcast.js (7553, 2013-09-12)
webrtc-broadcasting\index.html (17746, 2013-09-12)
webrtc-broadcasting (0, 2013-09-23)

#### WebRTC One-Way video sharing/broadcasting / [Demo](https://www.webrtc-experiment.com/webrtc-broadcasting/) Participants can view your broadcasted video **anonymously**. They can also listen you without allowing access to their own microphone! This experiment is actually a **one-way** audio/video/screen streaming. = You can: 1. Share your screen in one-way over many peers 2. Share you camera in one-way over many peers 3. Share/transmit your voice in one-way over many peers = #### How WebRTC One-Way Broadcasting Works? 1. Mesh networking model is implemented to open multiple interconnected peer connections 2. Maximum peer connections limit is 256 (on chrome) = 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: 1. 10 RTP ports are opened to send video upward i.e. outgoing video 2. 10 RTP ports are opened to send audio upward i.e. outgoing audio And on participants system: 1. 10 RTP ports are opened to receive video i.e. incoming video 2. 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. ```javascript // 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'); ``` = Possible issues 1. Blurry video experience 2. Unclear voice and audio lost 3. Bandwidth issues / slow streaming / CPU overwhelming Solution? Obviously a media server! = #### Want to use video-conferencing in your own webpage? ```html
``` = #### Browser Support This [WebRTC One-Way Broadcasting](https://www.webrtc-experiment.com/webrtc-broadcasting/) experiment works fine on following web-browsers: | Browser | Support | | ------------- |-------------| | Firefox | [Stable](http://www.mozilla.org/en-US/firefox/new/) / [Aurora](http://www.mozilla.org/en-US/firefox/aurora/) / [Nightly](http://nightly.mozilla.org/) | | Google Chrome | [Stable](https://www.google.com/intl/en_uk/chrome/browser/) / [Canary](https://www.google.com/intl/en/chrome/browser/canary.html) / [Beta](https://www.google.com/intl/en/chrome/browser/beta.html) / [Dev](https://www.google.com/intl/en/chrome/browser/index.html?extra=devchannel#eula) | | Android | [Chrome Beta](https://play.google.com/store/apps/details?id=com.chrome.beta&hl=en) | = #### License [WebRTC One-Way Broadcasting](https://www.webrtc-experiment.com/webrtc-broadcasting/) experiment is released under [MIT licence](https://www.webrtc-experiment.com/licence/) . Copyright (c) 2013 [Muaz Khan](https://plus.google.com/100325991024054712503).

近期下载者

相关文件


收藏者