Skip to content

Instantly share code, notes, and snippets.

@ikr7
Created August 30, 2015 13:53
Show Gist options
  • Save ikr7/dc8c4d165ae730b55b8b to your computer and use it in GitHub Desktop.
Save ikr7/dc8c4d165ae730b55b8b to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Broadcaster</title>
</head>
<body>
<video autoplay="autoplay"></video>
<canvas></canvas>
<script src="./main.js"></script>
</body>
</html>
'use strict';
navigator.getUserMedia = navigator.webkitGetUserMedia;
navigator.getUserMedia({
video: true
}, function(stream){
var video = document.querySelector('video');
video.src = URL.createObjectURL(stream);
}, function(err){
throw err;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment