Last active
August 29, 2015 14:06
-
-
Save bdunnette/9afcb569cd1e5055c3ff to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://simplewebrtc.com/latest.js"></script> | |
</head> | |
<body> | |
<video height="300" id="localVideo"></video> | |
<div id="remotesVideos"></div> | |
<script> | |
var webrtc = new SimpleWebRTC({ | |
// the id/element dom element that will hold "our" video | |
localVideoEl: 'localVideo', | |
// the id/element dom element that will hold remote videos | |
remoteVideosEl: 'remotesVideos', | |
// immediately ask for camera access | |
autoRequestMedia: true | |
}); | |
// we have to wait until it's ready | |
webrtc.on('readyToCall', function () { | |
// you can name it anything | |
webrtc.joinRoom('your awesome room name'); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment