Created
May 14, 2016 08:57
-
-
Save erangamapa/56c5a3d333e0644e6dbb3b3d986e5321 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
| function pageReady() { | |
| localVideo = document.getElementById('localVideo'); | |
| remoteVideo = document.getElementById('remoteVideo'); | |
| serverConnection = new WebSocket('ws://127.0.0.1:3434'); | |
| serverConnection.onmessage = gotMessageFromServer; | |
| var constraints = { | |
| video: true, | |
| audio: true, | |
| }; | |
| if(navigator.getUserMedia) { | |
| navigator.getUserMedia(constraints, getUserMediaSuccess, getUserMediaError); | |
| } else { | |
| alert('Your browser does not support getUserMedia API'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment