Blocking device rotation on mobile web pages
Is it possible to detect on my page, for example using Javascript, when user visit it using mobile device in portrait mode, and stop orientation changing when user rotate its phone to landscape? There is game on my page, optimized for portrait display only and I don't want it in landscape. New API's are developing (and are currently available)! screen.orientation.lock(); // webkit only and screen.lockOrientation("orientation"); Where "orientation" can be any of the following: portrait-primary - It represents the orientation of the screen when it is in its primary portrait mode. A screen is