Replies: 2 comments
-
Currently client hints spec doesn't include vendor information, but the spec is not final, thus we still have no plan to accomodate the mentioned feature. // I haven't try this actually, but if we unreduce the user-agent first
// and then parse as usual, maybe it will give different result?
import { UAParser } from 'ua-parser-js';
import { unfreezeUA } from 'ua-unfreeze-js';
unfreezeUA().then(newUA => console.log(UAParser(newUA).device.vendor)); |
Beta Was this translation helpful? Give feedback.
0 replies
-
In the meantime you can also use const { device } = await UAParser().withClientHints();
if (!device.vendor && device.model) {
device.vendor = getDeviceVendor(device.model);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently on Chrome with Reduced User Agent, even withClientHints() result, we are not getting the device.vendor field. For example, a Samsung phone would return with the model number SM-xxxx, but without the vendor field set to "SAMSUNG".
Do we plan to make this available for 2.0 stable?
Beta Was this translation helpful? Give feedback.
All reactions