Explorar o código

Catch xr.supportsSession() rejection

Takahiro %!s(int64=6) %!d(string=hai) anos
pai
achega
d6907618cd
Modificáronse 1 ficheiros con 1 adicións e 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;