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

Add step by step instructions on finding your device's info #9

Merged
merged 1 commit into from
May 23, 2017

Conversation

jsantell
Copy link
Contributor

I think this will clear up a lot of issues in webvr-polyfill of people wanting to add their own devices to dpdb, as well as reference for those wanting to add locally.

A sanity check on the bezel width math would be appreciated as well!

README.md Outdated

```json
{
"type":"android",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we run this through JSON.stringify(JSON.parse(…)) to properly format spaces?

README.md Outdated

* `type`: Either `"android"` or `"ios"`.
* `rules`: An array of various rules that must be satisfied in order to use the configuration. Each rule is an object with one property and can be one of the following:
* `ua`: The user agent string to match. Go to [useragentstring.com] and find something unique that looks like the device's name. Use this if type is `"android"`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you indent this by 4 spaces so it's properly indented on GitHub?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user agent string -> User-Agent string

README.md Outdated
* `rules`: An array of various rules that must be satisfied in order to use the configuration. Each rule is an object with one property and can be one of the following:
* `ua`: The user agent string to match. Go to [useragentstring.com] and find something unique that looks like the device's name. Use this if type is `"android"`.
* `res`: An array of resolution values as width and height. Use this if type is `"ios"`.
* `mdmh`: The make and model of the device. Currently unused in [webvr-polyfill], and used for native devices(?) -- see other entries.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(?) - can we confirm this with someone?

README.md Outdated
* `ua`: The user agent string to match. Go to [useragentstring.com] and find something unique that looks like the device's name. Use this if type is `"android"`.
* `res`: An array of resolution values as width and height. Use this if type is `"ios"`.
* `mdmh`: The make and model of the device. Currently unused in [webvr-polyfill], and used for native devices(?) -- see other entries.
* `dpi`: An array of the DPI values of the screen as `[x, y]` values. Get this information via [Device Info App] and look for `Actual DPI X` and `Actual DPI Y` values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

via [Device -> via the [Device

README.md Outdated
* `ac`: Currently unused in [webvr-polyfill]?
* `bw`: The bezel width in millimeters. 3 and 4 are common bezel widths, but you can calculate the exact width using this formula, where `deviceWidth` is in millimeters, `screen` is the screen's diagonal length in millimeters, and `ratio` is the screen resolution's `width / height`:

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add set as

```js

@jsantell
Copy link
Contributor Author

@cvan Made all the changes -- asking around about the mdmh and ac values, although atleast for now they are not used in webvr-polyfill

Copy link
Contributor

@cvan cvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me

@cvan cvan merged commit e57357e into immersive-web:master May 23, 2017
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.

2 participants