|
@@ -186,6 +186,11 @@ class VRButton {
|
|
|
|
|
|
if ( 'xr' in navigator ) {
|
|
|
|
|
|
+ // WebXRViewer (based on Firefox) has a bug where addEventListener
|
|
|
+ // throws a silent exception and aborts execution entirely.
|
|
|
+ const isWebXRViewer = /WebXRViewer\//i.test( navigator.userAgent );
|
|
|
+ if( isWebXRViewer ) return;
|
|
|
+
|
|
|
navigator.xr.addEventListener( 'sessiongranted', () => {
|
|
|
|
|
|
VRButton.xrSessionIsGranted = true;
|