Skip to content

Commit 7dc6940

Browse files
robmanRob Manson
authored and
Rob Manson
committed
Commented out media constraints usage as Chrome doesn't like it.
Also scaled #canvas css width/height to match pipeline_width/height as Chrome didn't like that either.
1 parent 3c0a3b8 commit 7dc6940

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

image_processing_pipeline.html

+13-10
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151

5252
// setup variables
5353
var pipeline_processor_speed = 30; // processor iterations per second
54-
var pipeline_width = 320;
55-
var pipeline_height = 240;
54+
var pipeline_width = 640;
55+
var pipeline_height = 480;
5656

5757

5858
// setup frame buffer processor
@@ -144,19 +144,22 @@
144144
pipeline_canvas.width = pipeline_width; // set this otherwise it defaults to 300
145145
pipeline_canvas.height = pipeline_height; // set this otherwise it defaults to 150
146146
pipeline_ctx = pipeline_canvas.getContext("2d");
147+
/*
147148
var options = {
148149
video:{
149150
mandatory: {
150151
width: { min: pipeline_width },
151152
height: { min: pipeline_height }
152153
},
153-
//optional: [
154-
// { frameRate: 60 },
155-
// { facingMode: "user" }
156-
//]
157-
} ,
154+
// optional: [
155+
// { frameRate: 60 },
156+
// { facingMode: "user" }
157+
// ]
158+
},
158159
audio:false
159160
};
161+
*/
162+
var options = { video:true, audio:false };
160163
get_user_media(options, create_vc_pipeline, got_error);
161164
function got_error(error) {
162165
console.log(error);
@@ -249,14 +252,14 @@
249252
<style>
250253
#pipeline_canvas {
251254
/* scale whole canvas here */
252-
width: 1024px;
253-
height: 768px;
255+
width: 640px;
256+
height: 480px;
254257
background-color: #FF0000;
255258
}
256259
</style>
257260
</head>
258261
<body onload="start()">
259262
<p><canvas id="pipeline_canvas"></canvas></p>
260-
<p><a href="#void" onClick="toggle_filter()">TOGGLE FILTER</a> <-- View the source of this page to see what this does (HINT: search for "Key concept:" and "example:" to get started)</p>
263+
<p><a href="#" onClick="toggle_filter()">TOGGLE FILTER</a> <-- View the source of this page to see what this does (HINT: search for "Key concept:" and "example:" to get started)</p>
261264
</body>
262265
</html>

0 commit comments

Comments
 (0)