@@ -55,7 +55,8 @@ $(document).ready(function(){
55
55
56
56
//check if the user is using http vs. https & redirect to https if needed
57
57
if ( document . location . protocol != "https:" ) {
58
- alert ( "This doesn't work well on http. Redirecting to https" ) ;
58
+ $ ( document ) . html ( "This doesn't work well on http. Redirecting to https" ) ;
59
+ console . log ( "redirecting to https" ) ;
59
60
document . location . href = "https:" + document . location . href . substring ( document . location . protocol . length ) ;
60
61
}
61
62
@@ -142,26 +143,15 @@ function gum(candidate, device) {
142
143
stream . getTracks ( ) . forEach ( function ( track ) {
143
144
track . stop ( ) ;
144
145
} ) ;
145
- //try this for FF
146
- if ( video . mozSrcObject )
147
- video . mozSrcObject . stop ( ) ;
148
146
}
149
147
150
148
//create constraints object
151
149
var constraints = {
152
150
audio : false ,
153
151
video : {
154
- /*mandatory: {
155
- sourceId: device.id,
156
- minWidth: {candidate.width,
157
- minHeight: candidate.height,
158
- maxWidth: candidate.width,
159
- maxHeight: candidate.height*/
160
152
deviceId : device . id ? { exact : device . id } : undefined ,
161
153
width : { exact : candidate . width } , //new syntax
162
154
height : { exact : candidate . height } //new syntax
163
-
164
- // }
165
155
}
166
156
} ;
167
157
@@ -187,7 +177,6 @@ function gum(candidate, device) {
187
177
188
178
window . stream = mediaStream ; // make globally available
189
179
video . srcObject = mediaStream ;
190
- //video.play();
191
180
192
181
}
193
182
}
@@ -400,6 +389,7 @@ function createAllResolutions(minHeight, maxHeight){
400
389
resolutions . push ( res ) ;
401
390
402
391
//square
392
+ //noinspection JSSuspiciousNameCombination
403
393
res = {
404
394
"label" : y + "x" + y ,
405
395
"width" : y ,
0 commit comments