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.
How do I specifically detect Apple devices?
-
- Posts: 9
- Joined: Mon Apr 13, 2020 1:02 pm
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.
https://ggnome.com/doc/javascript-api/
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.
https://ggnome.com/doc/javascript-api/
You can add a logic block to, for example, the visible property of the fullscreen button.
You'll find the iOS trigger under Advanced > Operating System
You'll find the iOS trigger under Advanced > Operating System
- Attachments
-
- Screen Shot 2020-05-26 at 12.14.49 PM.png (90.16 KiB) Viewed 1373 times