Prechádzať zdrojové kódy

Catch xr.supportsSession() rejection

Takahiro 6 rokov pred
rodič
commit
d6907618cd
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      examples/js/vr/WebVR.js

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

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