Last active
August 29, 2015 14:06
-
-
Save tokafish/37aa2fda794e93e9d8ff to your computer and use it in GitHub Desktop.
Adding video
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
| navigator.getUserMedia({ video: true, audio: true }, function(stream) { | |
| currentUser.stream = stream; | |
| }, function() {}); | |
| // ... | |
| peer = new SimplePeer({ stream: currentUser.stream }); | |
| peer.on('stream', function(stream) { | |
| var video = document.querySelector("video"); | |
| video.src = window.URL.createObjectURL(stream); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment