Permalink
Browse files

fixed gum demos

  • Loading branch information...
1 parent 973a376 commit cc93513e9ac5e3ece038e61a9ca96de17f48b653 @remy committed Nov 1, 2012
Showing with 8 additions and 7 deletions.
  1. +1 −3 demos/gum-canvas.html
  2. +7 −4 demos/gum.html
@@ -90,9 +90,7 @@
// from HTML5 Doctor article: http://html5doctor.com/getusermedia/
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
if (navigator.getUserMedia) {
- navigator.getUserMedia('video', successCallback, errorCallback);
- // Below is the latest syntax. Using the old syntax for the time being for backwards compatibility.
- //navigator.getUserMedia({video: true}, successCallback, errorCallback);
+ navigator.getUserMedia({ video: true }, successCallback, errorCallback);
function successCallback(stream) {
window.stream = stream;
if (window.webkitURL) {
View
@@ -1,10 +1,12 @@
<title>getUserMedia streamed to a video element</title>
<style>
- video {
+ audio, video {
max-width: 100%;
margin: 0;
}
- .supported video {
+
+ .supported video,
+ .supported audio {
/* I'm using CSS3 to translate the video on the X axis to give it a mirror effect */
-webkit-transform: rotateY(180deg) rotate3d(1, 0, 0, 0deg);
-o-transform: rotateY(180deg) rotate3d(1, 0, 0, 0deg);
@@ -34,13 +36,14 @@
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
if (navigator.getUserMedia) {
// NOTE: at time of writing March 26, 2012, audio isn't working in Chrome
- navigator.getUserMedia('video', successCallback, errorCallback);
+ // navigator.getUserMedia('audio,video', successCallback, errorCallback);
// Below is the latest syntax. Using the old syntax for the time being for backwards compatibility.
- //navigator.getUserMedia({video: true}, successCallback, errorCallback);
+ navigator.getUserMedia({video: true, audio: true }, successCallback, errorCallback);
function successCallback(stream) {
window.stream = stream;
if (window.webkitURL) {
video.src = window.webkitURL.createObjectURL(stream);
+ // document.querySelector('audio').src = window.webkitURL.createObjectURL(stream);
} else {
video.src = stream;
}

0 comments on commit cc93513

Please sign in to comment.