Tour-360 / tour-player

Virual tour player
http://tour-player.herokuapp.com
52 stars 19 forks source link

MacOS compatibility issues #524

Open AVTPJ opened 3 years ago

AVTPJ commented 3 years ago

I can't seem to get the latest (v2.2.3) working on Chrome (89.0.4389.114 (Official Build)) on MacOS Big Sur (11.2.3). The issue might be to do with mac os user agent reporting. I get a blank white page and this in console:

Uncaught TypeError: Cannot read property '1' of null
    at r (tour-player.js:1)
    at BrouserInfo (tour-player.js:1)
    at Object.Tour.init (tour-player.js:2)
    at (index):134

Any advice as to how to fix this?

AVTPJ commented 3 years ago

Ok found the culprit, the user agent check doesn't take into account Mac OS 11, this is the line that breaks it:

t = /Mac OS X (10[\.\_\d]+)/.exec(navigator.userAgent)[1];