Open danrossi opened 6 years ago
I see the device information stripped from my Pixel as well on Firefox 59. Has there been a change in UA strings in Firefox? @cvan
@jsantell FYI. I don't know what to say about this. They have removed the device name on purpose to sabotage. From what I gather this will make the browser more secure from spoofing ???
There's value in changing the user agent for privacy for sure; this might cause issues rendering WebVR experiences with the polyfill however.
A-Frame folks, have you noticed any issues in Firefox with the UA change? @dmarcos @ngokevin
Firefox for Android has never had the device name in the UA.
According to a commit ticket it did. It's falling back to a default setting. I'll try and work around it.
Huh, maybe the default device has been close enough for me on Firefox. @danrossi is the distortion incredibly off, or is it just seeing the console error?
I'm not too sure what is going on. But for me the entire cardboard display is not resizing correctly when going fullscreen. It's fine on Chrome / Samsung Internet. Maybe it's another issue altogether.
I found some possible methods to detect dpi ?
https://stackoverflow.com/questions/279749/detecting-the-system-dpi-ppi-from-js-css https://jsfiddle.net/pgLo6273/2/
function findFirstPositive(b, a, i, c) {
c=(d,e)=>e>=d?(a=d+(e-d)/2,0<b(a)&&(a==d||0>=b(a-1))?a:0>=b(a)?c(a+1,e):c(d,a-1)):-1
for (i = 1; 0 >= b(i);) i *= 2
return c(i / 2, i)|0
}
var dpi = findFirstPositive(x => matchMedia(`(max-resolution: ${x}dpi)`).matches)
Please close this if its not fixable. My fullscreen bug, was not device detection but because of some patched polyfill causing fullscreen events on the element not working. It needed it on the document.
useragent string is
In Chrome / Samsung Internet
SM-G950F is missing. therefore no device data gets detected.