Seeing it works on android and Iphone:
If it's constantly returning 0 either the device doesn't support orientation or the app/game doesn't have the permission to acces it (could ofcourse have to do with the browser not having permission if you play in the browser)
I haven't fiddled with firefox OS myself, so it might be that the way to acces these informations works differently from other systems and the "bug" is inside the code to try and get acces..