Skip to content

Commit a21a001

Browse files
committed
Remove test code from index.html
1 parent 22b6859 commit a21a001

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

index.html

-35
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,6 @@
1414
<body>
1515

1616
<script>
17-
navigator.webkitGetUserMedia({video: false, audio: true}, function(stream) {
18-
var context = new webkitAudioContext;
19-
mediaStreamSource = context.createMediaStreamSource(stream);
20-
processor = context.createJavaScriptNode(4096, 2, 2);
21-
22-
processor.onaudioprocess = function(e) {
23-
// console.log(e.inputBuffer);
24-
// console.log(e.inputBuffer.getChannelData(0));
25-
processor.onaudioprocess = undefined;
26-
stream.stop();
27-
// Process the audio data found in e.inputBuffer
28-
};
29-
30-
mediaStreamSource.connect(processor);
31-
processor.connect(context.destination);
32-
});
33-
34-
navigator.webkitGetUserMedia({video: true, audio: false}, function(stream) {
35-
var canvas = document.createElement('canvas');
36-
var ctx = canvas.getContext('2d');
37-
38-
video = document.createElement('video');
39-
video.src = window.URL.createObjectURL(stream);
40-
41-
video.addEventListener('loadeddata', function() {
42-
ctx.drawImage(video, 0, 0);
43-
var frame = ctx.getImageData(0, 0, video.videoWidth, video.videoHeight).data;
44-
var pixels = new Uint8Array(frame); // rgba
45-
console.log(pixels);
46-
47-
stream.stop();
48-
});
49-
});
50-
</script>
51-
5217
<a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
5318

5419
<div style="margin-left: auto; margin-right: auto; width: 600px">

0 commit comments

Comments
 (0)