Chrome如何获取设备定位信息? [英] How does Chrome get device orientation information?

查看:602
本文介绍了Chrome如何获取设备定位信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在阅读关于Chrome能够获取设备方向信息( Engadget文章 WebKit Bugzilla archive )。一些问题:


  1. 是否有演示HTML5页面,显示使用此设备方向信息?它的工作平台是什么?


  2. 此设备方向信息可用于其他WebKit浏览器,如Safari吗?

  3. Chrome如何在不同平台上获取此信息?它是否会进行系统调用?代码分支中的哪个部分完成了?如果我想帮助在新的设备/操作系统/平台上提供此设备方向,我该如何提供帮助?

  4. >解决方案

这里是 Google的HTML5 SlideOrientation演示



另外,MacBook确实有一种加速计,称为突发运动传感器。它的目的是通过在突然加速的情况下保护硬盘来防止硬盘损坏。


I was reading about Chrome being able to get device orientation information (Engadget article, WebKit Bugzilla archive). Some questions:

  1. Is there a demo HTML5 page that shows off the use of this device orientation info? What platforms does it work on?

  2. Is this device orientation info available on other WebKit browsers like Safari?

  3. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆