Results 61 - 80 of 782

Detecting device orientation

Increasingly, web-enabled devices are capable of determining their orientation; that is, they can report data indicating changes to their orientation with relation to the pull of gravity. In particular, hand-held devices such as mobile phones can use this information to automatically rotate the display to remain upright, presenting a wide-screen view of the web content when the device is rotated so that its width is greater than its height.
API Device Orientation Firefox OS Intermediate Mobile Motion Orientation Reference

DeviceMotionEvent.acceleration

The acceleration property returns the amount of acceleration recorded by the device, in meters per second squared (m/s2).
API Device Orientation Firefox OS Mobile Motion NeedsExample Orientation Property

DeviceMotionEvent.accelerationIncludingGravity

The accelerationIncludingGravity property returns the amount of acceleration recorded by the device, in meters per second squared (m/s2). Unlike DeviceMotionEvent.acceleration which compensates for the influence of gravity, its value is the sum of the acceleration of the device as induced by the user and the acceleration caused by gravity.
API Device Orientation Firefox OS Mobile Motion NeedsExample Orientation Property

DeviceMotionEvent.interval

Returns the interval, in milliseconds, at which data is obtained from the underlaying hardware. You can use this to determine the granularity of motion events.
API Device Orientation Firefox OS Mobile Motion NeedsExample Orientation Property

FMRadio.onantennaavailablechange

Specifies an event listener to receive antennaavailablechange events. Those events occur when an antenna is plugged or unplugged.
API Firefox OS FMRadio API Property Reference WebFM

FMRadio.onenabled

Specifies an event listener to receive enabled events. Those events occur when the device's FM radio is turned on.
API Firefox OS FMRadio API Property Reference WebFM

FMRadio.onfrequencychange

Specifies an event listener to receive frequencychange events. Those events occur whenever the radio frequency is changed
API Firefox OS FMRadio API Property Reference WebFM