Last active
April 13, 2017 12:23
-
-
Save adrianblynch/134cfff49b62867a2e53 to your computer and use it in GitHub Desktop.
icecomm.io - Minimum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Comment