@@ -145,14 +145,16 @@ function gum(candidate, device) {
145
145
var constraints = {
146
146
audio : false ,
147
147
video : {
148
- mandatory : {
148
+ /* mandatory: {
149
149
sourceId: device.id,
150
- minWidth : candidate . width ,
150
+ minWidth: { candidate.width,
151
151
minHeight: candidate.height,
152
152
maxWidth: candidate.width,
153
- maxHeight : candidate . height
153
+ maxHeight: candidate.height*/
154
+ width : { exact : candidate . width } , //new syntax
155
+ height : { exact : candidate . height } //new syntax
154
156
155
- }
157
+ // }
156
158
}
157
159
} ;
158
160
@@ -166,7 +168,7 @@ function gum(candidate, device) {
166
168
captureResults ( "fail: " + error . name ) ;
167
169
}
168
170
} ) ;
169
- } , ( stream ? 100 : 0 ) ) ; //official examples had this at 200
171
+ } , ( stream ? 200 : 0 ) ) ; //official examples had this at 200
170
172
171
173
172
174
function gotStream ( mediaStream ) {
@@ -186,7 +188,7 @@ function gum(candidate, device) {
186
188
187
189
function displayVideoDimensions ( ) {
188
190
if ( ! video . videoWidth ) {
189
- setTimeout ( displayVideoDimensions , 100 ) ; //was 500
191
+ setTimeout ( displayVideoDimensions , 500 ) ; //was 500
190
192
}
191
193
192
194
if ( video . videoWidth * video . videoHeight > 0 ) {
0 commit comments