Skip to content

Instantly share code, notes, and snippets.

@adrianblynch
Last active April 13, 2017 12:23
Show Gist options
  • Save adrianblynch/134cfff49b62867a2e53 to your computer and use it in GitHub Desktop.
Save adrianblynch/134cfff49b62867a2e53 to your computer and use it in GitHub Desktop.
icecomm.io - Minimum
<video id="localVideo"></video>
<script src="https://cdn.icecomm.io/icecomm.js"></script>
<script>
var comm = new Icecomm("my_api_key");
comm.connect("Room 101");
comm.on("local", function(peer) {
$("#localVideo").get(0).src = peer.stream;
});
comm.on("connected", function(peer) {
$("#localVideo").after(peer.getVideo());
});
comm.on("disconnect", function(peer) {
document.getElementById(peer.ID).remove();
});
</script>
@adrianblynch
Copy link
Author

Comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment