Explorar el Código

Catch xr.supportsSession() rejection

Takahiro hace 6 años
padre
commit
d6907618cd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      examples/js/vr/WebVR.js

+ 1 - 1
examples/js/vr/WebVR.js

@@ -136,7 +136,7 @@ var WEBVR = {
 
 			stylizeElement( button );
 
-			navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR );
+			navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR ).catch( showVRNotFound );
 
 			return button;