Browse Source

Catch xr.supportsSession() rejection

Takahiro 6 năm trước cách đây
mục cha
commit
d6907618cd
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;