@@ -13,12 +13,11 @@ export type CompatibilityStatus = {
1313 usb : boolean ;
1414 platformAllowed : boolean ;
1515 webGL : boolean ,
16- webUSB : boolean
1716} ;
1817
1918export function checkCompatibility ( ) : CompatibilityStatus {
2019 if ( localStorage . getItem ( 'isTesting' ) ) {
21- return { bluetooth : true , usb : true , platformAllowed : true , webGL : true , webUSB : true } ;
20+ return { bluetooth : true , usb : true , platformAllowed : true , webGL : true } ;
2221 }
2322 const browser = Bowser . getParser ( window . navigator . userAgent ) ;
2423 const browserName = browser . getBrowser ( ) . name ?? 'unknown' ;
@@ -28,17 +27,9 @@ export function checkCompatibility(): CompatibilityStatus {
2827 // TODO: Handle webgl1 vs webgl2 in relation to threejs
2928 const webGL = canvas . getContext ( "webgl" ) instanceof WebGLRenderingContext
3029
31- const webUSB = false // Check for this is async, so another function is used
32- // try {
33- // await navigator.usb.getDevices()
34- // webUSB = true
35- // } catch {
36- // webUSB = false
37- // }
38-
3930 const browserVersion = browser . getBrowserVersion ( ) ;
4031 if ( ! browserVersion ) {
41- return { bluetooth : false , usb : false , platformAllowed : true , webGL : webGL , webUSB } ;
32+ return { bluetooth : false , usb : false , platformAllowed : true , webGL : webGL } ;
4233 }
4334 const majorVersion = browser . getBrowserVersion ( ) . split ( '.' ) [ 0 ] ;
4435 const minorVersion = browser . getBrowserVersion ( ) . split ( '.' ) [ 1 ] ;
@@ -60,18 +51,6 @@ export function checkCompatibility(): CompatibilityStatus {
6051 usb : isUsbSupported ,
6152 platformAllowed : isPlatformAllowed ,
6253 webGL : webGL ,
63- webUSB : webUSB
6454 } ;
6555}
6656
67- export async function checkUSBCompatibility ( ) : Promise < boolean > {
68- try {
69- await navigator . usb . getDevices ( )
70- return true
71- } catch {
72- return false
73- }
74- }
75- // }
76-
77- // export default CompatibilityChecker;
0 commit comments