The screen orientation API enables setting allowed screen orientations on a page level. Specifically, it may be used to lock the screen's orientation, regardless of the position of the device.
Please refer to the table below for a detailed list of orientation combinations supported by each of the device platforms.
The screen orientation API contains the following:
Abstraction/Class | Methods | Description |
---|---|---|
ScreenOrientation |
Consists of the screen orientation object. The object can be accessed using the |
|
setAllowed | Enables to set the allowed screen orientation settings to the
|
The following table lists orientation combinations supported by each of the device platforms. Screen orientation settings are defined as follows:
pp - portrait
pd - portrait upside down
ll - landscape left
lr - landscape right
Combination | Android | iOS |
---|---|---|
pp | yes | yes |
pd | yes | yes |
ll | yes | yes |
lr | yes | yes |
pp, pd | yes*) | yes |
pd, ll | yes | |
ll, lr | yes | yes |
pp, ll | yes | |
pd, lr | yes | |
pp, lr | yes | |
pp, pd, ll | yes | |
pd, ll, lr | yes | |
pp, ll, lr | yes | |
pp, pd, lr | yes | |
pp, pd, ll, lr | yes | yes |
*) May not work on some devices.
**) Has no effect on currently available devices.