Created
June 17, 2015 14:49
-
-
Save jefBinomed/f524a35662675351eb2f to your computer and use it in GitHub Desktop.
Programmez-07/08_2015-PortalWebrtc-04
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
var canvasRemoteElement = document.querySelector('#canvasRemoteVideo'); | |
var ctxRemote = canvasRemoteElement.getContext('2d'); | |
function snapshot(){ | |
var canvasToUse = canvasRemoteElement; | |
var contextToUse = ctxRemote; | |
varvideoToUse = remoteVideo; | |
canvasRemoteElement.width = remoteVideo.videoWidth; | |
canvasRemoteElement.height = remoteVideo.videoHeight; | |
if (remoteStream){ | |
ctxRemote.drawImage(remoteVideo,0,0); | |
} | |
window.requestAnimationFrame(snapshot); | |
} | |
snapshot(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment