Pixi.js: It seems that user-agent strings will be deprecated, perhaps this will affect isMobile & PixiJS

Created on 30 Jan 2020  路  11Comments  路  Source: pixijs/pixi.js

Most helpful comment

Closing now, since that pr i mentioned is now merged, and investigations into other areas of code reveal that pixijs wouldn't stop working if the user agent went away

All 11 comments

Can you explain why you closed the ticket?

PixiJS uses isMobile, right?

I think the ticked should stay open until the issue has been resolved.

We might consider in the future not having Pixi do any platform sniffing. And where it does make sense, we should try to do feature detection (like we do for webgl). Instead, we could expose more environment settings users and toggle for their particular situation.

Also pixi doesn't work in older Safari versions (iPad 3-) anymore, only because of ismobilejs. See https://github.com/kaimallea/isMobile/issues/115

@bigtimebuddy Thanks for re-opening this ticket!

We might consider in the future not having Pixi do any platform sniffing. And where it does make
sense, we should try to do feature detection

Sounds great!

I hope my demos won't be broken by the browser changes that affect PixiJS ...
eg
https://tobireif.com/demos/swirls/
and
https://tobireif.com/demos/merry_christmas/

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I think this ticket is still relevant.

According to https://groups.google.com/a/chromium.org/forum/m/#!msg/blink-dev/-2JIRNMWJ7s/yHe4tQNLCgAJ the proposed change won't occur until 2021 at the earliest.

@themoonrat ... and until then this ticket is still relevant, right?

I do appreciate this being raised, it's been useful to read what Google might be up to!

Looking through our code, even if the user agent went away to replaced by a blank string, I don't see any of our usages of userAgent, either directly or via isMobile, that would stop PixiJS from working. There are a few things that help tweak performance for a android or ios (which can be overridden by the user via settings anyway), and a couple of things to try and help with accessibility, but in each case there is a fallback that pretty much no-one would notice occuring.

There's one tiny tweak I'll PR in case the version of Android or iOS disappears from the user agent .. but even if that wasn't done, it'd just be reverting to v4 behaviour. Once that's in, I think this issue can be closed

Sounds great!

Closing now, since that pr i mentioned is now merged, and investigations into other areas of code reveal that pixijs wouldn't stop working if the user agent went away

Was this page helpful?
0 / 5 - 0 ratings