Skip to content

Instantly share code, notes, and snippets.

@mattdsteele
Last active October 30, 2016 12:18
Show Gist options
  • Select an option

  • Save mattdsteele/5615925 to your computer and use it in GitHub Desktop.

Select an option

Save mattdsteele/5615925 to your computer and use it in GitHub Desktop.
Quirks in DeviceOrientation API

Nexus S, Android 4.1.1

Firefox Beta 22.0

  • Alpha increases when rotating device clockwise
  • Alpha is at 0° when device is exactly south

Chrome Beta 27.0.1453.90

  • Alpha increases when rotating device counterclockwise
  • Alpha is at 0° when device is approximately south

Android Browser 4.1.1

  • Alpha increases when rotating device counterclockwise
  • Alpha is at 0° when device is exactly east

Opera Mobile 12.1.4

  • Alpha increases when rotating device counterclockwise
  • Alpha is at 0° when device is exactly south

iPhone 5, iOS 6.1.4

Mobile Safari

  • Alpha increases when rotating device counterclockwise
  • Alpha is at 0° where the page loads
  • Includes webkitCompassHeading property, which is at 0° when device is north
  • webkitCompassHeading increases when rotating device clockwise

iPhone 4S, iOS 6.1.3

Chrome 26.0.1410.53

  • Same as iPhone 5 Mobile Safari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment