|
@@ -169,14 +169,20 @@ THREE.WEBVR = {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( 'xr' in navigator && 'supportsSession' in navigator.xr ) {
|
|
|
+ if ( 'xr' in navigator && 'isSessionSupported' in navigator.xr ) {
|
|
|
|
|
|
var button = document.createElement( 'button' );
|
|
|
button.style.display = 'none';
|
|
|
|
|
|
stylizeElement( button );
|
|
|
|
|
|
- navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR ).catch( showXRNotFound );
|
|
|
+ navigator.xr.isSessionSupported( 'immersive-vr' ).then( funciton ( supported ) {
|
|
|
+ if ( supported ) {
|
|
|
+ showEnterXR();
|
|
|
+ } else {
|
|
|
+ showXRNotFound();
|
|
|
+ }
|
|
|
+ } );
|
|
|
|
|
|
return button;
|
|
|
|