The camera rotation from device orientation was implemented specially for Firefox in mind and it seems that the handling of beta value has changed somewhere between Firefox 27.0 (the old code was still working) and Firefox 30.0. I could not find any official information about the change, but the new version of the code works in Firefox 30.0. Therefore it is recommented to use the newest version of Firefox.