浏览代码

Catch xr.supportsSession() rejection

Takahiro 6 年之前
父节点
当前提交
d6907618cd
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;