-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conversation
README.md
Outdated
|
||
```json | ||
{ | ||
"type":"android", |
There was a problem hiding this comment.
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"`. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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`: | ||
|
||
``` |
There was a problem hiding this comment.
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
@cvan Made all the changes -- asking around about the |
There was a problem hiding this 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
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!