Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable motion detection by default on desktop #26

Closed
wants to merge 1 commit into from

Conversation

zpao
Copy link

@zpao zpao commented Jul 6, 2012

This isn't perfect, but it changes how Plax works by default on desktop.
Previously it would always be enabled if the browser supported it
(Firefox only?). Now it will be disabled unless you explicitly allow
desktop support. Detection is done by detecting 'ontouchstart' which is
only on mobile (for now).

This isn't perfect, but it changes how Plax works by default on desktop.
Previously it would always be enabled if the browser supported it
(Firefox only?). Now it will be disabled unless you explicitly allow
desktop support. Detection is done by detecting 'ontouchstart' which is
only on mobile (for now).
@zpao
Copy link
Author

zpao commented Jul 6, 2012

This is causing a bad behavior with Firefox 14+ on desktop where motion detection is triggered because window.DeviceMotionEvent exists if we can use the accelerometer (may need MBP, my MBA didn't trigger). The result is a "Tatooine earthquake" on Github's 404 pages (see https://bugzilla.mozilla.org/show_bug.cgi?id=768634)

@dougt
Copy link
Contributor

dougt commented Jul 6, 2012

I'd hate to see that you can not depend on the existing of .DeviceMotionEvent. You can instead just use a low pass filter to filter out the noise.

@dougt
Copy link
Contributor

dougt commented Jul 6, 2012

@dougt
Copy link
Contributor

dougt commented Jul 6, 2012

fwiw, i created a pull request for that patch.

@cameronmcefee
Copy link
Owner

Closing since this is irrelevant to the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants