Just copy HTML code in your site and that's all you need to do. Nothing to install! No requirements!
Only one limitation: A link back to Muaz Khan!
====
This WebRTC Experiment works fine on following web-browsers:
| Browser | Support |
|---|---|
| Firefox | Aurora |
| Firefox | Nightly |
| Google Chrome | Stable |
| Google Chrome | Canary |
| Google Chrome | Beta |
| Google Chrome | Dev |
--
How to share audio-only streams ? Early workaround for Chrome Canary!
audio.src = webkitURL.createObjectURL(event.stream);
audio.addEventListener('play', function () {
this.muted = false;
this.volume = 1;
}, false);
audio.play();In simple words, multi-peers and sockets are opened to make it work!
- Audio broadcasting capability (one-to-many)
- Private broadcasting rooms
Just copy following HTML code to enjoy audio broadcasting in your own site!
<table class="visible">
<tr>
<td style="text-align: right;">
<input type="text" id="conference-name" placeholder="Broadcast Name">
</td>
<td>
<button id="start-conferencing">Start Audio Broadcasting</button>
</td>
</tr>
</table>
<table id="rooms-list" class="visible"></table>
<div id="participants"></div>
<script src="https://bit.ly/socket-io"></script>
<script src="https://bit.ly/RTCPeerConnection-v1-4"></script>
<script src="https://webrtc-experiment.appspot.com/audio-broadcast/broadcast.js"> </script>
<script src="https://webrtc-experiment.appspot.com/audio-broadcast/broadcast-ui.js"></script>var config = {
// JUST change code in openSocket method
openSocket: function (config) {
// ---------------------------- from here
var socket = io.connect('your own socket.io URL');
// set channel: 'audio-broadcasting' is the default channel
socket.channel = config.channel || 'audio-broadcasting';
// when socket opens: call 'config.onopen'
config.onopen && socket.on('connect', config.onopen);
// when socket gets message: call 'config.onmessage'
socket.on('message', config.onmessage);
// return socket object; because it will be used later
return socket;
// ---------------------------- to here --- and that's all you need to do!
}
};====
Copyright (c) 2013 Muaz Khan - A link back is MUST! - All rights reserved!