Created
June 9, 2013 14:55
-
-
Save toshi3221/5743827 to your computer and use it in GitHub Desktop.
simpleWebRTC
This file contains 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> | |
<div id="localVideo"></div> | |
<div id="remotesVideos"></div> | |
<script> | |
var webrtc = new WebRTC({ | |
// 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('SimpleWebRTC tiramisu test'); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment