How to distinguish 'p5 WEB' smartphone computer?

How to distinguish ‘p5 WEB’ smartphone computer?

  1. What you are currently using is a computer or mobile.
    Can I get device information?
  2. If it’s mobile, I want it to be fixed in portrait.
2 Likes

@GoToLoop

[Screen.orientation]
The orientation read-only property of the Screen interface returns the current orientation of the screen.

thank you for the reply. Is it correct to receive the information above? Is it correct that it cannot be fixed?

What do you mean by “it can’t be fixed”?
Just open a browser’s console and type in: screen.orientation

This is what I get from my laptop’s browser SlimJet:
ScreenOrientation {angle: 0, type: ‘landscape-primary’, onchange: null}

3 Likes

@GoToLoop

thank you so much.
I solved it.