'Apache2 Ubuntu navigator missing functions
I've been developing a web app with Apache2 which is supposed to run on a Raspberry pi running Ubuntu in the end.
Initial developing and testing is done on an Arch Linux machine (with httpd) and then transferred and further debugged on the pi.
Recently, I've started implementing controller input into the web app using javascript and the navigator.getGamepads() function. Everything working as expected on my Arch machine, but when i transfer the code to the pi, i get a "navigator.getGamepads is not a function" error.
When further investigating, I can indeed confirm that the function is missing using the firefox javascript console, as well as that the navigator object itself looks quite different for both pages (the Arch version, and the pi version).
Pi navigator: https://i.stack.imgur.com/RUN6U.png
Arch navigator: https://i.stack.imgur.com/ERBxT.png
Both screenshots are taken on the same machine, same browser, with the page loaded from both places in different tabs.
Has anyone experienced similar problem, and is there a fix?
Solution 1:[1]
Found an answer after some tinkering.
Turns out the browser (Firefox) will not expose all navigator functions unless the connection is handled through SSL (https).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Venelin Minchev |
