Skip to content

Commit cc93513

Browse files
committed
fixed gum demos
1 parent 973a376 commit cc93513

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

demos/gum-canvas.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@
9090
// from HTML5 Doctor article: http://html5doctor.com/getusermedia/
9191
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
9292
if (navigator.getUserMedia) {
93-
navigator.getUserMedia('video', successCallback, errorCallback);
94-
// Below is the latest syntax. Using the old syntax for the time being for backwards compatibility.
95-
//navigator.getUserMedia({video: true}, successCallback, errorCallback);
93+
navigator.getUserMedia({ video: true }, successCallback, errorCallback);
9694
function successCallback(stream) {
9795
window.stream = stream;
9896
if (window.webkitURL) {

demos/gum.html

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<title>getUserMedia streamed to a video element</title>
22
<style>
3-
video {
3+
audio, video {
44
max-width: 100%;
55
margin: 0;
66
}
7-
.supported video {
7+
8+
.supported video,
9+
.supported audio {
810
/* I'm using CSS3 to translate the video on the X axis to give it a mirror effect */
911
-webkit-transform: rotateY(180deg) rotate3d(1, 0, 0, 0deg);
1012
-o-transform: rotateY(180deg) rotate3d(1, 0, 0, 0deg);
@@ -34,13 +36,14 @@
3436
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
3537
if (navigator.getUserMedia) {
3638
// NOTE: at time of writing March 26, 2012, audio isn't working in Chrome
37-
navigator.getUserMedia('video', successCallback, errorCallback);
39+
// navigator.getUserMedia('audio,video', successCallback, errorCallback);
3840
// Below is the latest syntax. Using the old syntax for the time being for backwards compatibility.
39-
//navigator.getUserMedia({video: true}, successCallback, errorCallback);
41+
navigator.getUserMedia({video: true, audio: true }, successCallback, errorCallback);
4042
function successCallback(stream) {
4143
window.stream = stream;
4244
if (window.webkitURL) {
4345
video.src = window.webkitURL.createObjectURL(stream);
46+
// document.querySelector('audio').src = window.webkitURL.createObjectURL(stream);
4447
} else {
4548
video.src = stream;
4649
}

0 commit comments

Comments
 (0)