|
@@ -188,7 +188,9 @@ export class Session extends AREventTarget<SessionEventType>
|
188
|
188
|
*/
|
189
|
189
|
static isSupported(): boolean
|
190
|
190
|
{
|
191
|
|
- // If Safari or iOS, require version 15.2 or later
|
|
191
|
+ //alert(Utils.deviceInfo()); // debug
|
|
192
|
+
|
|
193
|
+ // If Safari / iOS, require version 15.2 or later
|
192
|
194
|
if(/(Mac|iOS|iPhone|iPad|iPod)/i.test(Utils.platformString())) {
|
193
|
195
|
|
194
|
196
|
/*
|
|
@@ -226,17 +228,27 @@ export class Session extends AREventTarget<SessionEventType>
|
226
|
228
|
|
227
|
229
|
if(matches !== null) {
|
228
|
230
|
const version = matches[3] || '0.0';
|
229
|
|
- const [x, y] = version.split(/[\._]/).map(v => parseInt(v));
|
|
231
|
+ const [x, y] = version.split(/[\._]/).map(v => parseInt(v) | 0);
|
230
|
232
|
|
231
|
233
|
if((x < 15) || (x == 15 && y < 2)) {
|
232
|
234
|
Utils.error(`${matches === safari ? 'Safari' : 'iOS'} version ${version} is not supported! User agent: ${navigator.userAgent}`);
|
233
|
235
|
return false;
|
234
|
236
|
}
|
|
237
|
+
|
|
238
|
+ // XXX reject older iPhone models? Which ones?
|
|
239
|
+ /*if(navigator.userAgent.includes('iPhone')) {
|
|
240
|
+ // detect screen size?
|
|
241
|
+ }*/
|
235
|
242
|
}
|
236
|
243
|
else
|
237
|
244
|
Utils.warning(`Unrecognized user agent: ${navigator.userAgent}`);
|
238
|
245
|
}
|
239
|
246
|
|
|
247
|
+ // Android: reject very old / weak devices?
|
|
248
|
+ // XXX establish criteria?
|
|
249
|
+ /*if(Utils.isAndroid()) {
|
|
250
|
+ }*/
|
|
251
|
+
|
240
|
252
|
// Check if WebGL2 and WebAssembly are supported
|
241
|
253
|
return Speedy.isSupported();
|
242
|
254
|
}
|