frontMostAppOrientation
Read interface orientation.
js
frontMostAppOrientation()Arguments
No arguments.
Returns
1 = portrait, 2 = portrait upside down, 3/4 = landscape.
Example
js
const orientation = frontMostAppOrientation();
console.log(orientation === 3 || orientation === 4);Also available as
getDeviceOrientation.