Chrome如何获取设备定位信息? [英] How does Chrome get device orientation information?
问题描述
我在阅读关于Chrome能够获取设备方向信息( Engadget文章, WebKit Bugzilla archive )。一些问题:
-
是否有演示HTML5页面,显示使用此设备方向信息?它的工作平台是什么?
-
此设备方向信息可用于其他WebKit浏览器,如Safari吗?
-
Chrome如何在不同平台上获取此信息?它是否会进行系统调用?代码分支中的哪个部分完成了?如果我想帮助在新的设备/操作系统/平台上提供此设备方向,我该如何提供帮助?
>解决方案
这里是 Google的HTML5 SlideOrientation演示
另外,MacBook确实有一种加速计,称为突发运动传感器。它的目的是通过在突然加速的情况下保护硬盘来防止硬盘损坏。
I was reading about Chrome being able to get device orientation information (Engadget article, WebKit Bugzilla archive). Some questions:
Is there a demo HTML5 page that shows off the use of this device orientation info? What platforms does it work on?
Is this device orientation info available on other WebKit browsers like Safari?
How does Chrome get this information on different platforms? Does it make system calls? Where in the code branch is this done? If I want to help provide this device orientation on a new device/OS/platform, how can I contribute?
Here's Google's HTML5 SlideOrientation demo
Also, MacBooks do have a type of accelerometer, called a Sudden Motion Sensor. It's purpose is to prevent hard drive damage by protecting the hard drive in the event of sudden acceleration.
这篇关于Chrome如何获取设备定位信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!