How do I specifically detect Apple devices?

Q&A about the latest versions
Post Reply
Posts: 7
Joined: Tue May 19, 2020 3:43 pm

Fri May 22, 2020 4:43 pm

How can I detect Apple devices to trigger different behaviours?

Saw the 'Has Touch' and 'Is Mobile' triggers, but can't see how to exclude all Apple OSes from the results and I want to include desktops as well as iOS phones/tablets.

Basically, I don't want it to look like the 'Full Screen' button is broken - when it is ignored on Apple browsers - as it works fine on PCs, Android tablets and phones, so I want to keep it on those.

Edit: this link is a 404 ... e-devices/
Posts: 9
Joined: Mon Apr 13, 2020 1:02 pm

Sun May 24, 2020 1:17 am

You might be able to have a browser detection scheme put into a text field with javascript, then have the that script change a variable to a particular value that can trigger the correct visibility of the elements.

I do this kind of thing in my html template, changing the variable just after the pano loads. I think I used the beforechangenode event.

Do know that browser detecting is not perfect, but in my experience it is usually pretty reliable - so be careful when you search for browser/OS detection code that you get a good one.

See: pano.setVariableValue(varName:String, varValue:Any) in the javascript api docs.
Post Reply