Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = function() {
- var video = document.getElementById("my_video");
- video.style.transform = "rotateY(180deg)"
- navigator.getUserMedia({video: true, audio: false}, function(stream) {
- console.log(stream);
- video.autoplay = true;
- video.src = window.URL.createObjectURL(stream);
- }, function(err) {
- console.log(err);
- });
- }
- //<html>
- // <head>
- // <title>camera sample</title>
- // <script type="text/javascript" src="test1.js"></script>
- // </head>
- // <body>
- // <video id="my_video" width="640"></video>
- // </body>
- //</html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement