Skip to content

Instantly share code, notes, and snippets.

@ncurrier
Created June 11, 2015 09:05
Show Gist options
  • Save ncurrier/7874a5fdccb1bd9f82f2 to your computer and use it in GitHub Desktop.
Save ncurrier/7874a5fdccb1bd9f82f2 to your computer and use it in GitHub Desktop.
skylink.on('peerJoined', function(peerId, peerInfo, isSelf) {
if(isSelf) return; // We already have a video element for our video and don't need to create a new one.
var vid = document.createElement('video');
vid.autoplay = true;
vid.muted = true; // Added to avoid feedback when testing locally
vid.id = peerId;
document.body.appendChild(vid);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment