Skip to Content
Platform.Ontology

Gyroscope

Reads how fast the device is rotating around three axes.

Asks you firstLocation and motionGeneric Sensor APIWeb browsersWhile you use it

In one line

Can feel how fast your device turns while the page is open

Reads how fast the device is rotating around three axes.

Shows how fast the device turns. Gyroscope noise has been used to eavesdrop on nearby speech (Gyrophone, 2014) and to fingerprint devices, which is why browsers cap the rate.

What it can and can't do

What the user does: Nothing in most browsers. Chrome allows it by default unless you changed Motion sensors in site settings

It can

  • Measure turning speed on three axes
  • Move a 3D view or game as you turn the phone
  • Help recognise your device through small sensor quirks

It cannot

  • Run in Firefox or Safari, which do not support it
  • Run at full speed; browsers cap the rate to limit eavesdropping on speech
  • Show a prompt in Chrome; there is none by default
  • Measure turning while the page is closed

How it differs between platforms: Chrome, Edge and Samsung Internet support it. Safari and Firefox do not.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported672018-05-29None
EdgeSupported792020-01-15None
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported672018-05-31None
Samsung InternetSupported9.02018-09-15None

How a site asks for it

APInew Gyroscope({frequency})
Permission namegyroscope
Permissions policygyroscope
Browser compat keysapi.Gyroscope
How access is grantedprompt
What the user seesChromium shows no bubble: access follows the Motion sensors site setting (default Allow) plus the Permissions API name. Safari and Firefox do not ship the API.
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
How long it lastsSite setting Allow or Block per origin
How to take it backchrome://settings/content/sensors; Permissions API 'change' event
Inside an iframeCross-origin iframes blocked unless allow="gyroscope"; page must be focused and visible

Typical flow

  1. Check isSecureContext and Permissions Policy
  2. Construct the sensor with {frequency: 60}
  3. sensor.start()
  4. 'reading' events fire; 'error' event on NotAllowedError or NotReadableError

Data you get

What comes back: Sensor readings at the requested frequency
Shape: event
How often: up to 60 Hz (Chrome caps frequency)

FieldTypeUnitRangePrecision
x, y, zfloatradians per secondabout -35 to 35 (hardware)about 0.001
frequencyfloatHz1 to 60 (Chrome cap)1 Hz

Technical limits

  • 60 Hz cap mitigates the audio side channel
  • No readings while hidden

The story

What it is

The page reads how fast your device is turning.

For you

You twist your phone and a game camera turns, or a 360 photo spins. On many phones there is no big prompt. The sensor can also pick up tiny sounds from nearby speech.

For makers

Makers use it for smooth camera control in 3D and AR. Trackers can use sensor quirks to recognize a phone, and research showed it can eavesdrop on speech nearby.

Where you see it

TypeExampleApps
gamesA browser first person game or 3D viewer turns the camera as you turn your phone.Sketchfab
ar-vrA web AR try on page uses turning speed to keep models fixed in place.8th Wall
mediaA 360 degree video pans smoothly as you twist your phone.YouTube 360
mapsA web map turns as you turn, with smooth compass behavior.None named
securityResearchers showed a page could pick up speech through gyroscope vibration, an eavesdropping risk.None named
analyticsA fingerprinting script uses tiny gyro errors to recognize one phone among millions.None named

Risks

  • Can eavesdrop on speech
  • Fingerprints devices

What the platform says

Good uses and abuse

Legitimate uses

  • Camera stabilisation
  • VR head tracking

Known abuse

  • Device fingerprinting by sensor bias
  • Speech eavesdropping at higher rates

Scores

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bits4Rough identifying entropy, when known

History

  • 2014-08, paper n/a: Gyrophone shows speech recovery from gyroscope sampled near 200 Hz
  • 2018-05, Chrome 67: Gyroscope ships

Sources

How well checked: Based on official documentation.

On this page